Thread: Script Help
View Single Post
  #6  
Old 06-08-2003, 06:44 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
NPC Code:

if (playerchats&&strequals(#c,buy regular beer)) {
if (playerrupees >=5){
playerrupees -=5;
set ybeershow;
} else if (playerrupees<5) {
say2 You need more money.
}



NPC Code:

if (ybeershow){
show;
} else {
hide;
}
if (playertouchsme) {
hurt -10;
unset ybeershow;
}



Thats one way, if i was you i'd rather use putnpc.

NPC Code:

if (playerchats&&strequals(#c,buy regular beer)) {
if (playerrupees >=5){
playerrupees -=5;
putnpc2 x,y, { //dont remember if this line is correct.
if (playertouchsme) {
playerhearts+=5;
hurt 0;
}
}
else if (playerrupees<5) {
say2 You need more money.
}
}


__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote