• 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 (Switch)

XRobin

Beginner Mapper/Spriter
Joined
Nov 13, 2008
Messages
99
Reaction score
0
Idea from : http://otland.net/f81/outfit-changer-35234/

s6r4sz.jpg


Lua:
-- 90 % By Shawak / 10 % By XRobin --
local effects = {1, 2, 3, 4, 5, 6, 7}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	for i = 1, #effects do
	        doSendMagicEffect(getCreaturePosition(cid), effects[i])
	end
	doCreatureChangeOutfit(cid, {lookType = math.random(2, 134), lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0})
	doSendAnimatedText(getPlayerPosition(cid),"Changed!", math.random(01,255))
return TRUE
end

Maby :
 
Last edited:
Give ME credits for MY SCRIPTS!
Helping you don't mean posting the scripts on otland.
 
Added : Outfit Time.
Lua:
-- 75 % By Shawak / 25 % By XRobin--
local effects = {1, 2, 3, 4, 5, 6, 7}
local time = 5*10000  

function onUse(cid, item, fromPosition, itemEx, toPosition)
	for i = 1, #effects do
	        doSendMagicEffect(getCreaturePosition(cid), effects[i])
	end
	doSetCreatureOutfit(cid, {lookType = math.random(2, 134), lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, time)
	doSendAnimatedText(getPlayerPosition(cid),"Changed!", math.random(01,255))
return TRUE
end
-.-
 
use "_time" veriable without "time" it's function key in lua... it can debuging.

PHP:
local cfg = {
	effects = {1,7}, -- effect from x to y ({1,7} = 1,2,3,4,5,6,7)
	_time = 300 -- in seconds outfit condition (300=5mins)
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local _pos = getPlayerPosition(cid)
	for i=cfg.effects[1],cfg.effects[2] do doSendMagicEffect(_pos, [i]) end
	local out = getCreatureOutfit(cid) out.lookType = math.random(2, 134)
	doSetCreatureOutfit(cid, out, cfg._time) doSendAnimatedText(_pos,"Changed!", math.random(1,255))
	return TRUE
end

My version.
 
Last edited:
I tried add a cost, but only get debugs :S
Code:
local effects = {1, 2, 3, 4, 5, 6, 7}

function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerMoney(cid) < 25 then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Need more platinums...")
	doCreatureSay(cid, "Go go kill ;)", TALKTYPE_GREEN_1, cid)
return false
end

	for i = 1, #effects do
	        doSendMagicEffect(getCreaturePosition(cid), effects[i])
	end
	doCreatureChangeOutfit(cid, {lookType = math.random(2, 134), lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0})
	doPlayerRemoveMoney(cid, 25)
	doSendAnimatedText(getPlayerPosition(cid),"Changed!", math.random(01,255))
return TRUE
end
 
I like this script :)
how can i make it 100 charges only then it finishes?
 
Back
Top