-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
script alguém pode me ajudar nessa spells aqui, queira que colocassem pro meu personagem ficar inatingível por 6 segundos e podendo atacar livremente
Por lazaroszz,
- 0 respostas
- 1041 visualizações
-
- 0 respostas
- 2070 visualizações
-
- 1 resposta
- 1740 visualizações
-
- 0 respostas
- 3138 visualizações
-
- 3 respostas
- 4322 visualizações
-

Pergunta
Luga03 333
Eai pessoal, criei um npc só que está dando um problema, ele quando fala hi, ele manda uma mensagem de message_greet, dai tem que falar help, ai depois que fala help, recebe uma mensagem, e tem que falar outra coisa, só que a eu falo e não acontece nada! Exemplo:
PLAYER: Hi NPC: |PLAYERNAME|? It's been a long time! or maybe it's the first time we meet? Time keeps fooling me... so, how Mougter can {help} you, young soul? PLAYER: help NPC: So you want to help? Can I turn it into a {Deighter}, {Flgheter} and {Flwoew}.You will want to be that Monster? PLAYER: Deighter NPC: (Aparti daqui não acontece mais nada)NPC:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Arceus" script="Arceus.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="|PLAYERNAME|? It's been a long time! or maybe it's the first time we meet? Time keeps fooling me... so, how Mougtercan {help} you, young soul?"/> </parameters> </npc>LUA:
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 if (msgcontains(msg, 'help')) and talkState[talkUser] == 0 then selfSay('So you want to help? Can I turn it into a {Deighter}, {Flgheter} and {Flwoew}.You will want to be that Monster?', cid) talkState[talkUser] = 1 if (msgcontains(msg, 'Deighter')) and talkState[talkUser] == 1 then talkState[talkUser] = 0 setMonsterClass(cid, 2) selfSay('You have just become a Deighter!', cid) elseif (msgcontains(msg, 'Flgheter')) and talkState[talkUser] == 1 then talkState[talkUser] = 0 setMonsterClass(cid, 5) selfSay('You have just become a Flgheter!', cid) elseif (msgcontains(msg, 'Flwoew')) and talkState[talkUser] == 1 then talkState[talkUser] = 0 setMonsterClass(cid, 8) selfSay('You have just become a Flwoew!', cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())tem como vcs ajudarem pfv???
Editado por Zet0N0MurmurouuLink para o comentário
https://xtibia.com/forum/topic/238050-problema-de-msg/Compartilhar em outros sites
6 respostass a esta questão
Posts Recomendados