Ir para conteúdo

Featured Replies

Postado
1 minuto atrás, knepperzik disse:

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

O erro é que vc ta setando valor de texto em storage, ja vou corrigir aqui 

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") == 1 then
   doSendMagicEffect(getThingPos(cid), 14)
   doSendAnimatedText(pos, "", math.random(1, 255))
  doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..getPlayerGuildName(cid).."]!")
  else
   doSendMagicEffect(getThingPos(cid), 2)
      doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Voce nao pertence a Guild dominante.")
  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") ~= -1 then
       setGlobalStorageValue("COH_PREPARE1", -1)
       setGlobalStorageValue("COH_PREPARE2", -1)
       setGlobalStorageValue("COH_STATUS", 1)
    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["..getPlayerGuildName(cid).."] !")
      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") ~= 0 then
    setGlobalStorageValue("COH_PREPARE1", 1)
    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))
 end
 return true
end

 

  • Respostas 15
  • Visualizações 987
  • 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
10 minutos atrás, FlameArcixt disse:

O erro é que vc ta setando valor de texto em storage, ja vou corrigir aqui 


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") == 1 then
   doSendMagicEffect(getThingPos(cid), 14)
   doSendAnimatedText(pos, "", math.random(1, 255))
  doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..getPlayerGuildName(cid).."]!")
  else
   doSendMagicEffect(getThingPos(cid), 2)
      doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Voce nao pertence a Guild dominante.")
  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") ~= -1 then
       setGlobalStorageValue("COH_PREPARE1", -1)
       setGlobalStorageValue("COH_PREPARE2", -1)
       setGlobalStorageValue("COH_STATUS", 1)
    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["..getPlayerGuildName(cid).."] !")
      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") ~= 0 then
    setGlobalStorageValue("COH_PREPARE1", 1)
    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))
 end
 return true
end

 

JwSeOcq.png
Coloquei a script, e ocorreu o seguinte erro, não deixa nem passar em cima da tile.

Postado
11 minutos atrás, knepperzik disse:

JwSeOcq.png
Coloquei a script, e ocorreu o seguinte erro, não deixa nem passar em cima da tile.

Erro meu, deixei alguns parenteses abertos.

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") == 1 then
   doSendMagicEffect(getThingPos(cid), 14)
   doSendAnimatedText(pos, "", math.random(1, 255))
  doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..getPlayerGuildName(cid).."]!")
  else
   doSendMagicEffect(getThingPos(cid), 2)
      doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Voce nao pertence a Guild dominante.")
  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")) ~= -1 then
       setGlobalStorageValue("COH_PREPARE1", -1)
       setGlobalStorageValue("COH_PREPARE2", -1)
       setGlobalStorageValue("COH_STATUS", 1)
    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["..getPlayerGuildName(cid).."] !")
      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")) ~= 0 then
    setGlobalStorageValue("COH_PREPARE1", 1)
    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))
 end
 return true
end

 

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

Erro meu, deixei alguns parenteses abertos.



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") == 1 then
   doSendMagicEffect(getThingPos(cid), 14)
   doSendAnimatedText(pos, "", math.random(1, 255))
  doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..getPlayerGuildName(cid).."]!")
  else
   doSendMagicEffect(getThingPos(cid), 2)
      doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Voce nao pertence a Guild dominante.")
  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")) ~= -1 then
       setGlobalStorageValue("COH_PREPARE1", -1)
       setGlobalStorageValue("COH_PREPARE2", -1)
       setGlobalStorageValue("COH_STATUS", 1)
    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["..getPlayerGuildName(cid).."] !")
      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")) ~= 0 then
    setGlobalStorageValue("COH_PREPARE1", 1)
    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))
 end
 return true
end

 

Ao passar no tile que domina o castle, não esta ativando a action. "16202"

Editado por knepperzik (veja o histórico de edições)

Postado
4 minutos atrás, knepperzik disse:

Ao passar no tile que domina o castle, não esta ativando a action. "16202"

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") == 1 then
   doSendMagicEffect(getThingPos(cid), 14)
   doSendAnimatedText(pos, "", math.random(1, 255))
  doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..getPlayerGuildName(cid).."]!")
  else
   doSendMagicEffect(getThingPos(cid), 2)
      doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "Voce nao pertence a Guild dominante.")
  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")) == -1 then
		setGlobalStorageValue("COH_PREPARE1", -1)
		setGlobalStorageValue("COH_PREPARE2", -1)
		setGlobalStorageValue("COH_STATUS", 1)
		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["..getPlayerGuildName(cid).."] !")
    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")) ~= 0 then
    setGlobalStorageValue("COH_PREPARE1", 1)
    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))
 end
 return true
end

 

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