View Single Post
  #21  
Old 10-02-2001, 03:15 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
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
Reply With Quote