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

Range in weapon name ?

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello.
How I can add the range of distance weapons like that:

You see bow (attack: 4 defense: 4 range: 3).

?
Thx, for advance.
 
if you have the correct line in items.xml, it should show up properly. wonder what did you do wrong.

weaponType has to be "distance" and ammoType has to be defined
 
Last edited:
XML:
	<item id="11733" article="a" name="Novice Reiatsu Bow">
		<attribute key="weight" value="1500" />
		<attribute key="weaponType" value="distance" />
		<attribute key="slotType" value="two-handed" />
		<attribute key="defense" value="2" />
		<attribute key="attack" value="4" />
		<attribute key="range" value="4" />
		<attribute key="description" value="The bow for novice shooters. Bow attack for small range, removing 3 reiatsu points per hit." />
	</item>

But i was wrote an script, the weapon removing 3 mana per hit and its like bow but not using arrows
Dont showing ;/
 
it's not shown because ammoType is missing.

you can create a hack in item.cpp
Code:
	else if(it.weaponType != WEAPON_NONE)
	{
		bool begin = true;
		if(it.weaponType == WEAPON_DIST && [B][COLOR="red"](it.id == 11733 || [/COLOR][/B]it.ammoType != AMMO_NONE[B][COLOR="red"])[/COLOR][/B])
		{
			begin = false;
			s << " (Range:" << int32_t(item ? item->getShootRange() : it.shootRange);
 
nope :D
Code:
		if(it.weaponType == WEAPON_DIST && (it.id == 11733 || [B][COLOR="red"]it.id == 1234 ||[/COLOR][/B] it.ammoType != AMMO_NONE))

but this should be a better solution
Code:
		if(it.weaponType == WEAPON_DIST && [B][COLOR="red"](it.slotPosition & SLOTP_TWO_HAND ||[/COLOR][/B] it.ammoType != AMMO_NONE[B][COLOR="red"])[/COLOR][/B])
 
Last edited:
Back
Top