From cbad5874dbf32e2a6de24718938607101a41c85e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 5 Jul 2021 16:31:59 -0300 Subject: Reapercry (but Terogan is broken and effects are not working? O.o) --- db/pre-re/skill_db.conf | 12 +++ db/pre-re/skill_tree.conf | 1 + npc/099-7/boss.txt | 3 +- npc/magic/final.txt | 2 + npc/magic/level0-reapercry.txt | 228 +++++++++++++++++++++++++++++++++++++++++ npc/scripts.conf | 1 + 6 files changed, 246 insertions(+), 1 deletion(-) create mode 100644 npc/magic/level0-reapercry.txt diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf index 69157ef9..98f0ab73 100644 --- a/db/pre-re/skill_db.conf +++ b/db/pre-re/skill_db.conf @@ -39354,5 +39354,17 @@ skill_db: ( SPCost: 23 } }, +{ + Id: 20056 + Name: "SKILL_REAPERCRY" + Description: "Reapercry" + MaxLevel: 1 + SkillType: { + Self: true + } + SkillInfo: { + Quest: true + } +}, ) diff --git a/db/pre-re/skill_tree.conf b/db/pre-re/skill_tree.conf index e88fdbba..17e4e794 100644 --- a/db/pre-re/skill_tree.conf +++ b/db/pre-re/skill_tree.conf @@ -64,6 +64,7 @@ Talpan: { // Level 0 SKILL_CONFRINGO: 9 + SKILL_REAPERCRY: 0 // Level 1 SKILL_ABIZIT: 1 diff --git a/npc/099-7/boss.txt b/npc/099-7/boss.txt index 29b0edbe..70caac1c 100644 --- a/npc/099-7/boss.txt +++ b/npc/099-7/boss.txt @@ -518,7 +518,8 @@ L_Off: if (!#CRYPT_PASSWORD) end; mes "There's a bloody inscription on the gate."; next; - mes "\"##B"+get(.invocation$, "reapercry")+"##b\""; + mes "\"##B"+"reapercry"+"##b\""; + learnskill SKILL_REAPERCRY, 1; next; mes "##9You hear the sounds of battle. Candle lights shines in distance."; next; diff --git a/npc/magic/final.txt b/npc/magic/final.txt index d4f14413..30dce5e9 100644 --- a/npc/magic/final.txt +++ b/npc/magic/final.txt @@ -35,6 +35,8 @@ function script HUB_SkillInvoke { // Level 0 case SKILL_CONFRINGO: SK_Confringo(); break; + case SKILL_REAPERCRY: + Reapercry(); break; // Level 1 case SKILL_ABIZIT: SK_Abizit(); break; diff --git a/npc/magic/level0-reapercry.txt b/npc/magic/level0-reapercry.txt new file mode 100644 index 00000000..1b6f07d5 --- /dev/null +++ b/npc/magic/level0-reapercry.txt @@ -0,0 +1,228 @@ +// #reapercry +// Spell to warp to Keshlam Outskirts +// Variable: @reapercry -> Holds summon state +// +// If this was Evol2 engine, I would be able to easily use bitmasks, +// Having a custom password sequence unique per character. +// But alas, on TMWA, I can't really abuse player variables. +// So I allow you to cheat. Or not. Lemme think. Account variable... +// This is actually an old script and I'm too lazy to redo. + +// Returns true if player inside candle area +// call("alacriuspos", bitwise) + +function script alacriuspos { + @alacriusp = 0; + + // Left side + if (1 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_25_53_29_56; + if (2 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_20_47_22_51; + if (4 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_22_40_25_43; + if (8 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_29_40_32_43; + if (16 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_32_47_35_50; + if (32 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_25_53_29_56; + // Left not set + if (1 == getarg(0)) + goto L_29_40_32_43; + if (2 == getarg(0)) + goto L_32_47_35_50; + if (4 == getarg(0)) + goto L_25_53_29_56; + if (8 == getarg(0)) + goto L_20_47_22_51; + if (16 == getarg(0)) + goto L_22_40_25_43; + if (32 == getarg(0)) + goto L_29_40_32_43; + // Right side + if (64 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_49_53_53_56; + if (128 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_43_47_46_51; + if (256 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_46_40_49_43; + if (512 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_53_40_56_43; + if (1024 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_56_47_58_50; + if (2048 == getarg(0) && #CRYPT_PASSWORD & getarg(0)) + goto L_49_53_53_56; + // Right side not set + if (64 == getarg(0)) + goto L_53_40_56_43; + if (128 == getarg(0)) + goto L_56_47_58_50; + if (256 == getarg(0)) + goto L_49_53_53_56; + if (512 == getarg(0)) + goto L_43_47_46_51; + if (1024 == getarg(0)) + goto L_46_40_49_43; + if (2048 == getarg(0)) + goto L_53_40_56_43; + + // Nope, all wrong + @alacriusp = 0; + return; + +L_29_40_32_43: + @alacriusp = isin("027-8", 29, 40, 32, 43); + return; +L_22_40_25_43: + @alacriusp = isin("027-8", 22, 40, 25, 43); + return; +L_20_47_22_51: + @alacriusp = isin("027-8", 20, 47, 22, 51); + return; +L_25_53_29_56: + @alacriusp = isin("027-8", 25, 53, 29, 56); + return; +L_32_47_35_50: + @alacriusp = isin("027-8", 32, 47, 35, 50); + return; + +L_53_40_56_43: + @alacriusp = isin("027-8", 53, 40, 56, 43); + return; +L_46_40_49_43: + @alacriusp = isin("027-8", 46, 40, 49, 43); + return; +L_43_47_46_51: + @alacriusp = isin("027-8", 43, 47, 46, 51); + return; +L_49_53_53_56: + @alacriusp = isin("027-8", 49, 53, 53, 56); + return; +L_56_47_58_50: + @alacriusp = isin("027-8", 56, 47, 58, 50); + return; + +} + +function script Reapercry { + // Not in Terogan's Room + if (getmapname() != "027-8") end; + + // Terogan is asleep + if (!$@CRYPT_FIGHT3) end; + + // No password is set o.o + if (!#CRYPT_PASSWORD) end; + + // Switch the quest state + if (@reapercry == 0) + goto L_Check0; + if (@reapercry == 1) + goto L_Check1; + if (@reapercry == 2) + goto L_Check2; + if (@reapercry == 3) + goto L_Check3; + if (@reapercry == 4) + goto L_Check4; + if (@reapercry == 5) + goto L_Check5; + + // Something went wrong!! + end; + +L_Check0: + callfunc("alacriuspos", 1); + if (@alacriusp) goto L_Exec0; + callfunc("alacriuspos", 64); + if (@alacriusp) goto L_Exec0; + + @reapercry = 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + end; + +L_Exec0: + misceffect FX_FIRE_EXPLOSION, strcharinfo(0); // Hmm FIXME + @reapercry = 1; + end; + +L_Check1: + callfunc("alacriuspos", 2); + if (@alacriusp) goto L_Exec1; + callfunc("alacriuspos", 128); + if (@alacriusp) goto L_Exec1; + + @reapercry = 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + end; + +L_Exec1: + misceffect FX_FIRE_EXPLOSION, strcharinfo(0); // Hmm FIXME + @reapercry = 2; + end; + +L_Check2: + callfunc("alacriuspos", 4); + if (@alacriusp) goto L_Exec2; + callfunc("alacriuspos", 256); + if (@alacriusp) goto L_Exec2; + + @reapercry = 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + end; + +L_Exec2: + misceffect FX_FIRE_EXPLOSION, strcharinfo(0); // Hmm FIXME + @reapercry = 3; + end; + +L_Check3: + callfunc("alacriuspos", 8); + if (@alacriusp) goto L_Exec3; + callfunc("alacriuspos", 512); + if (@alacriusp) goto L_Exec3; + + @reapercry = 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + end; + +L_Exec3: + misceffect FX_FIRE_EXPLOSION, strcharinfo(0); // Hmm FIXME + @reapercry = 4; + end; + +L_Check4: + callfunc("alacriuspos", 16); + if (@alacriusp) goto L_Exec4; + callfunc("alacriuspos", 1024); + if (@alacriusp) goto L_Exec4; + + @reapercry = 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + end; + +L_Exec4: + misceffect FX_FIRE_EXPLOSION, strcharinfo(0); // Hmm FIXME + @reapercry = 5; + end; + +L_Check5: + callfunc("alacriuspos", 32); + if (@alacriusp) goto L_Exec5; + callfunc("alacriuspos", 2048); + if (@alacriusp) goto L_Exec5; + + @reapercry = 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + end; + +L_Exec5: + // This means cast sequence complete + // Maybe FX_MAGIC_BLUE_TELEPORT? (iilia's effect) + @reapercry = 0; + getexp 100000, 0; + misceffect FX_MAGIC_TELEPORT, strcharinfo(0); + warp "099-7", 75, 36; + end; +} diff --git a/npc/scripts.conf b/npc/scripts.conf index 606ab3ab..fa3407b1 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -71,6 +71,7 @@ //Magic "npc/magic/config.txt", "npc/magic/level0-monsterinfo.txt", +"npc/magic/level0-reapercry.txt", "npc/magic/level0-wand.txt", "npc/magic/level1-aggravate.txt", "npc/magic/level1-experience.txt", -- cgit v1.2.3-60-g2f50