function onUse(cid, item, fromPosition, itemEx, toPosition)
local v, tmp = math.random(333), getCreatureOutfit(cid)
while isInArray({tmp.lookType, 75, 135, 266, 302}, v) == TRUE or v <= 1 or (v > 160 and v < 192) or v > 333 do
v = math.random(351)
end
tmp.lookType = v
doCreatureChangeOutfit(cid, tmp)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
doCreatureSay(cid, 'Outfit Changed!.', TALKTYPE_ORANGE_1, false, cid, getThingPos(cid))
return TRUE
end
<action itemid="Put here Outfit Changer itemID" script="Outfit Lever.lua"/>
So I put a action id on here and action id On a stone or what i want ?Code:<action itemid="Put here Outfit Changer itemID" script="Outfit Lever.lua"/>
<action itemid="11090" script="Outfit Lever.lua"/>
Yea, on all statues that has [11090],But I want it to be on a lever . and If I have like that U will get monster outfit on all statues ?
<action itemid="Any action ID" script="Outfit Lever.lua"/>
For real I don't know, but I'll edit if I found.Is there any Monster that change looktype all the time ?![]()
This script is lever script, changes your outfit randomly into monsters [Infinte USE]., You could put the actionID of this script on a statue or stone or something.. [ I choosed the ITEM ID 'ACTIONID' 11090, As to be a statue, if you click on the statue, it changes your outfit randomly..
At actions/scripts/create Outfit Lever.lua and paste this in it:
At actions/actions.XML paste this..:Code:function onUse(cid, item, fromPosition, itemEx, toPosition) local v, tmp = math.random(333), getCreatureOutfit(cid) while isInArray({tmp.lookType, 75, 135, 266, 302}, v) == TRUE or v <= 1 or (v > 160 and v < 192) or v > 333 do v = math.random(351) end tmp.lookType = v doCreatureChangeOutfit(cid, tmp) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) doCreatureSay(cid, 'Outfit Changed!.', TALKTYPE_ORANGE_1, false, cid, getThingPos(cid)) return TRUE end
If I helped, Click [here]Code:<action itemid="Put here Outfit Changer itemID" script="Outfit Lever.lua"/>
It worked great with me!