in the npc dieing method
just put (psuedocode)
if (random(w/e) == 0)
dropClue
|
Hey, I am trying to make it so all the NPC's drop Clue Scrolls, Instead of adding 20 different Clue Scroll ID's to each NPC individually, I'm not sure what code I should be using but I'm pretty sure the code will be going in NPC.java, If anyone knows what I should do please post back to this thread to help me out, thanks.
in the npc dieing method
just put (psuedocode)
if (random(w/e) == 0)
dropClue
Hmm I don't get it
If you are using a PI source, just go into NPChandler.java and take a look at where it creates Summoning Charms drops. I'm sure if you take a look at it you'll start to understand.
I'm using Matrix 718 Base
Yer this isn't really help it's describing what the method type is, I'm having troubles on where to put it etc...
}Code:if(clueScrollDrop(c)) { Server.itemHandler.createGroundItem(c, getClueLevel(i), npcs[i].absX, npcs[i].absY,c.heightLevel, 1, c.playerId);
Code:public boolean clueScrollDrop(Client c) { int[] clues = { 2714, 2717, 2720, 2677, 2678, 2679, 2795, 3576, 3565 }; int count = 0; for(int clue : clues) { if(!c.getItems().playerHasItem(clue, 1) && !c.getItems().itemInBank(clue)) { count++; } } if(count == clues.length) { if (Misc.random(50) >= 47) { return true; } else { return false; } } return false; } public int getClueLevel(int i) { int npcCombatLevel = getNpcCombat(i); if(npcCombatLevel > 10 && npcCombatLevel < 45) { if(Misc.random(100) >= 93) return 2677; } else if(npcCombatLevel > 44 && npcCombatLevel < 90) { if(Misc.random(100) >= 95) return 2678; } else if(npcCombatLevel > 89) { if(Misc.random(100) >= 97) return 2679; } return -1; }
Looks good but where abouts shall I add this which file?
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |