Ir para conteúdo
  • Cadastre-se

Normal Ajuda entender essa parte do script


Posts Recomendados

function onUse(cid, item, fromPosition, itemEx, toPosition)

if(item.actionid == 65500) then
if getTopCreature({x=32464,y=32378,z=5}).uid > 0 then
doTeleportThing(getTopCreature({x=32464,y=32378,z=5}).uid, {x=32526,y=32421,z=5})

essa e a parte q nao entendo naonde coloco essas cordenedas .

Script enteira 

function onUse(cid, item, fromPosition, itemEx, toPosition)

if(item.actionid == 65500) then
if getTopCreature({x=32464,y=32378,z=5}).uid > 0 then
doTeleportThing(getTopCreature({x=32464,y=32378,z=5}).uid, {x=32526,y=32421,z=5})
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
else
doPlayerSendCancel(cid, "Você precisa estar em cima do tapete.")
return true
end

elseif (item.actionid == 65501) then
if getTopCreature({x=32526,y=32421,z=5}).uid > 0 then
doTeleportThing(getTopCreature({x=32526,y=32421,z=5}).uid, {x=32464,y=32378,z=5})
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
else
doPlayerSendCancel(cid, "Você precisa estar em cima do tapete.")
end
end
return true
end

 

isso e a do Castle

Link para o post
Compartilhar em outros sites
  • Respostas 12
  • Created
  • Última resposta

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Posts

if getTopCreature(coordenada do tapete).uid > 0 then doTeleportThing(getTopCreature(coordenada do tapete).uid, coordenada para onde o jogador irá)  

local tapete = { [19457] = {{x = 1050, y = 1053, z = 7}, {x = 1050, y = 1049, z = 7}}, [19458] = {{x = 1051, y = 1053, z = 7}, {x = 1051, y = 1049, z = 7}}, --[ACTION_ID] = {posição que o player tem que estar}, {posição para onde o player irá}, } function onUse(cid, item, fromPosition, itemEx, toPosition) local action = tapete[item.actionid] local player = getTopCreature(action[1]).uid if player > 0 then doTeleportThing(player, action[2]) doSendMagicEffect(getCreaturePosition(cid),

if getTopCreature(coordenada do tapete).uid > 0 then
doTeleportThing(getTopCreature(coordenada do tapete).uid, coordenada para onde o jogador irá)

 

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

Não dou suporte via PM, crie um tópico caso tenha dúvidas.

Isso previne que outras pessoas com a mesma dúvida criem tópicos desnecessários.

Link para o post
Compartilhar em outros sites

Esse Erro

http://prntscr.com/b73nag

7 minutos atrás, Talesigorvr disse:

if getTopCreature(coordenada do tapete).uid > 0 then
doTeleportThing(getTopCreature(coordenada do tapete).uid, coordenada para onde o jogador irá)

 

Link para o post
Compartilhar em outros sites

São vários players em cima do tapete ou só um?

Não dou suporte via PM, crie um tópico caso tenha dúvidas.

Isso previne que outras pessoas com a mesma dúvida criem tópicos desnecessários.

Link para o post
Compartilhar em outros sites
8 minutos atrás, Talesigorvr disse:

São vários players em cima do tapete ou só um?

tipo e so o dono da guild e quando ele e + 1 outro dono eles clika numa parte tipo uma pedra e eles e junto com a guild sao teleportados

ou so 2 player com guild vao clicao e dps que eles sao teleportados ele falam !gocastle e sua toda guild on e teleportada juntamente

Desculpa os erros de portugues

8 minutos atrás, Talesigorvr disse:

São vários players em cima do tapete ou só um?

Pera esplicar Melhor 

 

2 Player entrao num portal esse portal so pode entrar quem tem guild.

 

Quando 1 player entra no portal apareçe um aviso tipo Guild Gms esta invadindo o castle.

 

Dps quando outra guild entrar fecha o evento

 

e eles precisao clikar no trono e quem fica no trono por + tempo ganha o evento

 

Eles iram ganhar uma hunt so para aquela guild que ganhar

 

o evento so inicia de Sabado

 

Os player tem 1 semana para ussar essas Hunts

 

E dps disso eles sao removidos estantaneamente de la

 

 

32 minutos atrás, Talesigorvr disse:

if getTopCreature(coordenada do tapete).uid > 0 then
doTeleportThing(getTopCreature(coordenada do tapete).uid, coordenada para onde o jogador irá)

 

Spoiler

Data/script

function onUse(cid, item, fromPosition, itemEx, toPosition)

if(item.actionid == 65500) then
if getTopCreature({x=1344,y=1290,z=7}).uid > 0 then
doTeleportThing(getTopCreature({x=1300,y=1289,z=7}).uid, {x=1345,y=1290,z=7})
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
else
doPlayerSendCancel(cid, "Você precisa estar em cima do tapete.")
return true
end

elseif (item.actionid == 65501) then
if getTopCreature({x=1350,y=1290,z=7}).uid > 0 then
doTeleportThing(getTopCreature({x=1326,y=1183,z=7}).uid, {x=1350,y=1290,z=7})
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
else
doPlayerSendCancel(cid, "Você precisa estar em cima do tapete.")
end
end
return true
end

Spoiler

action xml

 



<action actionid="65500-65501" event="script" value="naviocastle.lua"/>

 

data/lib/015-coh

Spoiler

-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.

-- //

COH_PUSHTIME = 10800 -- Tempo (em segundos) de exhausted para usar o comando !gocastle - Padrão (3 horas)
COH_AREA = {{x = 32458, y = 32332, z = 7}, {x = 32558, y = 32429, z = 7}} -- Canto superior esquerdo / inferior direito do Castle

-- // Não mexa daqui para baixo 
COH_STATUS = 201320111714
COH_PREPARE1 = 201320111715 
COH_PUSHSTOR = 201320111716 
COH_PREPARE2 = 201320111717 

function doCastleRemoveEnemies()

 for index, creature in ipairs(getPlayersOnline()) do
  if isInArea(getThingPos(creature), COH_AREA[1], COH_AREA[2]) then
   if getPlayerGuildName(creature) ~= getGlobalStorageValue(COH_STATUS) then
    doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature)))
   end
  end
 end
 return true
end
Spoiler

Data/movemts/scripts

 


-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.

-- //

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, "CoH", math.random(1, 255))
  else
   doSendMagicEffect(getThingPos(cid), 2)
      doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "[CoH] Você não pertence á 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
  		doPlayerSendTextMessage(cid, 20, "[Castle of Honor] Você e sua guild estão no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!")
 	  setGlobalStorageValue(COH_PREPARE1, -1)
  	 setGlobalStorageValue(COH_PREPARE2, -1)
 	  setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid))
 	  doCastleRemoveEnemies()
    doBroadcastMessage("[Castle of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estão no comando do castelo, vá dominar e impedir isso!")
  	end
 	else
   doSendMagicEffect(pos, 2)  
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "[CoH] Você não 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, "CoH", math.random(1, 255))
   if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then
    setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid))
    doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está tentando dominar o castelo, preparem-se!")
   end
  else
   doSendMagicEffect(pos, 2)  
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.")   
   return true
  end   
 end
 
 if item.actionid == 16201 then
  if not isPlayer(cid) then
	  return true
  end
  doSendAnimatedText(pos, "CoH", math.random(1, 255))
  if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then
   setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid))
   doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está muito próxima do domínio, ataquem!")
  end
 end
 return true
end
Spoiler

data/movements/movements.xml

 


<movevent type="StepIn" actionid="16200-16203" event="script" value="COH.lua"/>
Spoiler

data/talkactions/scripts COHABSOLUTE.lua

 


-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.

-- //

function onSay(cid, words, param)

 if getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER then
  if getPlayerStorageValue(cid, COH_PUSHSTOR) < os.time() then
   if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then
    if isInArea(getThingPos(cid), COH_AREA[1], COH_AREA[2]) then
     if #getMembersOnline(getPlayerGuildId(cid)) > 0 then
      for index, creature in ipairs(getMembersOnline(getPlayerGuildId(cid))) do
       if (getTileInfo(getThingPos(creature)).protection ~= true) then
        return doPlayerSendCancel(cid, "[CoH] Os membros devem estar em área PZ.")
       end
       doTeleportThing(creature, getThingPos(cid))
      end
      setPlayerStorageValue(cid, COH_PUSHSTOR, os.time() + COH_PUSHTIME) 
      doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "[Castle of Honor] Você teleportou seus membros, comando pode ser usado a cada "..tostring(COH_PUSHTIME / 60).." minuto(s).")
     else
      doPlayerSendCancel(cid, "[CoH] Para executar isso, sua guild deve ter 2 ou mais membros online.") 
     end
    else
     doPlayerSendCancel(cid, "[CoH] Você deve estar no castelo.")
    end
   else
    doPlayerSendCancel(cid, "[CoH] Sua guild não é dona do castelo.")
   end
  else
   doPlayerSendCancel(cid, "[CoH] Você deve aguardar "..tostring(math.ceil((getPlayerStorageValue(cid, COH_PUSHSTOR) - os.time()) / 60)).." minuto(s) para usar este comando.")
  end
 else
  doPlayerSendCancel(cid, "[CoH] Você deve ser líder de uma guild para executar este comando.")
 end
 return true
end

function getMembersOnline(id)
 local mbr = {}

 for index, creature in ipairs(getPlayersOnline()) do
  if getPlayerGuildId(creature) == id then
   if getCreatureSkullType(creature) < 3 then
    table.insert(mbr, creature)
   end
  end                      
 end
 return mbr or #mbr
end

 

 

data/talkactions/talkactions.xml 

Spoiler

<talkaction words="!castlepush;!pushmembers;!gocastle" event="script" value="COHABSOLUTE.lua"/>

 

 

28 minutos atrás, Talesigorvr disse:

São vários players em cima do tapete ou só um?

esse ae e oq eu estou ussando

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

  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
  • Estatísticas dos Fóruns

    96847
    Tópicos
    519606
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo