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

Action Outfit changer

Figaro

Banned User
Joined
Jun 25, 2008
Messages
275
Reaction score
0
Location
696E 2079 6F75 7220 6265 64
Well this isnt so special but this is my first script :) Im making open battle event so im gonna use this script on that :) Mayby this is useful to somebody, dunno :)


Data -> Actions -> Actions.xml
Code:
	<action uniqueid="1323" event="script" value="changeoutfit.lua"/>
Data -> Actions -> Scripts -> changeoutfit.lua
Code:
local outfit = {lookType = 128, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
local effect2 = 30
local effect3 = 27
local effect4 = 29
local effect = 28

	function onUse(cid, item, fromPosition, itemEx, toPosition) do
                doCreatureChangeOutfit(cid, outfit)
	        doSendMagicEffect(getCreaturePosition(cid), effect)
	        doSendMagicEffect(getCreaturePosition(cid), effect2)
	        doSendMagicEffect(getCreaturePosition(cid), effect3)
	        doSendMagicEffect(getCreaturePosition(cid), effect4)
		doPlayerSendTextMessage(cid,21,"Your outfit is changed!")
	end
    return true
end
Edit this to change diferent outfit:
Code:
local outfit = {lookType = 128, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
 
MORE FAST ;D

Code:
	<talkaction words="!of" 	 script="changeoutfit.lua"/>
Code:
local outfit = {lookType = 128, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
local effect2 = 30
local effect3 = 27
local effect4 = 29
local effect = 28

	function onSay(cid, item, fromPosition, itemEx, toPosition) do
                doCreatureChangeOutfit(cid, outfit)
	        doSendMagicEffect(getCreaturePosition(cid), effect)
	        doSendMagicEffect(getCreaturePosition(cid), effect2)
	        doSendMagicEffect(getCreaturePosition(cid), effect3)
	        doSendMagicEffect(getCreaturePosition(cid), effect4)
		doPlayerSendTextMessage(cid,21,"Your outfit is changed!")
	end
    return true
end
 
nice!
Would be nice if you could make something like this, the leader of a party says !outfit and all members in the party gets same outfit as the leader ;)
 
it's not working ^^ using tfs 8.60 i did the same as you did any ideas?
 
MORE FAST ;D

Code:
	<talkaction words="!of" 	 script="changeoutfit.lua"/>
Code:
local outfit = {lookType = 128, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
local effect2 = 30
local effect3 = 27
local effect4 = 29
local effect = 28

	function onSay(cid, item, fromPosition, itemEx, toPosition) do
                doCreatureChangeOutfit(cid, outfit)
	        doSendMagicEffect(getCreaturePosition(cid), effect)
	        doSendMagicEffect(getCreaturePosition(cid), effect2)
	        doSendMagicEffect(getCreaturePosition(cid), effect3)
	        doSendMagicEffect(getCreaturePosition(cid), effect4)
		doPlayerSendTextMessage(cid,21,"Your outfit is changed!")
	end
    return true
end

You can do too a random outfit with math.random like:
local lookHead1 = math.random(0,128)
local lookHead1 = math.random(0,128)
local lookBody1 = math.random(0,128)
local lookLegs1 = math.random(0,128)
local lookFeet1 = math.random(0,128)
local lookAddons1 = math.random(0,3)
local outfit = {lookType = 128, lookHead = lookHead1, lookBody = lookBody1, lookLegs = lookLegs1, lookFeet = lookFeet1, lookTypeEx = 0, lookAddons = lookAddons1}
 
Back
Top