Ir para conteúdo

Featured Replies

Postado

Bom galera to usando sistema de @xWhiteWolf:

 

Mais eu queria fazer um modificaçao, na hora de uma guild derrotar o boss gran tower.

Ele ja funcionar se o dos membro de uma guild derrota o boss, todos da guild ganha á aura. mais eu queria que somente os membro da guild que estive online que vai ganha á aura, o offline nao Ganha.

 

Alguem consegue fazer isso pra min.

 

Spoiler

function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) local killer = lastHitKiller[1] if isPlayer(killer) and (getCreatureName(cid) == "Gran Tower") then if (getGlobalStorageValue(GRANTOWER.FINALWINNER) ~= getCreatureName(killer)) then if getPlayerGuildId(killer) >= 1 then for index, creature in ipairs(getGranTowerPlayers()) do if getPlayerGuildId(creature) ~= getPlayerGuildId(killer) then doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature)), true) end end else for index, creature in ipairs(getGranTowerPlayers()) do if getPlayerStorageValue(creature, GRANTOWER.AURA) ~= -1 then doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature)), true) end end end if (getPlayerGuildId(killer) >= 1) then setGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID, getPlayerGuildId(killer)) for index, creature in ipairs(getGranTowerGuild(getPlayerGuildId(killer))) do setPlayerStorageValue(creature, GRANTOWER.AURA, 1) end end setPlayerStorageValue(killer, GRANTOWER.AURA, 1) addEvent(changeOutfit, 0, killer) setGlobalStorageValue(GRANTOWER.SAVELASTWINNER, getCreatureName(killer)) addEvent(doCreateMonster, 2 * 1000, "Gran Tower", GRANTOWER.TOWERPOSITION) setGlobalStorageValue(GRANTOWER.FINALWINNER, getCreatureName(killer)) setGlobalStorageValue(GRANTOWER.DESTROYCOUNT, (getGlobalStorageValue(GRANTOWER.DESTROYCOUNT) + 1)) doBroadcastMessage("[Gran Tower] The Gran Aura is with "..getCreatureName(killer)..", run to destroy the Grand Tower and take it.") end end return true end function onTarget(cid, target) if isPlayer(cid) and isMonster(target) and (getCreatureName(target) == "Gran Tower") then if (getGlobalStorageValue(GRANTOWER.FINALWINNER) == getCreatureName(cid)) then doPlayerSendCancel(cid, "Você não pode atacar o Gran Tower, proteja ele!") return false end end return true end function onStatsChange(cid, attacker, type, combat, value) if (type == STATSCHANGE_HEALTHLOSS) and isMonster(cid) and isPlayer(attacker) and (getCreatureName(cid) == "Gran Tower") then if (getGlobalStorageValue(GRANTOWER.FINALWINNER) == getCreatureName(attacker)) then return false end end return true endfunction onDeath(cid, corpse, lastHitKiller, mostDamageKiller) local killer = lastHitKiller[1] if isPlayer(killer) and (getCreatureName(cid) == "Gran Tower") then if (getGlobalStorageValue(GRANTOWER.FINALWINNER) ~= getCreatureName(killer)) then if getPlayerGuildId(killer) >= 1 then for index, creature in ipairs(getGranTowerPlayers()) do if getPlayerGuildId(creature) ~= getPlayerGuildId(killer) then doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature)), true) end end else for index, creature in ipairs(getGranTowerPlayers()) do if getPlayerStorageValue(creature, GRANTOWER.AURA) ~= -1 then doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature)), true) end end end if (getPlayerGuildId(killer) >= 1) then setGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID, getPlayerGuildId(killer)) for index, creature in ipairs(getGranTowerGuild(getPlayerGuildId(killer))) do setPlayerStorageValue(creature, GRANTOWER.AURA, 1) end end setPlayerStorageValue(killer, GRANTOWER.AURA, 1) addEvent(changeOutfit, 0, killer) setGlobalStorageValue(GRANTOWER.SAVELASTWINNER, getCreatureName(killer)) addEvent(doCreateMonster, 2 * 1000, "Gran Tower", GRANTOWER.TOWERPOSITION) setGlobalStorageValue(GRANTOWER.FINALWINNER, getCreatureName(killer)) setGlobalStorageValue(GRANTOWER.DESTROYCOUNT, (getGlobalStorageValue(GRANTOWER.DESTROYCOUNT) + 1)) doBroadcastMessage("[Gran Tower] The Gran Aura is with "..getCreatureName(killer)..", run to destroy the Grand Tower and take it.") end end return true end function onTarget(cid, target) if isPlayer(cid) and isMonster(target) and (getCreatureName(target) == "Gran Tower") then if (getGlobalStorageValue(GRANTOWER.FINALWINNER) == getCreatureName(cid)) then doPlayerSendCancel(cid, "Você não pode atacar o Gran Tower, proteja ele!") return false end end return true end function onStatsChange(cid, attacker, type, combat, value) if (type == STATSCHANGE_HEALTHLOSS) and isMonster(cid) and isPlayer(attacker) and (getCreatureName(cid) == "Gran Tower") then if (getGlobalStorageValue(GRANTOWER.FINALWINNER) == getCreatureName(attacker)) then return false end end return true end

 

Editado por BangxD (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.7k

Informação Importante

Confirmação de Termo