• 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 Action {OutFit Script}

WORGEN

Mind Freak
Premium User
Joined
Jul 17, 2012
Messages
162
Reaction score
5
Location
FreakOT
Hello Otlanders,
Today i will Share my First Script Hope You Like it.!
{Lets Start}

Create An Lua File And Paste this Script on it! With name (Outfit)

PHP:
			---Script CreaTed By Worgen---
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorage (cid, 235235) <1 then
		doPlayerAddOutfit (63, 1)
		doCreatureSay (cid, "You have Gained Your New Outfit! ", TALKTYPE_GREEN_1)
		setPlayerStorageValue(cid, 235235, 1)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
	else
		doPlayerSendTextMessage(cid,22,"You have already gained your new outfit.")
        end
	return true
   end

_\/_
Add this Line to Your Actions.xml
PHP:
<action itemid="2110" script="outfit.lua"/>


Goto Your Server/Data/Xml/Outfit.xml And Add this!

PHP:
<outfit id="28" premium="yes">
		<list gender="0" lookType="63" name="Worgen"/>

This outfit For elf arcanist
Hope You like My Script
Sorry for my bad english :S


Rep++ If i helped You :D
 
Last edited:
1-not bad for a new scripter but i have found a bug with it.look at the code i posted and try to use
Lua:
[code=lua]  doCreatureSay (cid, "You have Gained Your New Outfit! ", TALKTYPE_GREEN_!)

2-you could use doSetCreatureOutfit(cid, outfit, time)

Anyway nice :p
 
Last edited:
1-not bad for a new scripter but i have found a bug with it.look at the code i posted and try to use
Lua:
[code=lua]  doCreatureSay (cid, "You have Gained Your New Outfit! ", TALKTYPE_GREEN_!)

2-you could use doSetCreatureOutfit(cid, outfit, time)

Anyway nice :p

thanks but u can say me what was the bug? (Teach me More ) ;)
 
Last edited:
:eek: thanks for your report :p Fixed now :)

BUMP
 
Last edited:
Code:
 if getPlayerStorage (cid, 235235) >1 then
should be
Code:
 if getPlayerStorageValue (cid, 235235) <1 then
storage values start at -1
 
thats cause this script is flawed i fixed it here
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerStorageValue(cid, 235235) <1 then
        doPlayerAddOutfit (cid, 63, 1)
        doCreatureSay (cid, "You have Gained Your New Outfit! ", TALKTYPE_GREEN_1)
        setPlayerStorageValue(cid, 235235, 1)
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
    else
        doPlayerSendTextMessage(cid,22,"You have already gained your new outfit.")
    end
return true
end
 
how do I make it like tibia RL? I want the soil guardian outfit not to be available for everyone, and you can only wear him after doing the quest. How do I do it? i know its on the outfits.xml file
 
Back
Top