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

[TFS 0.3.6]Addons only for premium (How do I enable 'em for free accounts?)

Elox

http://elox.se/
Joined
Jul 5, 2008
Messages
624
Reaction score
2
Location
Sweden, Fagersta
Hello!
Posted this as a bug earlier, but they said it's not so I guess I'm retarded. :ninja:

The problem is that free accounts cannot use addons. :confused:

I had a lever that gives you full citizen addon.
Works perfectly when I'm on my free account GM, but doesn't work when I'm on a normal free account character.
When I give the character premium, you can suddenly use the addons.. So there is nothing wrong with the script.

Does anyone have a clue how to enable addons for free accounts?
This worked fine using 0.3.5, but not when using 0.3.6. <_<

Thanks!

-Edit-
Premium is set to no at outfits.xml so that's not it.
 
Last edited:
\data\xml\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">
		<list gender="0" lookType="137" name="Hunter"/>
		<list gender="1" lookType="129" name="Hunter"/>
	</outfit>

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

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

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

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

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

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

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

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

	<outfit id="11" premium="yes">
		<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" premium="yes" default="0">
		<list gender="0" lookType="336" name="Warmaster"/>
		<list gender="1" lookType="335" name="Warmaster"/>
	</outfit>

	<outfit id="23" premium="yes" default="0">
		<list gender="0" lookType="329" name="Wedding"/>
		<list gender="1" lookType="328" name="Wedding"/>
	</outfit>

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

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

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

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

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

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

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

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

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

	<outfit id="33" access="3" premium="yes">
		<list gender="0-3" lookType="75" name="Gamemaster"/>
	</outfit>

	<outfit id="34" access="4" premium="yes">
		<list gender="0-3" lookType="266" name="Community Manager"/>
	</outfit>

	<outfit id="35" access="5" premium="yes">
		<list gender="0-3" lookType="302" name="God"/>
	</outfit>
</outfits>


I think the premium="yes" is your problem here, change it into "no" and hopefully it will work like you want it to. ;)
 
Apparently premium="yes" thingy, is only for the outfits.. Not the addons.
And I've already changed everything to no.
So that's not it. :peace:

I've the exact same configurations as I had on 0.3.5, but it still doesn't work.
 
So... You can use the outfits when not having premium. However the addons will not work without premium?
 
Hm just noticed that on free accounts characters you only have the "normal outfits" ( you dont have demonhunter, yalahari and those)

So I tested a script that gives full Demonhunter addon, and it worked fine on 0.3.5.. But on 0.3.6 you only get the Demonhunter outfit, not the addons.

I get no errors in the console or nothing, here's the script: (which worked fine on 0.3.5)
Code:
function onUse(cid, item, frompos, item2, topos)

if item.uid ==7092 then
queststatus = getPlayerStorageValue(cid,7092)
if queststatus == 1 then
doPlayerSendTextMessage(cid,22,"This quest is empty.")

else
doPlayerSendTextMessage(cid,22,"You found a Demonhunter addon.")
doSendMagicEffect(topos,12)
if getPlayerSex(cid) == 0 then
doPlayerAddOutfit(cid, 288, 3)
doPlayerAddOutfit(cid, 289, 3)
setPlayerStorageValue(cid,7092,2)
else
doPlayerAddOutfit(cid, 288, 3)
doPlayerAddOutfit(cid, 289, 3)
talk_state = 1
end
end
return 0
end
return 1
end
And as I said before, if you get the character premium.. They can use the addons.
 
A little bump.
Addons are for premium on real Tibia, so maybe TFS has changed so they are only for premium on TFS also.

If so, does anyone know where to fix it in the source? =)
 
Well, if someone need it:


protocolgame.cpp, replace
Code:
void ProtocolGame::sendOutfitWindow()
{
	NetworkMessage_ptr msg = getOutputBuffer();
	if(msg)
	{
		TRACK_MESSAGE(msg);
		msg->AddByte(0xC8);
		AddCreatureOutfit(msg, player, player->getDefaultOutfit(), true);

		std::list<Outfit> outfitList;
		for(OutfitMap::iterator it = player->outfits.begin(); it != player->outfits.end(); ++it)
		{
			if(player->canWearOutfit(it->first, it->second.addons))
				outfitList.push_back(it->second);
		}

 		if(outfitList.size())
		{
			msg->AddByte((size_t)std::min((size_t)OUTFITS_MAX_NUMBER, outfitList.size()));
			std::list<Outfit>::iterator it = outfitList.begin();
			for(int32_t i = 0; it != outfitList.end() && i < OUTFITS_MAX_NUMBER; ++it, ++i)
			{
				msg->AddU16(it->lookType);
				msg->AddString(it->name);
				if(player->hasCustomFlag(PlayerCustomFlag_CanWearAllAddons))
					msg->AddByte(0x03);
				else if(player->isPremium())
					msg->AddByte(it->addons);
				else
					msg->AddByte(0x00);
			}
		}
		else
		{
			msg->AddByte(1);
			msg->AddU16(player->getDefaultOutfit().lookType);
			msg->AddString("Outfit");
			msg->AddByte(player->getDefaultOutfit().lookAddons);
		}

		player->hasRequestedOutfit(true);
	}
}

with

Code:
void ProtocolGame::sendOutfitWindow()
{
	NetworkMessage_ptr msg = getOutputBuffer();
	if(msg)
	{
		TRACK_MESSAGE(msg);
		msg->AddByte(0xC8);
		AddCreatureOutfit(msg, player, player->getDefaultOutfit(), true);

		std::list<Outfit> outfitList;
		for(OutfitMap::iterator it = player->outfits.begin(); it != player->outfits.end(); ++it)
		{
			if(player->canWearOutfit(it->first, it->second.addons))
				outfitList.push_back(it->second);
		}

 		if(outfitList.size())
		{
			msg->AddByte((size_t)std::min((size_t)OUTFITS_MAX_NUMBER, outfitList.size()));
			std::list<Outfit>::iterator it = outfitList.begin();
			for(int32_t i = 0; it != outfitList.end() && i < OUTFITS_MAX_NUMBER; ++it, ++i)
			{
				msg->AddU16(it->lookType);
				msg->AddString(it->name);
				if(player->hasCustomFlag(PlayerCustomFlag_CanWearAllAddons))
					msg->AddByte(0x03);
				else
					msg->AddByte(it->addons);
			}
		}
		else
		{
			msg->AddByte(1);
			msg->AddU16(player->getDefaultOutfit().lookType);
			msg->AddString("Outfit");
			msg->AddByte(player->getDefaultOutfit().lookAddons);
		}

		player->hasRequestedOutfit(true);
	}
}
 
Back
Top