Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   [help] ai.obj -> nasc (https://postpacific.loc-online.com/showthread.php?t=5011)

ateh 30.06.2006 14:13

[help] ai.obj -> nasc
 
Hello.
How would you decompile this fragment of AI into NASC?

Code:

L18778
        shift_sp 1
        func_call 23        //  func[GetCurrentTick]
        push_event        //  talker
        push_const 32
        add
        fetch_i        //  quest_last_reward_time
        push_const 644
        add
        fetch_i
        sub
        push_const 1
        greater
        branch_false L18781

this "sub" command is new for me...

Btw.. does anyone of you have any software decompiler ai->nasc?
Or I have to do all this manually...

FidoW 30.06.2006 14:25

if ((GetCurrentTick()-talker.quest_last_reward_time) > 1)

ateh 30.06.2006 14:33

omg so easy... :oops: how come i didn't think about that heh.
Thank you :)) :thumbright:

Miafan 30.06.2006 17:15

And how to about this code:
Code:

class wisdom_chest : citizen
handler 4        //  TALK_SELECTED
        variable_begin
                "fhtml0"
                "i0"
                "talker"
                "myself"
                "_choiceN"
                "_code"
                "_from_choice"
        variable_end

        push_event        //  _from_choice
        push_const 332
        add
        fetch_i
        push_const 0
        equal
        branch_false L42133
L42132
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 334
        func_call 59        //  func[HaveMemo]
        shift_sp -2
        push_const 1
        equal
        push_reg_sp
        fetch_i
        branch_false L42134
        push_event        //  talker
        push_const 32
        add
        fetch_i        //  flag
        push_const 1716
        add
        fetch_i
        push_const 4
        equal
        and
L42134
        branch_false L42136
L42135
        push_event        //  _choiceN
        push_const 328
        add
        push_reg_sp
        fetch_i
        push_event        //  _choiceN
        push_const 328
        add
        fetch_i
        push_const 1
        add
        assign
        shift_sp -1
        push_event        //  _code
        push_const 324
        add
        push_reg_sp
        fetch_i
        push_const 0
        assign
        shift_sp -1
        shift_sp 1
        push_const 0
S8958.        "The Wishing Potion"
        push_string S8958
        func_call 131        //  func[AddChoice]
        shift_sp -2
        shift_sp -1
L42136
        push_event        //  _choiceN
        push_const 328
        add
        fetch_i
        push_const 1
        greater
        branch_false L42138
L42137
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 1
        func_call 132        //  func[ShowChoicePage]
        shift_sp -2
        shift_sp -1
        exit_handler
L42138
L42133
        push_event        //  _from_choice
        push_const 332
        add
        fetch_i
        push_reg_sp
        fetch_i
        branch_true L42139
        push_event        //  _choiceN
        push_const 328
        add
        fetch_i
        push_const 1
        equal
        or
L42139
        branch_false L42141
L42140
        push_event        //  _code
        push_const 324
        add
        fetch_i
        push_reg_sp
        fetch_i
        push_const 0
        equal
        branch_false L42144
L42143
        push_event        //  _from_choice
        push_const 332
        add
        fetch_i
        push_const 0
        equal
        push_reg_sp
        fetch_i
        branch_true L42145
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 334
        func_call 59        //  func[HaveMemo]
        shift_sp -2
        push_const 1
        equal
        push_reg_sp
        fetch_i
        branch_false L42146
        push_event        //  talker
        push_const 32
        add
        fetch_i        //  flag
        push_const 1716
        add
        fetch_i
        push_const 4
        equal
        and
L42146
        or
L42145
        branch_false L42148
L42147
        push_event        //  i0
        push_const 192
        add
        push_reg_sp
        fetch_i
        shift_sp 1
        push_const 10
        func_call 55        //  func[Rand]
        shift_sp -1
        assign
        shift_sp -1
        shift_sp 1
        func_call 23        //  func[GetCurrentTick]
        push_event        //  talker
        push_const 32
        add
        fetch_i        //  quest_last_reward_time
        push_const 644
        add
        fetch_i
        sub
        push_const 1
        greater
        branch_false L42150
L42149
        push_event        //  talker
        push_const 32
        add
        fetch_i        //  quest_last_reward_time
        push_const 644
        add
        push_reg_sp
        fetch_i
        shift_sp 1
        func_call 23        //  func[GetCurrentTick]
        assign
        shift_sp -1
        push_event        //  i0
        push_const 192
        add
        fetch_i
        push_const 2
        less
        branch_false L42152
L42151
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
S8959.        "wisdom_chest_q0334_01.htm"
        push_string S8959
        func_call 43        //  func[ShowPage]
        shift_sp -2
        shift_sp -1
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 1049
        push_const 1
        func_call 77        //  func[GiveItem1]
        shift_sp -3
        shift_sp -1
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 1050
        push_const 1
        func_call 77        //  func[GiveItem1]
        shift_sp -3
        shift_sp -1
        jump L42153
L42152
        push_event        //  i0
        push_const 192
        add
        fetch_i
        push_const 2
        greater_equal
        push_reg_sp
        fetch_i
        branch_false L42154
        push_event        //  i0
        push_const 192
        add
        fetch_i
        push_const 4
        less
        and
L42154
        branch_false L42156
L42155
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
S8960.        "wisdom_chest_q0334_02.htm"
        push_string S8960
        func_call 43        //  func[ShowPage]
        shift_sp -2
        shift_sp -1
        jump L42157
L42156
        push_event        //  i0
        push_const 192
        add
        fetch_i
        push_const 4
        greater_equal
        push_reg_sp
        fetch_i
        branch_false L42158
        push_event        //  i0
        push_const 192
        add
        fetch_i
        push_const 6
        less
        and
L42158
        branch_false L42160
L42159
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
S8961.        "wisdom_chest_q0334_03.htm"
        push_string S8961
        func_call 43        //  func[ShowPage]
        shift_sp -2
        shift_sp -1
        jump L42161
L42160
        push_event        //  i0
        push_const 192
        add
        fetch_i
        push_const 6
        equal
        branch_false L42163
L42162
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
S8962.        "wisdom_chest_q0334_04.htm"
        push_string S8962
        func_call 43        //  func[ShowPage]
        shift_sp -2
        shift_sp -1
        jump L42164
L42163
        push_event        //  i0
        push_const 192
        add
        fetch_i
        push_const 7
        greater_equal
        push_reg_sp
        fetch_i
        branch_false L42165
        push_event        //  i0
        push_const 192
        add
        fetch_i
        push_const 9
        less
        and
L42165
        branch_false L42167
L42166
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
S8963.        "wisdom_chest_q0334_05.htm"
        push_string S8963
        func_call 43        //  func[ShowPage]
        shift_sp -2
        shift_sp -1
        jump L42168
L42167
        push_event        //  i0
        push_const 192
        add
        fetch_i
        push_const 9
        equal
        branch_false L42170
L42169
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
S8964.        "wisdom_chest_q0334_06.htm"
        push_string S8964
        func_call 43        //  func[ShowPage]
        shift_sp -2
        shift_sp -1
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 3943
        push_const 1
        func_call 77        //  func[GiveItem1]
        shift_sp -3
        shift_sp -1
L42170
L42168
L42164
L42161
L42157
L42153
        push_event        //  talker
        push_const 32
        add
        fetch_i        //  flag
        push_const 1716
        add
        push_reg_sp
        fetch_i
        push_const 0
        assign
        shift_sp -1
        shift_sp 1
        func_call 175        //  func[Despawn]
        shift_sp -1
L42150
L42148
        jump L42142
        jump L42171
L42144
L42171
L42142
        shift_sp -1
        exit_handler
L42141
        call_super
handler_end

handler 12        //  TIMER_FIRED_EX
        variable_begin
                "timer_id"
                "myself"
                "_choiceN"
                "_code"
                "_from_choice"
        variable_end

        push_event        //  timer_id
        push_const 176
        add
        fetch_i
        push_const 2336007
        equal
        branch_false L42173
L42172
        shift_sp 1
        func_call 175        //  func[Despawn]
        shift_sp -1
L42173
        call_super
handler_end

handler 13        //  CREATED
        variable_begin
                "i0"
                "myself"
                "_choiceN"
                "_code"
                "_from_choice"
        variable_end

        shift_sp 1
        push_const 2336007
        push_const 120
        push_const 1000
        mul
        func_call 28        //  func[AddTimerEx]
        shift_sp -2
        shift_sp -1
        call_super
handler_end

class_end

I want to increase property to gain amulet Heart of Paagrio

[rus]Помогите перелопатить кусок кода, а ещё лучше перегнать в наску, чтобы сам мог менять. Проблема в том, что амулет из ящика мудрости получить вообще нереально, народ по несколько месяцев страдает :([/rus]

Zil 30.06.2006 17:18

Code:

class wisdom_chest : citizen {

  handler:

  EventHandler TALK_SELECTED(_choiceN, _code, _from_choice, i0, talker) {
    if (_from_choice == 0) {
      if ((HaveMemo(talker, @wish_potion) == 1)  &&  (talker.flag == 4)) {
        _choiceN = (_choiceN+1);
        _code = 0;
        AddChoice(0, "The Wishing Potion");
      }
      if (_choiceN > 1) {
        ShowChoicePage(talker, 1);
        return;
      }
    }
    if ((_from_choice  ||  (_choiceN == 1))) {
      if (_code == 0) {
        if ((_from_choice == 0)  ||  (HaveMemo(talker, @wish_potion) == 1)  &&  (talker.flag == 4)) {
          i0 = Rand(10);
          if ((GetCurrentTick()-talker.quest_last_reward_time) > 1) {
            talker.quest_last_reward_time = GetCurrentTick();
            if (i0 < 2) {
              ShowPage(talker, "wisdom_chest_q0334_01.htm");
              GiveItem1(talker, @sb_ice_bolt1, 1);
              GiveItem1(talker, @sb_battle_heal1, 1);
            }
            else {
              if ((i0 >= 2)  &&  (i0 < 4)) {
                ShowPage(talker, "wisdom_chest_q0334_02.htm");
              }
              else {
                if ((i0 >= 4)  &&  (i0 < 6)) {
                  ShowPage(talker, "wisdom_chest_q0334_03.htm");
                }
                else {
                  if (i0 == 6) {
                    ShowPage(talker, "wisdom_chest_q0334_04.htm");
                  }
                  else {
                    if ((i0 >= 7)  &&  (i0 < 9)) {
                      ShowPage(talker, "wisdom_chest_q0334_05.htm");
                    }
                    else {
                      if (i0 == 9) {
                        ShowPage(talker, "wisdom_chest_q0334_06.htm");
                        GiveItem1(talker, @sb_heart_of_paagrio1, 1);
                      }
                    }
                  }
                }
              }
            }
            talker.flag = 0;
            Despawn();
          }
        }
      }
      return;
    }
    super;
  }


  EventHandler TIMER_FIRED_EX(timer_id) {
    if (timer_id == 2336007) {
      Despawn();
    }
    super;
  }



  EventHandler CREATED() {
    AddTimerEx(2336007, (120*1000));
    super;
  }


}


Miafan 30.06.2006 19:44

Quote:

Originally Posted by Zil
Code:

class wisdom_chest : citizen {

  handler:

  EventHandler TALK_SELECTED(_choiceN, _code, _from_choice, i0, talker) {
    if (_from_choice == 0) {
      if ((HaveMemo(talker, @wish_potion) == 1)  &&  (talker.flag == 4)) {
        _choiceN = (_choiceN+1);
        _code = 0;
        AddChoice(0, "The Wishing Potion");
      }
      if (_choiceN > 1) {
        ShowChoicePage(talker, 1);
        return;
      }
    }
    if ((_from_choice  ||  (_choiceN == 1))) {
      if (_code == 0) {
        if ((_from_choice == 0)  ||  (HaveMemo(talker, @wish_potion) == 1)  &&  (talker.flag == 4)) {
          i0 = Rand(10);
          if ((GetCurrentTick()-talker.quest_last_reward_time) > 1) {
            talker.quest_last_reward_time = GetCurrentTick();
            if (i0 < 2) {
              ShowPage(talker, "wisdom_chest_q0334_01.htm");
              GiveItem1(talker, @sb_ice_bolt1, 1);
              GiveItem1(talker, @sb_battle_heal1, 1);
            }
            else {
              if ((i0 >= 2)  &&  (i0 < 4)) {
                ShowPage(talker, "wisdom_chest_q0334_02.htm");
              }
              else {
                if ((i0 >= 4)  &&  (i0 < 6)) {
                  ShowPage(talker, "wisdom_chest_q0334_03.htm");
                }
                else {
                  if (i0 == 6) {
                    ShowPage(talker, "wisdom_chest_q0334_04.htm");
                  }
                  else {
                    if ((i0 >= 7)  &&  (i0 < 9)) {
                      ShowPage(talker, "wisdom_chest_q0334_05.htm");
                    }
                    else {
                      if (i0 == 9) {
                        ShowPage(talker, "wisdom_chest_q0334_06.htm");
                        GiveItem1(talker, @sb_heart_of_paagrio1, 1);
                      }
                    }
                  }
                }
              }
            }
            talker.flag = 0;
            Despawn();
          }
        }
      }
      return;
    }
    super;
  }


  EventHandler TIMER_FIRED_EX(timer_id) {
    if (timer_id == 2336007) {
      Despawn();
    }
    super;
  }



  EventHandler CREATED() {
    AddTimerEx(2336007, (120*1000));
    super;
  }


}


thanks, thanks a lot :!:
but how you get it? :shock:
have you full decompiled ai.obj?

hel 30.06.2006 20:15

Miafan:
Yeah. ai_mmerged.txt (decompiled ai) exist in l2tools1.4+ pack.

Miafan 30.06.2006 20:37

Quote:

Originally Posted by hel
Miafan:
Yeah. ai_mmerged.txt (decompiled ai) exist in l2tools1.4+ pack.

in my l2tools 1.6 realy exist ai_mmerged.txt but it don't contain class wisdom_chest and many-many others :(

Zil 30.06.2006 22:21

Yes, I have FULL decompiled ai.obj....not full, but anytime I can decompile any part of AI. It's not in L2tools ai_merged.txt

Miafan 01.07.2006 06:47

Quote:

Originally Posted by Zil
Yes, I have FULL decompiled ai.obj....not full, but anytime I can decompile any part of AI. It's not in L2tools ai_merged.txt

How you do that :?:
Can you share or send by email decompiled ai :roll:

Zil 01.07.2006 09:35

Nope....Share some good thing and write to Humordwarf for having his GREATES tool or donate him

Miafan 07.07.2006 10:34

Can anyone decompile a few classes for me, pleaseee :)

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
pets_summons_129.zip — 3940 байт

Miafan 14.07.2006 11:43

UP!!!

ateh 14.07.2006 12:54

Why dont you try to learn and decompile this on your own?
Read and rewrite into nasc :)...
You have names of functions after "//", parameters are above the function.
Try and you will understand it eventually. Then compile back with nasc and check if it matches (well, labels won't match, but don't bother.

Zeran 15.07.2006 11:42

Guys, can anybody give me some manual, how to create AI classes (AI functions) and compile/decompile it?I wish to start to work above it (AI) but i need help... :(

TheOrder 15.07.2006 12:04

Quote:

Originally Posted by Miafan
Can anyone decompile a few classes for me, pleaseee :)

[php:1:e4e87fd5f6]class summon_c3 : default_npc {

parameter:

float SummonLifeTime = xx.xx0000;
int CrystalMeat = 1458;
int CrystalAmountMeat = 1;
int CrystalMeatReuse = 900000;

handler:

EventHandler CREATED() {
AddPetDefaultDesire_Follow(SummonLifeTime);
AddTimerEx(100020, CrystalMeatReuse);
}
// 2 functions called (2+0)


EventHandler NO_DESIRE() {
AddPetDefaultDesire_Follow(SummonLifeTime);
AddTimerEx(100020, CrystalMeatReuse);
}
// 2 functions called (2+0)


EventHandler TIMER_FIRED_EX(myself, timer_id) {
if (timer_id == 100020) {
if (myself.master.alive == 0) {
Despawn();
}
AddTimerEx(100020, CrystalMeatReuse);
if (OwnItemCount(myself.master, CrystalMeat) >= CrystalAmountMeat) {
DeleteItem1(myself.master, CrystalMeat, CrystalAmountMeat);
}
else {
Despawn();
}
}
}
// 5 functions called (4+1)


EventHandler MY_DYING(c0, c1, myself) {
c0 = GetLastAttacker();
if (c0.npc_class_id == 1005103) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress3))) {
GiveItem1(c1, @crystal_of_defeat3, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress3, OwnItemCount(c1, @crystal_of_inprogress3));
DeleteItem1(c1, @crystal_of_starting3, OwnItemCount(c1, @crystal_of_starting3));
}
}
}
else {
if (c0.npc_class_id == 1005102) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress1))) {
GiveItem1(c1, @crystal_of_defeat1, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress1, OwnItemCount(c1, @crystal_of_inprogress1));
DeleteItem1(c1, @crystal_of_starting1, OwnItemCount(c1, @crystal_of_starting1));
}
}
}
else {
if (c0.npc_class_id == 1005105) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress2))) {
GiveItem1(c1, @crystal_of_defeat2, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress2, OwnItemCount(c1, @crystal_of_inprogress2));
DeleteItem1(c1, @crystal_of_starting2, OwnItemCount(c1, @crystal_of_starting2));
}
}
}
else {
if (c0.npc_class_id == 1005106) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress4))) {
GiveItem1(c1, @crystal_of_defeat4, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress4, OwnItemCount(c1, @crystal_of_inprogress4));
DeleteItem1(c1, @crystal_of_starting4, OwnItemCount(c1, @crystal_of_starting4));
}
}
}
else {
if (c0.npc_class_id == 1005107) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress6))) {
GiveItem1(c1, @crystal_of_defeat6, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress6, OwnItemCount(c1, @crystal_of_inprogress6));
DeleteItem1(c1, @crystal_of_starting6, OwnItemCount(c1, @crystal_of_starting6));
}
}
}
else {
if (c0.npc_class_id == 1005104) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress5))) {
GiveItem1(c1, @crystal_of_defeat5, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress5, OwnItemCount(c1, @crystal_of_inprogress5));
DeleteItem1(c1, @crystal_of_starting5, OwnItemCount(c1, @crystal_of_starting5));
}
}
}
}
}
}
}
}
super;
}
// 49 functions called (24+25)

}

class summon_c3_warrior : summon_c3 {

parameter:

int DDMagic = 769;

handler:

EventHandler MENU_SELECTED(ask, c0, i0, myself, reply) {
i0 = myself.master.target_index;
if (i0 <= 0) {
return;
}
c0 = GetCreatureFromIndex(i0);
if (c0) {
if ((Skill_GetConsumeMP(DDMagic) < myself.sm.mp) && (Skill_GetConsumeHP(DDMagic) < myself.sm.hp) && (Skill_InReuseDelay(DDMagic) == 0)) {
AddUseSkillDesireEx(myself.master.target_id, DDMagic, 0, reply, ask, 1000000);
}
}
}
// 5 functions called (1+4)

}

class summon_c3_support : summon_c3 {

parameter:

int DDMagic = 258817;

handler:

EventHandler MENU_SELECTED(myself) {
if ((Skill_GetConsumeMP(DDMagic) < myself.sm.mp) && (Skill_GetConsumeHP(DDMagic) < myself.sm.hp) && (Skill_InReuseDelay(DDMagic) == 0)) {
if ((Skill_GetConsumeMP(DDMagic) < myself.sm.mp) && (Skill_GetConsumeHP(DDMagic) < myself.sm.hp) && (Skill_InReuseDelay(DDMagic) == 0)) {
AddUseSkillDesire(myself.master, DDMagic, 1, 1, 1000000);
}
}
return;
}
// 7 functions called (1+6)

}


class summon_magicalattack : default_npc {

parameter:

int DDMagic;
float SummonLifeTime;

handler:

EventHandler CREATED() {
AddPetDefaultDesire_Follow(SummonLifeTime);
}
// 1 functions called (1+0)


EventHandler NO_DESIRE() {
AddPetDefaultDesire_Follow(SummonLifeTime);
}
// 1 functions called (1+0)


EventHandler MENU_SELECTED(ask, c0, i0, myself, reply) {
i0 = myself.master.target_index;
if (i0 <= 0) {
return;
}
c0 = GetCreatureFromIndex(i0);
if (c0) {
if ((Skill_GetConsumeMP(DDMagic) < myself.sm.mp) && (Skill_GetConsumeHP(DDMagic) < myself.sm.hp) && (Skill_InReuseDelay(DDMagic) == 0)) {
AddUseSkillDesireEx(myself.master.target_id, DDMagic, 0, reply, ask, 1000000);
}
}
}
// 5 functions called (1+4)


EventHandler MY_DYING(c0, c1, myself) {
c0 = GetLastAttacker();
if (c0.npc_class_id == 1005103) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress3))) {
GiveItem1(c1, @crystal_of_defeat3, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress3, OwnItemCount(c1, @crystal_of_inprogress3));
DeleteItem1(c1, @crystal_of_starting3, OwnItemCount(c1, @crystal_of_starting3));
Despawn();
}
}
}
else {
if (c0.npc_class_id == 1005102) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress1))) {
GiveItem1(c1, @crystal_of_defeat1, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress1, OwnItemCount(c1, @crystal_of_inprogress1));
DeleteItem1(c1, @crystal_of_starting1, OwnItemCount(c1, @crystal_of_starting1));
Despawn();
}
}
}
else {
if (c0.npc_class_id == 1005105) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress2))) {
GiveItem1(c1, @crystal_of_defeat2, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress2, OwnItemCount(c1, @crystal_of_inprogress2));
DeleteItem1(c1, @crystal_of_starting2, OwnItemCount(c1, @crystal_of_starting2));
Despawn();
}
}
}
else {
if (c0.npc_class_id == 1005106) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress4))) {
GiveItem1(c1, @crystal_of_defeat4, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress4, OwnItemCount(c1, @crystal_of_inprogress4));
DeleteItem1(c1, @crystal_of_starting4, OwnItemCount(c1, @crystal_of_starting4));
Despawn();
}
}
}
else {
if (c0.npc_class_id == 1005107) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress6))) {
GiveItem1(c1, @crystal_of_defeat6, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress6, OwnItemCount(c1, @crystal_of_inprogress6));
DeleteItem1(c1, @crystal_of_starting6, OwnItemCount(c1, @crystal_of_starting6));
Despawn();
}
}
}
else {
if (c0.npc_class_id == 1005104) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress5))) {
GiveItem1(c1, @crystal_of_defeat5, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress5, OwnItemCount(c1, @crystal_of_inprogress5));
DeleteItem1(c1, @crystal_of_starting5, OwnItemCount(c1, @crystal_of_starting5));
Despawn();
}
}
}
}
}
}
}
}
super;
}
// 55 functions called (30+25)

}

class summon_physicalattack : default_npc {

parameter:

float SummonLifeTime;

handler:

EventHandler CREATED() {
AddPetDefaultDesire_Follow(SummonLifeTime);
}
// 1 functions called (1+0)


EventHandler NO_DESIRE() {
AddPetDefaultDesire_Follow(SummonLifeTime);
}
// 1 functions called (1+0)


EventHandler MENU_SELECTED(ask) {
if (ask == 1) {
}
}
// 0 functions called (0+0)


EventHandler MY_DYING(c0, c1, myself) {
c0 = GetLastAttacker();
if (c0.npc_class_id == 1005103) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress3))) {
GiveItem1(c1, @crystal_of_defeat3, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress3, OwnItemCount(c1, @crystal_of_inprogress3));
DeleteItem1(c1, @crystal_of_starting3, OwnItemCount(c1, @crystal_of_starting3));
}
}
}
else {
if (c0.npc_class_id == 1005102) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress1))) {
GiveItem1(c1, @crystal_of_defeat1, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress1, OwnItemCount(c1, @crystal_of_inprogress1));
DeleteItem1(c1, @crystal_of_starting1, OwnItemCount(c1, @crystal_of_starting1));
}
}
}
else {
if (c0.npc_class_id == 1005105) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress2))) {
GiveItem1(c1, @crystal_of_defeat2, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress2, OwnItemCount(c1, @crystal_of_inprogress2));
DeleteItem1(c1, @crystal_of_starting2, OwnItemCount(c1, @crystal_of_starting2));
}
}
}
else {
if (c0.npc_class_id == 1005106) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress4))) {
GiveItem1(c1, @crystal_of_defeat4, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress4, OwnItemCount(c1, @crystal_of_inprogress4));
DeleteItem1(c1, @crystal_of_starting4, OwnItemCount(c1, @crystal_of_starting4));
}
}
}
else {
if (c0.npc_class_id == 1005107) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress6))) {
GiveItem1(c1, @crystal_of_defeat6, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress6, OwnItemCount(c1, @crystal_of_inprogress6));
DeleteItem1(c1, @crystal_of_starting6, OwnItemCount(c1, @crystal_of_starting6));
}
}
}
else {
if (c0.npc_class_id == 1005104) {
if (myself.sm.master) {
c1 = myself.sm.master;
if ((HaveMemo(c1, @test_of_summoner) && OwnItemCount(c1, @crystal_of_inprogress5))) {
GiveItem1(c1, @crystal_of_defeat5, 1);
SoundEffect(c1, "ItemSound.quest_itemget");
DeleteItem1(c1, @crystal_of_inprogress5, OwnItemCount(c1, @crystal_of_inprogress5));
DeleteItem1(c1, @crystal_of_starting5, OwnItemCount(c1, @crystal_of_starting5));
}
}
}
}
}
}
}
}
super;
}
// 49 functions called (24+25)

}

class big_boom : default_npc {

parameter:

int DDMagic;
float SummonLifeTime;

handler:

EventHandler CREATED() {
AddPetDefaultDesire_Follow(SummonLifeTime);
}
// 1 functions called (1+0)


EventHandler NO_DESIRE() {
AddPetDefaultDesire_Follow(SummonLifeTime);
}
// 1 functions called (1+0)


EventHandler MENU_SELECTED(ask, c0, i0, myself, reply) {
i0 = myself.master.target_index;
if (i0 <= 0) {
return;
}
c0 = GetCreatureFromIndex(i0);
if (c0) {
if ((Skill_GetConsumeMP(DDMagic) < myself.sm.mp) && (Skill_GetConsumeHP(DDMagic) < myself.sm.hp) && (Skill_InReuseDelay(DDMagic) == 0)) {
AddUseSkillDesireEx(myself.master.target_id, DDMagic, 0, reply, ask, 1000000);
AddTimerEx(100021, 10000);
}
}
}
// 6 functions called (2+4)


EventHandler USE_SKILL_FINISHED() {
Despawn();
}
// 1 functions called (1+0)


EventHandler DECAYING_INTERRUPTED() {
AddTimerEx(100021, 1200000);
}
// 1 functions called (1+0)


EventHandler TIMER_FIRED_EX(timer_id) {
if (timer_id == 100021) {
Despawn();
}
}
// 1 functions called (1+0)

}

class summon_siege_golem : default_npc {

handler:

EventHandler CREATED() {
AddPetDefaultDesire_Follow(xx.xx0000);
AddTimerEx(100020, 1000);
AddTimerEx(100021, (1000*60));
}
// 3 functions called (3+0)


EventHandler NO_DESIRE() {
AddPetDefaultDesire_Follow(xx.xx0000);
}
// 1 functions called (1+0)


EventHandler MENU_SELECTED(ask, i0, myself, reply) {
i0 = myself.master.target_id;
if ((Skill_GetConsumeMP(@s_siege_hammer1) < myself.sm.mp) && (Skill_GetConsumeHP(@s_siege_hammer1) < myself.sm.hp) && (Skill_InReuseDelay(@s_siege_hammer1) == 0)) {
AddUseSkillDesireEx(i0, 1044225, 0, reply, ask, 1000000);
}
}
// 4 functions called (1+3)


EventHandler TIMER_FIRED_EX(myself, timer_id) {
if (timer_id == 100020) {
if (myself.master.alive == 0) {
Despawn();
}
AddTimerEx(100020, 1000);
}
if (timer_id == 100021) {
if ((OwnItemCount(myself.master, @gemstone_c) < 140) && (OwnItemCount(myself.master, @gemstone_c) >= 70)) {
Say(MakeFString(1000169, "", "", "", "", ""));
}
if (OwnItemCount(myself.master, @gemstone_c) >= 70) {
DeleteItem1(myself.master, @gemstone_c, 70);
}
else {
Despawn();
}
AddTimerEx(100021, (1000*60));
}
}
// 10 functions called (6+4)

}
[/php:1:e4e87fd5f6]

Here you go


All times are GMT. The time now is 15:41.