I have made a shop where you can buy axe's and go chop some trees down.
then you can come back and sell your wood for a random amount of the day(well not exactly)
here is my script:
PHP Code:
function onPlayerEnters(){
this.num = random(3,20);
}
function onPlayerChats(){
if (player.chat == "/buy axe"){
if (player.rupees >= 500){
player.rupees -= 500;
addweapon(Axe);
player.chat = "I got an Axe!";
}
if (player.rupees < 500){
player.chat = "I need more rupees for that axe!";
}
}
if (player.chat == "/sell wood"){
clientr.woods -= 5;
player.rupees += this.num;
player.chat = "I sold 5 wood for "@this.num@" bucks!";
}
}
there is nothing wrong with it, i just dont want it to say:
I sold 5 wood for 13.457252421932 bucks!
cause thats just redonculous(re-donk-u-lus

)