rodrygosos 4 Postado Setembro 18, 2011 Share Postado Setembro 18, 2011 (editado) Galera meu ot é 9.10 crystal server. o npc oldrak não responde deem uma olhada ai pra mim. Oldrak.xml <npc name="Oldrak" script="data/npc/scripts/oldrak.lua" walkinterval="2000" floorchange="0" access="3" level="1" maglevel="1"> <health now="150" max="150"/> <look type="57" head="115" body="113" legs="31" feet="38" addons="3" corpse="2212"/> <parameters> <parameter key="message_greet" value="Hello, |PLAYERNAME|!" /> <parameter key="message_needmoremoney" value="Try again when you have more money."/> <parameter key="message_decline" value="Why would you tease me like that?"/> </parameters> </npc> oldrak.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 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, 'hallowed axe') then selfSay('Do you want to buy a Hallowed Axe from me?', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then local price = 1000 if getPlayerItemCount(cid, 2386) >= 1 and getPlayerMoney(cid) >= price then if doPlayerRemoveMoney(cid, price) then selfSay('Here you are. You can now defeat the demon oak with this axe.', cid) doPlayerRemoveItem(cid, 2386, 1) doPlayerAddItem(cid, 8293, 1) talkState[talkUser] = 0 end else selfSay('I need an axe and ' .. price .. ' gold coins to make you a {hallowed axe}.', cid) talkState[talkUser] = 0 end elseif msgcontains(msg, 'demon oak') then selfSay('Did you defeat the demon oak?', cid) talkState[talkUser] = 2 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then if getCreatureStorage(cid, 35700) == 1 then selfSay('Good job!', cid) doCreatureSetStorage(cid, 35700, 2) talkState[talkUser] = 0 else selfSay('Go defeat the demon oak first.', cid) talkState[talkUser] = 0 end elseif msgcontains(msg, 'no') and (talkState[talkUser] >= 1 and talkState[talkUser] <= 3) then selfSay('Ok thanks.', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Editado Setembro 18, 2011 por TkSamer Link para o comentário https://xtibia.com/forum/topic/168106-oldrak/ Compartilhar em outros sites More sharing options...
grigacuin 15 Postado Setembro 18, 2011 Share Postado Setembro 18, 2011 Em muitos servidores Global, prescisa falar com ele pelo Chat NPC's Direto! Sim é meio chato, Más se for arrumar, vai ter que reescrever o script! =/ tente falar com ele pelo npc chat, falando Hi ou Hallowed Axe if msgcontains(msg, 'hallowed axe') then Está configurado já!! Tente lá!! e avise seus players!! É meio dificil de arrumar isso, e se eu pudesse te ajudar eu te ajudaria, Vlws ae flws! Link para o comentário https://xtibia.com/forum/topic/168106-oldrak/#findComment-1104789 Compartilhar em outros sites More sharing options...
rodrygosos 4 Postado Setembro 18, 2011 Autor Share Postado Setembro 18, 2011 meu ot é mapa proprio mano ;s não tem como arrumar não? Link para o comentário https://xtibia.com/forum/topic/168106-oldrak/#findComment-1104798 Compartilhar em outros sites More sharing options...
grigacuin 15 Postado Setembro 18, 2011 Share Postado Setembro 18, 2011 Muitas vezes o mapa nao interfere no npc, (ou todas.) Talvez voce prescise da acid, pegue no outro mapa usando shift (RME) de Control+C, Control+V. E começe a editar! Vlws, flws! =D Link para o comentário https://xtibia.com/forum/topic/168106-oldrak/#findComment-1104870 Compartilhar em outros sites More sharing options...
Posts Recomendados