• 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 to monster outfit statue [Only vip player]

Cornex

Web Developer
Staff member
Global Moderator
Joined
Jun 15, 2008
Messages
3,444
Solutions
5
Reaction score
1,166
Location
Sweden
Hello ther! I have made an script that changes your outfit to an random monster outfit. Only vip players ingame will be able to press and use it.
Tested 0.3.6+
Please dont post your verisions of this script. (Respect)

Hopefully it usefull for someone :) Repp? (A)

First go to data/actions/scripts and make an file named changeoutfit.lua

And put inside:

Lua:
local price = 100000 --- How much it gonna cost. This is 100k
local duration = 18000 --- How long time you gonna have the outfit.
local monsters = {"orc warrior", "pirate cutthroat", "dworc voodoomaster", "dwarf guard", "minotaur mage"} --- Outfitnames. You can add more.

 
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getPlayerVipDays(cid) < 1 then	  
	            doPlayerSendTextMessage(cid,19,"You need to be vip to change to monster outfit!")
	    elseif  getPlayerVipDays(cid) >= 1 then	
                doPlayerRemoveMoney(cid, price) 
                doSetMonsterOutfit(cid,monsters[math.random(#monsters)],duration*1000)
                doPlayerSendTextMessage(cid, 20, 'You got a random outfit for '.. price ..' gold coins!')               
        else
            doPlayerSendTextMessage(cid, 20, 'You don\'t have '..price..' gold coins required for the random outfit!')
            doSendMagicEffect(getThingPos(cid),12)
        end			
        return true
end

After go to data/actions and open actions.xml

Then paste this row:

Lua:
<action uniqueid="65415" event="script" value="changeoutfit.lua"/>

Configuration in the script.

Then go to rme and put the stue or what ever item you want to use and put the unique ID like:

21k9co4.png



Some screens:

zwi42u.png

2nhdb8j.png

2zzt74w.png
 
Last edited:
why not free to vip and cost to free players i think this will be usefull to somebody so just continue the nice work
 
Thanks for your idea, and i made it for the one who want it ;p

This one cost 100k for normal players, but is free for VIP players.
Also updated main script, it did not removed money.

Lua:
local price = 100000 --- 
local duration = 18000
local monsters = {"orc warrior", "pirate cutthroat", "dworc voodoomaster", "dwarf guard", "minotaur mage"}

 
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getPlayerVipDays(cid) >= 1 then	  
	        doSetMonsterOutfit(cid,monsters[math.random(#monsters)],duration*1000)
	        doPlayerSendTextMessage(cid, 20, 'You got a random outfit!')
	    elseif  getPlayerMoney (cid) >= price and getPlayerVipDays(cid) < 1 then	
                doPlayerRemoveMoney(cid, price) 
                doSetMonsterOutfit(cid,monsters[math.random(#monsters)],duration*1000)
                doPlayerSendTextMessage(cid, 20, 'You got a random outfit for '.. price ..' gold coins!')               
        else
            doPlayerSendTextMessage(cid, 20, 'You don\'t have '..price..' gold coinds required for the random outfit!')
        end			
        return true
end
 
Last edited:
Back
Top