Hello!
Now every player on the server get exhausted when someone does Warzones
Is it possible to just make the players who entered the teleport exhausted instead?
Please write that into the script.
Appreciate all help!
Now every player on the server get exhausted when someone does Warzones
Is it possible to just make the players who entered the teleport exhausted instead?
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.uid == 3143) then
--doSendMagicEffect(fromPosition, CONST_ME_MAGIC_GREEN)
if getGlobalStorageValue(item.uid) == 1 then
doCreatureSay(cid, "The crystals are still recharging, you have to wait longer.", TALKTYPE_ORANGE_1, false, cid, toPosition)
return true
end
if(getGlobalStorageValue(item.uid) < 1) then
setGlobalStorageValue(item.uid, 1)
for i = 1, 1 do
doCreatureSay(cid, 'The crystals are charging.', TALKTYPE_ORANGE_1)
end
local pos = {x = 932, y = 549, z = 10}
doTransformItem(getTileItemById(pos, 17999).uid, 1387)
doSetItemActionId(getTileItemById(pos, 1387).uid, 3144)
addEvent(function () doTransformItem(getTileItemById(pos, 1387).uid, 17999) end, 60000)
addEvent(doSummonCreature, 10 * 1000, "deathstrike", {x = 933, y = 598, z = 10})
addEvent(doSendMagicEffect, 6 * 20 * 1000, {x = 928, y = 596, z = 10}, CONST_ME_TELEPORT)
addEvent(teleportAllPlayersFromArea, 6 * 20 * 1000 + 30 * 60 * 1000, {
{x = 916, y = 588, z = 10},
{x = 953, y = 624, z = 10}
}, {x = 830, y = 559, z = 10})
addEvent(removeBoss, 6 * 20 * 1000 + 30 * 60 * 1000)
addEvent(setGlobalStorageValue, 6 * 20 * 1000 + 30 * 60 * 1000, item.uid, 0)
end
end
return true
end
function removeBoss(fromArea, bossName)
for x = 916, 953 do
for y = 588, 624 do
for z = 10, 10 do
if(getThingfromPos({x = x, y = y, z = z, stackpos = 255}).uid > 0) then
if(isMonster(getThingfromPos({x = x, y = y, z = z, stackpos = 255}).uid)) then
if(string.lower(getCreatureName(getThingfromPos({x = x, y = y, z = z, stackpos = 255}).uid)) == "deathstrike") then
doRemoveCreature(getThingfromPos({x = x, y = y, z = z, stackpos = 255}).uid)
end
end
end
end
end
end
return true
end
Please write that into the script.
Appreciate all help!