Divinerscape
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Divinerscape

Divinerscape beta 562 And 508
 
HomeGalleryLatest imagesSearchRegisterLog in
Caelum Base Making a command cost money Statusimg.php?ip=divinerscape.no-ip
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» Dota 6.78 Ai
Caelum Base Making a command cost money I_icon_minitimeTue Feb 18, 2014 5:14 am by chaunnef

» Autodata 3.38 Suomi Torrent
Caelum Base Making a command cost money I_icon_minitimeTue Feb 18, 2014 3:35 am by chaunnef

» Los Reyes De Arranque Puro Pinche Party Rar
Caelum Base Making a command cost money I_icon_minitimeFri Feb 14, 2014 5:51 pm by chaunnef

» SEVER NEEDS WORK!
Caelum Base Making a command cost money I_icon_minitimeSat Jun 16, 2012 11:48 am by mosf1415

» Keep spawning at falador??? when login with a new account
Caelum Base Making a command cost money I_icon_minitimeMon Aug 16, 2010 8:22 am by Jimmy300114

» How to Add Costum items (like agile and H'ween stuff)
Caelum Base Making a command cost money I_icon_minitimeSat Aug 14, 2010 8:35 am by Jimmy300114

» Making Npc's Talk???
Caelum Base Making a command cost money I_icon_minitimeSat Aug 14, 2010 6:02 am by Jimmy300114

» How do you Make Construction and Making G.e Work???
Caelum Base Making a command cost money I_icon_minitimeSat Aug 14, 2010 5:31 am by Jimmy300114

» omfg put the server on!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Caelum Base Making a command cost money I_icon_minitimeThu Aug 12, 2010 4:30 am by d3mons

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

 

 Caelum Base Making a command cost money

Go down 
2 posters
AuthorMessage
zeck
Owner
Owner



Posts : 27
Reputation : 3
Join date : 2010-01-17
Age : 33
Location : Florida

Caelum Base Making a command cost money Empty
PostSubject: Caelum Base Making a command cost money   Caelum Base Making a command cost money I_icon_minitimeWed Apr 28, 2010 8:44 pm

Ok here's another tutorial but this is for caelum base on how to make a command cost money.

Ok so the original command should look like this.
Code:

if (cmd[0].equals("::pots")) {
if (!player.SafeZone()) {
player.sm("You cant spawn items at wilderness/BountyHunter");
return;
}
player.getInventory().addItem(139, 1);
player.getInventory().addItem(2440, 1);
player.getInventory().addItem(2436, 1);
player.getInventory().addItem(2442, 1);
}

What you want to do is modify it so you looks like this, Seeing the coding should already give you a hint of how to do it.
Code:

if (cmd[0].equals("::pots")) {
if (!player.SafeZone()) {
player.sm("You cant spawn items at wilderness/BountyHunter");
return;
}
if (!player.getInventory().contains(995, 150000)){
player.sm("<col=000000>You need 100k gold to use this command.<col=000000>");
return;
}
player.sm("<col=000000>You just bought some potions for 100k<col=000000>");
player.getInventory().deleteItem(995, 150000);
player.getInventory().addItem(139, 1);
player.getInventory().addItem(2440, 1);
player.getInventory().addItem(2436, 1);
player.getInventory().addItem(2442, 1);
}

Ok and thats basically it. You can do that for anyitems for example dragon claws.
Original Command

Code:

if (cmd[0].equals("::claws")) {
if (!player.SafeZone()) {
player.sm("You cant spawn items at wilderness/BountyHunter");
return;
}
player.getInventory().addItem(14484, 1);
}

Here's the new and improved command.
Code:

if (cmd[0].equals("::claws")) {
if (!player.SafeZone()) {
player.sm("You cant spawn items at wilderness/BountyHunter");
return;
}
if (!player.getInventory().contains(995, 35000000)){
player.sm("<col=000000>You need 350m gold to use this command.<col=000000>");
return;
}
player.sm("<col=000000>You just bought a pair of dragon claws for 350m<col=000000>");
player.getInventory().deleteItem(995, 35000000);
player.getInventory().addItem(14484, 1);
}

And that's it hope this helps you in your furture coding.
Back to top Go down
https://divinerscape.forumotion.com
Chex

Chex


Posts : 4
Reputation : 0
Join date : 2010-06-15

Caelum Base Making a command cost money Empty
PostSubject: Re: Caelum Base Making a command cost money   Caelum Base Making a command cost money I_icon_minitimeTue Jun 15, 2010 8:21 pm

Nice tut i can use this Smile
Back to top Go down
 
Caelum Base Making a command cost money
Back to top 
Page 1 of 1
 Similar topics
-
» Caelum Base how to make ::item command for mods only
» 562 rs2hd caelum's base adding shops
» Adminpoints, Modpoints, Removepoints (Atomic Base)
» Making Npc's Talk???
» 562 Making objects work

Permissions in this forum:You cannot reply to topics in this forum
Divinerscape :: Html, C++, Java, Server Tutorials-
Jump to: