dunno what im doingCode:public void resetTzhaar() { c.waveId = -1; c.tzhaarToKill = -2; c.tzhaarKilled = -2; movePlayer(2438, 5168, 0); }
|
RESOLVED
Hi I changed my fight caves it's just 1 wave with 2 jads, but after i kill the first 1 i teleport out.
these are the methods that it uses.
Code:public void handleJadDeath(int i) { Client c = (Client) PlayerHandler.players[npcs[i].spawnedBy]; c.getItems().addItem(19111, 1); c.sendMessage("Congratulations on completing the fight caves minigame!"); c.sendMessage("Your reward for your bravery is the TokHaar-Kal cape!"); c.getPA().resetTzhaar(); c.waveId = 300; }resettzhaar if neededCode:if (npcs[i].npcType == 2745) { handleJadDeath(i); }
how do i make it so i have to kill both before being teled out?Code:public void resetTzhaar() { c.waveId = -1; c.tzhaarToKill = -1; c.tzhaarKilled = -1; movePlayer(2438, 5168, 0); }
Thanks!
dunno what im doingCode:public void resetTzhaar() { c.waveId = -1; c.tzhaarToKill = -2; c.tzhaarKilled = -2; movePlayer(2438, 5168, 0); }
The best solution that I came up with for this problem would be using a simple counter.
It would look something like this(but not exactly):
I'll let you figure out the specifics.Code:if (npcs[i].npcType == 2745) { if (jadDeath == 2) handleJadDeath(i); jadDeath += (jadDeath < 2) ? 1 : -2; }
You're calling handleJadDeath when jad dies, but the server doesn't know whether it's the first death or second death, it just knows to execute that code when jad is killed.
just add it in player methode? jadkilled, and do as it gives +1 for ea jad kill and at 2 it will tele you out and reset? just a easy way to fix
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |