Synthetic_
deathzot.net
- Joined
- Dec 30, 2008
- Messages
- 2,535
- Reaction score
- 574
Solved
.
.
Last edited:
Find in combat.cpp (its in 2 places):list of slots said:SLOT_HEAD
SLOT_NECKLACE
SLOT_BACKPACK
SLOT_ARMOR
SLOT_RIGHT
SLOT_LEFT
SLOT_LEGS
SLOT_FEET
SLOT_RING
SLOT_AMMO
multiplier = vocation->getMultiplier(MULTIPLIER_MAGIC);
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)
}
Isn't it possible by using items.xml? Always thought it is...
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):
and under it (in 2 places) paste:PHP:multiplier = vocation->getMultiplier(MULTIPLIER_MAGIC);
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.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) }
Since YurOTS 7.6 isn't most popular engine
Now developers add new attributes to items.
You can request new item attributes (you can edit item attributes values in LUA script and it save when logout):
http://otland.net/project.php?do=issuelist&projectid=2&issuetypeid=feature