- Katılım
- 6 Kas 2021
- Mesajlar
- 2,985
- Tepkime puanı
- 4,500
- Puanları
- 113
- Yaş
- 31
- Konum
- Türkiye
- Dc
- fatihbulut
Aynı türdeki itemler arasında efsun transferi yapmanızı sağlayan efsun nesnesi
Game Source;Game;
char_item.cpp:
Kod:
//Arat;
else if (item->GetVnum() == 76014)
{
int aiChangeProb[ITEM_ATTRIBUTE_MAX_LEVEL] =
{
0, 10, 50, 39, 1
};
item2->ChangeAttribute(aiChangeProb);
}
//Altına ekle;
else if (item->GetVnum() == 72350)
{
if (item2->GetType() != ITEM_WEAPON && item2->GetType() != ITEM_ARMOR)
{
ChatPacket(CHAT_TYPE_INFO, "Bu nesneyi sadece silahlar ve iç itemler üzerinde kullanabilirsin !");
return false;
}
if (item->GetAttributeType(0) == 0)
{
for (int i = 0; i < ITEM_ATTRIBUTE_MAX_NUM; ++i)
{
item->SetForceAttribute(i, item2->GetAttributeType(i), item2->GetAttributeValue(i));
}
item->SetForceAttribute(5,0,item2->GetType());
item->SetForceAttribute(6,0,item2->GetWearFlag());
item2->ChangeAttribute();
ChatPacket(CHAT_TYPE_INFO, "Bonuslar başarıyla %s isimli eşyandan emildi.",item2->GetName());
}
else
{
auto itemtype = item->GetAttributeValue(5);
if ((item2->GetType() == itemtype) && (itemtype == ITEM_WEAPON))
{
if (item->GetAttributeType(0) == 72 || item->GetAttributeType(0) == 71)
{
if (item2->GetAttributeType(0) != 72 && item2->GetAttributeType(0) != 71)
{
ChatPacket(CHAT_TYPE_INFO, "Bu nesneyi sadece ortalama ve/veya beceri hasarı gelebilen esyalarda kullanabilirsin !");
return false;
}
}
else
{
if (item2->GetAttributeType(0) == 72 || item2->GetAttributeType(0) == 71)
{
ChatPacket(CHAT_TYPE_INFO, "Bu nesneyi ortalama ve/veya beceri hasarı gelebilen esyalarda kullanamazsın !");
return false;
}
}
}
else
{
auto itemwearflag = item->GetAttributeValue(6);
if (itemwearflag != item2->GetWearFlag())
{
ChatPacket(CHAT_TYPE_INFO, "Bonusları emilen eşya ile aktarmak istediğin eşyanın türü uyumlu değil!");
return false;
}
}
for (int i = 0; i < ITEM_ATTRIBUTE_MAX_NUM; ++i)
{
item2->SetForceAttribute(i, item->GetAttributeType(i), item->GetAttributeValue(i));
}
ChatPacket(CHAT_TYPE_INFO, "Bonuslar başarıyla %s isimli eşyana aktarıldı.",item2->GetName());
item->SetCount(item->GetCount() - 1);
}
break;
}
Pack;
Root;
uitooltip.py:
Kod:
#Arat
### Weapon ###
if item.ITEM_TYPE_WEAPON == itemType:
uitooltip.py:
Kod:
#Üstüne ekle;
if 72350 == itemVnum:
itemwearflag = attrSlot[6][1]
if itemwearflag > 0:
wearNames = ""
if itemwearflag == 1:
wearNames = "Zırh"
elif itemwearflag == 2:
wearNames = "Kask"
elif itemwearflag == 4:
wearNames = "Ayakkabı"
elif itemwearflag == 8:
wearNames = "Bilezik"
elif itemwearflag == 16:
wearNames = "Silah"
elif itemwearflag == 32:
wearNames = "Kolye"
elif itemwearflag == 64:
wearNames = "Küpe"
elif itemwearflag == 256:
wearNames = "Kalkan"
self.AppendTextLine(wearNames, self.NEED_SKILL_POINT_COLOR)
self.AppendSpace(3)
self.__AppendAffectInformation()
self.__AppendAttributeInformation(attrSlot)
else:
self.AppendTextLine("[BOŞ]", self.NEGATIVE_COLOR)
Locale;
item_list.txt:
Kod:
#En sona ekle;
72350 ETC icon/item/71084.tga
Proto;
item_names.txt:
Kod:
72350 Efsun Aktarma Nesnesi
item_proto.txt:
Kod:
72350 Efsun Aktarma Nesnesi ITEM_USE USE_CHANGE_ATTRIBUTE 1 ANTI_DROP | ANTI_SELL | ANTI_STACK NONE NONE 500 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0