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

Damage[Solved]

You can add it in source. If you want use it for few items you can add code:
list of slots said:
SLOT_HEAD
SLOT_NECKLACE
SLOT_BACKPACK
SLOT_ARMOR
SLOT_RIGHT
SLOT_LEFT
SLOT_LEGS
SLOT_FEET
SLOT_RING
SLOT_AMMO
Find in combat.cpp (its in 2 places):
PHP:
multiplier = vocation->getMultiplier(MULTIPLIER_MAGIC);
and under it (in 2 places) paste:
PHP:
				if(Item* item = player->getInventoryItem(SLOT_NECKLACE))
				{
                    if(item->getID() == 2196) // 'broken amulet' (ooooold aol)
                        multiplier *= 1.2f; // i think its +20% (120% of normal dmg)
                    else if(item->getID() == 2197) // stone skin amulet
                        multiplier *= 1.4f; // i think its +40% (140% of normal dmg)
                }
                if(Item* item = player->getInventoryItem(SLOT_ARMOR))
				{
                    if(item->getID() == 2466) // golden armor
                        multiplier *= 1.1f; // i think its +10% (120% of normal dmg)
                    else if(item->getID() == 2656) // blue robe
                        multiplier *= 1.5f; // i think its +50% (140% of normal dmg)
                }
I didnt test is it work, but compile without errors (tfs 0.3.4pl2). You can add more 'else if' and item ids and other slots for items. If player has XXX item in XXX slot when he use spell it should add him XXX% magic damage.
 
You can add it in source. If you want use it for few items you can add code:

Find in combat.cpp (its in 2 places):
PHP:
multiplier = vocation->getMultiplier(MULTIPLIER_MAGIC);
and under it (in 2 places) paste:
PHP:
				if(Item* item = player->getInventoryItem(SLOT_NECKLACE))
				{
                    if(item->getID() == 2196) // 'broken amulet' (ooooold aol)
                        multiplier *= 1.2f; // i think its +20% (120% of normal dmg)
                    else if(item->getID() == 2197) // stone skin amulet
                        multiplier *= 1.4f; // i think its +40% (140% of normal dmg)
                }
                if(Item* item = player->getInventoryItem(SLOT_ARMOR))
				{
                    if(item->getID() == 2466) // golden armor
                        multiplier *= 1.1f; // i think its +10% (120% of normal dmg)
                    else if(item->getID() == 2656) // blue robe
                        multiplier *= 1.5f; // i think its +50% (140% of normal dmg)
                }
I didnt test is it work, but compile without errors (tfs 0.3.4pl2). You can add more 'else if' and item ids and other slots for items. If player has XXX item in XXX slot when he use spell it should add him XXX% magic damage.

I'll test it out, thanks Gesior.. I appreciate it
 
Last edited:
Back
Top