Jump to content
  • 0
Darker

667/714 Dungeoneering Ladder

Question

Ok, so, what the f..., i did everything to the ladder works fine, buuut... look at that...

My point is, im trying to make the ladder work only 1 time per floor, so people dont keep clicking it for xp, created a boolean for that on player.java

[code]public boolean floordone;[/code]

Ok, going ahead to ObjectHandler.java

[code]} else if (id == 3784) {
if (player.floordone = true) {
player.sendMessage("You already voted to go ahead.");
return;
}
} else
if (player.floordone = false) {
player.getSkills().addXp(Skills.DUNGEONEERING, 833);
player.getDialogueManager().startDialogue("DungeonExit");
player.floordone = true;[/code]

What's wrong lol? can someone understand what im trying to do?

EDIT:

tried boolean:

[code]public boolean floordgdone = false;[/code]

I think its pretty much the same LOL Edited by Darker

Share this post


Link to post
Share on other sites

27 answers to this question

Recommended Posts

  • 0
i use this and it works for me.

[CODE] } else if (id == 3784) {
player.stopAll();
player.getInventory().reset();
player.getEquipment().reset();
player.getEquipment().refresh();
player.getInventory().refresh();
player.getSkills().addXp(24, 85000);
player.getAppearence().generateAppearenceData();
player.getPackets().sendGameMessage("<col=960000>You've completed the dungeon and earned 85000 dungeoneering experience");
player.getControlerManager().forceStop();[/CODE]
im sure there's much better ways but this 1 works for me also u have to add some imports.
:)
also if u messed with the other dung files you have to add more ect. it switches to the normal spellbook again and stuff Edited by Zoda

Share this post


Link to post
Share on other sites
  • 0
What does it exactly do? i dont see any teleports/destroydung/leavedung on your code :c can you explain what does it exactly does :)

On my view its like, reseting armors,inv and stuff, adding xp, and sending a message on the chat.

Share this post


Link to post
Share on other sites
  • 0
The 'else' should go after the bracket above, the one closing the 'if' statement.

Share this post


Link to post
Share on other sites
  • 0
i have another idea just give player point from killing boss

then if player got point >= 1 can go and send points = 0

well just do it :p

Share this post


Link to post
Share on other sites
  • 0
[quote name='Darker']What does it exactly do? i dont see any teleports/destroydung/leavedung on your code :c can you explain what does it exactly does :)

On my view its like, reseting armors,inv and stuff, adding xp, and sending a message on the chat.[/QUOTE]
If you haven't messed with ur dung files you should be teleported automaticly else you have to add a teleport in the code if you messed with them
it stops the dung controler also. Edited by Zoda

Share this post


Link to post
Share on other sites
  • 0
[code]} else if (id == 3784) {
if (player.floordone = true) {
player.sendMessage("You already voted to go ahead.");
return;
} else
if (player.floordone = false) {
player.getSkills().addXp(Skills.DUNGEONEERING, 833);
player.getDialogueManager().startDialogue("DungeonExit");
player.floordone = true;
}
}[/code]

Share this post


Link to post
Share on other sites
  • 0
[quote name='Hash'][code]} else if (id == 3784) {
if (player.floordone = true) {
player.sendMessage("You already voted to go ahead.");
return;
} else
if (player.floordone = false) {
player.getSkills().addXp(Skills.DUNGEONEERING, 833);
player.getDialogueManager().startDialogue("DungeonExit");
player.floordone = true;
}
}[/code][/QUOTE]

Yeah now its getting xp, but i can hit "No" option, click ladder again and it will keep giving xp, the boolean check at the top isnt working:

[code]if (player.floordone = true) {
player.sendMessage("You already voted to go ahead.");
return;[/code]

Share this post


Link to post
Share on other sites
  • 0
[quote name='Darker']Yeah now its getting xp, but i can hit "No" option, click ladder again and it will keep giving xp, the boolean check at the top isnt working:

[code]if (player.floordone = true) {
player.sendMessage("You already voted to go ahead.");
return;[/code][/QUOTE]

Make it send the boolean before starting the dialogue.

[code]} else if (id == 3784) {
if (player.floordone = true) {
player.sendMessage("You already voted to go ahead.");
return;
} else
if (player.floordone = false) {
player.getSkills().addXp(Skills.DUNGEONEERING, 833);
player.floordone = true;
player.getDialogueManager().startDialogue("DungeonExit");
}
}[/code]

Share this post


Link to post
Share on other sites
  • 0
getting those errors on server when clicking on the object:

[code]
java.lang.ArrayIndexOutOfBoundsException: 0
at com.rs.game.player.dialogues.DungeonExit.start(DungeonExit.java:13)
at com.rs.game.player.DialogueManager.startDialogue(DialogueManager.java:25)
at com.rs.net.decoders.handlers.ObjectHandler$1.run(ObjectHandler.java:751)
at com.rs.game.player.CoordsEvent.processEvent(CoordsEvent.java:54)
at com.rs.game.player.Player.processEntity(Player.java:695)
at com.rs.cores.WorldThread.run(WorldThread.java:32)[/code]

what the.. LOL

Share this post


Link to post
Share on other sites
  • 0
[quote name='Darker']getting those errors on server when clicking on the object:

[code]
java.lang.ArrayIndexOutOfBoundsException: 0
at com.rs.game.player.dialogues.DungeonExit.start(DungeonExit.java:13)
at com.rs.game.player.DialogueManager.startDialogue(DialogueManager.java:25)
at com.rs.net.decoders.handlers.ObjectHandler$1.run(ObjectHandler.java:751)
at com.rs.game.player.CoordsEvent.processEvent(CoordsEvent.java:54)
at com.rs.game.player.Player.processEntity(Player.java:695)
at com.rs.cores.WorldThread.run(WorldThread.java:32)[/code]

what the.. LOL[/QUOTE]

It has something to do with your dialogue, take a look at it.

Share this post


Link to post
Share on other sites

×