Thread: dropped item names. (lootshare)

Results 1 to 8 of 8
  1. #1 dropped item names. (lootshare) 
    Registered Member
    Join Date
    Mar 2012
    Posts
    413
    Thanks given
    58
    Thanks received
    19
    Rep Power
    11
    hey guys thanks for taking the time to read this.
    i have seen a few posts about people trying to get rare drops to be announced over the server, but nobody has posted any kind of release.
    well i got it to work but for some reason when the items are dropped and its a rare one, it just states
    "***** has received a tool kit.
    its doing it for all rare drops, any idea's why?

    Code:
    c2.sendMessage(c.playerName + " has received a " + server.model.items.Item.getItemName(item) + ".");
    thanks!
    Reply With Quote  
     

  2. #2  
    Dark-Perfection Owner

    Join Date
    Jun 2012
    Posts
    485
    Thanks given
    51
    Thanks received
    45
    Rep Power
    22
    How are the item names loaded/readed? from the item.cfg file or client sided?

    If it is item.cfg make sure the item is in there...

    This will probably fix nothing but you never know...
    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Mar 2012
    Posts
    413
    Thanks given
    58
    Thanks received
    19
    Rep Power
    11
    its just loading of the basic pi lootshare system for the rate drops which i beleive is npcdrops.tsm
    (drop rarity)
    goal is to make it so when lootshare is active it will say to all players
    lootshare being the choice if you want to tell the players what u got.
    Reply With Quote  
     

  4. #4  
    Dark-Perfection Owner

    Join Date
    Jun 2012
    Posts
    485
    Thanks given
    51
    Thanks received
    45
    Rep Power
    22
    Yes the itemid is loaded/readed from npcdrops.tsm but the itemname isnt?

    U first need to know how it checks the item name then u atleast know where to search
    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Mar 2012
    Posts
    413
    Thanks given
    58
    Thanks received
    19
    Rep Power
    11
    well it works prior to me changing it. this is before and after.
    Code:
    	public void sendLootShareMessage(int clanId, String message) {
    		if (clanId == 0) {
    			for (int j = 0; j < clans[clanId].members.length; j++) {
    				if (clans[clanId].members[j] <= 0)
    					continue;
    				if (Server.playerHandler.players[clans[clanId].members[j]] != null) {
    					Client c2 = (Client)Server.playerHandler.players[clans[clanId].members[j]];
    					c2.sendClan("Lootshare", message, clans[clanId].name, 2);
    				}
    			}
    		}
    		}
    Code:
    public void handleLootShare(Client c, int item, int amount) {
    		sendLootShareMessage(c.clanId, c.playerName + " has received " + amount + "x " + server.model.items.Item.getItemName(item) + ".");	
    	}
    ^ standard lootshare.

    after editing.
    Code:
    	public void sendlootsharemessage(Client c, int clanId, int item) {
    			for (int j = 0; j < PlayerHandler.players.length; j++) {
    			if (PlayerHandler.players[j] != null) {
    				Client c2 = (Client) PlayerHandler.players[j];
    				if(clanId >= 0) {
    				//c2.sendMessage(c.playerName + " has received a" + server.model.items.Item.getItemName(item) + "."); 
    				c2.sendMessage(c.playerName + " has received a " + c.getItems().getItemName(item) + ".");	//tryed somthing else didnt work.		
    				}
    			}
    		}
    	}
    i combined both together and took out what was not needed the first code states the correct name second code always says tool kit.

    thanks for responding aswel
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    Sep 2012
    Posts
    1,038
    Thanks given
    193
    Thanks received
    123
    Rep Power
    0
    Quote Originally Posted by qpanel View Post
    well it works prior to me changing it. this is before and after.
    Code:
    	public void sendLootShareMessage(int clanId, String message) {
    		if (clanId == 0) {
    			for (int j = 0; j < clans[clanId].members.length; j++) {
    				if (clans[clanId].members[j] <= 0)
    					continue;
    				if (Server.playerHandler.players[clans[clanId].members[j]] != null) {
    					Client c2 = (Client)Server.playerHandler.players[clans[clanId].members[j]];
    					c2.sendClan("Lootshare", message, clans[clanId].name, 2);
    				}
    			}
    		}
    		}
    Code:
    public void handleLootShare(Client c, int item, int amount) {
    		sendLootShareMessage(c.clanId, c.playerName + " has received " + amount + "x " + server.model.items.Item.getItemName(item) + ".");	
    	}
    ^ standard lootshare.

    after editing.
    Code:
    	public void sendlootsharemessage(Client c, int clanId, int item) {
    			for (int j = 0; j < PlayerHandler.players.length; j++) {
    			if (PlayerHandler.players[j] != null) {
    				Client c2 = (Client) PlayerHandler.players[j];
    				if(clanId >= 0) {
    				//c2.sendMessage(c.playerName + " has received a" + server.model.items.Item.getItemName(item) + "."); 
    				c2.sendMessage(c.playerName + " has received a " + c.getItems().getItemName(item) + ".");	//tryed somthing else didnt work.		
    				}
    			}
    		}
    	}
    i combined both together and took out what was not needed the first code states the correct name second code always says tool kit.

    thanks for responding aswel
    Amg I actually needed this lol.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Mar 2012
    Posts
    413
    Thanks given
    58
    Thanks received
    19
    Rep Power
    11
    lol really? didnt hav an old source around?
    yw
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Mar 2012
    Posts
    413
    Thanks given
    58
    Thanks received
    19
    Rep Power
    11
    bump still need :/
    Reply With Quote  
     


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. Changing NPC names item names & object names!
    By medabi3 in forum Tutorials
    Replies: 8
    Last Post: 05-24-2013, 07:36 PM
  2. Dropped Item [VIDEO]
    By Real Brandon in forum Help
    Replies: 6
    Last Post: 07-19-2012, 04:48 AM
  3. Item glitch when item is dropped
    By Paketa in forum Help
    Replies: 5
    Last Post: 11-30-2009, 03:36 AM
  4. everything above item id 11997 isnt dropped
    By owner blade in forum Help
    Replies: 0
    Last Post: 11-23-2009, 03:58 PM
  5. Replies: 0
    Last Post: 08-13-2009, 05:55 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •