Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Gente qual ou porque que esta dando esse erro?

 

24pds2s.jpg

 

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 por Rodrigo0lg (veja o histórico de edições)

 

                                                           

55f6tc.gif                     

Link para o post
Compartilhar em outros sites

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())


spacer.png

 

 

Link para o post
Compartilhar em outros sites

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!

 

                                                           

55f6tc.gif                     

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo