diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/027-1/elza.txt | 36 | ||||
-rw-r--r-- | npc/027-1/enzo.txt | 46 | ||||
-rw-r--r-- | npc/027-1/ezra.txt | 45 | ||||
-rw-r--r-- | npc/magic/forget.txt | 51 | ||||
-rw-r--r-- | npc/scripts.conf | 3 |
5 files changed, 60 insertions, 121 deletions
diff --git a/npc/027-1/elza.txt b/npc/027-1/elza.txt index 5acdb881f..d948917f7 100644 --- a/npc/027-1/elza.txt +++ b/npc/027-1/elza.txt @@ -5,44 +5,12 @@ // Forgetful 027-1,86,110,0 script Elza NPC_DARK_SORCERER_F,{ - mesn l("Elza, the Forgetful"); + mesn l("%s, the Forgetful", .name$); mesq l("What was I doing before...? I totally forgot!"); if (any(true, false)) mesc l("Have you seen my brother %s?", any("Enzo", "Ezra")); - // FIXME - close; next; - mesc l("Teaching Elza your skills will make you both forget them."), 1; - mesc l("Once your skill is forgotten, the Magic Skill Points used will be freed."), 1; - mesc l("But be careful: Only 3MSP-costed skills can be forgotten, and learning fees WON'T be given back!"), 1; - do - { - next; - mesc l("Which skill will you FORGET permanently today?"), 1; - menuint - l("Uhm... Bye?"), 0, - rif(getskilllv(WZ_FROSTNOVA), l("Frost Nova")), WZ_FROSTNOVA, - rif(getskilllv(AC_SHOWER), l("Arrow Shower")), AC_SHOWER, - rif(getskilllv(SN_SHARPSHOOTING), l("Sharpshooter")), SN_SHARPSHOOTING, - rif(getskilllv(SN_WINDWALK), l("Wind Walk")), SN_WINDWALK, - rif(getskilllv(CR_TRUST), l("Last Man Standing")), CR_TRUST, - l("None at the moment!"), 0; - if (!@menuret) - close; - mes ""; - mesc l("Skill @@ will be permanently lost!", @menuret), 1; - mesc l("Continue anyway?"), 1; - if (askyesno() == ASK_YES) { - .@lv=getskilllv(@menuret)+2; - skill @menuret, 0, 0; - MAGIC_PTS-=.@lv; - mesc l("Skill @@ has been lost", @menuret), 3; - mesc l("You recovered @@ magic skill points", .@lv), 3; - } else { - mesn l("Elza, the Forgetful"); - mesq l("Uh, what?"); - } - } while (@menuret); + ForgetfulNPC(.name$, CLASS_SCHOLARSHIP); close; OnInit: diff --git a/npc/027-1/enzo.txt b/npc/027-1/enzo.txt index 9c2b27704..2c3e157af 100644 --- a/npc/027-1/enzo.txt +++ b/npc/027-1/enzo.txt @@ -5,52 +5,10 @@ // Forgetful 027-1,94,115,0 script Enzo NPC_BLACKWIZARD,{ - mesn l("Enzo, the Forgetful"); + mesn l("%s, the Forgetful", .name$); mesq l("What was I doing before...? I forgot!"); - // FIXME - close; next; - mesc l("Teaching Enzo your skills will make you both forget them."), 1; - mesc l("Once your skill is forgotten, the Magic Skill Points used will be freed."), 1; - mesc l("But be careful: Only 1MSP-costed skills can be forgotten, and learning fees WON'T be given back!"), 1; - do - { - next; - mesc l("Which skill will you FORGET permanently today?"), 1; - menuint - l("Uhm... Bye?"), 0, - rif(getskilllv(AL_HEAL), l("Healing")), AL_HEAL, - rif(getskilllv(TMW2_SAGE), l("Mana Wisdom")), TMW2_SAGE, - rif(getskilllv(HW_MAGICPOWER), l("Accumulate Power")), HW_MAGICPOWER, - rif(getskilllv(SM_PROVOKE), l("Provoke")), SM_PROVOKE, - rif(getskilllv(SA_FREECAST), l("Free Casting")), SA_FREECAST, - rif(getskilllv(TF_BACKSLIDING), l("Tactical Retreat")), TF_BACKSLIDING, - rif(getskilllv(MG_FIREWALL), l("Nature Wall")), MG_FIREWALL, - rif(getskilllv(ALL_FULL_THROTTLE), l("Last Resort")), ALL_FULL_THROTTLE, - rif(getskilllv(SM_BASH), l("Falkon Punch!")), SM_BASH, - rif(getskilllv(MC_MAMMONITE), l("Supreme Attack")), MC_MAMMONITE, - rif(getskilllv(AC_SHOWER), l("Arrow Shower")), AC_SHOWER, - rif(getskilllv(MG_FIREBALL), l("Fireball")), MG_FIREBALL, - rif(getskilllv(AL_HOLYLIGHT), l("Holy Light")), AL_HOLYLIGHT, - rif(getskilllv(MG_SOULSTRIKE), l("Magic Strike")), MG_SOULSTRIKE, - rif(getskilllv(MG_LIGHTNINGBOLT), l("Lightning Bolt")), MG_LIGHTNINGBOLT, - l("None at the moment!"), 0; - if (!@menuret) - close; - mes ""; - mesc l("Skill @@ will be permanently lost!", @menuret), 1; - mesc l("Continue anyway?"), 1; - if (askyesno() == ASK_YES) { - .@lv=getskilllv(@menuret); - skill @menuret, 0, 0; - MAGIC_PTS-=.@lv; - mesc l("Skill @@ has been lost", @menuret), 3; - mesc l("You recovered @@ magic skill points", .@lv), 3; - } else { - mesn l("Enzo, the Forgetful"); - mesq l("Uh, what?"); - } - } while (@menuret); + ForgetfulNPC(.name$, CLASS_PHYSICAL); close; OnInit: diff --git a/npc/027-1/ezra.txt b/npc/027-1/ezra.txt index 8bf2e5cad..3879ca7ec 100644 --- a/npc/027-1/ezra.txt +++ b/npc/027-1/ezra.txt @@ -5,51 +5,12 @@ // Forgetful 027-1,131,100,0 script Ezra NPC_BLACKWIZARD,{ - mesn l("Ezra, the very Forgetful"); + mesn l("%s, the Forgetful", .name$); mesq l("What was I doing before...? I forgot!"); - // FIXME - close; - next; - mesc l("Teaching Ezra your skills will make you both forget them."), 1; - mesc l("Once your skill is forgotten, the Magic Skill Points used will be freed."), 1; - mesc l("But be careful: Only 2MSP-costed skills can be forgotten, and learning fees WON'T be given back!"), 1; - do - { - next; - mesc l("Which skill will you FORGET permanently today?"), 1; - menuint - l("Uhm... Bye?"), 0, - rif(getskilllv(MG_NAPALMBEAT), l("Napalm Beat")), MG_NAPALMBEAT, - rif(getskilllv(MG_FROSTDIVER), l("Frost Diver")), MG_FROSTDIVER, - rif(getskilllv(SO_FIREWALK), l("Fire Walk")), SO_FIREWALK, - rif(getskilllv(KN_AUTOCOUNTER), l("Counter Attack")), KN_AUTOCOUNTER, - rif(getskilllv(ASC_METEORASSAULT), l("Ground Strike")), ASC_METEORASSAULT, - rif(getskilllv(EVOL_AREA_PROVOKE), l("Area Provoke")), EVOL_AREA_PROVOKE, - rif(getskilllv(EVOL_MASS_PROVOKE), l("Mass Provoke")), EVOL_MASS_PROVOKE, - rif(getskilllv(AB_HIGHNESSHEAL), l("High Healing")), AB_HIGHNESSHEAL, - rif(getskilllv(GC_DARKILLUSION), l("Sudden Attack")), GC_DARKILLUSION, - rif(getskilllv(NV_TRICKDEAD), l("Trick Dead")), NV_TRICKDEAD, - l("None at the moment!"), 0; - if (!@menuret) - goto L_Close; - mes ""; - mesc l("Skill @@ will be permanently lost!", @menuret), 1; - mesc l("Continue anyway?"), 1; - if (askyesno() == ASK_YES) { - .@lv=getskilllv(@menuret)+1; - skill @menuret, 0, 0; - MAGIC_PTS-=.@lv; - mesc l("Skill @@ has been lost", @menuret), 3; - mesc l("You recovered @@ magic skill points", .@lv), 3; - } else { - mesn l("Ezra, the very Forgetful"); - mesq l("Uh, what?"); - } - } while (@menuret); next; + ForgetfulNPC(.name$, CLASS_TRICKS); -L_Close: - mesn l("Ezra, the Very Forgetful"); + mesn l("%s, the Forgetful", .name$); mesq l("Do you know where my brother Enzo is? I forgot that too!"); close; diff --git a/npc/magic/forget.txt b/npc/magic/forget.txt new file mode 100644 index 000000000..0b8357fd0 --- /dev/null +++ b/npc/magic/forget.txt @@ -0,0 +1,51 @@ +// TMW2 script +// Author: Jesusalva <admin@tmw2.org> +// +// Magic Script: Forgetful NPCs +// Allows you to get rid of unwanted skills + +// ForgetfulNPC( NAME, SCHOOL ) +function script ForgetfulNPC { + .@n$=getarg(0); + .@school=getarg(1); + mesc l("Teaching %s your skills will make you both forget them.", .@n$), 1; + mesc l("Once your skill is forgotten, the Magic Skill Points used will be freed."), 1; + mesc l("But be careful: learning fees and research points WILL NOT be given back!"), 1; + do + { + next; + mesc l("Which skill will you FORGET permanently today?"), 1; + setarray .@forget$, l("Cancel"), 0; + freeloop(true); + for (.@i=0; .@i < getarraysize($@MSK_MAGIC) ; .@i++) { + .@sk=$@MSK_MAGIC[.@i]; + if (getskilllv(.@sk) > 1) { + if ($@MSK_CLASS[.@sk] == .@school) { + array_push(.@forget$, getskillname(.@sk)); + array_push(.@forget$, str(.@sk)); + } + } + } + freeloop(false); + menuint2(".@forget$"); + if (!@menuret) + close; + mes ""; + mesc l("Skill @@ will be permanently lost!", getskillname(@menuret)), 1; + mesc l("Continue anyway?"), 1; + if (askyesno() == ASK_YES) { + .@msp=0; + .@lv=$@MSK_MSPCOST[@menuret]+max(0, getskilllv(@menuret)-5); + skill @menuret, 0, 0; + MAGIC_PTS-=.@lv; + mesc l("Skill @@ has been lost", getskillname(@menuret)), 3; + mesc l("You recovered @@ magic skill points", .@lv), 3; + } else { + mesn l("%s, the Forgetful", .@n$); + mesq l("Uh, what?"); + } + } while (@menuret); + return; +} + + diff --git a/npc/scripts.conf b/npc/scripts.conf index 732a3626a..89265b69f 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -123,13 +123,14 @@ "npc/magic/abizit.txt", "npc/magic/demure.txt", "npc/magic/dragokin.txt", +"npc/magic/forget.txt", "npc/magic/guild.txt", "npc/magic/mpregen.txt", -"npc/magic/transmigration.txt", "npc/magic/parum.txt", "npc/magic/plantkingdom.txt", "npc/magic/revive.txt", "npc/magic/study.txt", +"npc/magic/transmigration.txt", // These are to be proccessed later "npc/functions/estate2.txt", |