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

Sync

Ø,ø
Joined
May 26, 2009
Messages
1,901
Reaction score
26
Location
Canada
Well in my server i figured it was to easy just to start with all the Outfits so i made them all just start with the Citizen outfit and i placed chests all around my map for when you click it you get the outfit. [Note this is for 0.3.5 Only]

So if you want them just to use Citizen Outfit for when they start use this.

Outfits.xml
Lua:
<?xml version="1.0"?>
<outfits>
	<outfit id="1">
		<list gender="0" lookType="136" name="Citizen"/>
		<list gender="1" lookType="128" name="Citizen"/>
	</outfit>

	<outfit id="2" default="0">
		<list gender="0" lookType="137" name="Hunter"/>
		<list gender="1" lookType="129" name="Hunter"/>
	</outfit>

	<outfit id="3" default="0">
		<list gender="0" lookType="138" name="Mage"/>
		<list gender="1" lookType="130" name="Mage"/>
	</outfit>

	<outfit id="4" default="0">
		<list gender="0" lookType="139" name="Knight"/>
		<list gender="1" lookType="131" name="Knight"/>
	</outfit>

	<outfit id="5" premium="yes" default="0">
		<list gender="0" lookType="140" name="Noblewoman"/>
		<list gender="1" lookType="132" name="Nobleman"/>
	</outfit>

	<outfit id="6" premium="yes" default="0">
		<list gender="0" lookType="141" name="Summoner"/>
		<list gender="1" lookType="133" name="Summoner"/>
	</outfit>

	<outfit id="7" premium="yes" default="0">
		<list gender="0" lookType="142" name="Warrior"/>
		<list gender="1" lookType="134" name="Warrior"/>
	</outfit>

	<outfit id="8" premium="yes" default="0">
		<list gender="0" lookType="147" name="Barbarian"/>
		<list gender="1" lookType="143" name="Barbarian"/>
	</outfit>

	<outfit id="9" premium="yes" default="0">
		<list gender="0" lookType="148" name="Druid"/>
		<list gender="1" lookType="144" name="Druid"/>
	</outfit>

	<outfit id="10" premium="yes" default="0">
		<list gender="0" lookType="149" name="Wizard"/>
		<list gender="1" lookType="145" name="Wizard"/>
	</outfit>

	<outfit id="11" premium="yes" default="0">
		<list gender="0" lookType="150" name="Oriental"/>
		<list gender="1" lookType="146" name="Oriental"/>
	</outfit>

	<outfit id="12" premium="yes" default="0">
		<list gender="0" lookType="155" name="Pirate"/>
		<list gender="1" lookType="151" name="Pirate"/>
	</outfit>

	<outfit id="13" premium="yes" default="0">
		<list gender="0" lookType="156" name="Assassin"/>
		<list gender="1" lookType="152" name="Assassin"/>
	</outfit>

	<outfit id="14" premium="yes" default="0">
		<list gender="0" lookType="157" name="Beggar"/>
		<list gender="1" lookType="153" name="Beggar"/>
	</outfit>

	<outfit id="15" premium="yes" default="0">
		<list gender="0" lookType="158" name="Shaman"/>
		<list gender="1" lookType="154" name="Shaman"/>
	</outfit>

	<outfit id="16" premium="yes" default="0">
		<list gender="0" lookType="252" name="Norsewoman"/>
		<list gender="1" lookType="251" name="Norseman"/>
	</outfit>

	<outfit id="17" premium="yes" default="0">
		<list gender="0" lookType="269" name="Nightmare"/>
		<list gender="1" lookType="268" name="Nightmare"/>
	</outfit>

	<outfit id="18" premium="yes" default="0">
		<list gender="0" lookType="270" name="Jester"/>
		<list gender="1" lookType="273" name="Jester"/>
	</outfit>

	<outfit id="19" premium="yes" default="0">
		<list gender="0" lookType="279" name="Brotherhood"/>
		<list gender="1" lookType="278" name="Brotherhood"/>
	</outfit>

	<outfit id="20" premium="yes" default="0">
		<list gender="0" lookType="288" name="Demonhunter"/>
		<list gender="1" lookType="289" name="Demonhunter"/>
	</outfit>

	<outfit id="21" premium="yes" default="0">
		<list gender="0" lookType="324" name="Yalaharian"/>
		<list gender="1" lookType="325" name="Yalaharian"/>
	</outfit>

	<outfit id="22" access="5" premium="yes">
		<list gender="0-3" lookType="12" name="Archdemon"/>
	</outfit>

	<outfit id="23" access="5" premium="yes">
		<list gender="0-3" lookType="159" name="Elf"/>
	</outfit>

	<outfit id="24" access="5" premium="yes">
		<list gender="0-3" lookType="160" name="Dwarf"/>
	</outfit>

	<outfit id="25" access="5" premium="yes">
		<list gender="0-3" lookType="226" name="Frog"/>
	</outfit>

	<outfit id="26" access="5" premium="yes">
		<list gender="0-3" lookType="194" name="Cult"/>
	</outfit>

	<outfit id="27" access="5" premium="yes">
		<list gender="0-3" lookType="253" name="Headsplitter"/>
	</outfit>

	<outfit id="28" access="5" premium="yes">
		<list gender="0-3" lookType="254" name="Skullhunter"/>
	</outfit>

	<outfit id="29" access="5" premium="yes">
		<list gender="0-3" lookType="255" name="Bloodwalker"/>
	</outfit>

	<outfit id="30" access="5" premium="yes">
		<list gender="0-3" lookType="264" name="Brutetamer"/>
	</outfit>

	<outfit id="31" access="3" premium="yes">
		<list gender="2;3" lookType="75" name="Gamemaster"/>
	</outfit>

	<outfit id="32" access="4" premium="yes">
		<list gender="2;3" lookType="266" name="Community Manager"/>
	</outfit>

	<outfit id="33" access="5" premium="yes">
		<list gender="2;3" lookType="302" name="God"/>
	</outfit>
</outfits>

And then in your Actions.xml
PHP:
<!--Outfit Quests -->
     <action uniqueid="12001" event="script" value="allOutfits.lua"/>  -- Hunter 
     <action uniqueid="12002" event="script" value="allOutfits.lua"/>  -- Mage  
     <action uniqueid="12003" event="script" value="allOutfits.lua"/>  -- Knight 
     <action uniqueid="12004" event="script" value="allOutfits.lua"/>  -- Nobleman 
     <action uniqueid="12005" event="script" value="allOutfits.lua"/>  -- Summoner 
     <action uniqueid="12006" event="script" value="allOutfits.lua"/>  -- Warrior 
     <action uniqueid="12007" event="script" value="allOutfits.lua"/>  -- Barbarian 
     <action uniqueid="12008" event="script" value="allOutfits.lua"/>  -- Druid 
     <action uniqueid="12009" event="script" value="allOutfits.lua"/>  -- Wizard  
     <action uniqueid="12010" event="script" value="allOutfits.lua"/>  -- Oriental 
     <action uniqueid="12011" event="script" value="allOutfits.lua"/>  -- Pirate 
     <action uniqueid="12012" event="script" value="allOutfits.lua"/>  -- Assassin 
     <action uniqueid="12013" event="script" value="allOutfits.lua"/>  -- Beggar 
     <action uniqueid="12014" event="script" value="allOutfits.lua"/>  -- Shaman 
     <action uniqueid="12015" event="script" value="allOutfits.lua"/>  -- Norseman 
     <action uniqueid="12016" event="script" value="allOutfits.lua"/>  -- Knightmare 
     <action uniqueid="12017" event="script" value="allOutfits.lua"/>  -- Jester 
     <action uniqueid="12018" event="script" value="allOutfits.lua"/>  -- Brotherhood 
     <action uniqueid="12019" event="script" value="allOutfits.lua"/>  -- Demon Hunter 
     <action uniqueid="12020" event="script" value="allOutfits.lua"/>  -- Yalahari

Then AllOutfits.lua
Lua:
function onUse(cid, item, frompos, item2, topos)

         if item.uid == 12001 then
             if (getPlayerStorageValue(cid,12010) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Hunter Outfit!")
		doPlayerAddOutfitId(cid,2,0)
		setPlayerStorageValue(cid,12010,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Hunter Outfit.")
end

       elseif item.uid == 12002 then
              if (getPlayerStorageValue(cid,12011) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Mage Outfit!")
		doPlayerAddOutfitId(cid,3,0)
		setPlayerStorageValue(cid,12011,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Mage Outfit.")
end

       elseif item.uid == 12003 then
              if (getPlayerStorageValue(cid,12012) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Knight Outfit!")
		doPlayerAddOutfitId(cid,4,0)
		setPlayerStorageValue(cid,12012,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Knight Outfit.")
	end


    elseif item.uid == 12004 then
           if (getPlayerStorageValue(cid,12013) == -1) and getPlayerSex(cid) == 1 then
		doPlayerSendTextMessage(cid,21,"You now have the Nobleman Outfit!")
		doPlayerAddOutfitId(cid,5,0)
		setPlayerStorageValue(cid,12013,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        	else if(getPlayerStorageValue(cid,12013) == -1) and getPlayerSex(cid) == 0 then
        	doPlayerSendTextMessage(cid,21,"You now have the Noblewoman Outfit!")
		doPlayerAddOutfitId(cid,5,0)
		setPlayerStorageValue(cid,12013,1)
    	else
		doPlayerSendTextMessage(cid,25,"You Already have this outfit.")		
	end
	   end

   
   elseif item.uid == 12005 then
	if (getPlayerStorageValue(cid,12014) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Summoner Outfit!")
		doPlayerAddOutfitId(cid,6,0)
		setPlayerStorageValue(cid,12014,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Summoner Outfit.")
	end

   elseif item.uid == 12006 then
          if (getPlayerStorageValue(cid,12015) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Warrior Outfit!")
		doPlayerAddOutfitId(cid,7,0)
		setPlayerStorageValue(cid,12015,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Warrior Outfit.")
	end

   elseif item.uid == 12007 then
          if (getPlayerStorageValue(cid,12016) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Barbarian Outfit!")
		doPlayerAddOutfitId(cid,8,0)
		setPlayerStorageValue(cid,12016,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Barbarian Outfit.")
	end

   elseif item.uid == 12008 then
          if (getPlayerStorageValue(cid,12017) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Druid Outfit!")
		doPlayerAddOutfitId(cid,9,0)
		setPlayerStorageValue(cid,12017,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Druid Outfit.")
	end

   elseif item.uid == 12009 then
          if (getPlayerStorageValue(cid,12018) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Wizard Outfit!")
		doPlayerAddOutfitId(cid,10,0)
		setPlayerStorageValue(cid,12018,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Wizard Outfit.")
	end

   elseif item.uid == 12010 then
          if (getPlayerStorageValue(cid,12019) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Oriental Outfit!")
		doPlayerAddOutfitId(cid,11,0)
		setPlayerStorageValue(cid,12019,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Oriental Outfit.")
	end

   elseif item.uid == 12011 then
          if (getPlayerStorageValue(cid,12020) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Pirate Outfit!")
		doPlayerAddOutfitId(cid,12,0)
		setPlayerStorageValue(cid,12020,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Pirate Outfit.")
	end

   elseif item.uid == 12012 then
          if (getPlayerStorageValue(cid,12021) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Assassin Outfit!")
		doPlayerAddOutfitId(cid,13,0)
		setPlayerStorageValue(cid,12021,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Assassin Outfit.")
	end

   elseif item.uid == 12013 then
          if (getPlayerStorageValue(cid,12022) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Beggar Outfit!")
		doPlayerAddOutfitId(cid,14,0)
		setPlayerStorageValue(cid,12022,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Beggar Outfit.")
	end

   elseif item.uid == 12014 then
          if (getPlayerStorageValue(cid,12023) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Shaman Outfit!")
		doPlayerAddOutfitId(cid,15,0)
		setPlayerStorageValue(cid,12023,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Shaman Outfit.")
	end

   elseif item.uid == 12015 then
           if (getPlayerStorageValue(cid,12024) == -1) and getPlayerSex(cid) == 1 then
		doPlayerSendTextMessage(cid,21,"You now have the Norseman Outfit!")
		doPlayerAddOutfitId(cid,16,0)
		setPlayerStorageValue(cid,12024,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        	else if(getPlayerStorageValue(cid,12024) == -1) and getPlayerSex(cid) == 0 then
        	doPlayerSendTextMessage(cid,21,"You now have the Norsewoman Outfit!")
		doPlayerAddOutfitId(cid,16,0)
		setPlayerStorageValue(cid,12024,1)
    	else
		doPlayerSendTextMessage(cid,25,"You Already have this outfit.")		
	  end
	   end


   elseif item.uid == 12016 then
          if (getPlayerStorageValue(cid,12025) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Knightmare Outfit!")
		doPlayerAddOutfitId(cid,17,0)
		setPlayerStorageValue(cid,12025,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Knightmare Outfit.")
	end

   elseif item.uid == 12017 then
          if (getPlayerStorageValue(cid,12026) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Jester Outfit!")
		doPlayerAddOutfitId(cid,18,0)
		setPlayerStorageValue(cid,12026,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Jester Outfit.")
	end

   elseif item.uid == 12018 then
          if (getPlayerStorageValue(cid,12027) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Brotherhood Outfit!")
		doPlayerAddOutfitId(cid,19,0)
		setPlayerStorageValue(cid,12027,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Brotherhood Outfit.")
	end

   elseif item.uid == 12019 then
          if (getPlayerStorageValue(cid,12028) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Demonhunter Outfit!")
		doPlayerAddOutfitId(cid,20,0)
		setPlayerStorageValue(cid,12028,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Demonhunter Outfit.")
	end

   elseif item.uid == 12020 then
          if (getPlayerStorageValue(cid,12029) == -1) then
		doPlayerSendTextMessage(cid,21,"You now have the Yalahari Outfit!")
		doPlayerAddOutfitId(cid,21,0)
		setPlayerStorageValue(cid,12029,1)
        	doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
    	else
		doPlayerSendTextMessage(cid,25,"You Already have the Yalahari Outfit.")
	end

    end
	return TRUE
end

23m9e0h.jpg
 
Last edited:
Why thank you.

It also says the right thing depending on your Sex. Example:
Code:
You now have the NobleMan Outfit. {Sex 1}
You Now have the Noblewoman outfit. {sex 0}
 
Omfg dude could u think anymore like me? Rep++++

And couldnt u edit actions.xml to this:

<!--Outfit Quests -->
<action uniqueid="12001-12020" event="script" value="allOutfits.lua"/>
 
Last edited:
Mod version of it ^.^ I wanted to retab your whole freaking script cause you fail at it. But decided against it.
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Outfit Quest" version="1.0" author="chris77" contact="otland.net" enabled="yes">
	<description>
	This mod adds the ability to gain outfits as chest rewards.
    </description>
	     <action uniqueid="12001-12020" event="buffer"><![CDATA[
function onUse(cid, item, frompos, item2, topos)

         if item.uid == 12001 then
             if (getPlayerStorageValue(cid,12010) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Hunter Outfit!")
                doPlayerAddOutfitId(cid,2,0)
                setPlayerStorageValue(cid,12010,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Hunter Outfit.")
end

       elseif item.uid == 12002 then
              if (getPlayerStorageValue(cid,12011) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Mage Outfit!")
                doPlayerAddOutfitId(cid,3,0)
                setPlayerStorageValue(cid,12011,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Mage Outfit.")
end

       elseif item.uid == 12003 then
              if (getPlayerStorageValue(cid,12012) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Knight Outfit!")
                doPlayerAddOutfitId(cid,4,0)
                setPlayerStorageValue(cid,12012,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Knight Outfit.")
        end


    elseif item.uid == 12004 then
           if (getPlayerStorageValue(cid,12013) == -1) and getPlayerSex(cid) == 1 then
                doPlayerSendTextMessage(cid,21,"You now have the Nobleman Outfit!")
                doPlayerAddOutfitId(cid,5,0)
                setPlayerStorageValue(cid,12013,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
                else if(getPlayerStorageValue(cid,12013) == -1) and getPlayerSex(cid) == 0 then
                doPlayerSendTextMessage(cid,21,"You now have the Noblewoman Outfit!")
                doPlayerAddOutfitId(cid,5,0)
                setPlayerStorageValue(cid,12013,1)
        else
                doPlayerSendTextMessage(cid,25,"You Already have this outfit.")         
        end
           end

   
   elseif item.uid == 12005 then
        if (getPlayerStorageValue(cid,12014) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Summoner Outfit!")
                doPlayerAddOutfitId(cid,6,0)
                setPlayerStorageValue(cid,12014,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Summoner Outfit.")
        end

   elseif item.uid == 12006 then
          if (getPlayerStorageValue(cid,12015) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Warrior Outfit!")
                doPlayerAddOutfitId(cid,7,0)
                setPlayerStorageValue(cid,12015,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Warrior Outfit.")
        end

   elseif item.uid == 12007 then
          if (getPlayerStorageValue(cid,12016) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Barbarian Outfit!")
                doPlayerAddOutfitId(cid,8,0)
                setPlayerStorageValue(cid,12016,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Barbarian Outfit.")
        end

   elseif item.uid == 12008 then
          if (getPlayerStorageValue(cid,12017) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Druid Outfit!")
                doPlayerAddOutfitId(cid,9,0)
                setPlayerStorageValue(cid,12017,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Druid Outfit.")
        end

   elseif item.uid == 12009 then
          if (getPlayerStorageValue(cid,12018) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Wizard Outfit!")
                doPlayerAddOutfitId(cid,10,0)
                setPlayerStorageValue(cid,12018,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Wizard Outfit.")
        end

   elseif item.uid == 12010 then
          if (getPlayerStorageValue(cid,12019) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Oriental Outfit!")
                doPlayerAddOutfitId(cid,11,0)
                setPlayerStorageValue(cid,12019,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Oriental Outfit.")
        end

   elseif item.uid == 12011 then
          if (getPlayerStorageValue(cid,12020) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Pirate Outfit!")
                doPlayerAddOutfitId(cid,12,0)
                setPlayerStorageValue(cid,12020,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Pirate Outfit.")
        end

   elseif item.uid == 12012 then
          if (getPlayerStorageValue(cid,12021) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Assassin Outfit!")
                doPlayerAddOutfitId(cid,13,0)
                setPlayerStorageValue(cid,12021,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Assassin Outfit.")
        end

   elseif item.uid == 12013 then
          if (getPlayerStorageValue(cid,12022) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Beggar Outfit!")
                doPlayerAddOutfitId(cid,14,0)
                setPlayerStorageValue(cid,12022,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Beggar Outfit.")
        end

   elseif item.uid == 12014 then
          if (getPlayerStorageValue(cid,12023) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Shaman Outfit!")
                doPlayerAddOutfitId(cid,15,0)
                setPlayerStorageValue(cid,12023,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Shaman Outfit.")
        end

   elseif item.uid == 12015 then
           if (getPlayerStorageValue(cid,12024) == -1) and getPlayerSex(cid) == 1 then
                doPlayerSendTextMessage(cid,21,"You now have the Norseman Outfit!")
                doPlayerAddOutfitId(cid,16,0)
                setPlayerStorageValue(cid,12024,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
                else if(getPlayerStorageValue(cid,12024) == -1) and getPlayerSex(cid) == 0 then
                doPlayerSendTextMessage(cid,21,"You now have the Norsewoman Outfit!")
                doPlayerAddOutfitId(cid,16,0)
                setPlayerStorageValue(cid,12024,1)
        else
                doPlayerSendTextMessage(cid,25,"You Already have this outfit.")         
          end
           end


   elseif item.uid == 12016 then
          if (getPlayerStorageValue(cid,12025) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Knightmare Outfit!")
                doPlayerAddOutfitId(cid,17,0)
                setPlayerStorageValue(cid,12025,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Knightmare Outfit.")
        end

   elseif item.uid == 12017 then
          if (getPlayerStorageValue(cid,12026) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Jester Outfit!")
                doPlayerAddOutfitId(cid,18,0)
                setPlayerStorageValue(cid,12026,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Jester Outfit.")
        end

   elseif item.uid == 12018 then
          if (getPlayerStorageValue(cid,12027) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Brotherhood Outfit!")
                doPlayerAddOutfitId(cid,19,0)
                setPlayerStorageValue(cid,12027,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Brotherhood Outfit.")
        end

   elseif item.uid == 12019 then
          if (getPlayerStorageValue(cid,12028) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Demonhunter Outfit!")
                doPlayerAddOutfitId(cid,20,0)
                setPlayerStorageValue(cid,12028,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Demonhunter Outfit.")
        end

   elseif item.uid == 12020 then
          if (getPlayerStorageValue(cid,12029) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Yalahari Outfit!")
                doPlayerAddOutfitId(cid,21,0)
                setPlayerStorageValue(cid,12029,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Yalahari Outfit.")
        end

    end
        return TRUE
end
]]>
	</action>
</mod>
 
Mod version of it ^.^ I wanted to retab your whole freaking script cause you fail at it. But decided against it.
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Outfit Quest" version="1.0" author="chris77" contact="otland.net" enabled="yes">
	<description>
	This mod adds the ability to gain outfits as chest rewards.
    </description>
	     <action uniqueid="12001-12020" event="buffer"><![CDATA[
function onUse(cid, item, frompos, item2, topos)

         if item.uid == 12001 then
             if (getPlayerStorageValue(cid,12010) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Hunter Outfit!")
                doPlayerAddOutfitId(cid,2,0)
                setPlayerStorageValue(cid,12010,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Hunter Outfit.")
end

       elseif item.uid == 12002 then
              if (getPlayerStorageValue(cid,12011) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Mage Outfit!")
                doPlayerAddOutfitId(cid,3,0)
                setPlayerStorageValue(cid,12011,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Mage Outfit.")
end

       elseif item.uid == 12003 then
              if (getPlayerStorageValue(cid,12012) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Knight Outfit!")
                doPlayerAddOutfitId(cid,4,0)
                setPlayerStorageValue(cid,12012,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Knight Outfit.")
        end


    elseif item.uid == 12004 then
           if (getPlayerStorageValue(cid,12013) == -1) and getPlayerSex(cid) == 1 then
                doPlayerSendTextMessage(cid,21,"You now have the Nobleman Outfit!")
                doPlayerAddOutfitId(cid,5,0)
                setPlayerStorageValue(cid,12013,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
                else if(getPlayerStorageValue(cid,12013) == -1) and getPlayerSex(cid) == 0 then
                doPlayerSendTextMessage(cid,21,"You now have the Noblewoman Outfit!")
                doPlayerAddOutfitId(cid,5,0)
                setPlayerStorageValue(cid,12013,1)
        else
                doPlayerSendTextMessage(cid,25,"You Already have this outfit.")         
        end
           end

   
   elseif item.uid == 12005 then
        if (getPlayerStorageValue(cid,12014) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Summoner Outfit!")
                doPlayerAddOutfitId(cid,6,0)
                setPlayerStorageValue(cid,12014,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Summoner Outfit.")
        end

   elseif item.uid == 12006 then
          if (getPlayerStorageValue(cid,12015) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Warrior Outfit!")
                doPlayerAddOutfitId(cid,7,0)
                setPlayerStorageValue(cid,12015,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Warrior Outfit.")
        end

   elseif item.uid == 12007 then
          if (getPlayerStorageValue(cid,12016) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Barbarian Outfit!")
                doPlayerAddOutfitId(cid,8,0)
                setPlayerStorageValue(cid,12016,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Barbarian Outfit.")
        end

   elseif item.uid == 12008 then
          if (getPlayerStorageValue(cid,12017) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Druid Outfit!")
                doPlayerAddOutfitId(cid,9,0)
                setPlayerStorageValue(cid,12017,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Druid Outfit.")
        end

   elseif item.uid == 12009 then
          if (getPlayerStorageValue(cid,12018) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Wizard Outfit!")
                doPlayerAddOutfitId(cid,10,0)
                setPlayerStorageValue(cid,12018,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Wizard Outfit.")
        end

   elseif item.uid == 12010 then
          if (getPlayerStorageValue(cid,12019) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Oriental Outfit!")
                doPlayerAddOutfitId(cid,11,0)
                setPlayerStorageValue(cid,12019,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Oriental Outfit.")
        end

   elseif item.uid == 12011 then
          if (getPlayerStorageValue(cid,12020) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Pirate Outfit!")
                doPlayerAddOutfitId(cid,12,0)
                setPlayerStorageValue(cid,12020,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Pirate Outfit.")
        end

   elseif item.uid == 12012 then
          if (getPlayerStorageValue(cid,12021) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Assassin Outfit!")
                doPlayerAddOutfitId(cid,13,0)
                setPlayerStorageValue(cid,12021,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Assassin Outfit.")
        end

   elseif item.uid == 12013 then
          if (getPlayerStorageValue(cid,12022) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Beggar Outfit!")
                doPlayerAddOutfitId(cid,14,0)
                setPlayerStorageValue(cid,12022,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Beggar Outfit.")
        end

   elseif item.uid == 12014 then
          if (getPlayerStorageValue(cid,12023) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Shaman Outfit!")
                doPlayerAddOutfitId(cid,15,0)
                setPlayerStorageValue(cid,12023,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Shaman Outfit.")
        end

   elseif item.uid == 12015 then
           if (getPlayerStorageValue(cid,12024) == -1) and getPlayerSex(cid) == 1 then
                doPlayerSendTextMessage(cid,21,"You now have the Norseman Outfit!")
                doPlayerAddOutfitId(cid,16,0)
                setPlayerStorageValue(cid,12024,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
                else if(getPlayerStorageValue(cid,12024) == -1) and getPlayerSex(cid) == 0 then
                doPlayerSendTextMessage(cid,21,"You now have the Norsewoman Outfit!")
                doPlayerAddOutfitId(cid,16,0)
                setPlayerStorageValue(cid,12024,1)
        else
                doPlayerSendTextMessage(cid,25,"You Already have this outfit.")         
          end
           end


   elseif item.uid == 12016 then
          if (getPlayerStorageValue(cid,12025) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Knightmare Outfit!")
                doPlayerAddOutfitId(cid,17,0)
                setPlayerStorageValue(cid,12025,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Knightmare Outfit.")
        end

   elseif item.uid == 12017 then
          if (getPlayerStorageValue(cid,12026) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Jester Outfit!")
                doPlayerAddOutfitId(cid,18,0)
                setPlayerStorageValue(cid,12026,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Jester Outfit.")
        end

   elseif item.uid == 12018 then
          if (getPlayerStorageValue(cid,12027) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Brotherhood Outfit!")
                doPlayerAddOutfitId(cid,19,0)
                setPlayerStorageValue(cid,12027,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Brotherhood Outfit.")
        end

   elseif item.uid == 12019 then
          if (getPlayerStorageValue(cid,12028) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Demonhunter Outfit!")
                doPlayerAddOutfitId(cid,20,0)
                setPlayerStorageValue(cid,12028,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Demonhunter Outfit.")
        end

   elseif item.uid == 12020 then
          if (getPlayerStorageValue(cid,12029) == -1) then
                doPlayerSendTextMessage(cid,21,"You now have the Yalahari Outfit!")
                doPlayerAddOutfitId(cid,21,0)
                setPlayerStorageValue(cid,12029,1)
                doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
        else
                doPlayerSendTextMessage(cid,25,"You Already have the Yalahari Outfit.")
        end

    end
        return TRUE
end
]]>
	</action>
</mod>

Your scripts are fail-tabed too, so first re-tab your scripts. :)
 
are not. and ive only released one script recently...and if this is wrong then..well i guess im wrong.

Lua:
function FindSandwich
	if (getPlayerSandwich == gone) then
		if(hobo == hasSandwich) then
			doTakeSandwichFromHobo(target)
		else
			doBeatHoboProfusely(target, baseballbat)
			setSearchforSandwich(cid, extended)
		end
	else
		return false 
	end
end

and btw i always joke with chris, he knows lol
 
Last edited:
6tk6bfjjv49ihmzni6je.png

tdu6eo2a324zx25yln.png


@Up:
This one is good tabed :D

@Edit2:
Code:
local outfits = {
	[12001] = {storage = 12010, male = "Hunter", female = "Hunter", id = 2},
	[12002] = {storage = 12011, male = "Mage", female = "Mage", id = 3},
	[12003] = {storage = 12012, male = "Knight", female = "Knight", id = 4},
	[12004] = {storage = 12013, male = "Nobleman", female = "Noblewoman", id = 5},
	[12005] = {storage = 12014, male = "Summoner", female = "Summoner", id = 6},
	[12006] = {storage = 12015, male = "Warrior", female = "Warrior", id = 7},
	[12007] = {storage = 12016, male = "Barbarian", female = "Barbarian", id = 8},
	[12008] = {storage = 12017, male = "Druid", female = "Druid", id = 9},
	[12009] = {storage = 12018, male = "Wizard", female = "Wizard", id = 10},
	[12010] = {storage = 12019, male = "Oriental", female = "Oriental", id = 11},
	[12011] = {storage = 12020, male = "Pirate", female = "Pirate", id = 12},
	[12012] = {storage = 12021, male = "Assassin", female = "Assassin", id = 13},
	[12013] = {storage = 12022, male = "Beggar", female = "Beggar", id = 14},
	[12014] = {storage = 12023, male = "Shaman", female = "Shaman", id = 15},
	[12015] = {storage = 12024, male = "Norseman", female = "Norsewoman", id = 16},
	[12016] = {storage = 12025, male = "Nightmare", female = "Nightmare", id = 17},
	[12017] = {storage = 12026, male = "Jester", female = "Jester", id = 18},
	[12018] = {storage = 12027, male = "Brotherhood", female = "Brotherhood", id = 19},
	[12019] = {storage = 12028, male = "Demonhunter", female = "Demonhunter", id = 20},
	[12020] = {storage = 12029, male = "Yalahari", female = "Yalahari", id = 21},
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local outfits = outfits[item.uid]
	if (outfit == nil) then
		return
	end
	local name = "Unknown"
	if (getPlayerSex(cid) == 0) then
		name = outfit.female
	else
		name = outfit.male
	end

	if (getPlayerStorageValue(cid, outfit.storage) == -1) then
		dolayerSendTextMessage(cid, MESSAGE_STATUS_ADVANCE, "You now have the ".. name .." Outfit!")
		doPlayerAddOutfitId(cid, outfit.id, 0)
		setPlayerStorageValue(cid, outfit.storage, 1)
		doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_ADVANCE, "You already have the ".. name .. " Outfit!")
	end
	return true
end

Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Outfit Quest" version="1.0" author="chris77" contact="otland.net" enabled="yes">
	<description>
		This mod adds the ability to gain outfits as chest rewards.
	</description>
 	<action uniqueid="12001-12020" event="buffer">
		<![CDATA[
			local outfits = {
				[12001] = {storage = 12010, male = "Hunter", female = "Hunter", id = 2},
				[12002] = {storage = 12011, male = "Mage", female = "Mage", id = 3},
				[12003] = {storage = 12012, male = "Knight", female = "Knight", id = 4},
				[12004] = {storage = 12013, male = "Nobleman", female = "Noblewoman", id = 5},
				[12005] = {storage = 12014, male = "Summoner", female = "Summoner", id = 6},
				[12006] = {storage = 12015, male = "Warrior", female = "Warrior", id = 7},
				[12007] = {storage = 12016, male = "Barbarian", female = "Barbarian", id = 8},
				[12008] = {storage = 12017, male = "Druid", female = "Druid", id = 9},
				[12009] = {storage = 12018, male = "Wizard", female = "Wizard", id = 10},
				[12010] = {storage = 12019, male = "Oriental", female = "Oriental", id = 11},
				[12011] = {storage = 12020, male = "Pirate", female = "Pirate", id = 12},
				[12012] = {storage = 12021, male = "Assassin", female = "Assassin", id = 13},
				[12013] = {storage = 12022, male = "Beggar", female = "Beggar", id = 14},
				[12014] = {storage = 12023, male = "Shaman", female = "Shaman", id = 15},
				[12015] = {storage = 12024, male = "Norseman", female = "Norsewoman", id = 16},
				[12016] = {storage = 12025, male = "Nightmare", female = "Nightmare", id = 17},
				[12017] = {storage = 12026, male = "Jester", female = "Jester", id = 18},
				[12018] = {storage = 12027, male = "Brotherhood", female = "Brotherhood", id = 19},
				[12019] = {storage = 12028, male = "Demonhunter", female = "Demonhunter", id = 20},
				[12020] = {storage = 12029, male = "Yalahari", female = "Yalahari", id = 21},
			}

			function onUse(cid, item, fromPosition, itemEx, toPosition)
				local outfits = outfits[item.uid]
				if (outfit == nil) then
					return
				end
				local name = "Unknown"
				if (getPlayerSex(cid) == 0) then
					name = outfit.female
				else
					name = outfit.male
				end

				if (getPlayerStorageValue(cid, outfit.storage) == -1) then
					dolayerSendTextMessage(cid, MESSAGE_STATUS_ADVANCE, "You now have the ".. name .." Outfit!")
					doPlayerAddOutfitId(cid, outfit.id, 0)
					setPlayerStorageValue(cid, outfit.storage, 1)
					doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
				else
					doPlayerSendTextMessage(cid, MESSAGE_STATUS_ADVANCE, "You already have the ".. name .. " Outfit!")
				end
				return true
			end
		]]>
	</action>
</mod>
 
Last edited:
sy1ks2.png

its fine on my computer before i pasted to a forum, because the forum converts them wierd sometimes. Maybe I have some spaces in there too, but on notepad++ it looks fine, you can see that they are errors because they do not follow the same pattern as the rest of the script which is tabbed correctly, why would i tabbed something so terribly then do it the right way afterwards
 
sy1ks2.png

its fine on my computer before i pasted to a forum, because the forum converts them wierd sometimes. Maybe I have some spaces in there too, but on notepad++ it looks fine, you can see that they are errors because they do not follow the same pattern as the rest of the script which is tabbed correctly, why would i tabbed something so terribly then do it the right way afterwards

So let they look fine on forum :D
 
I didn't notice they weren't so I guess I should thank you for pointing that out.

@topic...good idea, and very beneficial lol.
 
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Outfit Quest" version="1.1" author="Rizz & chris77" contact="otland.net" enabled="yes">
	<description>
		This mod adds the ability to gain outfits as chest rewards.
	</description>
	<config name="outfits"><![CDATA[
		outfits = {
				[12001] = {storage = 12010, male = "Hunter", female = "Hunter", id = 2},
				[12002] = {storage = 12011, male = "Mage", female = "Mage", id = 3},
				[12003] = {storage = 12012, male = "Knight", female = "Knight", id = 4},
				[12004] = {storage = 12013, male = "Nobleman", female = "Noblewoman", id = 5},
				[12005] = {storage = 12014, male = "Summoner", female = "Summoner", id = 6},
				[12006] = {storage = 12015, male = "Warrior", female = "Warrior", id = 7},
				[12007] = {storage = 12016, male = "Barbarian", female = "Barbarian", id = 8},
				[12008] = {storage = 12017, male = "Druid", female = "Druid", id = 9},
				[12009] = {storage = 12018, male = "Wizard", female = "Wizard", id = 10},
				[12010] = {storage = 12019, male = "Oriental", female = "Oriental", id = 11},
				[12011] = {storage = 12020, male = "Pirate", female = "Pirate", id = 12},
				[12012] = {storage = 12021, male = "Assassin", female = "Assassin", id = 13},
				[12013] = {storage = 12022, male = "Beggar", female = "Beggar", id = 14},
				[12014] = {storage = 12023, male = "Shaman", female = "Shaman", id = 15},
				[12015] = {storage = 12024, male = "Norseman", female = "Norsewoman", id = 16},
				[12016] = {storage = 12025, male = "Nightmare", female = "Nightmare", id = 17},
				[12017] = {storage = 12026, male = "Jester", female = "Jester", id = 18},
				[12018] = {storage = 12027, male = "Brotherhood", female = "Brotherhood", id = 19},
				[12019] = {storage = 12028, male = "Demonhunter", female = "Demonhunter", id = 20},
				[12020] = {storage = 12029, male = "Yalahari", female = "Yalahari", id = 21},
			}
	]]></config>
	
 	<action fromuid="12001" touid="12020" event="buffer">
		<![CDATA[
			function onUse(cid, item, fromPosition, itemEx, toPosition)
				domodlib('outfits')
				local outfits = outfits[item.uid]
				if (outfit == nil) then
					_result = false
				end
				local name = "Unknown"
				if (getPlayerSex(cid) == 0) then
					name = outfit.female
				else
					name = outfit.male
				end

				if (getPlayerStorageValue(cid, outfit.storage) == -1) then
					dolayerSendTextMessage(cid, MESSAGE_STATUS_ADVANCE, "You now have the ".. name .." Outfit!")
					doPlayerAddOutfitId(cid, outfit.id, 0)
					setPlayerStorageValue(cid, outfit.storage, 1)
					doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
				else
					doPlayerSendTextMessage(cid, MESSAGE_STATUS_ADVANCE, "You already have the ".. name .. " Outfit!")
				end
			end
		]]>
	</action>
</mod>
 
Last edited:
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Outfit Quest" version="1.1" author="Rizz" contact="otland.net" enabled="yes">
	<description>
		This mod adds the ability to gain outfits as chest rewards.
	</description>
	<config name="inq_chestToItem"><![CDATA[
		outfits = {
				[12001] = {storage = 12010, male = "Hunter", female = "Hunter", id = 2},
				[12002] = {storage = 12011, male = "Mage", female = "Mage", id = 3},
				[12003] = {storage = 12012, male = "Knight", female = "Knight", id = 4},
				[12004] = {storage = 12013, male = "Nobleman", female = "Noblewoman", id = 5},
				[12005] = {storage = 12014, male = "Summoner", female = "Summoner", id = 6},
				[12006] = {storage = 12015, male = "Warrior", female = "Warrior", id = 7},
				[12007] = {storage = 12016, male = "Barbarian", female = "Barbarian", id = 8},
				[12008] = {storage = 12017, male = "Druid", female = "Druid", id = 9},
				[12009] = {storage = 12018, male = "Wizard", female = "Wizard", id = 10},
				[12010] = {storage = 12019, male = "Oriental", female = "Oriental", id = 11},
				[12011] = {storage = 12020, male = "Pirate", female = "Pirate", id = 12},
				[12012] = {storage = 12021, male = "Assassin", female = "Assassin", id = 13},
				[12013] = {storage = 12022, male = "Beggar", female = "Beggar", id = 14},
				[12014] = {storage = 12023, male = "Shaman", female = "Shaman", id = 15},
				[12015] = {storage = 12024, male = "Norseman", female = "Norsewoman", id = 16},
				[12016] = {storage = 12025, male = "Nightmare", female = "Nightmare", id = 17},
				[12017] = {storage = 12026, male = "Jester", female = "Jester", id = 18},
				[12018] = {storage = 12027, male = "Brotherhood", female = "Brotherhood", id = 19},
				[12019] = {storage = 12028, male = "Demonhunter", female = "Demonhunter", id = 20},
				[12020] = {storage = 12029, male = "Yalahari", female = "Yalahari", id = 21},
			}
	]]></config>
	
 	<action fromuid="12001" touid="12020" event="buffer">
		<![CDATA[
			function onUse(cid, item, fromPosition, itemEx, toPosition)
				local outfits = outfits[item.uid]
				if (outfit == nil) then
					return
				end
				local name = "Unknown"
				if (getPlayerSex(cid) == 0) then
					name = outfit.female
				else
					name = outfit.male
				end

				if (getPlayerStorageValue(cid, outfit.storage) == -1) then
					dolayerSendTextMessage(cid, MESSAGE_STATUS_ADVANCE, "You now have the ".. name .." Outfit!")
					doPlayerAddOutfitId(cid, outfit.id, 0)
					setPlayerStorageValue(cid, outfit.storage, 1)
					doSendMagicEffect(getCreaturePosition(cid), math.random(1, 67))
				else
					doPlayerSendTextMessage(cid, MESSAGE_STATUS_ADVANCE, "You already have the ".. name .. " Outfit!")
				end
				return true
			end
		]]>
	</action>
</mod>

Hey, stop! You aren't author, author is chris77, we're only re-writers. So credits should go to chris77.
 
Besides all the little tabbing dispute bewteen you guys thanks for all the comments! xD
 
Back
Top