Nirer
New Member
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:
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:
and bellow the line
paste this:
Save the file and exit!
YOU'RE DONE!
For more information just read the comments I left in the outfitrune.lua file enjoy!
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"/>
PHP:
<!-- Other -->
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!