Ir para conteúdo

Featured Replies

Resolvido por FlameArcixt

Ir para solução
  • Respostas 15
  • Visualizações 965
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • FlameArcixt
    FlameArcixt

    chama no discord, nao posso acompanhar oq vc ta fazendo a cada 5 minutos de resposta no tk Arcixt#1329 Topico finalizado, resolvido no Discord.

  • FlameArcixt
    FlameArcixt

    Tenta assim function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStor

Postado
  • Autor
1 minuto atrás, FlameArcixt disse:

Cade o codigo do castle?

Acabei esquecendo de colocar, sorry :/
data/movements/scripts/COH.lua

Spoiler


function onStepIn(cid, item, pos, fromPosition)
 local pos = getThingPos(cid)
 
 if item.actionid == 16203 then 
  if not isPlayer(cid) then
      return true
  end 
  if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then
   doSendMagicEffect(getThingPos(cid), 14)
   doSendAnimatedText(pos, "", math.random(1, 255))
  doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..tostring(getGlobalStorageValue(COH_STATUS)).."] !")
  else
   doSendMagicEffect(getThingPos(cid), 2)
      doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Voce nao pertence a Guild "..getGlobalStorageValue(COH_STATUS)..".")
  end
  return true
 end

    if item.actionid == 16202 then
     if not isPlayer(cid) then
      return true
  end
  
  if getPlayerGuildId(cid) > 0 then
   if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then
       setGlobalStorageValue(COH_PREPARE1, -1)
       setGlobalStorageValue(COH_PREPARE2, -1)
       setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid))
    doBroadcastMessage("[Vilarejo] O jogador ["..getCreatureName(cid).."] e sua Guild ["..getPlayerGuildName(cid).."] estao Dominando o Vilarejo , va impedir isso!")
       doCastleRemoveEnemies()
doPlayerSendTextMessage(cid, 20, "[Vilarejo] Voce e sua Guild estao Dominando["..tostring(getGlobalStorageValue(COH_STATUS)).."] !")
      end
     else
   doSendMagicEffect(pos, 2)  
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Voce nao possui uma Guild.")
   end
      return true
 end
 
    if item.actionid == 16200 then
  if not isPlayer(cid) then
      return true
  end
  if getPlayerGuildId(cid) > 0 then
   doSendAnimatedText(pos, "", math.random(1, 255))
   if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then
    setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid))
    doBroadcastMessage("[Vilarejo] Atencao! A Guild "..getPlayerGuildName(cid).." esta tentando Dominar Vilarejo, preparem-se!")
   end
  else
   doSendMagicEffect(pos, 2)  
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, " Você nao possui uma guild.")   
   return true
  end   
 end
 
 if item.actionid == 16201 then
  if not isPlayer(cid) then
      return true
  end
  doSendAnimatedText(pos, "", math.random(1, 255))
  if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then
   setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid))
   doBroadcastMessage("[Vilarejo] Atencao! A Guild "..getPlayerGuildName(cid).." esta muito proxima do dominio!")
  end
 end
 return true
end

 

Postado

Tenta assim

function onStepIn(cid, item, pos, fromPosition)
 local pos = getThingPos(cid)
 
 if item.actionid == 16203 then 
  if not isPlayer(cid) then
      return true
  end 
  if getGlobalStorageValue("COH_STATUS") == getPlayerGuildName(cid) then
   doSendMagicEffect(getThingPos(cid), 14)
   doSendAnimatedText(pos, "", math.random(1, 255))
  doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..tostring(getGlobalStorageValue("COH_STATUS")).."] !")
  else
   doSendMagicEffect(getThingPos(cid), 2)
      doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Voce nao pertence a Guild "..getGlobalStorageValue("COH_STATUS")..".")
  end
  return true
 end

    if item.actionid == 16202 then
     if not isPlayer(cid) then
      return true
  end
  
  if getPlayerGuildId(cid) > 0 then
   if (getGlobalStorageValue("COH_STATUS") ~= getPlayerGuildName(cid)) then
       setGlobalStorageValue("COH_PREPARE1", -1)
       setGlobalStorageValue("COH_PREPARE2", -1)
       setGlobalStorageValue("COH_STATUS", getPlayerGuildName(cid))
    doBroadcastMessage("[Vilarejo] O jogador ["..getCreatureName(cid).."] e sua Guild ["..getPlayerGuildName(cid).."] estao Dominando o Vilarejo , va impedir isso!")
       doCastleRemoveEnemies()
doPlayerSendTextMessage(cid, 20, "[Vilarejo] Voce e sua Guild estao Dominando["..tostring(getGlobalStorageValue("COH_STATUS")).."] !")
      end
     else
   doSendMagicEffect(pos, 2)  
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Voce nao possui uma Guild.")
   end
      return true
 end
 
    if item.actionid == 16200 then
  if not isPlayer(cid) then
      return true
  end
  if getPlayerGuildId(cid) > 0 then
   doSendAnimatedText(pos, "", math.random(1, 255))
   if (getGlobalStorageValue("COH_PREPARE1") ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue("COH_PREPARE2") ~= getPlayerGuildName(cid))) then
    setGlobalStorageValue("COH_PREPARE1", getPlayerGuildName(cid))
    doBroadcastMessage("[Vilarejo] Atencao! A Guild "..getPlayerGuildName(cid).." esta tentando Dominar Vilarejo, preparem-se!")
   end
  else
   doSendMagicEffect(pos, 2)  
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, " Você nao possui uma guild.")   
   return true
  end   
 end
 
 if item.actionid == 16201 then
  if not isPlayer(cid) then
      return true
  end
  doSendAnimatedText(pos, "", math.random(1, 255))
  if (getGlobalStorageValue("COH_PREPARE2") ~= getPlayerGuildName(cid)) then
   setGlobalStorageValue("COH_PREPARE2", getPlayerGuildName(cid))
   doBroadcastMessage("[Vilarejo] Atencao! A Guild "..getPlayerGuildName(cid).." esta muito proxima do dominio!")
  end
 end
 return true
end

 

Postado
  • Autor
13 minutos atrás, FlameArcixt disse:

Tenta assim


function onStepIn(cid, item, pos, fromPosition)
 local pos = getThingPos(cid)
 
 if item.actionid == 16203 then 
  if not isPlayer(cid) then
      return true
  end 
  if getGlobalStorageValue("COH_STATUS") == getPlayerGuildName(cid) then
   doSendMagicEffect(getThingPos(cid), 14)
   doSendAnimatedText(pos, "", math.random(1, 255))
  doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..tostring(getGlobalStorageValue("COH_STATUS")).."] !")
  else
   doSendMagicEffect(getThingPos(cid), 2)
      doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Voce nao pertence a Guild "..getGlobalStorageValue("COH_STATUS")..".")
  end
  return true
 end

    if item.actionid == 16202 then
     if not isPlayer(cid) then
      return true
  end
  
  if getPlayerGuildId(cid) > 0 then
   if (getGlobalStorageValue("COH_STATUS") ~= getPlayerGuildName(cid)) then
       setGlobalStorageValue("COH_PREPARE1", -1)
       setGlobalStorageValue("COH_PREPARE2", -1)
       setGlobalStorageValue("COH_STATUS", getPlayerGuildName(cid))
    doBroadcastMessage("[Vilarejo] O jogador ["..getCreatureName(cid).."] e sua Guild ["..getPlayerGuildName(cid).."] estao Dominando o Vilarejo , va impedir isso!")
       doCastleRemoveEnemies()
doPlayerSendTextMessage(cid, 20, "[Vilarejo] Voce e sua Guild estao Dominando["..tostring(getGlobalStorageValue("COH_STATUS")).."] !")
      end
     else
   doSendMagicEffect(pos, 2)  
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Voce nao possui uma Guild.")
   end
      return true
 end
 
    if item.actionid == 16200 then
  if not isPlayer(cid) then
      return true
  end
  if getPlayerGuildId(cid) > 0 then
   doSendAnimatedText(pos, "", math.random(1, 255))
   if (getGlobalStorageValue("COH_PREPARE1") ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue("COH_PREPARE2") ~= getPlayerGuildName(cid))) then
    setGlobalStorageValue("COH_PREPARE1", getPlayerGuildName(cid))
    doBroadcastMessage("[Vilarejo] Atencao! A Guild "..getPlayerGuildName(cid).." esta tentando Dominar Vilarejo, preparem-se!")
   end
  else
   doSendMagicEffect(pos, 2)  
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, " Você nao possui uma guild.")   
   return true
  end   
 end
 
 if item.actionid == 16201 then
  if not isPlayer(cid) then
      return true
  end
  doSendAnimatedText(pos, "", math.random(1, 255))
  if (getGlobalStorageValue("COH_PREPARE2") ~= getPlayerGuildName(cid)) then
   setGlobalStorageValue("COH_PREPARE2", getPlayerGuildName(cid))
   doBroadcastMessage("[Vilarejo] Atencao! A Guild "..getPlayerGuildName(cid).." esta muito proxima do dominio!")
  end
 end
 return true
end

 

9iqqaOr.png
Ao reiniciar o servidor ainda permanece o mesmo erro, como segue a imagem.

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo