Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

olá preciso que esse script não teleporte o player se ele estiver pk ou battle, ele será um npc de missão onde primeiro deve matar o monstro para depois sim poder ser teletransportado de volta ao inicio

Citar

local pos = {x=89, y=227, z=7}
 
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
 
function onCreatureAppear(cid)         npcHandler:onCreatureAppear(cid)         end
function onCreatureDisappear(cid)      npcHandler:onCreatureDisappear(cid)         end
function onCreatureSay(cid, type, msg)   npcHandler:onCreatureSay(cid, type, msg:lower())   end
function onThink()                  npcHandler:onThink()                  end
local talkState = {}
 
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, "yes") then
        if getPlayerStorageValue(cid,8000) <= 0 then
        if not isPlayerPzLocked(cid) then
            doSendMagicEffect(getThingPos(cid), 10)
            doPlayerAddItem(cid,2343,1)
            npcHandler:releaseFocus(cid)
            doTeleportThing(cid, pos)
            doSendMagicEffect(pos, 10)
            setPlayerStorageValue(cid,8000,1)
            selfSay("Take this for save me.", cid)
        else
            selfSay("Your Pz is Locked!", cid)
        end
        elseif getPlayerStorageValue(cid,8000) ~= 0 then
            selfSay("Sorry, You're not in this saga!", cid)
        end
    talkState[talkUser] = 0
    end
   return true
end
 
 
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo