Thread: GlobalDrops.txt

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 GlobalDrops.txt 
    Registered Member
    Join Date
    Dec 2015
    Posts
    24
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    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
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Oct 2011
    Posts
    2,092
    Thanks given
    0
    Thanks received
    1,017
    Rep Power
    3468
    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.
    Reply With Quote  
     

  3. #3  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,701
    Thanks given
    170
    Thanks received
    285
    Discord
    Arch337#1337
    Rep Power
    591
    Sounds to me that your code only have set the visual but not the function behind it.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Dec 2015
    Posts
    24
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by arch337 View Post
    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.
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Oct 2011
    Posts
    2,092
    Thanks given
    0
    Thanks received
    1,017
    Rep Power
    3468
    Quote Originally Posted by setis View Post
    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.
    so you didn't bother checking to see if the function was actually there prior to posting this?

    Spoiler for p.s.:
    idk why you assumed it was a "snarky smart ass remark". i'd say you just have attitude problems lol. gl tho.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Dec 2015
    Posts
    24
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Omelete View Post
    so you didn't bother checking to see if the function was actually there prior to posting this?
    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.
    Reply With Quote  
     

  7. #7  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,701
    Thanks given
    170
    Thanks received
    285
    Discord
    Arch337#1337
    Rep Power
    591
    Quote Originally Posted by setis View Post
    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.
    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.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  8. #8  
    Extreme Member


    Join Date
    May 2016
    Age
    50
    Posts
    934
    Thanks given
    456
    Thanks received
    417
    Rep Power
    4981
    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:

    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;
    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.
    Reply With Quote  
     

  9. #9  

    trash



    mikan's Avatar
    Join Date
    Aug 2017
    Posts
    564
    Thanks given
    384
    Thanks received
    275
    Discord
    mikan#9999
    Rep Power
    1176
    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);
    	}
    Code:
    	final int y = packet.readLEShort();
    		final int itemId = packet.readShort();
    		final int x = packet.readLEShort();
    and creating a ground item uses packet 44 and deleting uses 156


    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Dec 2015
    Posts
    24
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    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
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. SpawnLog.txt
    By Simox in forum Tutorials
    Replies: 16
    Last Post: 05-13-2008, 05:25 PM
  2. Make the welcmessage read of a .txt file
    By SourDeeez in forum Tutorials
    Replies: 11
    Last Post: 12-02-2007, 04:19 AM
  3. loading updates from a .txt
    By Sub in forum Tutorials
    Replies: 2
    Last Post: 11-30-2007, 11:20 AM
  4. Replies: 13
    Last Post: 10-21-2007, 10:50 AM
  5. Load members from a .txt file!
    By James in forum Tutorials
    Replies: 0
    Last Post: 05-02-2007, 10:46 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •