yogiikke
:D
- Joined
- Mar 24, 2013
- Messages
- 59
- Reaction score
- 9
Hello Otland i wanted a reward for my last man standing event from @nevix
https://otland.net/threads/tfs-1-0-last-man-standing-by-nevix.222108/
And decided to remake https://otland.net/threads/action-exp-scroll-by-stages.133794/ posted by @kimokimo
and since even he doesnt know where its from i dont know either so thank you whoever made that script from kimokimo.
Expscroll.lua
i used parchement scroll u can change that ofc.
actions.xml
https://otland.net/threads/tfs-1-0-last-man-standing-by-nevix.222108/
And decided to remake https://otland.net/threads/action-exp-scroll-by-stages.133794/ posted by @kimokimo
and since even he doesnt know where its from i dont know either so thank you whoever made that script from kimokimo.
Expscroll.lua
Code:
-- Exp scroll By Stages by kimokimo https://otland.net/threads/action-exp-scroll-by-stages.133794/ --
-- Remade for TFS 1.1 By Yogiikke --
local config = {
funnyEffect = "YES",
minimumLevel = 7,
maximumLevel = 500, -- for infinite type math.huge
}
local addExp = {
[{config.minimumLevel, 100}] = 2500000,
[{100, 200}] = 15000000,
[{200, 300}] = 22500000,
[{300, 400}] = 30000000,
[{400, 500}] = 100000000,
[{500, 600}] = 20000000,
[{600, 1000}] = 30000000,
[{1000, 2000}] = 45000000,
[{2000, 2500}] = 125000000,
[{2500, 7500}] = 150000000,
[{7500, 10000}] = 200000000,
[{10000, 20000}] = 250000000,
[{20000, config.maximumLevel}] = 300000000
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local level = player:getLevel()
local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE)
if(level < config.minimumLevel) then
player:sendCancelMessage("You need to be at least "..config.minimumLevel.." to use a scroll.")
return false
end
if(level >= config.maximumLevel) then
player:sendCancelMessage("Your level is too high for using a scroll.")
return true
end
for k, v in pairs(addExp) do
if level >= k[1] and level < k[2] then
player:addExperience(v)
player:sendTextMessage(22, "Experience Scroll Gave You " .. v .." experience!")
item:remove(item.uid, 1)
break
end
end
if config.funnyEffect == "YES" then
local playerexp = addExp
local pos = player:getPosition()
local positions = {
{x=pos.x+1,y=pos.y-1,z=pos.z},
{x=pos.x-1,y=pos.y-1,z=pos.z},
{x=pos.x+1,y=pos.y+1,z=pos.z},
{x=pos.x-1,y=pos.y+1,z=pos.z},
{x=pos.x+1,y=pos.y,z=pos.z},
{x=pos.x-1,y=pos.y,z=pos.z},
{x=pos.x,y=pos.y+1,z=pos.z},
{x=pos.x,y=pos.y-1,z=pos.z}
}
for i = 1, table.getn(positions) do
Position(i):sendMagicEffect(effect)
end
end
end
i used parchement scroll u can change that ofc.
actions.xml
Code:
<action itemid="1948" script="expscroll.lua"/>
Last edited: