Bruno Maciel,
Peguei uma pequena linha do Script da Bike no PDA do Slicer.
Já que eu não entendo quase nada de Script, tente colocar isso no topo do comando, qualquer erro meu me corrija por favor.
@Edit
Não esqueça de fazer um Backup de seu arquivo!.







info
Grupo: Infante
Registrado: 27/08/11
Posts: 1.9k
Reputação: +85
Gênero: Masculino
Char no Tibia: Bruno Maciel
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++