Postado Setembro 12, 2016 8 anos Fala galera, blz? Comecei agora a mexer com Ot, e estou com um problema, o Cipfried nao está fazendo sua função, e também não da nenhum erro no distro. Spoiler <?xml version="1.0" encoding="UTF-8"?> <npc name="Cipfried" script="data/npc/scripts/healer_cipfried.lua" walkinterval="1500" speed="100" walkradius="2" floorchange="0"> <health max="100" now="100"/> <look type="57" head="0" body="0" legs="0" feet="0" addons="0"/> <parameters> <!--MESSAGES--> <parameter key="message_greet" value="Hello, |PLAYERNAME|! I will heal you if you are injured. Feel free to ask me for help."/> <parameter key="message_farewell" value="Farewell, |PLAYERNAME|."/> <parameter key="message_walkaway_male" value="Good bye."/> <parameter key="message_walkaway_female" value="Good bye."/> <!--KEYWORDS--> <parameter key="module_keywords" value="1"/> <parameter key="keywords" value="name;job;quest;god;al dee;obi;seymour;willie;tibia;rookgaard;rat;sewer;money;monster;academy"/> <parameter key="keyword_reply1" value="My name is Cipfried."/> <parameter key="keyword_reply2" value="I am just a humble monk. Ask me if you need help or healing."/> <parameter key="keyword_reply3" value=" Monsters are a constant threat. Learn to fight by hunting rabbits, deer and sheep. Then try to fight rats, bugs and perhaps spiders."/> <parameter key="keyword_reply4" value="They created Tibia and all life on it. Visit our library and learn about them."/> <parameter key="keyword_reply5" value="He is a local shop owner."/> <parameter key="keyword_reply6" value="He is a local shop owner."/> <parameter key="keyword_reply7" value="Seymour is a loyal follower of the king and responsible for the academy."/> <parameter key="keyword_reply8" value="Willie is a fine farmer. His farm is located to the left of the temple."/> <parameter key="keyword_reply9" value="That's where we are. The world of Tibia."/> <parameter key="keyword_reply10" value="The gods have chosen this isle as the point of arrival for the newborn souls."/> <parameter key="keyword_reply11" value="In the north of this temple you find a sewer grate. Use it to enter the sewers if you feel prepared. Don't forget a torch"/> <parameter key="keyword_reply12" value=" you'll need it."/> <parameter key="keyword_reply13" value="In the north of this temple you find a sewer grate. Use it to enter the sewers if you feel prepared. Don't forget a torch"/> <parameter key="keyword_reply14" value=" you'll need it."/> <parameter key="keyword_reply15" value="If you need money, you have to slay monsters and take their gold. Look for spiders and rats."/> <parameter key="keyword_reply16" value="Monsters are a constant threat. Learn to fight by hunting rabbits, deer and sheep. Then try to fight rats, bugs and perhaps spiders."/> <parameter key="keyword_reply17" value="You should visit Seymour in the academy and ask him about a mission."/> </parameters> </npc> Spoiler local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) if(cid ~= npcHandler.focus) then return false end if msgcontains(msg, 'heal') then if hasCondition(cid, CONDITION_FIRE) == TRUE then npcHandler:say('You are burning. I will help you.') doRemoveCondition(cid, CONDITION_FIRE) doSendMagicEffect(getCreaturePosition(cid), 14) elseif hasCondition(cid, CONDITION_POISON) == TRUE then npcHandler:say('You are poisoned. I will help you.') doRemoveCondition(cid, CONDITION_POISON) doSendMagicEffect(getCreaturePosition(cid), 13) elseif getCreatureHealth(cid) < 65 then npcHandler:say('You are looking really bad. Let me heal your wounds.') doCreatureAddHealth(cid, 65 - getCreatureHealth(cid)) doSendMagicEffect(getCreaturePosition(cid), 12) else npcHandler:say('You aren\'t looking really bad, ' .. getCreatureName(cid) .. '. I can only help in cases of real emergencies. Raise your health simply by eating food.') end return TRUE end end function onThink() npcHandler:onThink() end -- OTServ event handling functions end npcHandler:addModule(FocusModule:new()) Eu falo Hi, ele responde normalmente, mas quando falo heal, mesmo com o hp baixo ele não faz nada. É o meu primeiro post, se fiz algo de errado, me corrijam. Editado Setembro 12, 2016 8 anos por Jhol55 Formatação (veja o histórico de edições)
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.