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

OTClient change outfit from lua script

atef201080

Member
Joined
Aug 16, 2009
Messages
26
Solutions
1
Reaction score
20
I'm trying to change outfit from lua script as this

local outfit = player:getOutfit()
outfit.type = math.random(128,131)
g_game.changeOutfit(outfit)

but it doesn't work, but it changes normally when i change it from the outfit window the client was compiled with Bot protection off
also i tried using player:setOutfit(outfit) but It's client side
 
It is likely that whatever server you are using requires you to request the outfits list before changing your outfit.
If you don't do this, requests to change the outfit will simply be ignored.
The corresponding function is
Lua:
g_game.requestOutfit()
.
 
It is likely that whatever server you are using requires you to request the outfits list before changing your outfit.
If you don't do this, requests to change the outfit will simply be ignored.
The corresponding function is
Lua:
g_game.requestOutfit()
.

It's working now, Thanks <3
 
Back
Top