Jump to content
  • 0
madman

duel arena challenging

Question

ok well im trying to add the duel arena to my 562 but for some reason i cant challenge i have put duel request in request.java compiled and did all that good stuff but still not working could any1 shoot me some ideas plz.
:D

Share this post


Link to post
Share on other sites

11 answers to this question

Recommended Posts

  • 0
lol
hey brandon

Share this post


Link to post
Share on other sites
  • 0
in actionsender.java search for "sendPlayerOption" without quotes.
then add a statement:

sendPlayerOption("Request Dual", #, false);

make the number whatever option you want. For example, follow is 2, trade with is 3.

thats how u make the option show up but idk how to make it send the dual request when u click it

***This does it when they log in so it doesnt really work, just an example

Share this post


Link to post
Share on other sites
  • 0
yeah it adds a request assistance but names change to duel request so now i just need to know how to make it a duel request

Share this post


Link to post
Share on other sites
  • 0
ok this is bugging the shit out of me making me pull my hair out lmao

Share this post


Link to post
Share on other sites
  • 0
in request.java do you have any methods for requesting a dual?

Share this post


Link to post
Share on other sites
  • 0
what would it look like im just seeing the same thing been looking over everything for hrs trying to find the reason but im not seeing anything
[code]
private Player player;
protected Player tradeReq = null;
protected Trade trade = null;
public Player duelReq = null;
protected DuelArena duel = null;

public Request(Player player) {
this.player = player;
}

public void requestDuel(Player other) {
try {
if (other.getRequests().duelReq == player) {
answerDuel(other);
} else {
player.getActionSender().sendMessage("Sending duel request...");
other.getActionSender().sendDuelReq(Misc.upper(player.getDisplayName()), "wishes to duel with you.");
duelReq = other;
}
} catch (Exception e) {
}
}

public void answerDuel(Player other) {
try {
if (duel != null) {
if (duel.getPlayer1() == other && duel.getPlayer2() == player) {
return;
}
if (duel.getPlayer2() == other && duel.getPlayer1() == player) {
return;
}
duel.close();
}
if (other.getRequests().duelReq == player) {
establishDuel(player, other);
} else {
requestDuel(other);
}
} catch (Exception e) {
}
}

private static void establishDuel(Player player, Player other) {
try {
DuelArena duel = new DuelArena(player, other);
player.getRequests().duel = duel;
other.getRequests().duel = duel;
} catch (Exception e) {
}
}

public boolean isDueling() {
return duel != null;
}

public void closeDuel() {
try {
if (duel != null) {
duel.close();
}
} catch (Exception e) {
}
}

public DuelArena getDuel() {
return duel;
}
[/code]
need new pair of eyes on this shit ^ Edited by madman

Share this post


Link to post
Share on other sites
  • 0
can some 1 give that code a look over and see if i need to add anything to it because i cant challenge ppl

Share this post


Link to post
Share on other sites
  • 0
[quote name='madman']what would it look like im just seeing the same thing been looking over everything for hrs trying to find the reason but im not seeing anything
[code]
private Player player;
protected Player tradeReq = null;
protected Trade trade = null;
public Player duelReq = null;
protected DuelArena duel = null;

public Request(Player player) {
this.player = player;
}

public void requestDuel(Player other) {
try {
if (other.getRequests().duelReq == player) {
answerDuel(other);
} else {
player.getActionSender().sendMessage("Sending duel request...");
other.getActionSender().sendDuelReq(Misc.upper(player.getDisplayName()), "wishes to duel with you.");
duelReq = other;
}
} catch (Exception e) {
}
}

public void answerDuel(Player other) {
try {
if (duel != null) {
if (duel.getPlayer1() == other && duel.getPlayer2() == player) {
return;
}
if (duel.getPlayer2() == other && duel.getPlayer1() == player) {
return;
}
duel.close();
}
if (other.getRequests().duelReq == player) {
establishDuel(player, other);
} else {
requestDuel(other);
}
} catch (Exception e) {
}
}

private static void establishDuel(Player player, Player other) {
try {
DuelArena duel = new DuelArena(player, other);
player.getRequests().duel = duel;
other.getRequests().duel = duel;
} catch (Exception e) {
}
}

public boolean isDueling() {
return duel != null;
}

public void closeDuel() {
try {
if (duel != null) {
duel.close();
}
} catch (Exception e) {
}
}

public DuelArena getDuel() {
return duel;
}
[/code]
need new pair of eyes on this shit ^[/QUOTE]
Well, one thing I see is this
[code]pla yer.getDisplayName()), "wishes to duel with you.");[/code]
should be this
[code]player.getDisplayName()), "wishes to duel with you.");[/code]
(you had a space in 'player')

Share this post


Link to post
Share on other sites
  • 0
that just and error on this end theres no space there when i edit

if you have any other ideas why i cant send a request plz leave it Edited by madman

Share this post


Link to post
Share on other sites

×