• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Change Outfit By Item

SnowFox

New Member
Joined
May 18, 2008
Messages
264
Reaction score
0
OTs with donation somtimes have an donation item were it can change someones look type into a creature or even just have it as a quest item. so i made a script based off AGS script.

In Actions/Scirpts make a new lua called outfitchange.lua and put this into it.

Code:
local common = {"chakoya toolshaper", "chakoya windcaller", "silver rabbit", "enlightened of the cult", "pirate marauder", "dharalion", "diabolical imp", "banshee", "goblin", "lich", "crypt shambler", "ghost", "ghoul", "grim reaper", "vampire", "blue djinn", "monk", "barbarian skullhunter", "kongra", "cockroach", "crab","black sheep","crimson frog","azure frog","elf scout"}
local duration = 15000
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 5810 then
		doSetMonsterOutfit(cid,common[math.random(#common)],duration*1000)
	end
	doSendMagicEffect(fromPosition,CONST_ME_HOLYAREA)
	return TRUE
end


In actions.xml put anywhere inbeetween <actions> and </actions>

Code:
<action itemid="5810" script="outfitchange.lua" />



CREDITS

Me
AGS
 
Nice anyway... i dont use but i see nobody want it... i dont have server yet.. but maybe going up ;)
 
Back
Top