You don't need to add end statement if the if statement doesn't carry on lmfao.
You're obviously not calling the correct value and variable.
Code:
case 9178:
if (c.usingGlory)
c.getPA().startTeleport(Config.EDGEVILLE_X, Config.EDGEVILLE_Y, 0, "modern");
if (c.dialogueAction == 2)
c.getPA().startTeleport(3428, 3538, 0, "modern");
if (c.dialogueAction == 3)
c.getPA().startTeleport(Config.EDGEVILLE_X, Config.EDGEVILLE_Y, 0, "modern");
if (c.dialogueAction == 4)
c.getPA().startTeleport(3565, 3314, 0, "modern");
if (c.dialogueAction == 20) {
c.getPA().startTeleport(2897, 3618, 4, "modern");
}
if(c.dialogueAction == 100) {
c.getDH().sendDialogues(25, 946);
}
if (c.teleAction == 24) { //EDGE TELE
c.getPA().spellTeleport(3087,3497,0);
}
if (c.dialogueAction == 94) { // SUMMON DISMISS
c.updateRequired = true;
if(c.lastsummon > 0) {
c.firstslot();
for(int i = 0; i < 29; i++) {
Server.itemHandler.createGroundItem(c, c.storeditems[i], Server.npcHandler.npcs[c.summoningnpcid].absX, Server.npcHandler.npcs[c.summoningnpcid].absY, 1, c.playerId);
c.storeditems[i] = -1;
c.occupied[i] = false;
}
c.lastsummon = -1;
c.totalstored = 0;
c.summoningnpcid = 0;
c.summoningslot = 0;
c.sendMessage("Your BoB items have drop on the floor");
c.getPA().closeAllWindows();
} else {
c.sendMessage("You do not have a npc currently spawned");
}
}
break;
Use conventions. The code is not fixed you need to call dialogueAction 94.
If you use if statements like above then what you are doing is going through each one of them checking if the state is correct, unless you want to check for all of them then you're doing it right but I know this is wrong and I also know you didn't make this, Sanity just doesn't know basic Java.
You should make all the if statements continue as else if. Also braces are a must.
Code:
case 9178:
if (c.usingGlory) {
c.getPA().startTeleport(Config.EDGEVILLE_X, Config.EDGEVILLE_Y, 0, "modern");
} else if (c.dialogueAction == 2) {
c.getPA().startTeleport(3428, 3538, 0, "modern");
} else if (c.dialogueAction == 3) {
c.getPA().startTeleport(Config.EDGEVILLE_X, Config.EDGEVILLE_Y, 0, "modern");
} else if (c.dialogueAction == 4) {
c.getPA().startTeleport(3565, 3314, 0, "modern");
} else if (c.dialogueAction == 20) {
c.getPA().startTeleport(2897, 3618, 4, "modern");
} else if(c.dialogueAction == 100) {
c.getDH().sendDialogues(25, 946);
} else if (c.teleAction == 24) { //EDGE TELE
c.getPA().spellTeleport(3087,3497,0);
} else if (c.dialogueAction == 94) { // SUMMON DISMISS
c.updateRequired = true;
if(c.lastsummon > 0) {
c.firstslot();
for(int i = 0; i < 29; i++) {
Server.itemHandler.createGroundItem(c, c.storeditems[i], Server.npcHandler.npcs[c.summoningnpcid].absX, Server.npcHandler.npcs[c.summoningnpcid].absY, 1, c.playerId);
c.storeditems[i] = -1;
c.occupied[i] = false;
}
c.lastsummon = -1;
c.totalstored = 0;
c.summoningnpcid = 0;
c.summoningslot = 0;
c.sendMessage("Your BoB items have drop on the floor");
c.getPA().closeAllWindows();
} else {
c.sendMessage("You do not have a npc currently spawned");
}
}
break;