diff options
author | Jesusaves <jesusalva@themanaworld.org> | 2020-05-09 21:55:31 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-10 00:55:31 +0000 |
commit | 7ee960c62a2d2919a68f6f24925567ee417f192e (patch) | |
tree | a28cfb9eb0894690d2f46ff0fb30cc205848bf77 /world/map/npc/magic | |
parent | ff9054498564f69901ad1c48e6cf00bb7ff9023f (diff) | |
download | serverdata-7ee960c62a2d2919a68f6f24925567ee417f192e.tar.gz serverdata-7ee960c62a2d2919a68f6f24925567ee417f192e.tar.bz2 serverdata-7ee960c62a2d2919a68f6f24925567ee417f192e.tar.xz serverdata-7ee960c62a2d2919a68f6f24925567ee417f192e.zip |
WIP: 500 PRs Closed Commemorative Commit (#555)
* Mountain and Grass Snake experience +100% (per topic 20799)
* Prepare the act 5 button so it have a non-null action
* There's now 10% chance per clue of Tormenta showing up at 09:00 assault.
Usual spot. Currently 2 clues were found, so 20% spawn chances.
* Cerhan reactions for Sand Cutter (thanks for pointing this out, Ledmitz)
* Alacrius Riddle (needs 300 boss points to start)
* Keshlam Swamps map
* News file ID 85
Diffstat (limited to 'world/map/npc/magic')
-rw-r--r-- | world/map/npc/magic/_import.txt | 1 | ||||
-rw-r--r-- | world/map/npc/magic/level0-reapercry.txt | 244 | ||||
-rw-r--r-- | world/map/npc/magic/level2-lightning-strike.txt | 2 |
3 files changed, 247 insertions, 0 deletions
diff --git a/world/map/npc/magic/_import.txt b/world/map/npc/magic/_import.txt index 5c82ebac..4671ac7a 100644 --- a/world/map/npc/magic/_import.txt +++ b/world/map/npc/magic/_import.txt @@ -1,6 +1,7 @@ npc: npc/magic/_procedures.txt npc: npc/magic/level0-antiprotect.txt npc: npc/magic/level0-discharge.txt +npc: npc/magic/level0-reapercry.txt npc: npc/magic/level0-wand.txt npc: npc/magic/level1-aggravate.txt npc: npc/magic/level1-experience.txt diff --git a/world/map/npc/magic/level0-reapercry.txt b/world/map/npc/magic/level0-reapercry.txt new file mode 100644 index 00000000..fd80f113 --- /dev/null +++ b/world/map/npc/magic/level0-reapercry.txt @@ -0,0 +1,244 @@ +// #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... + +// Returns true if player inside candle area +// call("alacriuspos", bitwise) +function|script|alacriuspos +{ + set @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 + set @alacriusp, 0; + return; + +// Left Side Labels +L_29_40_32_43: + set @alacriusp, isin("027-8", 29, 40, 32, 43); + return; +L_22_40_25_43: + set @alacriusp, isin("027-8", 22, 40, 25, 43); + return; +L_20_47_22_51: + set @alacriusp, isin("027-8", 20, 47, 22, 51); + return; +L_25_53_29_56: + set @alacriusp, isin("027-8", 25, 53, 29, 56); + return; +L_32_47_35_50: + set @alacriusp, isin("027-8", 32, 47, 35, 50); + return; + +// Right Side Labels +L_53_40_56_43: + set @alacriusp, isin("027-8", 53, 40, 56, 43); + return; +L_46_40_49_43: + set @alacriusp, isin("027-8", 46, 40, 49, 43); + return; +L_43_47_46_51: + set @alacriusp, isin("027-8", 43, 47, 46, 51); + return; +L_49_53_53_56: + set @alacriusp, isin("027-8", 49, 53, 53, 56); + return; +L_56_47_58_50: + set @alacriusp, isin("027-8", 56, 47, 58, 50); + return; + +} + +-|script|reapercry|32767 +{ + if(call("magic_checks")) end; + callfunc "magic_exp"; + + // Not in Terogan's Room + if (getmap() != "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: + void call("alacriuspos", 1); + if (@alacriusp) goto L_Exec0; + void call("alacriuspos", 64); + if (@alacriusp) goto L_Exec0; + + set @reapercry, 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + end; + +L_Exec0: + misceffect FX_FIRE_EXPLOSION, strcharinfo(0); // Hmm FIXME + set @reapercry, 1; + end; + +////////////////////////////////////////////////////// +L_Check1: + void call("alacriuspos", 2); + if (@alacriusp) goto L_Exec1; + void call("alacriuspos", 128); + if (@alacriusp) goto L_Exec1; + + set @reapercry, 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + end; + +L_Exec1: + misceffect FX_FIRE_EXPLOSION, strcharinfo(0); // Hmm FIXME + set @reapercry, 2; + end; + +////////////////////////////////////////////////////// +L_Check2: + void call("alacriuspos", 4); + if (@alacriusp) goto L_Exec2; + void call("alacriuspos", 256); + if (@alacriusp) goto L_Exec2; + + set @reapercry, 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + end; + +L_Exec2: + misceffect FX_FIRE_EXPLOSION, strcharinfo(0); // Hmm FIXME + set @reapercry, 3; + end; + +////////////////////////////////////////////////////// +L_Check3: + void call("alacriuspos", 8); + if (@alacriusp) goto L_Exec3; + void call("alacriuspos", 512); + if (@alacriusp) goto L_Exec3; + + set @reapercry, 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + end; + +L_Exec3: + misceffect FX_FIRE_EXPLOSION, strcharinfo(0); // Hmm FIXME + set @reapercry, 4; + end; + +////////////////////////////////////////////////////// +L_Check4: + void call("alacriuspos", 16); + if (@alacriusp) goto L_Exec4; + void call("alacriuspos", 1024); + if (@alacriusp) goto L_Exec4; + + set @reapercry, 0; + misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0); + end; + +L_Exec4: + misceffect FX_FIRE_EXPLOSION, strcharinfo(0); // Hmm FIXME + set @reapercry, 5; + end; + +////////////////////////////////////////////////////// +L_Check5: + void call("alacriuspos", 32); + if (@alacriusp) goto L_Exec5; + void call("alacriuspos", 2048); + if (@alacriusp) goto L_Exec5; + + set @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) + set @reapercry, 0; + misceffect FX_MAGIC_TELEPORT, strcharinfo(0); + warp "099-7", 75, 36; + end; + +////////////////////////////////////////////////////// +OnInit: + set .invocation$, chr(MAGIC_SYMBOL) + "reapercry"; // used in npcs that refer to this spell + registercmd .invocation$, strnpcinfo(0); + end; +} diff --git a/world/map/npc/magic/level2-lightning-strike.txt b/world/map/npc/magic/level2-lightning-strike.txt index 05d358e3..d454abc6 100644 --- a/world/map/npc/magic/level2-lightning-strike.txt +++ b/world/map/npc/magic/level2-lightning-strike.txt @@ -19,6 +19,8 @@ (((200 - Agi) * 3000) / 200), // delay 0, // in_rain 0; // target id (tmp) + if (getequipid(equip_misc1) == 5253 || getequipid(equip_misc2) == 5253) + set @ingravspell[3], @ingravspell[3]*8/10+1; callfunc "magic_exp"; goto L_FreeRecast; |