Thread: Script Help
View Single Post
  #2  
Old 06-08-2003, 04:16 PM
Deus_Sephiroth Deus_Sephiroth is offline
Registered User
Join Date: Jun 2003
Posts: 12
Deus_Sephiroth is on a distinguished road
Send a message via AIM to Deus_Sephiroth
Also for some reason my beer will not display until I exit and re enter the room. It should work here is the bartender part of the code.

NPC Code:

//Yellow Beer
//If the player says Buy Regular Beer and his rupees are greater
//than or equal to 5 then subtract 5 of his rupees and set
//the ybeershow flag
if (playersays(Buy Regular Beer) && playerrupees >=5){
playerrupees -5;
set ybeershow;
}

//If the player says Buy Regular Beer and his rupees are less
//than 5 then display the message Sorry You Dont Have
//Enough Rupees, then wait 3 seconds and clear the message.

if (playersays(Buy Regular Beer) && playerrupees <5){
message Sorry You Dont Have Enough Rupees;
sleep 3.0;
message ;
}



Now here is the actual Beer npc code
NPC Code:

//If ybeershow is true then show the beer npc
if (ybeershow){
show;
}
//If ybeershow is not true then hidethe beer npc
if (!ybeershow){
hide;
}
//If the player touches the beer replenish 5 hearts and then unset
// the ybeershow flag
if (playertouchsme) {
hurt -10;
unset ybeershow;
}


If there is somthing wrong please tell me so i can figure out what i did and not do it again lol
Reply With Quote