Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
  • 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!

  • Respostas 15
  • Visualizações 735
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • "You started the task" =  Você já iniciou a missão , ou seja, está correto. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(

  • Bom , vou compartilhar com você uma gambiarra que fiz aqui a um tempo atras , você vai perceber que é velho pelas gambiarras e identação do código , aqui vamos nós : NPCS   XML <?xml

Posted Images

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