Thread: Script Help
View Single Post
  #10  
Old 06-09-2003, 01:04 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by mhermher
NPC Code:

if (playerchats&&strequals(#c,buy regular beer)) {
if (playerrupees >=5){
playerrupees -=5;
set ybeershow;
} else if (playerrupees<5) { < This "else if()" is not needed,just else would work fine...
say2 You need more money. < You forget to put a ";" here
}


This would be better..=)

NPC Code:

if (playerchats&&strequals(#c,buy regular beer)){
if (playerrupees >=5){
playerrupees -=5; set ybeershow; < I dont think this set is needed..but x.x'
} else
say2 You need at least 5 gralats;
}

__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote