Ir para conteúdo

Skydrowz

Membro
  • Registro em

  • Última visita

Solutions

  1. Skydrowz's post in (Resolvido)[Statues] Morar na cidade. was marked as the answer   
    function onUse(player, item) local townId = 4 local townName = Town(townId):getName() if player:getTown():getId() == townId then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Você já é morador desta cidade.") return false else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Parabéns! Você agora é morador de " .. townName .. ".") player:setTown(townId) player:getPosition():sendMagicEffect(CONST_ME_YELLOW_RINGS) end return true end  
    Agora vai.
    Desculpa, é que não tô testando. Tô fazendo de cabeça. xD
    São só erros de função mesmo. Sempre esqueço algumas...
  2. Skydrowz's post in (Resolvido)[NPC Barco] Não viaja. was marked as the answer   
    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 -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'cidada'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você deseja ir para Cidada em troca de 100 gps?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 100, destination = {x=414, y=1154, z=6} }) travelNode:addChildKeyword({'sim'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 100, destination = {x=414, y=1154, z=6} }) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'cidade'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você deseja ir para Cidade em troca de 150 gps?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 150, destination = {x=205, y=1069, z=6} }) travelNode:addChildKeyword({'sim'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 150, destination = {x=205, y=1069, z=6} }) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'cidadi'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você deseja ir para Cidadi em troca de 200 gps?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 200, destination = {x=1003, y=799, z=6} }) travelNode:addChildKeyword({'sim'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 200, destination = {x=1003, y=799, z=6} }) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'civade'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você deseja ir para Civade em troca de 150 gps?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 150, destination = {x=676, y=1407, z=6} }) travelNode:addChildKeyword({'sim'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 150, destination = {x=676, y=1407, z=6} }) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'cidadu'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você deseja ir para Cidadu em troca de 200 gps?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 200, destination = {x=1063, y=1062, z=6} }) travelNode:addChildKeyword({'sim'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 200, destination = {x=1063, y=1062, z=6} }) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'cidado'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você deseja ir para Cidado em troca de 150 gps?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 150, destination = {x=504, y=652, z=7} }) travelNode:addChildKeyword({'sim'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 150, destination = {x=504, y=652, z=7} }) -- Makes sure the npc reacts when you say hi, bye etc. npcHandler:addModule(FocusModule:new())  
    Já tentou assim? Geralmente keywords são escritos sem caixa alta.
  3. Skydrowz's post in (Resolvido)Hospedar site tibia was marked as the answer   
    Não... Primeiro você compra o domínio para o seu site, depois direciona sua VPS ao mesmo. Geralmente o direcionamento é feito pela própria empresa responsável pela sua VPS. Crie um ticket de suporte no site que hosteia sua VPS e peça para que redirecionem sua VPS ao seu domínio. Eles vão pedir sua conta e senha(pode confiar, eu mesmo já fiz) da GoDaddy para poder configurar alguns dados e pronto, sua VPS vai ser redirecionada.
     
  4. Skydrowz's post in (Resolvido)Duplicar Script TASK was marked as the answer   
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler)  local talkState = {} local quest = 76670 <!-- Alterei aqui para 76670, que seria a OUTRA storage de task --> local reward = 70000 <!-- Aqui você altera a reward --> 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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(not npcHandler:isFocused(cid)) then return false elseif msgcontains(msg, "ajudar") then npcHandler:say("Agradeco, por se empenhar em ajudar a vila, tenha cuidado {ok} ?", cid) talkState[talkUser] = 2 elseif msgcontains(msg, "ok") and talkState[talkUser] == 2 then npcHandler:say("Tenha cuidado nao se esforce muito!", cid) setPlayerStorageValue(cid, quest, 2) <!-- Aqui ele vai usar a storage que mudei lá em cima (76670) --> talkState[talkUser] = 0 elseif msgcontains(msg, "favor") then local str = getPlayerStorageValue(cid, quest) if(str < 2) then npcHandler:say("msg.", cid) talkState[talkUser] = 1 return true elseif(str == 2) then npcHandler:say("msg!", cid) elseif(str == 3) then npcHandler:say("msg.", cid) doPlayerAddItem(cid, 2148, 75) doPlayerAddExp(cid, 1300) doPlayerSendTextMessage(cid, 22, 'exp.') setPlayerStorageValue(cid, quest, 4) elseif(str == 4) then npcHandler:say("msg.", cid) end talkState[talkUser] = 0 end return TRUE end  npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())  
    Tenta assim.

Informação Importante

Confirmação de Termo