Solved by @@dchampag
Here is the fully working rush event/massive team battles for 0.4 series of TFS probably for other revisions too.
http://pastebin.com/wuLU0J9u
The title says it all..
Here is all the parts of the script that im guessing is the reward part, its a mod so i can't post it all.
Here is the fully working rush event/massive team battles for 0.4 series of TFS probably for other revisions too.
http://pastebin.com/wuLU0J9u
The title says it all..
Here is all the parts of the script that im guessing is the reward part, its a mod so i can't post it all.
Code:
t = {
a = 32145,
g = 32146,
l = 32147,
u = 32148,
h = 32149,
wv = 32150,
c = 0,
q = "The Massive Team Battle has now been started! Enjoy and have fight well!",
f = 5447,
f_1 = 5448,
f_2 = 5449,
d_1 = {x = 28387, y = 32337, z = 7}, -- red temple
d_2 = {x = 28386, y = 32355, z = 7}, -- blue temple
x = "The massive Team Battles won't start bacause too few people were willing to participate",
w = {x=28435,y=32309,z=4},
lvl = 80,
v = 2,
mn = 1,
m = 200,
o = "The war has seized, the RED TEAM has won the massive Team Battle!",
y = "The war has seized, the BLUE TEAM has won the massive Team Battle!",
i_1 = 2143,
i_2 = 50,
t = 1,
r = 3
Code:
if blue >= t.v then
doBroadcastMessage(t.y, MESSAGE_STATUS_WARNING)
setGlobalStorageValue(t.h, 1)
for _, pid in ipairs(getPlayersOnline()) do
if(getPlayerStorageValue(pid, t.f_1) == 1) then
doPlayerAddItem(cid, 2143, 50)
end
end
elseif red >= t.v then
doBroadcastMessage(t.o, MESSAGE_STATUS_WARNING)
setGlobalStorageValue(t.h, 1)
for _, pid in ipairs(getPlayersOnline()) do
if(getPlayerStorageValue(pid, t.f_2) == 1) then
doPlayerAddItem(cid, 2143, 50)
end
end
end
if getGlobalStorageValue(t.h) == 1 then
setGlobalStorageValue(t.a, 0)
setGlobalStorageValue(t.h, 0)
setGlobalStorageValue(t.wv, -1)
setPlayerStorageValue(cid, t.f, -1)
setPlayerStorageValue(cid, t.g, 0)
setPlayerStorageValue(cid, t.l, 0)
setPlayerStorageValue(cid, t.u, 0)
setPlayerStorageValue(cid, t.f_1, -1)
setPlayerStorageValue(cid, t.f_2, -1)
setPlayerStorageValue(cid, t.h, -1)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
doSendMagicEffect(getCreaturePosition(cid), 10)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid), MAGIC_EFFECT_UNKNOWN, COLOR_UNKNOWN, true)
doCreatureAddMana(cid, getCreatureMaxMana(cid))
doPlayerRemoveLethalConditions(cid)
for _, pid in ipairs(getPlayersOnline()) do
if(getPlayerStorageValue(pid, t.f_1) == 1 or getPlayerStorageValue(pid, t.f_2) == 1) then
setPlayerStorageValue(pid, t.f, -1)
doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
doSendMagicEffect(getCreaturePosition(pid), CONST_ME_TELEPORT)
setPlayerStorageValue(pid, t.g, 0)
setPlayerStorageValue(pid, t.l, 0)
setPlayerStorageValue(pid, t.u, 0)
setPlayerStorageValue(pid, t.f_1, -1)
setPlayerStorageValue(pid, t.f_2, -1)
setPlayerStorageValue(pid, t.h, -1)
doCreatureAddHealth(pid, getCreatureMaxHealth(pid), MAGIC_EFFECT_UNKNOWN, COLOR_UNKNOWN, true)
doCreatureAddMana(pid, getCreatureMaxMana(pid))
doPlayerRemoveLethalConditions(pid)
end
end
return false
end
return false
end
return true
end
Last edited: