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...
|
|
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?
thanks!Code:c2.sendMessage(c.playerName + " has received a " + server.model.items.Item.getItemName(item) + ".");
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.
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); } } } }^ standard lootshare.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) + "."); }
after editing.
i combined both together and took out what was not needed the first code states the correct name second code always says tool kit.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. } } } }
thanks for responding aswel![]()
lol really? didnt hav an old source around?
yw![]()
bump still need :/
| « Delete pkp reward from funpk? | [pi] making npc give item to inventory when dies » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |
| Tags for this Thread |