crezzy
June 18th, 2010, 16:39
This is a really good command and the players love it thankz to break for realeasing his 525 one :)
well i converted it fully for 562 for me and who ever else uses rs2hd anyway
in commandspackethandler.java add
if (cmd[0].equals("::buyspec")) {
if (Location.wildernessLevel(player.getLocation()) > 1) {
player.sm("You cannot use this command while inside of the wilderness.");
return;
}
if (!player.getInventory().contains(995, 999999)){
player.sm("Sorry you need to have atleast 1m to use this.");
return;
}
player.getActionSender().sendChatboxInterface(228) ;
player.getActionSender().sendString("Do you wish to buy an energy special?", 228, 1);
player.getActionSender().sendString("Yes", 228, 2);
player.getActionSender().sendString("no", 228, 3);
}
and in commandpackethandler.java add
if (cmd[0].equals("buyspec")) {
if (Location.wildernessLevel(player.getLocation()) > 1) {
player.sm("You cannot use this command while inside of the wilderness.");
return;
}
if (!player.getInventory().contains(995, 999999)){
player.sm("Sorry you need to have atleast 1m to use this.");
return;
}
player.getActionSender().sendChatboxInterface(228) ;
player.getActionSender().sendString("Do you wish to buy an energy special?", 228, 1);
player.getActionSender().sendString("Yes", 228, 2);
player.getActionSender().sendString("no", 228, 3);
}
and in dialogueoptions.java add
case 228: //buy special interface
if (buttonId == 2) {
player.getActionSender().sendCloseChatboxInterface ();
player.getInventory().deleteItem(995, 1000000);
player.specialAmount = 100;
player.getActionSender().animateInterface(9827, 228, 2);
player.getActionSender().sendPlayerOnInterface(241 , 2);
player.sm("You buy special for one Mil Gold.");
} else if (buttonId == 3) {
player.getActionSender().sendCloseChatboxInterface ();
}
break;
70% credits to break
30% to me for converting it for rs2hd 562.
well i converted it fully for 562 for me and who ever else uses rs2hd anyway
in commandspackethandler.java add
if (cmd[0].equals("::buyspec")) {
if (Location.wildernessLevel(player.getLocation()) > 1) {
player.sm("You cannot use this command while inside of the wilderness.");
return;
}
if (!player.getInventory().contains(995, 999999)){
player.sm("Sorry you need to have atleast 1m to use this.");
return;
}
player.getActionSender().sendChatboxInterface(228) ;
player.getActionSender().sendString("Do you wish to buy an energy special?", 228, 1);
player.getActionSender().sendString("Yes", 228, 2);
player.getActionSender().sendString("no", 228, 3);
}
and in commandpackethandler.java add
if (cmd[0].equals("buyspec")) {
if (Location.wildernessLevel(player.getLocation()) > 1) {
player.sm("You cannot use this command while inside of the wilderness.");
return;
}
if (!player.getInventory().contains(995, 999999)){
player.sm("Sorry you need to have atleast 1m to use this.");
return;
}
player.getActionSender().sendChatboxInterface(228) ;
player.getActionSender().sendString("Do you wish to buy an energy special?", 228, 1);
player.getActionSender().sendString("Yes", 228, 2);
player.getActionSender().sendString("no", 228, 3);
}
and in dialogueoptions.java add
case 228: //buy special interface
if (buttonId == 2) {
player.getActionSender().sendCloseChatboxInterface ();
player.getInventory().deleteItem(995, 1000000);
player.specialAmount = 100;
player.getActionSender().animateInterface(9827, 228, 2);
player.getActionSender().sendPlayerOnInterface(241 , 2);
player.sm("You buy special for one Mil Gold.");
} else if (buttonId == 3) {
player.getActionSender().sendCloseChatboxInterface ();
}
break;
70% credits to break
30% to me for converting it for rs2hd 562.