Ir para conteúdo

xFaRe z

Membro
  • Registro em

  • Última visita

  1. o script e o seguinte... 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 crystalid = 9971 local storage = 9971 local getstorage = getPlayerStorageValue(cid, storage) local sorrymessage = "Desculpe, voce nao tem todos os gold ingot para completar as missoes..." local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'gold ingot') then if getstorage == 6 then npcHandler:say("Voce ja completou a quest", cid) elseif getstorage < 6 then npcHandler:say("Voce tem todos os gold ingot necessarios?", cid) talkState[talkUser] = 1 end elseif msgcontains(msg, 'quest') then if getstorage < 1 then npcHandler:say("Voce precisa de 25 {gold ingot} para comecar. encontre-os em {infernalist}.", cid) elseif getstorage == 1 then npcHandler:say("Voce esta na segunda parte e precisa de mais 25 gold ingot para continuar.", cid) elseif getstorage == 2 then npcHandler:say("Voce esta na terceira parte e precisa de mais 25 gold ingot para continuar.", cid) elseif getstorage == 3 then npcHandler:say("Voce esta na quarta parte e precisa de mais 25 gold ingot para continuar.", cid) elseif getstorage == 4 then npcHandler:say("Voce esta na quinta parte e precisa de mais 25 gold ingot para continuar.", cid) elseif getstorage == 5 then npcHandler:say("Voce esta na sexta e ultima parte missao e precisa de mais 25 gold ingot para acabar.", cid) elseif getstorage == 6 then npcHandler:say("Voce completou todas as missoes.", cid) end elseif msgcontains(msg, 'yes') then if talkState[talkUser] == 1 then if getstorage < 0 then if doPlayerRemoveItem(cid, crystalid, 25) == TRUE then npcHandler:say("Voce ja me deu 25 gold ingot . Agora irei precisar de mais {25}.", cid) setPlayerStorageValue(cid, storage, 1) doPlayerAddExp(cid, 1000) talkState[talkUser] = 0 elseif doPlayerRemoveItem(cid, crystalid, 1) == FALSE then npcHandler:say(sorrymessage, cid) talkState[talkUser] = 0 end elseif getstorage == 1 then if doPlayerRemoveItem(cid, crystalid, 25) == TRUE then npcHandler:say("Voce ja me deu 25 gold ingot . Agora irei precisar de mais {25}.", cid) setPlayerStorageValue(cid, storage, 2) doPlayerAddExp(cid, 2000) talkState[talkUser] = 0 elseif doPlayerRemoveItem(cid, crystalid, 5) == FALSE then npcHandler:say(sorrymessage, cid) talkState[talkUser] = 0 end elseif getstorage == 2 then if doPlayerRemoveItem(cid, crystalid, 25) == TRUE then npcHandler:say("Voce ja me deu 25 gold ingot. Agora irei precisar de mais {25}.", cid) setPlayerStorageValue(cid, storage, 3) doPlayerAddExp(cid, 3000) talkState[talkUser] = 0 elseif doPlayerRemoveItem(cid, crystalid, 7) == FALSE then npcHandler:say(sorrymessage, cid) talkState[talkUser] = 0 end elseif getstorage == 3 then if doPlayerRemoveItem(cid, crystalid, 25) == TRUE then npcHandler:say("Voce ja me deu 25 gold ingot. Agora irei precisar de mais {25}.", cid) setPlayerStorageValue(cid, storage, 4) doPlayerAddExp(cid, 4000) talkState[talkUser] = 0 elseif doPlayerRemoveItem(cid, crystalid, 10) == FALSE then npcHandler:say(sorrymessage, cid) talkState[talkUser] = 0 end elseif getstorage == 4 then if doPlayerRemoveItem(cid, crystalid, 25) == TRUE then npcHandler:say("Voce ja me deu 25 gold ingot. E por ultimo, irei precisar de mais {25}.", cid) setPlayerStorageValue(cid, storage, 5) doPlayerAddExp(cid, 5000) talkState[talkUser] = 0 elseif doPlayerRemoveItem(cid, crystalid, 15) == FALSE then npcHandler:say(sorrymessage, cid) talkState[talkUser] = 0 end elseif getstorage == 5 then if doPlayerRemoveItem(cid, crystalid, 25) == TRUE then npcHandler:say("Parabens ,para quer receber seus premios agora? Diga {yes}.", cid) setPlayerStorageValue(cid, storage, 6) doPlayerAddItem(cid, 12279, 1) doPlayerAddItem(cid, 2160, 50) doPlayerAddExp(cid, 15000) doPlayerAddItem(cid, 9933, 1) talkState[talkUser] = 0 elseif doPlayerRemoveItem(cid, crystalid, 25) == FALSE then npcHandler:say(sorrymessage, cid) talkState[talkUser] = 0 end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) esta dando o erro: [13/10/2014 21:12:31] [Error - LuaScriptInterface::loadFile] data/npc/scripts/missings/gold ingot.lua:109: 'end' expected (to close 'if' at line 42) near '<eof>' [13/10/2014 21:12:31] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/missings/gold ingot.lua [13/10/2014 21:12:31] data/npc/scripts/missings/gold ingot.lua:109: 'end' expected (to close 'if' at line 42) near '<eof>'
  2. xFaRe z respondeu ao post em um tópico de xFaRe z em Suporte Tibia OTServer
    Cara não funcionou ainda, vou disponibilizar o download do server com a respectiva database, muito obrigado por tentar me ajudar! Testa ai se conseguir me ajuda PF, preciso muito msm cara: https://www.mediafire.com/?jfbqpe8y25xpi75
  3. xFaRe z respondeu ao post em um tópico de xFaRe z em Suporte Tibia OTServer
    https://imageshack.us/i/iqGjTBg2p mesmo erro cara peguei um db zuada, nem vi mais preciso mt de ajuda cara o server lotou
  4. xFaRe z respondeu ao post em um tópico de xFaRe z em Suporte Tibia OTServer
    carai deletei todas, guilds, guilds_invite e bla bla bla e continua dando Error while executing query: near "AUTO_INCREMENT": syntax error aperto CTRL+E e do F9 e aparareçe --> Error while executing query: near "AUTO_INCREMENT": syntax error
  5. xFaRe z respondeu ao post em um tópico de xFaRe z em Suporte Tibia OTServer
    o seguinte erro: Error while executing query: near "AUTO_INCREMENT": syntax error
  6. xFaRe z respondeu ao post em um tópico de xFaRe z em Suporte Tibia OTServer
    Muito obrigado cara voc é fod... te amo <3 eiii aa maioria dos players nao conseguem.... CARA PEGOU, AI COMO OS CARA QUERIA CRIAR COM O MSM NOME E JA TAVA REGISTRADO NO SQL, EU DELETEI A ABA GUILD E IMPORTEI OUTRA AI EU MANDEI O COMANDO, MAIS AGORA N VAI MAIS ;(, OQ EU FAÇO? ME AJUDA CARA PF
  7. xFaRe z reagiu a uma resposta no tópico: !createguild não pega
  8. xFaRe z respondeu ao post em um tópico de xFaRe z em Suporte Tibia OTServer
    não é nada de script amigão, ta tudo ok. Certeza que e a database, mais n posso trocar, porque o ot ta on se quiser entra la e ve... provavelmente é algum comando que preciso executar lá sei la, n manjo de db
  9. xFaRe z postou uma resposta no tópico em Suporte Tibia OTServer
    Por favor estou com um OT on brutalot.servegame, e preciso muito de ajuda, quando o player diz !createguild, não acontece nd, n e problema na talkactions, nem no config.lua e eu n sei mexer em sqlite studio, o meu ot n e mysql, algume pode me ajudar????
  10. estou com o mesmo problema preciso de ajudar oque eu faço?
  11. Pena que sumona umonte, poderia clicar denovo e ele desaparecer , tem como?

Informação Importante

Confirmação de Termo