Postado Fevereiro 28, 2014 11 anos Gente qual ou porque que esta dando esse erro? Vou posta o script abaixo. cturin.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 position = { gloria = {x= 776, y=792, z=6}, hydralair = {x= 887, y=1004, z=7}, azeroth = {x= 712, y=1001, z=6}, sandtrap = {x= 283, y=409, z=6}, avalon = {x= 201, y=71, z=6}, zatur = {x= 1203, y=1085, z=5}, libertybay = {x= 304, y=135, z=6} } local msgerror = 'Necessário premium account.' if(msgcontains(msg, 'gloria')) then if getPlayerPremiumDays(cid) < 1 then >>>>> doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.gloria) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'hydralair')) then if getPlayerPremiumDays(cid) < 1 then>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.hydralair) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'azeroth')) then>>>>>>>>>>>>>>>>>>> if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.azeroth) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'sandtrap')) then>>>>>>>>>>>>>>>>>> if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.sandtrap) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'avalon')) then>>>>> if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.avalon) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'zatur')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.zatur) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'libertybay')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.libertybay) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Captain Turin Tiquanda.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Captain Duzyer" script="data/npc/scripts/cturin.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="143" head="91" body="23" legs="80" feet="100" addons="2"/> <parameters> <parameter key="message_greet" value="Hi |PLAYERNAME|. I send you to gloria, hydra lair, azeroth, sand trap, tiquanda, zatur or liberty bay."/> </parameters> </npc> Obrigado, REP+ ! Editado Fevereiro 28, 2014 11 anos por Rodrigo0lg (veja o histórico de edições)
Postado Fevereiro 28, 2014 11 anos Você adicionou vários '>>>' no script, creio que por engano. Isso é o erro. Retirado: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 position = { gloria = {x= 776, y=792, z=6}, hydralair = {x= 887, y=1004, z=7}, azeroth = {x= 712, y=1001, z=6}, sandtrap = {x= 283, y=409, z=6}, avalon = {x= 201, y=71, z=6}, zatur = {x= 1203, y=1085, z=5}, libertybay = {x= 304, y=135, z=6} } local msgerror = 'Necessário premium account.' if(msgcontains(msg, 'gloria')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.gloria) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'hydralair')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.hydralair) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'azeroth')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.azeroth) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'sandtrap')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.sandtrap) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'avalon')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.avalon) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'zatur')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.zatur) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'libertybay')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.libertybay) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Postado Fevereiro 28, 2014 11 anos Autor Você adicionou vários '>>>' no script, creio que por engano. Isso é o erro. Retirado: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 position = { gloria = {x= 776, y=792, z=6}, hydralair = {x= 887, y=1004, z=7}, azeroth = {x= 712, y=1001, z=6}, sandtrap = {x= 283, y=409, z=6}, avalon = {x= 201, y=71, z=6}, zatur = {x= 1203, y=1085, z=5}, libertybay = {x= 304, y=135, z=6} } local msgerror = 'Necessário premium account.' if(msgcontains(msg, 'gloria')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.gloria) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'hydralair')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.hydralair) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'azeroth')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.azeroth) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'sandtrap')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.sandtrap) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'avalon')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.avalon) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'zatur')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.zatur) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end elseif (msgcontains(msg, 'libertybay')) then if getPlayerPremiumDays(cid) < 1 then doPlayerSendTextMessage(cid, MESSAGE_FIRST, msgerror) else doTeleportThing(cid, position.libertybay) doSendMagicEffect(getPlayerPosition(cid), math.random(1, 23)) return true end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Nossa, coloquei por uma causa e acabei deixando ~esquecendo~ por engano mesmo ! Protinho REP+, Obrigado!
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.