• 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.
 
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.
Outfit colour chaning like this uses packets that are being sent from client to server, You just need to block these packets from being sent rapidly.
 
Create a creature script that checks for outfit change and adds an exhaust on the character for x seconds.

Or if you want the player to be punished for using this..
Make a counter that adds 1 second to the counter each time the outfit is changed.
If the time on the counter is 60 seconds ahead of system time, deliver punishment.

(example: A player spamming outfit change can only really change outfits approx 1 second at fastest.. and definitely not that fast for over a minute consecutively, however a bot can do approx 10x a second.

Bot uses outfit change 10x a second for 6.6 seconds, will receive punishment.)
 
Last edited by a moderator:
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.
Another way is to store the players outfit as a condition, use onLogin with a separate function after so many minutes/seconds to be executed after the player logins, most players who login into the game setup their character to look a certain way and continue playing, you can then proceed to use a talkaction to disable the condition, which you can apply an exhaust one which supersedes the automatic re-enabling of the condition, not sure if you can pull up the outfit window with a talkaction, but it would be something viable to look into :p
 
Another way is to store the players outfit as a condition, use onLogin with a separate function after so many minutes/seconds to be executed after the player logins, most players who login into the game setup their character to look a certain way and continue playing, you can then proceed to use a talkaction to disable the condition, which you can apply an exhaust one which supersedes the automatic re-enabling of the condition, not sure if you can pull up the outfit window with a talkaction, but it would be something viable to look into :p
Code:
doPlayerSendOutfitWindow(cid) -- 0.3.7
I'm sure there's one for 1.x as well. :oops:
 
Add this to data/events/creature.lua

Replace the code --> Creature:onChangeOutfit()
Code:
function Creature:onChangeOutfit(outfit)
local change_outfit = 61500
    if Creature:getStorageValue(change_outfit) == 1 then
        return Creature:sendCancelMessage("You cannot change outfit for 1 minute.")
    end
    Creature:setStorageValue(change_outfit, 1)
    addEvent(removeStorage, 60 * 1000, Creature)
    return true
end

function removeStorage(Creature)
Creature:setStorageValue(change_outfit, 0)
end

Then in events.xml
change enabled to 1
Code:
<event class="Creature" method="onChangeOutfit" enabled="1" />
 
Add this to data/events/creature.lua

Replace the code --> Creature:eek:nChangeOutfit()
Code:
function Creature:onChangeOutfit(outfit)
local change_outfit = 61500
    if Creature:getStorageValue(change_outfit) == 1 then
        return Creature:sendCancelMessage("You cannot change outfit for 1 minute.")
    end
    Creature:setStorageValue(change_outfit, 1)
    addEvent(removeStorage, 60 * 1000, Creature)
    return true
end

function removeStorage(Creature)
Creature:setStorageValue(change_outfit, 0)
end

Then in events.xml
change enabled to 1
Code:
<event class="Creature" method="onChangeOutfit" enabled="1" />
This will crash the server if the player logs out.
 
Why is that?
Most likely because creature wont be found when event want to remove the storage.
I don't think it will crash tbh.

Better idea is to store the timestamp, and check if it has passed X seconds since last outfit change rather than add a event like this.
 
I haven't worked much with timestamps so if one of you know how why not help this guy out real fast?
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.
 
I haven't worked much with timestamps so if one of you know how why not help this guy out real fast?
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
 
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.

savage, did you take your pills today? Old man.

@Cornex
I'll give a shoot on it in few minutes, and edit this post, thanks.
 
Back
Top