Estou aqui pra fazre um pedido relacionado a npc travel !!
NPC
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'ticket')) then
if getPlayerMoney(cid) >= 500 then
selfSay('You want to buy 1 travel ticket?, it cost 5 dollars', cid)
talkState[talkUser] = 1
else
selfSay('You don\'t have enough money, it cost 5 dollars.', cid)
end
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
if doPlayerRemoveMoney(cid, 500) == TRUE then
setPlayerStorageValue(cid, 4592, 1)
selfSay('Here is your ticket, it can not be transfere, when you have used the ticket at the boat, it can not be used again, go to the boat to use it.', cid)
end
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Eu queria que o cara que for usa este npc ele tem que este com o pokemon dentro da ball !!
q quem for mi ajuda se possivelmente puter posta a linha pois tem +3 npcs assim dai eu ia adicionar nos outros 3 ^^
Curti++