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

doCreatureChangeOutfit(cid, 319)

andu

Sold 649 scripts, 25 maps and 9 events!
Joined
Aug 7, 2009
Messages
978
Solutions
17
Reaction score
373
GitHub
olrios
Twitch
jamagowy
I want to make a script what change outfit, but not over time, i just change outfit for players

but this
PHP:
doCreatureChangeOutfit(cid, 319)
doesnt work
PHP:
attempt to index a number value
stack traceback:
    [C]: in function 'doCreatureChangeOutfit'
    data/creaturescripts/scripts/firstlogin.lua:4: in function <data/creaturescripts/scripts/firstlogin.lua:2>
 
"Tibia Error - Debug Asseration"

xD

but i have monsters with lookType 319, so i dont undearstand why i got this debug ;/
 
LUA:
  outfit = getCreatureOutfit(cid)
			outfit.lookType = 64   -- Here put the outfit id
   doCreatureChangeOutfit(cid, outfit)
 
could be something else in the script? :p
LUA:
  outfit = getCreatureOutfit(cid)
			outfit.lookType = 64   -- Here put the outfit id
   doCreatureChangeOutfit(cid, outfit)
i think 319 can't have colors anyway? and if there's no lookHead, etc it defaults to 0 :p
 
this debug what i got was becouse i have little error in code, now fixed
but this
PHP:
doCreatureChangeOutfit(cid,{lookType = 319})
dont work correctly becouse new players have outfit like invisible spell
 
Back
Top