instead of tweaking around with the .txt file, look into the actual class file(s) that handle that .txt. it'll tell you a lot more, including the format itself, instead of just guessing how the lines are supposed to look.
|
So my server has a globaldrops.txt file where i can declare what I want for a global drop, the items spawn as global drops however when you try to "take" it, nothing happens
and idea what I'm doing wrong or missing so that the player can actually obtain an item out of clicking the globalitem? the globalitem.txt works in the sense of.
itemname(space)itemamount(space)itemX(space)itemY
instead of tweaking around with the .txt file, look into the actual class file(s) that handle that .txt. it'll tell you a lot more, including the format itself, instead of just guessing how the lines are supposed to look.
Sounds to me that your code only have set the visual but not the function behind it.
that makes more sense then telling me not to fiddle with the globaldrops.txt that handles the spawning of the item itself lmao, the problem isn't that it isn't showing up. the problem is that you can't grab the item once you click on it. there is no actual function declaring what item it will give and based off what from the looks of it. trying to figure out exactly where the file is being referenced as we speak but not understanding how to assign what its going to grab when a specific item is clicked, more guidance would be appreciated. love how the first reply is a snarky smart ass remark.
I was looking into the files and had gotten it to work for spawning the item, I figured that since the items were able to be spawned they would generally be able to be picked up as if it were a regular drop from an NPC however I have been proven wrong, I'm trying to decode the issue as we speak myself as well, so instead of being an asshole about it and trying to make yourself feel superior over others mistakes to boost post count actually provide some help or move on to another post have a great night.
Omelete do have a point though, that you should look into the class in which it is loading the configs from the txt file.
Because from that you can locate and see what methods are being used from these configs.
However depend on how your server is setup, you might need to add a method for your globalitemonground.
Not sure if anyone actually understands your problem, if your problem is that the item does drop from the npc and then when you click take on the item nothing happens (you can't pick it up) then a couple other good things to know would be is it this item only or all items? if it is this item alone is it a hard coded item? If it is hard coded be sure you have something like this:
If the item is not hard coded you could attempt to hard code it like above to be sure take is in the right slot however depending on your source that is most likely not the problem and you'd need to look into the the class that handles the taking of ground items. Which if it is a problem there then it wouldn't let you pick up any items from the ground. Try to provide more information, you start off with talking about a class that is irrelevant to your issue unless i don't get your issue.Code:case -1: //item id (id used to spawn the item/etc) itemDef.name = "Item Name"; itemDef.description = "Item description."; itemDef.groundActions = new String[] { null, null, "Take", null, null }; //be sure to leave take as the 3rd option //unless your server handles it differently. break;
wat.... if you are missing the function.. then add it? it gets the clicked ground item from the client... not the text file... that just tells the server where to spawn ground items, or you are obv not sending the ground items properly, packet 236 handles picking up ground items btw
Code:public void buildPacket(ByteBuffer buf) { buf.putOpcode(236); buf.writeUnsignedWordBigEndian(val1); buf.putShort(nodeId); buf.writeUnsignedWordBigEndian(val2); }and creating a ground item uses packet 44 and deleting uses 156Code:final int y = packet.readLEShort(); final int itemId = packet.readShort(); final int x = packet.readLEShort();
The problem is that it’s not an npc drop it’s a globally spawned item such as spades and tinder boxes in osrs. The item itself spawns to the ground and in the itemdef there is a statement that declares its ground functions, however when the ground function is clicked to “take” the item, the client doesn’t process I’ve attempted to pick up the item and associate it with the appropriate c.getitems().additems Clause. It just doesn’t do anything. I had figured it would function the same as an npc drop and the ability to pick them up would work the same way which is why I posted this as now I’m lost as to where the function is actually used.
I see the comment above referencing packets. I’ll have to look into that more but thanks for the guideance
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |