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

Nirer

New Member
Joined
Aug 23, 2007
Messages
91
Reaction score
0
Location
Israel, How Unfortunate
Sup guys, this is my second release, I'm new to scripting anyways, a guy on OTF*ns, wanted me to make this so I did, basiclly a rune that makes you change somebody's/your outfit to a warlock outfit... (can be changed to whatever outfit you'd like), anyways here we go (really simple script):

Note: TESTED ONLY ON TFS MYSTIC SPIRITS -- RECOMENDED DISTRO!


Ok well first step is:
go to your "Mystic Spirit\data\actions\scripts\other" directory, create a new lua file called "outfitrune" so generally its now outfitrune.lua...

ok open it, and paste this into it:

PHP:
function onUse(cid, item, frompos, item2, topos)
    ---Made By Nirer/Kakashi~Sensei/Naruto--- 
	  -- © CopyRight. Nirer Production --
	local outfit_to_change={lookType=130 , lookBody=71 , lookHead=19 , lookLegs=128 ,lookFeet=128 , lookAddons=1} -- Change to whatever outfit you want
	local level_needed=2 -- Change this to level needed to make the rune work properly with no errors
	    if(item.itemid==2263) then
	        if(isPlayer(item2.uid)==1) then
			     if(getPlayerLevel(cid)>=level_needed) then
		             doSetCreatureOutfit(item2.uid, outfit_to_change, -1)
				       doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
				   elseif(getPlayerLevel(cid)<level_needed) then
                           doPlayerSendCancel(cid, "You don't have enough level to use this outfit rune...") 	
                             doSendMagicEffect(frompos, CONST_ME_POFF)						   
                 end						   
		    elseif(isPlayer(item2.uid)==FALSE) then
			    doPlayerSendCancel(cid, "It is not a player...")
				  doSendMagicEffect(frompos, CONST_ME_POFF)
		   end	
       end
	return 1					
end


Save and exit the file...

Now go back two folders ("Mystic Spirit\data\actions") and open the file called "actions" (actions.xml), now:

above the line:
PHP:
<action itemid="2175" script="other/spellbook.lua"/>
and bellow the line
PHP:
<!-- Other -->
paste this:
PHP:
<action itemid="2263" script="other/outfitrune.lua"/>

Save the file and exit!
YOU'RE DONE!
For more information just read the comments I left in the outfitrune.lua file :) enjoy!
 
Who want's to be a warlock? Does it decay after a certain time or it will be permanent? Idk whats the point
 
what about.

PHP:
function onUse(cid, item, frompos, item2, topos)
---Made By Nirer/Kakashi~Sensei/Naruto---
-- © CopyRight. Nirer Production --
local M = {128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273}
local F = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279}
local outfit_to_change={
        lookBody=math.random(1, 132),
        lookHead=math.random(1, 132),
        lookLegs=math.random(1, 132),
        lookFeet=math.random(1, 132),
        lookAddons=math.random(0, 3)
                    }
local level_needed=2 -- Change this to level needed to make the rune work properly with no errors
    if(item.itemid==2263) then
        if (isPlayer(item2.uid) == TRUE) then
            if(getPlayerLevel(cid)>=level_needed) then
                if getPlayerSex(item2.uid) == 0 then
                    outfit_to_change.lookType = F[math.random(1, #F)]
                else
                    outfit_to_change.lookType = M[math.random(1, #M)]
                end
                doSetCreatureOutfit(item2.uid, outfit_to_change, -1)
                doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
            else
                doPlayerSendCancel(cid, "You don't have enough level to use this outfit rune...")    
                doSendMagicEffect(frompos, CONST_ME_POFF)                          
            end                          
        else
            doPlayerSendCancel(cid, "It is not a player...")
            doSendMagicEffect(frompos, CONST_ME_POFF)
        end    
    end
return 1                    
end
^^
 
Last edited:
PHP:
local outfit =
{
lookType = 203,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0
}
function onEquip(cid, item, slot)
doSetCreatureOutfit(cid, outfit, -1)
end
function onDeEquip(cid, item, slot)
doRemoveCondition(cid, CONDITION_OUTFIT)
doTransformItem(item.uid, 7697)
end
Use a format similar to this for an easier script to change and play with, of course that is for a ring, but using conditions is a better way.
 
Is it possible to, make so when you equip a sov and you got warrior addon on you you automatic get addon 2 temporarly unt'll you take off your sov?

And when you are using another addon, etc summoner, druid, nothing will happen when equipping it?
 
@Up: Yes, see my thread under the Items and Weapons section at OT Fans named Ring of Dharalion. All you need to do is change the ids.
 
Ahh yeah, thanks :)

Why don't u release it over here? :p But i found it, nvm thx. :)
 
Back
Top