Quote:
Originally posted by fireball_dolphonia
i made a ball system here it goes
// NPC made by Fireball
if (playerenters) {toweapons *Ball System;
}
if (playertouchsme) {
}
if(playersays(Show Balls))
say2 You have #v(balls) balls;
if(playersays(sell balls)){
playerrupees = playerrupees + balls * 2;
//to get 2 g for 1 ball
setstring balls,0;
balls = balls - (#v,balls);
}
|
uhh, that wont work well, so heres a better one:
NPC Code:
if (playerenters) {toweapons *Ball System;}
if(strequals(#c,Show Balls)&&playerchats)
{say2 You have #s(client.balls) balls.; }
if(strequals(#c,Sell Balls)&&playerchats){
players[0].rupees+=#v(strtofloat(#s(client.balls))*2);
//to get 2 g for 1 ball
setstring client.balls,0;
}
this is a better way of doing it