Este foro te ayuda a hacer tus servers

Conectarse

Recuperar mi contraseña



Mejores posteadores
inoki92 (591)
 
Suarez6 (128)
 
marcio123 (88)
 
[Ivan] (21)
 
Old legend (12)
 
Assesino de mortos (9)
 
GOD elektrik (4)
 
sergiopirata3 (3)
 
tibiafodastico (2)
 
Arian (2)
 

Afiliados

http://img638.imageshack.us/img638/5206/banner1jv.gif

http://i.imgur.com/BG8hM58.png


No estás conectado. Conéctate o registrate

Zombie event

Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje [Página 1 de 1.]

1 Zombie event el Mar Abr 09, 2013 1:22 pm

{
playerCount = 2001, -- Global storage for counting the players left/entered in the event

goblet = 5805, -- id of the gold goblet you'll get when finishing the event.
rewards = {2195, 2152, 2160}, -- You will get this + a gold goblet with your name on.
-- {moneyId, count, using? 1 for using moneyReward, 0 for not using.}
moneyReward = {2160, 10, 1}, -- second collumn(count) 0 if you don't want money to be used. or a stackable item you want more than 1 of.

-- Estas coordenadas deben ser exactamente las misma del script en Global event!
-- Los zombies seran invocados aleatoriamente en esta coordenada
fromPosition = {x = 901, y = 937, z = 10}, -- supongo k ya saben como es esto top left cornor of the playground
toPosition = {x = 917, y = 949, z = 10}, -- bottom right cornor of the playground
}

function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(cid) and isMonster(attacker) then
if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then
if getGlobalStorageValue(config.playerCount) >= 2 then
doBroadcastMessage(getPlayerName(cid) .. " fue comido por los zoombies!", MESSAGE_STATUS_CONSOLE_RED)
local corpse = doCreateItem(3058, 1, getPlayerPosition(cid))
doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1)
elseif getGlobalStorageValue(config.playerCount) == 1 then
if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then
doBroadcastMessage(getPlayerName(cid) .. " gano en Zoombie Event! Felizidades!", MESSAGE_STATUS_WARNING)
local goblet = doPlayerAddItem(cid, config.goblet, 1)
doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " por ganar el Zombie event.")
local corpse = doCreateItem(3058, 1, getPlayerPosition(cid))
doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
for _,items in ipairs(config.rewards) do
doPlayerAddItem(cid, items, 1)
end
if config.moneyReward[3] == 1 then
doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2])
end
end

for x = config.fromPosition.x, config.toPosition.x do
for y = config.fromPosition.y, config.toPosition.y do
for z = config.fromPosition.z, config.toPosition.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getMonsters = getThingfromPos(areapos)
if isMonster(getMonsters.uid) then
doRemoveCreature(getMonsters.uid)
end
end
end
end
end
return false
end
end
return true
end

:+rep:

Ver perfil de usuario

2 Re: Zombie event el Vie Ago 16, 2013 9:57 pm

[Ivan]

avatar
Administrator
Administrator
Buena pero existen los còdigos & Spoilers.
Código:
Hola
Spoiler:
Hola


_________________
Ver perfil de usuario http://tibia-open.creaforo.net

Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje [Página 1 de 1.]

Permisos de este foro:
No puedes responder a temas en este foro.