if (NPCHandler.npcs[j].HP <= 0) {
c.getPA().sendFrame126("Dead", 21111);
make it 'c2' and define it as players who are in the boat/minigame.
|
Got stuck atm, im correcting my pest control system, and i've got 2 problems which are really strange, i cant seem to fix.
1: Pest Control interface only works 100% for 1 player, For anyone else it just dosent update.
2: When the portals Die the Health Returns to 200 In the working Interface, The portals are not respawning, But if i throw and Else statement likeIt just nulls up, Any ideas from anyone?Code:if (NPCHandler.npcs[j].HP <= 0) { c.getPA().sendFrame126("Dead", 21111);
So i played around with it a bit more, and this worked, It said Dead when it killed the portal, But then it went back to 200 After another second. I think that has to do with the NPCHandler spawn timer So i think i'll be able to finish this error my self, here is the code for anyone who wants.
Any ideas about the other problem?Code:if (PlayerHandler.players[j].inPcGame()) { Client c = (Client) PlayerHandler.players[j]; for (j = 0; j < NPCHandler.npcs.length; j++) { if (NPCHandler.npcs[j] != null) { if ((NPCHandler.npcs[j].HP <= 0) && (playingGame = true)) { if (NPCHandler.npcs[j].npcType == 6142) c.getPA().sendFrame126("Dead", 21111); if (NPCHandler.npcs[j].npcType == 6143) c.getPA().sendFrame126("Dead", 21112); if (NPCHandler.npcs[j].npcType == 6144) c.getPA().sendFrame126("Dead", 21113); if (NPCHandler.npcs[j].npcType == 6145) c.getPA().sendFrame126("Dead", 21114); } else { if (NPCHandler.npcs[j].npcType == 6142) c.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21111); if (NPCHandler.npcs[j].npcType == 6143) c.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21112); if (NPCHandler.npcs[j].npcType == 6144) c.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21113); if (NPCHandler.npcs[j].npcType == 6145) c.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21114); } } } c.getPA().sendFrame126(""+c.pcDamage+"", 21115); c.getPA().sendFrame126("500", 21116); c.getPA().sendFrame126("Time Remaining: "+gameTimer+"", 21117); c.getPA().walkableInterface(21100); }
try this method if (PlayerHandler.players[j].inPcGame()) {
Client c = (Client) PlayerHandler.players[j];
for (j = 1; j < NPCHandler.npcs.length; j++) {
if (NPCHandler.npcs[j] != null) {
if ((NPCHandler.npcs[j].HP <= 0) && (playingGame = true)) {
if (NPCHandler.npcs[j].npcType == 6142)
c2.getPA().sendFrame126("Dead", 21111);
if (NPCHandler.npcs[j].npcType == 6143)
c2.getPA().sendFrame126("Dead", 21112);
if (NPCHandler.npcs[j].npcType == 6144)
c2.getPA().sendFrame126("Dead", 21113);
if (NPCHandler.npcs[j].npcType == 6145)
c2.getPA().sendFrame126("Dead", 21114);
} else {
if (NPCHandler.npcs[j].npcType == 6142)
c2.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21111);
if (NPCHandler.npcs[j].npcType == 6143)
c2.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21112);
if (NPCHandler.npcs[j].npcType == 6144)
c2.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21113);
if (NPCHandler.npcs[j].npcType == 6145)
c2.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21114);
}
}
}
c2.getPA().sendFrame126(""+c.pcDamage+"", 21115);
c2.getPA().sendFrame126("500", 21116);
c2.getPA().sendFrame126("Time Remaining: "+gameTimer+"", 21117);
c2.getPA().walkableInterface(21100);
}
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |