PDA

View Full Version : rs2hd 562 ::buyspec command



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.

Break
June 18th, 2010, 16:54
Good job, When ever I will use 562 I will probably add this.
Btw: Thanks for the credits.

Aaron
June 18th, 2010, 16:56
Good Job for this command:)

crezzy
June 18th, 2010, 22:38
np :D

TehCow
June 18th, 2010, 22:50
Very nice bro!

XxBryantD
June 19th, 2010, 01:15
good job im useing now

Spear
June 19th, 2010, 01:17
Very nice.

finalpk
June 28th, 2010, 18:39
nice work

TehCow
June 28th, 2010, 19:17
It worked, just checked :p

Geo
June 29th, 2010, 03:06
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


and in commandpackethandler.java add



and in dialogueoptions.java add



70% credits to break
30% to me for converting it for rs2hd 562.

Or you could've just added special restore pots (not everyone's server is based off an economy using cash)

Aaron
June 29th, 2010, 03:36
It worked, just checked :p

Worked for me To, It's Beast, Tehcow!:D

Niator
July 14th, 2010, 20:34
Or you could've just added special restore pots (not everyone's server is based off an economy using cash)
Do you tink you could make a tut? THAT WOULD BE AWSOMEH! :D

Geo
July 14th, 2010, 20:49
Do you tink you could make a tut? THAT WOULD BE AWSOMEH! :D

yeah sure, i'll make one later, you could also just leech it from my source

posted it it's at:

Only the registered members can see the link.

Niator
July 15th, 2010, 12:41
yeah sure, i'll make one later, you could also just leech it from my source

posted it it's at:

Only the registered members can see the link.

Thanks man! You are really cool :D

Heroeswar
September 21st, 2010, 15:34
not working for me cant click on yes or no....

2kbarrows
September 21st, 2010, 22:12
No need for dialogue options or any of the Interface stuff...Still a nice code,might use it...