Mateus Robeerto
Excellent OT User
I got a script here.
And I've been updated to TFS 1.5 but half of 50% experience doesn't work. For example, I want a boost that increases the experience points your character gains from hunting by 50%! It lasts for 1 hour of hunting, being paused if the resistance drops below 14 hours. Is there a way to do this?
script:
Scroll that boosts exp for x time
Looking for a script for 1.1 TFS that boosts a players exp for X minutes, (example 2 hours) Anyone have one made or can put one together?
otland.net
And I've been updated to TFS 1.5 but half of 50% experience doesn't work. For example, I want a boost that increases the experience points your character gains from hunting by 50%! It lasts for 1 hour of hunting, being paused if the resistance drops below 14 hours. Is there a way to do this?
script:
Lua:
local boostStorage = 693690
local boostDuration = 3600
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
local currentBoostEnd = player:getStorageValue(boostStorage)
local currentStamina = player:getStamina()
if currentBoostEnd >= os.time() and currentStamina > 14 * 60 then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "You already have double XP!")
return true
end
local newBoostEnd = os.time() + boostDuration
if currentStamina <= 14 * 60 then
local remainingStaminaTime = currentStamina * 60
newBoostEnd = os.time() + remainingStaminaTime
end
player:setStorageValue(boostStorage, newBoostEnd)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Your 1-hour double XP has started!")
item:remove(1)
return true
end
function Player:onGainExperience(source, exp, rawExp)
local boostEnd = self:getStorageValue(boostStorage)
if boostEnd >= os.time() then
exp = exp * 2
end
return exp
end
Last edited: