Ir para conteúdo

Featured Replies

Postado

Ae galerado tk, 

 

Bom, estou precisando de uma ajuda... estou com este script do CASTLE24H.. (<-clique) Se fosse possível gostaria que para uma  guild dominar o castelo, tivesse que matar 1 monstro para para tomar posse do castle, pois este script oferecido pelo absolute no forum, o player precisa subir em um trono para dominalo.

 

 

AGUARDO RESPOSTAS.

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

Postado

Em data/creaturescripts/scripts crie killmons.lua

function onKill(cid)
if isPlayer(cid) then
elseif getCreatureName(target) == 'NOMEDOMONSTER' then
doSetPlayerStorageValue(cid, 19234, 1)
end
end
return true
end

em data/creaturescripts creaturescripts.xml:

<event type="kill" name="killmons" event="script" value="killmons.lua"/>

em login.lua que fica em data/creaturescripts/scripts:

registerCreatureEvent(cid, "killmons")

e no script onde esta:

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

mude para:

if getPlayerGuildId(cid) > 0 then
if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then
elseif getPlayerStorageValue(cid, 19234) == 1 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)
     setPlayerStorageValue(cid, 19234, -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
  end
  else
   doSendMagicEffect(pos, 2)  
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.")
   end
   return true end

Ando devagar, porque já tive pressa. E levo esse sorriso, porque já chorei demais...

________________________________________________________________________________

Minhas Sprites:

Mega Metagross

Mega Abomasnow

Pack de Shinys

[Posso atualizá-lo com novos shinys a qualquer momento]

Tutoriais:

[Completo] Criando e adicionando um novo Pokémon

[Actions] Criando quest no RME

Editores Lua/Xml/Sync Entre outros:

Editores Win/Mac/Linux

Postado
  • Autor

 

Em data/creaturescripts/scripts crie killmons.lua 

function onKill(cid)
if isPlayer(cid) then
elseif getCreatureName(target) == 'NOMEDOMONSTER' then
doSetPlayerStorageValue(cid, 19234, 1)
end
end
return true
end

em data/creaturescripts creaturescripts.xml:

<event type="kill" name="killmons" event="script" value="killmons.lua"/>

em login.lua que fica em data/creaturescripts/scripts:

registerCreatureEvent(cid, "killmons")

e no script onde esta:

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

mude para:

if getPlayerGuildId(cid) > 0 then
if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then
elseif getPlayerStorageValue(cid, 19234) == 1 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)
     setPlayerStorageValue(cid, 19234, -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
  end
  else
   doSendMagicEffect(pos, 2)  
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.")
   end
   return true end

 

 

 

Em data/creaturescripts/scripts crie killmons.lua

function onKill(cid)
if isPlayer(cid) then
elseif getCreatureName(target) == 'NOMEDOMONSTER' then
doSetPlayerStorageValue(cid, 19234, 1)
end
end
return true
end

em data/creaturescripts creaturescripts.xml:

<event type="kill" name="killmons" event="script" value="killmons.lua"/>

em login.lua que fica em data/creaturescripts/scripts:

registerCreatureEvent(cid, "killmons")

e no script onde esta:

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

mude para:

if getPlayerGuildId(cid) > 0 then
if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then
elseif getPlayerStorageValue(cid, 19234) == 1 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)
     setPlayerStorageValue(cid, 19234, -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
  end
  else
   doSendMagicEffect(pos, 2)  
   doTeleportThing(cid, fromPosition, false)
   doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.")
   end
   return true end

 

não estou conseguindo arrumar os end. da uma força ae

 

 

Script aqui \/
-- 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
if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then
elseif getPlayerStorageValue(cid, 19234) == 1 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)
     setPlayerStorageValue(cid, 19234, -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
  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 == 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
 

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

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo