Alright ill take a look but i have been trying to change in requestduel where it resets your items once you request then realized i wasted my time thanks for help
I found where it open its here: But everything i have tried has failed. It will probably work where it won't let you accept another duel while in the duel screen but i am not sure how i can make it do that.
Code:
public void requestDuel(int id) {
try {
if (id == c.playerId)
return;
resetDuel();
resetDuelItems();
c.duelingWith = id;
Client o = (Client) Server.playerHandler.players[id];
if(o == null) {
return;
}
c.duelRequested = true;
if(c.duelStatus == 0 && o.duelStatus == 0 && c.duelRequested && o.duelRequested && c.duelingWith == o.getId() && o.duelingWith == c.getId()) {
if(c.goodDistance(c.getX(), c.getY(), o.getX(), o.getY(), 1)) {
c.getTradeAndDuel().openDuel();
o.getTradeAndDuel().openDuel();
c.sendMessage("REMEMBER Dueling is glitchy report any glitch on the topic under announcements");
} else {
c.sendMessage("You need to get closer to your opponent to start the duel.");
}
} else {
c.sendMessage("Sending duel request...");
o.sendMessage(c.playerName+":duelreq:");
}
} catch (Exception e) {
Misc.println("Error requesting duel.");
}
}