Postado Maio 23, 2018 7 anos Autor Em 22/05/2018 em 20:11, Sttorm disse: @peterson18 Então vamos fazer do jeito classico , XML > OUTFITS.XML , deixei a tag da outfit que você quer que ganhe assim <outfit id="2" quest="181654"> <list gender="0" lookType="137" name="Hunter"/> <list gender="1" lookType="129" name="Hunter"/> </outfit> Observe que quest é uma storage , que voce vai colocar respectivamente na script que te passarei : 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 local storage = 35678 -- monster kill | local sto = 24529 -- don't pick premio | ---- | Não mecha nessa gambiarra aqui , só certifique que nenhuma dessas storages sejam usadas em outros sistemas local rage = 24525 -- inicializate contage | local ok = 45651 -- don't inicializate | local exp = 100 -- Quantidade de XP local monster = 100 -- Quantos monstros terá que matar local outfit = 181654 -- Storage que está na outfits.xml if(msgcontains(msg, 'premio')) then if getPlayerStorageValue(cid, sto) == -1 then if getPlayerStorageValue(cid, storage) >= 100 then selfSay("You have finished the task", cid) doPlayerAddExp(cid, exp) doSendMagicEffect(getCreaturePosition(cid), 5) setPlayerStorageValue(cid, rage, -1) setPlayerStorageValue(cid, sto, 1) setPlayerStorageValue(cid, fuck, 1) setPlayerStorageValue(cid, outfit, 1) else selfSay("You need kill 100 monsters do finish the task", cid) end else selfSay("back from here nigga", cid) end end if(msgcontains(msg, 'accept')) then if getPlayerStorageValue(cid, ok) == -1 then selfSay("You have intialized the task", cid) setPlayerStorageValue(cid, ok, 1) setPlayerStorageValue(cid, rage, 1) else selfSay("You started the task", cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Funcionando! Muito Obrigado!
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.