ai.obj npc sub nobless

guarnieri2008

Пляшущий с бубном
Пользователь
Сообщения
22
Розыгрыши
0
Репутация
0
Реакции
0
Баллы
233
someone even tell me how to change it so that I can only buy nobless after I have the sub class

 
someone even tell me how to change it so that I can only buy nobless after I have the sub class
C++:
HTML clipboard

class 1 quest_tool : citizen
{
parameter:
    int noblessItemId = 18086;
    int noblessItemCount = 50;
    int subjobItemId = 18086;
    int subjobItemCount = 30;

handler:
    EventHandler TALKED(talker)
    {
        myself::ShowPage(talker, "quest_tool_001.htm");
        return;
    }

    EventHandler MENU_SELECTED(ask, reply, talker)
    {
        if (ask == 123)
        {
            if (reply == 1)
            {
                if (myself::GetOneTimeQuestFlag(talker, 235) == @FALSE && talker.level > 74)
                {
                    if (subjobItemId == 0 || myself::OwnItemCount(talker, subjobItemId) >= subjobItemCount)
                    {
                        myself::AddUseSkillDesire(talker, @s_quest_elixir_of_mimir, @ST_ATTACK, @AMT_STAND, @MAX_TIMER_ID);
                        myself::SetOneTimeQuestFlag(talker, 235, @TRUE);
                        myself::SoundEffect(talker, "ItemSound.quest_finish");
                        myself::ShowPage(talker, "quest_tool_002.htm");
                        if (subjobItemId > 0)
                        {
                            myself::DeleteItem1(talker, subjobItemId, subjobItemCount);
                        }
                    }
                    else
                    {
                        myself::ShowPage(talker, "quest_tool_003.htm");
                    }
                }
                else
                {
                    myself::ShowPage(talker, "quest_tool_004.htm");
                }
            }
            else if (reply == 2)
            {
                if (myself::IsMainClass(talker) == @FALSE && talker.nobless_type == @NOBLESS_NONE && myself::GetOneTimeQuestFlag(talker, 247) == @FALSE && talker.level > 74)
                {
                    if (noblessItemId == 0 || myself::OwnItemCount(talker, noblessItemId) >= noblessItemCount)
                    {
                        myself::GiveItem1(talker, @nobless_tiara, 1);
                        myself::SoundEffect(talker, "ItemSound.quest_finish");
                        myself::ShowPage(talker, "quest_tool_005.htm");
                        myself::SetOneTimeQuestFlag(talker, 247, @TRUE);
                        myself::AddUseSkillDesire(talker, @s_quest_elixir_of_mimir, @ST_ATTACK, @AMT_STAND, @MAX_TIMER_ID);
                        myself::SetNobless(talker);
                        if (noblessItemId > 0)
                        {
                            myself::DeleteItem1(talker, noblessItemId, noblessItemCount);
                        }
                    }
                    else
                    {
                        myself::ShowPage(talker, "quest_tool_003.htm");
                    }
                }
                else
                {
                    myself::ShowPage(talker, "quest_tool_004.htm");
                }
            }
        }
        super;
    }

}