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

Outfit Color Change question

Thial

New Member
Joined
Jul 7, 2009
Messages
17
Reaction score
0
Hello. That's probably not right place to ask questions but i didn't knew where to put it. I'm currently working on tfs 0.2.9 (8.7) and i wan't to make my own custom skins randomly generated when character is being created. I want to give players power to change outfit colors but i don't want them to change outfits. So here's my question is there any way to remove other outfits from player or lock outfit change buttons so player will be able to change only colors? Sry for my english D;.
 
I don't understand point of this.
EdZxq.jpg

I wan't to block highlighted part so player won't be able to change his look but will be able to change colors. Is this possible ?
 
Is possible only have very difficult..
you need add in tibia.spr you outfit for changed other colors, dont know yes you look in tibia.spr outifts have other colors..
and compiling added you outfit is hard you don't changed other color why you only add sprite in tibia.spr not have other optioon changed color.
 
i have all outfits ready. Now when player is creating character he gets random outfit. From this point i want him to have only this one random outfit and give him possibility to change its colors
 
What the hell are you people talking on about?
He just wants everyone to have 1 outfit.

Go to data/XML/outfits.xml and remove all outfits except that one that you want to remain.
Since it's a custom outfit, I believe you'll need to have a correctly set blend overlay for color changing in data editor (but I suppose you did this already otherwise you'd be asking for it too).

This way, your outfits.xml script would look like this, just edit the green parts:
Code:
<?xml version="1.0"?>
<outfits>
	<outfit id="[COLOR="#006400"]xx[/COLOR]">
		<list gender="0" lookType="[COLOR="#006400"]xxx[/COLOR]" name="[COLOR="#006400"]Nameofoutfit[/COLOR]"/>
		<list gender="1" lookType="[COLOR="#006400"]xxx[/COLOR]" name="[COLOR="#006400"]Nameofoutfit[/COLOR]"/>
	</outfit>
</outfits>

Also, this script is from 0.3.6, some stuff might be different in your distro version, but you get the general idea. I hope this helped.
---------

EDIT:
I read furthermore through the thread and saw that you want people to get 1 random outfit out of many, and then have that 1 only?
I'll explain to you how to do it, however I don't have time to create the script.

Let's say you want the player to get a random outfit among 10 of them. You will need a storage value to determine which outfit has been given to the player. Since there are 10 outfits, each of them will use one storage. (for example, from 980 to 990)

In your login.lua script, make a function which will only be activated upon the first login of the player. On this login, he should have a randomly set storage value which will give him an outfit. That means
Code:
doPlayerSetStorageValue(cid, math.random(980,990), 1)

This will give 1 outfit to him. Which - depends on how you set it in outfits.xml. In there (at least in newer versions), there is a flag called Quest, which actually stands for a storage value. So, the following example:
Code:
	<outfit id="xx" quest="[COLOR="#00FF00"]990[/COLOR]">
		<list gender="0" lookType="279" name="xx"/>
		<list gender="1" lookType="278" name="xx"/>
	</outfit>

Means that the player who has 990 storage value set to 1 will have this outfit available to him.

If you still don't manage to do this, I can help when I'm back later, however it's pretty simple as you can see. Good luck.
 
Last edited:
Ty for help Shadowsong, i'll give it a try and post results later

hmm my outfits are a bit different

example:
<outfit type="1" looktype="128" enabled="1" name="Citizen" premium="0"/>
will the quest thing work with this ?
 
nope i won't have access to outfit change window.

- - - Updated - - -

so anyone can help me ? Simply i just want to block looktype change arrows. I'm trying to find it in outfit.cpp but no luck till now
 
Ty for help Shadowsong, i'll give it a try and post results later

hmm my outfits are a bit different

example:

will the quest thing work with this ?

It should, I guess. Try it out and tell me what's the deal. I'm 100% certain that my plan would work if that does.
 
nope Shadowsong. I've also checked source. There's no quest thingy coded there. I'm almost sure that solution can be found in outfit.cpp but c++ isn't my language. There are outfit list building procedures etc so i'm almost sure that they can be edited somehow to prevent changing looktype. I only want to block looktpe. Lookhead body etc should still remain untouched.
 
Back
Top