Jump to content
  • 0
Sign in to follow this  
Cand4man

[PI] Duel Arena glitch

Question

Okay, so the glitch is When ever you win the winner stay at the duel arena while the losser gets teleported out, and the winner is stuck in the duel arena until the losser re-logs. Then the winner gets his price and gets teleported.

Any one got a clue how to fix it?

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Config

Add
Code:

public static final int DUELING_RESPAWN_X = 3362; // when dead in duel area spawn here
public static final int DUELING_RESPAWN_Y = 3263;
public static final int RANDOM_DUELING_RESPAWN = 5; // random coords

PlayerAssistant

ctrl+f
Code:

applyDead

Add
Code:

if(c.duelStatus <= 4) {
Client o = (Client) Server.playerHandler.players[c.killerId];
c.sendMessage("Oh dear you are dead!");
} else if (c.duelStatus != 6) {
c.sendMessage("You have lost the duel!");
PlayerSave.saveGame(c);
c.getPA().movePlayer
(Config.DUELING_RESPAWN_X
+ (Misc.random(Config.RANDOM_DUELING_RESPAWN)),
Config.DUELING_RESPAWN_Y
+ (Misc.random(Config.RANDOM_DUELING_RESPAWN)), 0);
}

ctrl+f
Code:

giveLife

Under (something like this)
Code:

if (c.pitsStatus == 1) {
movePlayer(2399, 5173, 0);
} else if(c.duelStatus <= 4) { // if we are not in a duel repawn to wildy
movePlayer(Config.RESPAWN_X, Config.RESPAWN_Y, 0);
c.isSkulled = false;
c.skullTimer = 0;
c.attackedPlayers.clear();
} else if (c.inFightCaves()) {
c.getPA().resetTzhaar();

Add
Code:

} else { // we are in a duel, respawn outside of arena
Client o = (Client) Server.playerHandler.players[c.duelingWith];
if(o != null) {
o.getPA().createPlayerHints(10, -1);
if(o.duelStatus == 6) {
o.getTradeAndDuel().duelVictory();
}
}
movePlayer(Config.DUELING_RESPAWN_X+(Misc.random(Config.RANDOM_DUELING_RESPAWN)), Config.DUELING_RESPAWN_Y+(Misc.random(Config.RANDOM_DUELING_RESPAWN)), 0);
if(c.duelStatus != 6) { // if we have won but have died, don't reset the duel status.
c.getTradeAndDuel().resetDuel();
}
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

×