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

need xp ring for tfs 1.0

mimus

New Member
Joined
Mar 14, 2012
Messages
168
Reaction score
2
hello! well i was woundering that someone could give one script for and xp ring

as always tanks for reeding
 
You need to provide more information about this ring.
There isn't a standard "xp ring" that everyone uses.
 
oh jeje well im using tfs 1.0, i need to the xp ring give 1.5x boost of xp for 1 hour hmm what else?
 
What is the ID of the ring?
Do you want the ring to stop time when unequipped or continue all the way non-stop?
 
Sorry for late response, I wasn't sure which ring you were gonna use.

Anyways, in data/events/scripts, open player.lua and find:
Code:
function Player:onGainExperience(source, exp, rawExp)
    return exp
end

Replace it with:
Code:
function Player:onGainExperience(source, exp, rawExp)
    local ringItem = self:getSlotItem(CONST_SLOT_RING)

    if ringItem and ringItem:getId() == 18528 then
        return exp * 1.5
    end

    return exp
end

You also want to enable the event, so open events.xml and change:
Code:
<event class="Player" method="onGainExperience" enabled="0" />

To:
Code:
<event class="Player" method="onGainExperience" enabled="1" />
 
i have this on events
Code:
function Player:onGainExperience(source, exp, rawExp)
    local party = self:getParty()
    if party then
        if party:isSharedExperienceEnabled() and party:isSharedExperienceActive() then
            local bonus = config[party:getVocationCount()]
            if not bonus then
                return exp
            end

            exp = exp * bonus
        end
    end
    return exp
end


if i change it i would change the xpshare no? can you helpme to change it with out affect the sharexp?
 
Back
Top