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

Avoid change outfit botter tfs 1.2

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi folks!

Currently there is bot that can change the outfit color so fucking quickly, and it's bothering me, and my question is, there is a way to add a delay on this or maybe a fix for this inject on Tibia client?


foJszUd.gif


Thanks.
 
I am bad at LUA, but something like
Code:
function Creature:onChangeOutfit(outfit)
    local storage = 61500
    local every   = 100 -- Change outfit once every 100 seconds
    local last    = Creature:getStorageValue(storage) - os.time()

    if last < every then
        Creature:sendCancelMessage("You cannot change outfit for 1 minute.")
        return false
    end

    Creature:setStorageValue(storage, os.time())
    return true
end

Code:
function Creature:onChangeOutfit(outfit)
    if self:isPlayer() then
        local storage = 61500
        local every   = 100 -- Change outfit once every 100 seconds
        local last    = self:getStorageValue(storage)

        if last+every > os.time() then
            self:sendCancelMessage("You cannot change outfit for 1 minute.")
            return false
        end

        self:setStorageValue(storage, os.time())
    end
    return true
end
 
This guy always needs help, there is no "help him out real fast"
It is mainly why we haven't written the script for him, most of us in this thread can easily write a script as simple as this.
Maybe he doesnt have that much knowledge about the OT building world, Or the scripting languages, Like you do.

So, I don't understand people like you. You COULD help, EASILY, but still you choose not to?


Ket37xu.png
 
Maybe he doesnt have that much knowledge about the OT building world, Or the scripting languages, Like you do.

So, I don't understand people like you. You COULD help, EASILY, but still you choose not to?


Ket37xu.png
I choose not to immediately write scripts for those that are not even making an effort to write them themselves, I have no problem with sharing ideas or possible solutions.

Btw if it wasn't for people like me you would not have the multitude of diverse servers/tools at your disposal you have today :)
 
Code:
function Creature:onChangeOutfit(outfit)
    if self:isPlayer() then
        local storage = 61500
        local every   = 100 -- Change outfit once every 100 seconds
        local last    = self:getStorageValue(storage)

        if last+every > os.time() then
            self:sendCancelMessage("You cannot change outfit for 1 minute.")
            return false
        end

        self:setStorageValue(storage, os.time())
    end
    return true
end
Cheers! Like last ever gonna be less than every... haha :oops:
 
I choose not to immediately write scripts for those that are not even making an effort to write them themselves, I have no problem with sharing ideas or possible solutions.

Btw if it wasn't for people like me you would not have the multitude of diverse servers/tools at your disposal you have today :)
I'm not speaking of you coders, I'm speaking about people like you who could easily help but still dont. " :) "
 
I'm not speaking of you coders, I'm speaking about people like you who could easily help but still dont. " :) "
Helping and spoon feeding are not the same thing, please don't confuse the two.

@president vankk is always asking for someone to fix x or y or just build whatever, I never seen him once produce a piece of code he wrote himself.. for some odd reason he doesn't seem to comprehend what is in front of him.

On a final note, he like so many others are making money off of this community, the very least people like this can do is make an attempt to learn how these scripts are constructed and then when they are stuck ask for help.

This isn't the case with @president vankk he just immediately asks for "help" however help requires that you make an effort, the support boards are here for existing problems not problems which have yet to exist.

Go to request board if you want free shit.
 
Last edited:
Helping and spoon feeding are not the same thing, please don't confuse the two.

@president vankk is always asking for someone to fix x or y or just build whatever, I never seen him once produce a piece of code he wrote himself.. for some odd reason he doesn't seem to comprehend what is in front of him.

On a final note, he like so many others are making money off of this community, the very least people like this can do is make an attempt to learn how these scripts are constructed and then when they are stuck ask for help.

This isn't the case with @president vankk he just immediately asks for "help" however help requires that you make an effort, the support boards are here for existing problems not problems which have yet to exist.

Go to request board if you want free shit.

Dude, what is your problem? I think is because you're no one in life that came here to rage on me/everyone.

I came on Support Board when I don't know make some thing, I can not do something, or having problems that piece me off. If you are bothered by my presence, there is an option to ignore on this forum, or if you want it, just don't answer, and be in silent - your silent is like poetry.

Did you notice I did not rage you on theses days? And I'll not, because I'm currently being higher than you in maturity, Mr. 40 years old.
 
Dude, what is your problem? I think is because you're no one in life that came here to rage on me/everyone.

I came on Support Board when I don't know make some thing, I can not do something, or having problems that piece me off. If you are bothered by my presence, there is an option to ignore on this forum, or if you want it, just don't answer, and be in silent - your silent is like poetry.

Did you notice I did not rage you on theses days? And I'll not, because I'm currently being higher than you in maturity, Mr. 40 years old.
I stopped reading at "Dude what is your problem?"

I don't have a problem, you do.. well you don't actually... you do and you don't.. you come to support to request scripts when its the request boards you should be requesting scripts in.

So this is your problem, you can't follow simple instructions about where to post..
 
Maybe he doesnt have that much knowledge about the OT building world, Or the scripting languages, Like you do.

So, I don't understand people like you. You COULD help, EASILY, but still you choose not to?


Ket37xu.png

ofc he can easily do it but whats the point? some years (idk realy) he was just like you, with no knowledge but he tried to learn and he learned so, why dont u try it? like me, he and almost all who knows how to do something did?
 
Code:
function Creature:onChangeOutfit(outfit)
       if self:isPlayer() then
              local storage = 61500
              if self:getExhaustion() > os.time() then
                     self:sendTextMessage(MESSAGE_STATUS_SMALL, 'You are exhausted.')
                     return true
              end
              self:setExhaustion(storage, 60 * 60 * 1000)
      end
      return true
end
I'm not in my computer to write in a good editor and don't remeber the MESSAGE CONST, if is wrong please post the correct ;)
and ahhhh vankk, please stop to ask before try by yourself please, is not about this time that I saw someone talking about it
 
ofc he can easily do it but whats the point? some years (idk realy) he was just like you, with no knowledge but he tried to learn and he learned so, why dont u try it? like me, he and almost all who knows how to do something did?
Your lack of english skills, Just denied everything you just said..
 
No need to act like that, just because english isn't his main language.

This is a Open-Tibia forum, not an english class.. a lot of people uses translators.
He did say and i quote "some years (idk realy) he was just like you, with no knowledge but he tried to learn and he learned so, why dont u try it? like me" Well, If hes been trying to learn for years, He should speak proper english by now.
 
He did say and i quote "some years (idk realy) he was just like you, with no knowledge but he tried to learn and he learned so, why dont u try it? like me" Well, If hes been trying to learn for years, He should speak proper english by now.
lmao bro u r stupid as fuck and thats just enough for me
 
He did say and i quote "some years (idk realy) he was just like you, with no knowledge but he tried to learn and he learned so, why dont u try it? like me" Well, If hes been trying to learn for years, He should speak proper english by now.
I think he was referring to me, years ago i didn't know anything about ot's or scripting in lua but i wanted to learn...

So I started taking existing scripts and modifying them, my 1st script was welcoming a player to the game, even tho i got a lot of grief from the community for the way it was written, I didn't let it deter me.

Eventually I wrote the square trainer and still got shit for it... eventually I left this community and went to a different framework (love2d) , in this community you were given an engine and a framework.. thats it, everything else you had to build yourself, so it forced me to learn lua.. and I am glad I had the experience with it... am I an expert at lua? no but I try which is more than I can say for most of you people in this community.
 
Code:
outfitChangedTimeByPid = {}
function Creature:onChangeOutfit(outfit)
    if self:isPlayer() then
        local pid = self:getId()
        local lastChangedTime = outfitChangedTimeByPid[pid]
        local delaySecondsPerChange = 2
        local currenTime = os.time()
    
        outfitChangedTimeByPid[pid] = currenTime    
        if lastChangedTime then
            if lastChangedTime + delaySecondsPerChange > currenTime then return end
        end
        addEvent(allowPlayerToChangeOutfit, delaySecondsPerChange *1000, pid)
    end
    return true
end

function allowPlayerToChangeOutfit(pid) -- use this functions before whenever you forcefully want to change player outfit (for quests, events, etc)
local player = Player(pid)
    if player then outfitChangedTimeByPid[player:getId()] = nil end
end
 
Last edited:
Back
Top