![]() |
[help] ai.obj -> nasc
Hello.
How would you decompile this fragment of AI into NASC? Code:
L18778Btw.. does anyone of you have any software decompiler ai->nasc? Or I have to do all this manually... |
if ((GetCurrentTick()-talker.quest_last_reward_time) > 1)
|
omg so easy... :oops: how come i didn't think about that heh.
Thank you :)) :thumbright: |
And how to about this code:
Code:
class wisdom_chest : citizen[rus]Помогите перелопатить кусок кода, а ещё лучше перегнать в наску, чтобы сам мог менять. Проблема в том, что амулет из ящика мудрости получить вообще нереально, народ по несколько месяцев страдает :([/rus] |
Code:
class wisdom_chest : citizen { |
Quote:
but how you get it? :shock: have you full decompiled ai.obj? |
Miafan:
Yeah. ai_mmerged.txt (decompiled ai) exist in l2tools1.4+ pack. |
Quote:
|
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
|
Quote:
Can you share or send by email decompiled ai :roll: |
Nope....Share some good thing and write to Humordwarf for having his GREATES tool or donate him
|
Can anyone decompile a few classes for me, pleaseee :)
Вложения из исходного сообщения (сами файлы в копии отсутствуют): pets_summons_129.zip — 3940 байт |
UP!!!
|
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. |
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... :(
|
Quote:
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. |