• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[TFS 1.0] Exhaust Question

bybbzan

mapper
Joined
Aug 4, 2012
Messages
809
Solutions
2
Reaction score
136
Location
Sweden
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?

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!
 
I don't see any exhaust-related function there.
Besides, if you want to make them get exhausted when they step in the teleport then you need to edit or add a movevent script.
 
I don't see any exhaust-related function there.
Besides, if you want to make them get exhausted when they step in the teleport then you need to edit or add a movevent script.

Yea exhaust may be the wrong word. Its the
Code:
addEvent(setGlobalStorageValue, 6 * 20 * 1000 + 30 * 60 * 1000, item.uid, 0)
that i need to change so just the "active" boss players will get that storage, not all players.
 
but that's a global storage, if you want an individual storage for each of those active players then you need to add them a player storage
 
Back
Top