OTClient change outfit from lua script

atef201080

New Member
Joined
Aug 16, 2009
Messages
8
Best answers
0
Reaction score
0
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
 

Summ

(\/)(;,,;)(\/) Y not?
Staff member
Global Moderator
Joined
Oct 15, 2008
Messages
4,168
Best answers
9
Reaction score
1,010
Location
Germany :O
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()
.
 
OP
A

atef201080

New Member
Joined
Aug 16, 2009
Messages
8
Best answers
0
Reaction score
0
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
 
Top