local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
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
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
return false
end
storage = getPlayerStorageValue(cid,91003)
if msgcontains(msg, 'FALA') and storage == 0 then
selfSay('MSG AQUI')
talk_state = 1
elseif msgcontains(msg, 'yes') and talk_state == 1 then
if getPlayerItemCount(cid,6107) >= 1 and getPlayerItemCount(cid,6107) >= 1 and getPlayerItemCount(cid,6107) >= 1 and getPlayerItemCount(cid,6107) >= 1 then
doPlayerTakeItem(cid,6107,1)
doPlayerTakeItem(cid,6107,1)
doPlayerTakeItem(cid,6107,1)
doPlayerTakeItem(cid,6107,1)
doPlayerSendTextMessage(cid,19,"Quest 'SUA QUEST'.' completada.")
doSendMagicEffect(getPlayerPosition(cid),12)
setPlayerStorageValue(cid,91003,1)
selfSay('MSG de qualquer se naoquizer usar isso aki basta remover a linha')
talk_state = 0
else
selfSay('I knew that it was a lie! Where is it?')
end
------------------------------------------------ confirm no ------------------------------------------------
elseif msgcontains(msg, 'no') and (talk_state >= 1) then
selfSay('Ok than.')
talk_state = 0
end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
NPC acima e Movements abaixo
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE then
if getPlayerStorageValue(cid, 91003) == -1 then
doTeleportThing(cid,position)
else
doTeleportThing(cid,fromPosition)
end
end
return TRUE
end






info
Grupo: Campones
Registrado: 18/11/17
Posts: 2
Reputação: 0
Gênero: Masculino
programador que saiba mexer em ot xml, versão 8.0 menos
por favor entrar em contato whatsapp 011 94994 8216