• 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!

Gems from Forgottenl.org

Zewz

V.I.P Member
Joined
Jul 18, 2014
Messages
41
Reaction score
6
Location
Canada, Quebec
If you guys ever played forgottenl.org / forgottenl.net / forgottenl.hopto.org.

There was Collector gems, Reflect Gems, And one more that i dont remember the name.

Im trying to find a script for them..

The collector gem effect : When you click on the gem you save all the damages taken by your enemies for 10 seconds and throw em back against them.

The reflect gem effect : When you click on the gem you reflect 100% of your enemies damage to his self for 10 seconds.

Note : I'm using 0.3.6

Thanks =)
 
I can make the reflect gem.
Not sure how you'd do the collector gem.


Reflect gem scripts. (Untested)
register in actions.xml
Code:
local storage = 45001
local exstorage = 45002 -- exhaust storage
local ex_time = 60 -- seconds

local function timer_1(cid)
    if isPlayer(cid) then
        setPlayerStorageValue(cid, storage, 0)
    end
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if exhaustion.check(cid, exstorage) then
        doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
        return true
    end
    exhaustion.set(cid, exstorage, ex_time)
    setPlayerStorageValue(cid, storage, 1)
    addEvent(timer_1, 10000, cid)
    return true
end
Register in creaturescripts.xml and login.lua (both scripts)
Code:
local storage = 45001

function onLogin(cid)
    if getPlayerStorageValue(cid, storage) == 1 then
        setPlayerStorageValue(cid, storage, 0)
    end
    return true
end
Code:
local storage = 45001

function onStatsChange(cid, attacker, type, combat, value)
    if type == STATSCHANGE_HEALTHLOSS then
        if getPlayerStorageValue(cid, storage) == 1 then
            doTargetCombatHealth(cid, attacker, combat, -value, -value, CONST_ME_LOSEENERGY)
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_LOSEENERGY)
            return false
        end
    end
    return true
end
 
Last edited:
Thanks a ton! I'll test it as soon as i get home.

- Cheers :)

[18/07/2016 10:04:26] [Error - LuaScriptInterface::loadFile] data/actions/scripts/ReflectGem.lua:6: syntax error near 'if'
[18/07/2016 10:04:26] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/ReflectGem.lua)
[18/07/2016 10:04:26] data/actions/scripts/ReflectGem.lua:6: syntax error near 'if'
 
Last edited by a moderator:
[18/07/2016 10:04:26] [Error - LuaScriptInterface::loadFile] data/actions/scripts/ReflectGem.lua:6: syntax error near 'if'
[18/07/2016 10:04:26] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/ReflectGem.lua)
[18/07/2016 10:04:26] data/actions/scripts/ReflectGem.lua:6: syntax error near 'if'
Updated. :p
Code:
local timer_1(cid)
Code:
local function timer_1(cid)
Good old notepad at work. ;)
 
Not sure how you'd do the collector gem.
Store the damage with a lua table by player guid in statschange, it can be handled easily there.

Aye! Thank alot will test soon once aggain ! :]
Edit your last post instead of making doubleposts.
 
Back
Top