Jump to content
  • 0
Sign in to follow this  
noobsai

Item script that generates random cashpoints

Question

Hi Im really noob in item scripting so i need help.

I make a new item called ticket and I want it to have a function that when used it will generate a cashpoint randomly from 20-50 points

(cashpoint from @cash command)

 

Thanks in advance :)

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

You should have told me before that, but I think the atcommand method does notify about the user's current cash.

 

If you want to get notified when using the #CASHPOINTS method, use this other code:

.@addition = rand(20,50);#CASHPOINTS += .@addition;announce "You've earned " + .@addition + " Cash Points. Your current total is " + #CASHPOINTS + " Cash Points.", bc_self;

Share this post


Link to post
Share on other sites
  • 0

You can simply use this on its code:

#CASHPOINTS += rand(20,50);

 

Or if you feel safer by using the atcommand:

atcommand "@cash " + rand(20,50);

Share this post


Link to post
Share on other sites
  • 0

please share. i'm interested :))

 

Just make your own item, and make sure its on use script is like this one:

.@addition = rand(20,50);#CASHPOINTS += .@addition;announce "You've earned " + .@addition + " Cash Points. Your current total is " + #CASHPOINTS + " Cash Points.", bc_self;

 

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.