• 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 Outfit Box

Erexo

Kage
Premium User
Joined
Mar 27, 2010
Messages
742
Solutions
5
Reaction score
198
Location
Pr0land
GitHub
Erexo
Hello,
this action simply change player outfit until his logout, next out change etc.
It have infinity charges, but you need full mana to change outfit.
Also you can choose which outfits are available.
You can use it on other players.

LUA:
local outfits = {578,577,576,571,545,491,484,445,438,429,423,346,344,339,335,334,332,330,298,61,43,35,24,21}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) >= 100 then
	if isPlayer(itemEx.uid) then
		if getPlayerMana(cid) == getPlayerMaxMana(cid) then
			if getCreatureName(cid) == getCreatureName(itemEx.uid) then
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have changed your outfit.")
				doSetCreatureOutfit(cid, {lookType = outfits[math.random(#outfits)]}, -1)
				doSendMagicEffect(getCreaturePosition(cid), 13)
			else
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(itemEx.uid) .. " outfit is now changed.")
				doPlayerSendTextMessage(itemEx.uid, MESSAGE_STATUS_CONSOLE_BLUE, "Your outfit has been changed by " .. getCreatureName(cid))
				doSetCreatureOutfit(itemEx.uid, {lookType = outfits[math.random(#outfits)]}, -1)
				doSendMagicEffect(getCreaturePosition(itemEx.uid), 13)
			end
				if getPlayerAccess(cid) <= 2 then
					doPlayerAddMana(cid, -getPlayerMana(cid), false)
					doPlayerAddSpentMana(cid, getPlayerMana(cid))
				end
		else
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You need full mana to use that powerful tool.")
			doSendMagicEffect(getCreaturePosition(cid), 2)
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You can only use this on players.")
		doSendMagicEffect(getCreaturePosition(cid), 2)
	end
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You need 100 level to use that powerful tool.")
		doSendMagicEffect(getCreaturePosition(cid), 2)
	end
return true
end
 
Last edited:
Back
Top