Piaskillers
Active User
- Joined
- Dec 23, 2008
- Messages
- 95
- Reaction score
- 6
Przedstawiam kod na Set, kt?ry dodaje obra?enia magiczne w po??czeniu ze sob?. Set jest zrobiony na przyk?adzie Sapphire Setu znanego z APO.
W const76.h pod:
Dodajemy:
W game.cpp pod:
Dodajemy:
Potem w luascript.cpp pod:
Dodajemy:
Nastepnie w luascript.h pod:
Dodajemy:
I w config.lua dodajemy:
Teraz wystarczy przebudowa? projekt.
Testowane na YurOTS 0.9.4f
W const76.h pod:
PHP:
ITEM_WAND_OF_DRAGONBREATH = 2191,
PHP:
ITEM_SARMOR = 2503,
ITEM_SHELMET = 2501,
ITEM_SLEGS = 2504,
PHP:
if (me->attackType & ATTACK_MANADRAIN)
{
manaDamage = std::min(damage, targetCreature->mana);
targetCreature->drainMana(manaDamage);
damage = 0;
}
else
#endif //YUR_DRAINS
PHP:
if(attackPlayer && attackPlayer->getItem(SLOT_HEAD) && attackPlayer->getItem(SLOT_HEAD)->getID() == ITEM_SHELMET && attackPlayer->getItem(SLOT_ARMOR) && attackPlayer->getItem(SLOT_ARMOR)->getID() == ITEM_SARMOR && attackPlayer->getItem(SLOT_LEGS) && attackPlayer->getItem(SLOT_LEGS)->getID() == ITEM_SLEGS)
{
double newdamage = damage*g_config.SAPPHIRE_SET/100.0;
damage += (int)newdamage;
}
PHP:
MANA_INFERNO = atoi(getGlobalStringField("wandmana", 5, "13").c_str());
PHP:
SAPPHIRE_SET = getGlobalNumber("sapphireset",20);
PHP:
int MANA_INFERNO;
PHP:
int SAPPHIRE_SET;
PHP:
sapphireset = 14
Testowane na YurOTS 0.9.4f