ну...
Код:class antelope extends warrior_passive_physicalspecial { EventHandler MY_DYING(always_list, aparty, code_info, i10, i11, i9, last_attacker, lmpcc, lparty, member, random1_list, target) { always_list = gg->AllocCodeInfoList(); random1_list = gg->AllocCodeInfoList(); target = last_attacker; if (gg->HaveMemo(target, 336) && gg->GetMemoState(target, 336) == 3) { random1_list->SetInfo(0, target); } if (gg->HaveMemo(target, 336) && gg->GetMemoState(target, 336) == 3) { random1_list->SetInfo(0, target); } if (gg->IsNull(lparty) == 0) { for (i9 = 0; i9 < lparty->member_count; i9 = i9->++) { target = myself->GetMemberOfParty(lparty, i9); if (gg->HaveMemo(target, 336) && gg->GetMemoState(target, 336) == 3) { random1_list->SetInfo(0, target); } } } target = last_attacker; if (gg->HaveMemo(target, 662)) { random1_list->SetInfo(1, target); } if (gg->HaveMemo(target, 662)) { random1_list->SetInfo(1, target); } if (gg->IsNull(lparty) == 0) { for (i9 = 0; i9 < lparty->member_count; i9 = i9->++) { target = myself->GetMemberOfParty(lparty, i9); if (gg->HaveMemo(target, 662)) { random1_list->SetInfo(1, target); } } } while (gg->IsNull(code_info = always_list->Next()) == 0) { code_info->code } code_info = random1_list->RandomSelectOne(); if (gg->IsNull(code_info) == 0) { switch (code_info->code) { case 0: { myself->SetCurrentQuestID(336); target = code_info->RandomSelectOne(); if (gg->IsNull(target) == 0 && myself->DistFromMe(target) <= 1500) { if (gg->Rand(1000) < 100) { myself->GiveItem1(target, 3482, 1); myself->SoundEffect(target, "ItemSound.quest_itemget"); } } break; } case 1: { myself->SetCurrentQuestID(662); target = code_info->RandomSelectOne(); if (gg->IsNull(target) == 0 && myself->DistFromMe(target) <= 1500) { if (gg->Rand(1000) < 483) { myself->GiveItem1(target, 8765, 1); myself->SoundEffect(target, "ItemSound.quest_itemget"); } } break; } } } super; } }
Я не силён в программировании, так вопрос мимо темы, а зачем в коде который вы показали по два раза повторяются строки
Код:
if (gg->HaveMemo(target, 336) && gg->GetMemoState(target, 336) == 3)
{
random1_list->SetInfo(0, target);
}
if (gg->HaveMemo(target, 336) && gg->GetMemoState(target, 336) == 3)
{
random1_list->SetInfo(0, target);
}
Код:
if (gg->HaveMemo(target, 662))
{
random1_list->SetInfo(1, target);
}
if (gg->HaveMemo(target, 662))
{
random1_list->SetInfo(1, target);
}