Ir para conteúdo

Featured Replies

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

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

 

Deu certo, deu para dominar, após reiniciar o servidor o mesmo erro conforme a imagem.
bUk2WoU.png
Será que pode ser alguma coisa relacionada com a source?

  • Respostas 15
  • Visualizações 985
  • 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
function onStepIn(cid, item, pos, fromPosition)
 local pos = getThingPos(cid)
 
 if item.actionid == 16203 then 
  if not isPlayer(cid) then
      return true
  end 
  if getPlayerStorageValue(cd,"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 (getPlayerStorageValue(cd,"COH_STATUS")) == -1 then
		setPlayerStorageValue(cid,"COH_PREPARE1", -1)
		setPlayerStorageValue(cid,"COH_PREPARE2", -1)
		setPlayerStorageValue(cid,"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 (getPlayerStorageValue(cd,"COH_PREPARE1")) ~= 0 then
    setPlayerStorageValue(cid,"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

Você ta setando valor do servidor e nao do player, ele ta checando se o servidor tem a storage, se o servidor tiver entao o player entra, ou seja, os enemigos também entram, botei pra setar valor nos players, testa agora

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

function onStepIn(cid, item, pos, fromPosition)
 local pos = getThingPos(cid)
 
 if item.actionid == 16203 then 
  if not isPlayer(cid) then
      return true
  end 
  if getPlayerStorageValue(cd,"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 (getPlayerStorageValue(cd,"COH_STATUS")) == -1 then
		setPlayerStorageValue(cid,"COH_PREPARE1", -1)
		setPlayerStorageValue(cid,"COH_PREPARE2", -1)
		setPlayerStorageValue(cid,"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 (getPlayerStorageValue(cd,"COH_PREPARE1")) ~= 0 then
    setPlayerStorageValue(cid,"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

Você ta setando valor do servidor e nao do player, ele ta checando se o servidor tem a storage, se o servidor tiver entao o player entra, ou seja, os enemigos também entram, botei pra setar valor nos players, testa agora

deu o mesmo problema ali de cima, o player passa em cima do tile que domina, porem a action "16202" não ativa.

Postado
2 minutos atrás, knepperzik disse:

deu o mesmo problema ali de cima, o player passa em cima do tile que domina, porem a action "16202" não ativa.

function onStepIn(cid, item, pos, fromPosition)
 local pos = getThingPos(cid)
 
 if item.actionid == 16203 then 
  if not isPlayer(cid) then
      return true
  end 
  if getPlayerStorageValue(cd,"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 not getPlayerGuildId(cid) then
		doSendMagicEffect(pos, 2)  
		doTeleportThing(cid, fromPosition, false)
		doPlayerSendCancel(cid, "Voce nao possui uma Guild.")
  end
   if (getPlayerStorageValue(cd,"COH_STATUS")) == -1 then
		setPlayerStorageValue(cid,"COH_PREPARE1", -1)
		setPlayerStorageValue(cid,"COH_PREPARE2", -1)
		setPlayerStorageValue(cid,"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
      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 (getPlayerStorageValue(cd,"COH_PREPARE1")) ~= 0 then
    setPlayerStorageValue(cid,"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
3 minutos atrás, FlameArcixt disse:

function onStepIn(cid, item, pos, fromPosition)
 local pos = getThingPos(cid)
 
 if item.actionid == 16203 then 
  if not isPlayer(cid) then
      return true
  end 
  if getPlayerStorageValue(cd,"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 not getPlayerGuildId(cid) then
		doSendMagicEffect(pos, 2)  
		doTeleportThing(cid, fromPosition, false)
		doPlayerSendCancel(cid, "Voce nao possui uma Guild.")
  end
   if (getPlayerStorageValue(cd,"COH_STATUS")) == -1 then
		setPlayerStorageValue(cid,"COH_PREPARE1", -1)
		setPlayerStorageValue(cid,"COH_PREPARE2", -1)
		setPlayerStorageValue(cid,"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
      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 (getPlayerStorageValue(cd,"COH_PREPARE1")) ~= 0 then
    setPlayerStorageValue(cid,"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

 

ainda não foi 

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