Nottinghster
Tibia World RPG Developer
- Joined
- Oct 24, 2007
- Messages
- 1,619
- Solutions
- 6
- Reaction score
- 539
- Location
- Brazil - Rio de Janeiro
- GitHub
- Nottinghster
Hello Guys!
I tried to create another example of boat npc to my Server and I can't make it work.
I don't know what the fuck I did wrong
Explaining:
When I say 'Thais' the npc ask if I want to travel and blah blah blah, when I say 'yes', he say that I don't have enough money
Here is the code:
I tried to create another example of boat npc to my Server and I can't make it work.
I don't know what the fuck I did wrong
Explaining:
When I say 'Thais' the npc ask if I want to travel and blah blah blah, when I say 'yes', he say that I don't have enough money
Here is the code:
Code:
if msgcontains(msg, 'thais') then
npcHandler:say('Do you seek a passage to Thais for 110 gold?')
talk_state = 1
elseif msgcontains(msg,'yes') and talk_state == 1 then
if isPremium(cid) == TRUE then
if hasCondition(cid, CONDITION_INFIGHT) == TRUE then
if getPlayerMoney(cid) >= 130 then
selfSay('Set the sails!')
doPlayerRemoveMoney(cid, 130)
doTeleportThing(cid, {x=32312,y=32211,z=6, stackpos=0})
doSendMagicEffect(getCreaturePosition(cid), 10)
end
else
npcHandler:say('You don\'t have enough money.')
end
else
npcHandler:say('First get rid of those blood stains! You are not going to ruin my vehicle!')
end
else
npcHandler:say('I\'m sorry, but you need a premium account in order to travel onboard our ships.')
end