Postado Maio 22, 2018 7 anos @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())
Postado Maio 22, 2018 7 anos Autor 40 minutos atrás, 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()) Desta forma não inicia o server da falha ao carregar o outfht.xml Da outra forma, não da erro na distro mas também não adiciona a outhft, Pergunta:Não tem um comando, doPlayerAddOuthft que posso colocar nas recompensas...Não me expressei bem, digo não tem como adicionar a outhft com um comando que já reconheça o sexo, exemplo só colocando os ID do outfht.XML, Exemplo: "1, 2, 3, ...." Editado Maio 22, 2018 7 anos por peterson18 (veja o histórico de edições)
Postado Maio 23, 2018 7 anos 10 minutos atrás, peterson18 disse: Desta forma não inicia o server da falha ao carregar o outfht.xml Da outra forma, não da erro na distro mas também não adiciona a outhft, Pergunta:Não tem um comando, doPlayerAddOuthft que posso colocar nas recompensas...Não me expressei bem, digo não tem como adicionar a outhft com um comando que já reconheça o sexo, exemplo só colocando os ID do outfht.XML, Exemplo: "1, 2, 3, ...." Testei pelo outfits.xml e foi , não seria um problema de configuração seu ?
Postado Maio 23, 2018 7 anos Autor Agora, Sttorm disse: Testei pelo outfits.xml e foi , não seria um problema de configuração seu ? Eu copiei exatamente igual o teu e quando coloquei para rodar deu erro... Só fiz alguns ajuste pois a outfith seria a ID:10, e nela esta assim: Citar <outfit id="10" premium="yes"> <list gender="0" lookType="149" name="Wizard"/> <list gender="1" lookType="145" name="Wizard"/> </outfit> Ae deixei assim, deu erro... Citar <outfit id="10" quest="181654"> <list gender="0" lookType="149" name="Wizard"/> <list gender="1" lookType="145" name="Wizard"/> </outfit> E também tentei assim, e também deu erro... Citar <outfit id="10" premium="yes" quest="181654"> <list gender="0" lookType="149" name="Wizard"/> <list gender="1" lookType="145" name="Wizard"/> </outfit>
Postado Maio 23, 2018 7 anos 2 minutos atrás, peterson18 disse: Eu copiei exatamente igual o teu e quando coloquei para rodar deu erro... Só fiz alguns ajuste pois a outfith seria a ID:10, e nela esta assim: Ae deixei assim, deu erro... E também tentei assim, e também deu erro... E qual erro que dá ?
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.