bump
|
Hi,
I've added a lootshare system but it prints totally different outcome of the drop, no idea why.
And in the npd dropping:Code:public void getLootShareMessage(Client c, int item, int amount) { sendLootShareMessage(c.clanId, Misc.optimizeText(c.playerName) + " received: " + amount + " " + Misc.optimizeText(engine.model.items.Item.getItemName(item)) + "."); }
any idea?Code:PrimaryGameEngine.itemHandler.createGroundItem(c, NPCDrops.NPC_DROPS[npc][1], npcs[i].absX, npcs[i].absY, NPCDrops.NPC_DROPS[npc][2], c.playerId); if (c.clanId >= 0) PrimaryGameEngine.clanChat.getLootShareMessage(c, NPCDrops.NPC_DROPS[npc][1], NPCDrops.NPC_DROPS[npc][2]); //BUGGED OUTCOME?? c.sendMessage(engine.model.items.Item.getItemName(NPC_DROPS[npc][1]) + NPC_DROPS[npc][2]); //REAL OUTCOME
of course i made it drop an item. The code was just a part of the dropping.Code:for(npc = 0; npc < NPCDrops.NPC_DROPS.length; npc++){ if(npcs[i].npcType == NPCDrops.NPC_DROPS[npc][0]) { if(Misc.random(NPCDrops.NPC_DROPS[npc][3]) == 0) { if (c.clanId >= 0) PrimaryGameEngine.clanChat.getLootShareMessage(c, NPCDrops.NPC_DROPS[npc][1], NPCDrops.NPC_DROPS[npc][2]); //BUGGED OUTCOME?? PrimaryGameEngine.itemHandler.createGroundItem(c, NPCDrops.NPC_DROPS[npc][1], npcs[i].absX, npcs[i].absY, NPCDrops.NPC_DROPS[npc][2], c.playerId); c.sendMessage(engine.model.items.Item.getItemName(NPC_DROPS[npc][1]) + NPC_DROPS[npc][2]); //REAL OUTCOME break; } } }
Haven't really messed with 317's lately, I may be wrong but try this:
Code:for(npc = 0; npc < NPCDrops.NPC_DROPS.length; npc++){ if(npcs[i].npcType == NPCDrops.NPC_DROPS[npc][0]) { if(Misc.random(NPCDrops.NPC_DROPS[npc][3]) == 0) { if (c.clanId >= 0) PrimaryGameEngine.clanChat.getLootShareMessage(c, NPCDrops.NPC_DROPS[npc][1], NPCDrops.NPC_DROPS[npc][2]); //BUGGED OUTCOME?? PrimaryGameEngine.itemHandler.createGroundItem(c, NPCDrops.NPC_DROPS[npc][1], npcs[i].absX, npcs[i].absY, NPCDrops.NPC_DROPS[npc][2], c.playerId); break; } } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |