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

Help with storage look TFS 1.3

Dohko

Active Member
Joined
Mar 7, 2017
Messages
100
Reaction score
29
Good afternoon friends, I need a script and I have no idea how to do it I need that if the player has a certain storage, he receives a title in the look. Example: You see player, he is son ot Atena. "

I need 5 diferent titles,

Son of Atena
Son of Zeus
Son of Poseidon
Son of Hades
Son of Dionisio

up, nobody know how i do this ?

Info of my server :

I use otx 3.9, I believe it is based on tfs 1.3

My look files

Creaturescripts

[XML] creaturescripts.xml - Pastebin.com
--------------------------------

Login.lua
[Lua] Login.lua - Pastebin.com
 
Last edited by a moderator:
Solution
To get this working, add this in the Player:eek:nLook (data/events/scripts/player.lua);
Lua:
    if thing:isCreature() then
        if thing:isPlayer() then
            local storage = thing:getStorageValue(titleStorage)
            if storage >= 1 then
                description = string.format("%s\n%s %s", description, thing:getSex() == PLAYERSEX_FEMALE and "She is " or "He is ", titles[titleStorage])
            end
        end
    end

And at the top of the script add this and remember to change the storage value and titles;
Lua:
local titleStorage = 10000
local titles = {
    [1] = "Son of ..",
    [2] = "Son of ..",
    [3] = "Son of .."
}
Was this even in requests?

Sorry, I did not understand what you mean.

Okay try to just write out anything to see if the script is being updated, if it isn't then make sure your server is reloaded.
If it does print out make sure the storage value is set.

Wibbenz, I still can not make it work, sorry to disturb you.
 
To get this working, add this in the Player:eek:nLook (data/events/scripts/player.lua);
Lua:
    if thing:isCreature() then
        if thing:isPlayer() then
            local storage = thing:getStorageValue(titleStorage)
            if storage >= 1 then
                description = string.format("%s\n%s %s", description, thing:getSex() == PLAYERSEX_FEMALE and "She is " or "He is ", titles[titleStorage])
            end
        end
    end

And at the top of the script add this and remember to change the storage value and titles;
Lua:
local titleStorage = 10000
local titles = {
    [1] = "Son of ..",
    [2] = "Son of ..",
    [3] = "Son of .."
}
 
Solution
To get this working, add this in the Player:eek:nLook (data/events/scripts/player.lua);
Lua:
    if thing:isCreature() then
        if thing:isPlayer() then
            local storage = thing:getStorageValue(titleStorage)
            if storage >= 1 then
                description = string.format("%s\n%s %s", description, thing:getSex() == PLAYERSEX_FEMALE and "She is " or "He is ", titles[titleStorage])
            end
        end
    end

And at the top of the script add this and remember to change the storage value and titles;
Lua:
local titleStorage = 10000
local titles = {
    [1] = "Son of ..",
    [2] = "Son of ..",
    [3] = "Son of .."
}

Thank you WibbenZ, you're the best!
 
Back
Top