Quote:
|
Originally Posted by SyLaTAC
ok im making a pizza shop and i need to figure out how to make an item that will work online all i have for it like all that i know is
NPC Code:
if (playerchats && strequals(#c,buy single)) {
if (playerrupees <=7) {
message you dont have enough money;
}
if (playerrupees >=7){
message Thank you!;
}
} {
thats all i have because i cant figure out how to make it
1) an item that does stuff
2) go into your inventory and take gralats away
will someone help me please?
|
Basically what you're saying is, if the player rupees is 7, then it will do both functions. In this case, it will do the latest function in the script. However this isn't exactly correct. Be sure to use one or the other.
Think about what you did:
playerrupees >= 7 (less then OR EQUAL to seven) "not enough money"
playerrupees <= 7 (greater then OR EQUAL to seven) "sold"
How could it be both?
Just for future reference when you get to more complex scripting. I think you should get into a habbit to doing this correctly so that they always work out right.