• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Quest outfit

Xyzyk

RudziutOTS Maker
Joined
Jun 14, 2008
Messages
39
Reaction score
0
Location
Poland
How to set that outfit is available only, if player has StorageValue: 8001?
I use TFS 0.3.6 and my outfits looks that (this outfit is unavailable even if player has this Storage):
Code:
	<outfit id="15" premium="yes" default="0" quest="8001">
		<list gender="0" lookType="158" name="Shaman"/>
		<list gender="1" lookType="154" name="Shaman"/>
	</outfit>
 
Ohhh, I found! There was necessity to delete default="0":
Code:
	<outfit id="15" premium="yes" quest="8001">
		<list gender="0" lookType="158" name="Shaman"/>
		<list gender="1" lookType="154" name="Shaman"/>
	</outfit>
 
u probs have the storage "8001" already used and he done (the quest or w/e) try changing it to something else and try using "storageid ="8001"" instead of quest...
if this didnt work then use the function "canPlayerWearOutfit(cid, lookType, addons)" in ur quest which has the storage "8001"...
 
Code:
	<outfit id="15" premium="yes" default="0">
		<list gender="0" lookType="158" name="Shaman"/>
		<list gender="1" lookType="154" name="Shaman"/>
	</outfit>

Code:
function onUse(cid, item, frompos, item2, topos)
if (getPlayerStorageValue(cid, 8001) ~= 1) then
                doPlayerSendTextMessage(cid, 25,"You have found a new addon!")
                doPlayerAddOutfit(cid, 158, 0)
                doPlayerAddOutfit(cid, 154, 0)
                setPlayerStorageValue(cid, 8001, 1)
        else
                doPlayerSendTextMessage(cid, 25,"You have already done this quest.")
	end
return TRUE
end
 
Last edited:
Back
Top