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

Lua TFS 1.3 walk on snow reward mount

Icaraii

Well-Known Member
Joined
Jan 5, 2020
Messages
469
Solutions
1
Reaction score
58
Hi guys,

I would like a script where the player will gain:
caped snowman when it does 100 steps on the snow;
festive snowman when it does 1000 steps on the snow;
muffled snowman when it does 10000 steps on the snow;

Thanks guys
 
Solution
this file data/movements/scripts/snow.lua

add in
Lua:
local stepStorage = 111111
local currentStorage = creature:getStorageValue(stepStorage)
if currentStorage < 10000 then
    currentStorage = currentStorage < 1 and 1 or currentStorage + 1
    creature:setStorageValue(potionStorage, currentStorage)
   
    if currentStorage == 100 then
        creature:addMount(mountId)
    end
    if currentStorage == 1000 then
        creature:addMount(mountId)
    end
    if currentStorage == 10000 then
        creature:addMount(mountId)
    end
end

Edit.. changed player -> creature on multiple lines
this file data/movements/scripts/snow.lua

add in
Lua:
local stepStorage = 111111
local currentStorage = creature:getStorageValue(stepStorage)
if currentStorage < 10000 then
    currentStorage = currentStorage < 1 and 1 or currentStorage + 1
    creature:setStorageValue(potionStorage, currentStorage)
   
    if currentStorage == 100 then
        creature:addMount(mountId)
    end
    if currentStorage == 1000 then
        creature:addMount(mountId)
    end
    if currentStorage == 10000 then
        creature:addMount(mountId)
    end
end

Edit.. changed player -> creature on multiple lines
 
Last edited:
Solution
Back
Top