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

(TFS 1.0) Looking for All Addons and Mounts at Log in. Lua

CesarZ

Well-Known Member
Joined
Sep 20, 2012
Messages
268
Solutions
4
Reaction score
63
Make sure it works for TFS 1.0. Give me the details to install it properly. Thanks guys!
 
Solution
B
Paste this below line 3 of that file:

Lua:
local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102

if player:getStorageValue(52325) < 1 then
    for i = 1, mounts do
        player:addMount(i)
    end
    for i = 1...
I dont know what version of Tibia TFS 1.0 is running (what outfits and mounts exist), but I took these outfits and mounts from TFS 1.3.
You can check and see what outfits your TFS has in data/xml/outfits.xml, which are the ones listed in outfits = {} and then just remove the ones you dont have.

Same goes for mounts, but then you just change the mounts number to the last mount id located at data/xml/mounts.xml

Here you can see where I got the number 102 from: otland/forgottenserver (https://github.com/otland/forgottenserver/blob/master/data/XML/mounts.xml#L104)

And then you just place the code below in data/events/scripts/player.lua, at the bottom of the file.
Then reload events, or restart server and login.
Lua:
local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102

function onLogin(player)
    if player:getStorageValue(52324) < 1 then
        for i = 1, mounts do
            player:addMount(i)
        end
        for i = 1, #outfits do
            player:addOutfit(outfits[i])
            player:addOutfitAddon(outfits[i], 3)
        end
        player:setStorageValue(52324, 1)
    end
    return true
end
 
Last edited:
I added it on player.lua. It doesn't work. or maybe is missing something??
Do you have any errors?
Do you get the mounts and not the outfits?
Do you get the addons?
Do you have all the outfits unlocked for everyone to use?
Is free premium set in config.lua?

Just saying it doesnt work does not tell me anything :oops:
 
I get no error either the mounts nor the outfits. I put it all the way at the bottom of the script. Of player.lua. its like it didnt do nothing. I pasted at the. Bottom after the "end"
Post automatically merged:

I got free premmy setup in my configuration also
 
Yea i did created a new character. It's weird because I added this Script, it didn't came up with any error but it doesn't work. it's like i placed it in the wrong spot and it's not even detecting itplayer lueee.JPG
 
Lua:
function onLogin(cid)
local player = Player(cid)
local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102

    if player:getStorageValue(52325) < 1 then
        for i = 1, mounts do
            player:addMount(i)
        end
        for i = 1, #outfits do
            player:addOutfit(outfits[i])
            player:addOutfitAddon(outfits[i], 3)
        end
        player:setStorageValue(52325, 1)
    end
    return true
end
Try this maybe.
 
Last edited:
And then you just place the code below in data/events/scripts/player.lua, at the bottom of the file.
Then reload events, or restart server and login.
shouldn't this creeatureevent script be placed at creatureevent script folder and xml? or tfs 1.0 didn't had it yet? 🤔
 
shouldn't this creeatureevent script be placed at creatureevent script folder and xml? or tfs 1.0 didn't had it yet? 🤔

Correct but no need to do anything in XML since all the TFS distros I know have a creaturescripts folder and a login.lua (not something new from 1.x)
Just paste it below this:
Lua:
local player = Player(cid)
 
Nothing yet. not error no nothing. :S im running 10.41 client on TFS 1.0

Should i be adding anything on the Event.XML?lll.JPG
 
Last edited:
Paste this below line 3 of that file:

Lua:
local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102

if player:getStorageValue(52325) < 1 then
    for i = 1, mounts do
        player:addMount(i)
    end
    for i = 1, #outfits do
        player:addOutfit(outfits[i])
        player:addOutfitAddon(outfits[i], 3)
    end
    player:setStorageValue(52325, 1)
end
 
Solution
Paste this below line 3 of that file:

Lua:
local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102

if player:getStorageValue(52325) < 1 then
    for i = 1, mounts do
        player:addMount(i)
    end
    for i = 1, #outfits do
        player:addOutfit(outfits[i])
        player:addOutfitAddon(outfits[i], 3)
    end
    player:setStorageValue(52325, 1)
end
Way to go swoop in at the last second with my script <3
 
Way to go swoop in at the last second with my script <3

Sorry dude, the credit is definitely yours. I would never claim any script was mine unless I specify it.

Also, if i said to add your script to that login.lua, I am pretty sure the OP would add the unnecessary parts and not integrate properly, leading to another post with "end" script errors etc xD
 
Last edited by a moderator:
Thanks all of you guys it worked i will post the script just for other people that need this can see what works.

Tested with TFS 1.0, Tibia 10.41 client Worked! All addons and Outfit at login.. Thanks for the help guys.

This is the script.
Code:
local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102

if player:getStorageValue(52325) < 1 then
    for i = 1, mounts do
        player:addMount(i)
    end
    for i = 1, #outfits do
        player:addOutfit(outfits[i])
        player:addOutfitAddon(outfits[i], 3)
    end
    player:setStorageValue(52325, 1)
end




This is how i put it in creaturescript/script/login.lua
Code:
function onLogin(cid)
    local player = Player(cid)
        local loginStr = "Welcome to " .. configManager.getString(configKeys.SERVER_NAME) .. "!"
   
    local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102

if player:getStorageValue(52325) < 1 then
    for i = 1, mounts do
        player:addMount(i)
    end
    for i = 1, #outfits do
        player:addOutfit(outfits[i])
        player:addOutfitAddon(outfits[i], 3)
    end
    player:setStorageValue(52325, 1)
end
   
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."
        player:sendOutfitWindow()
   
    else
        if loginStr ~= "" then
            player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
            doCreatureSay(cid, "Welcome", TALKTYPE_ORANGE_1)
            doPlayerAddBlessing(cid, 1)
            doPlayerAddBlessing(cid, 2)
            doPlayerAddBlessing(cid, 3)
            doPlayerAddBlessing(cid, 4)
            doPlayerAddBlessing(cid, 5)
        end

        loginStr = string.format("Your last visit was on %s.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
    end
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)

    player:registerEvent("PlayerDeath")
    player:registerEvent("LevelLock")
    player:registerEvent("player")
    return true
end
 
Back
Top