diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-07-16 15:33:49 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-07-16 15:33:49 -0300 |
commit | 97ac6817ffdbebef3f7605e38c8a69420fa46cee (patch) | |
tree | 72de77e74b0d36bc2b5eb16e34b5919dd4531578 /npc | |
parent | 01788bc76d15415a90593a9b972283765c56db43 (diff) | |
download | serverdata-97ac6817ffdbebef3f7605e38c8a69420fa46cee.tar.gz serverdata-97ac6817ffdbebef3f7605e38c8a69420fa46cee.tar.bz2 serverdata-97ac6817ffdbebef3f7605e38c8a69420fa46cee.tar.xz serverdata-97ac6817ffdbebef3f7605e38c8a69420fa46cee.zip |
Ragger Prototype
Diffstat (limited to 'npc')
-rw-r--r-- | npc/003-0/_import.txt | 1 | ||||
-rw-r--r-- | npc/003-0/berserk.txt | 159 | ||||
-rw-r--r-- | npc/functions/class.txt | 12 | ||||
-rw-r--r-- | npc/functions/util.txt | 2 | ||||
-rw-r--r-- | npc/items/books.txt | 18 |
5 files changed, 180 insertions, 12 deletions
diff --git a/npc/003-0/_import.txt b/npc/003-0/_import.txt index ca0bf74e8..fda237c3c 100644 --- a/npc/003-0/_import.txt +++ b/npc/003-0/_import.txt @@ -2,6 +2,7 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/003-0/_warps.txt", "npc/003-0/audsbel.txt", +"npc/003-0/berserk.txt", "npc/003-0/mages.txt", "npc/003-0/paladin.txt", "npc/003-0/tanker.txt", diff --git a/npc/003-0/berserk.txt b/npc/003-0/berserk.txt new file mode 100644 index 000000000..de90fbaee --- /dev/null +++ b/npc/003-0/berserk.txt @@ -0,0 +1,159 @@ +// TMW2 scripts. +// Authors: +// Jesusalva +// Description: +// Leader of the BERSERK class + +003-0,34,45,4 script Ragger Master NPC_PLAYER,{ + if (!is_staff()) + goto L_Close; + if (!(MAGIC_SUBCLASS & CL_BERSERK)) + goto L_SignUp; + goto L_Member; + +// Sign Up +L_SignUp: + // Not allowed if subclass filled or not from main class + if (total_subclass() >= max_subclass() || getskilllv(MAGIC_WARRIOR) < 2) + goto L_Close; + mesn; + mesq l("Hey there! Do you want to join the Berserk (Ragger) Class?"); + mesc l("Warning: If you join a subclass, you can't leave it later!"), 1; + next; + if (askyesno() != ASK_YES) + close; + // TODO: Requeriment for signing up to a subclass? Or is the tier + skill quest hard enough? + MAGIC_SUBCLASS=MAGIC_SUBCLASS|CL_BERSERK; + mesn; + mesq l("Welcome to the berserker guild!"); + close; + +// Close +L_Close: + goodbye; + closedialog; + close; + +L_Missing: + mesn; + mesq l("Hey hey! You don't have that stuff, CAN'T YOU READ?!"); + percentheal 0, -10; + next; + goto L_Member; + +// Membership area +// Ragger +// KN_AUTOCOUNTER (Counter any attack with 2x critical rate and block attack for 0.5s) +// SM_ENDURE (deny stun penalty when hit, and MDEF bonus, for 10s) + +L_Member: + mesn; + mesq l("Hey there! Do you want to learn new skills for a very small teaching fee?"); + select + rif(sk_intcost(SM_BASH) && getskilllv(SM_BASH) < (3+degree_subclass()), l("Improve Bash Skill")), + rif(sk_intcost(SM_ENDURE) && sk_canlvup(SM_ENDURE), l("Improve Endure Skill")), + rif(sk_intcost(KN_AUTOCOUNTER) && sk_canlvup(KN_AUTOCOUNTER), l("Improve Counter Defense")), + l("Nothing at the moment."); + mes ""; + switch (@menu) { + case 1: + mesn; + mesq l("This useful skill will only require:"); + mesc l("@@/@@ @@", countitem(ManaPiouFeathers), (getskilllv(SM_ENDURE)+1)*15, getitemlink(ManaPiouFeathers)); + mesc l("@@/@@ @@", countitem(CaveSnakeSkin), (getskilllv(SM_ENDURE)+1)*4, getitemlink(CaveSnakeSkin)); + mesc l("@@/@@ @@", countitem(RubyPowder), (getskilllv(SM_ENDURE)+1)*2, getitemlink(RubyPowder)); + mesc l("@@/@@ @@", countitem(StrengthPotion), (getskilllv(SM_ENDURE)+1)*2, getitemlink(StrengthPotion)); + next; + if (askyesno() == ASK_YES) { + if ( + countitem(ManaPiouFeathers) < (getskilllv(SM_ENDURE)+1)*15 || + countitem(CaveSnakeSkin) < (getskilllv(SM_ENDURE)+1)*4 || + countitem(RubyPowder) < (getskilllv(SM_ENDURE)+1)*2 || + countitem(StrengthPotion) < (getskilllv(SM_ENDURE)+1)*2) goto L_Missing; + + delitem PiberriesInfusion, (getskilllv(SM_ENDURE)+1)*15; + delitem BlackMambaEgg, (getskilllv(SM_ENDURE)+1)*4; + delitem MoubooSteak, (getskilllv(SM_ENDURE)+1)*2; + delitem IronIngot, (getskilllv(SM_ENDURE)+1)*2; + + sk_lvup(SM_BASH); + + next; + } + break; + case 2: + mesn; + mesq l("This useful skill will only require:"); + mesc l("@@/@@ @@", countitem(PiberriesInfusion), (getskilllv(KN_AUTOCOUNTER)+1)*10, getitemlink(PiberriesInfusion)); + mesc l("@@/@@ @@", countitem(BlackMambaEgg), (getskilllv(KN_AUTOCOUNTER)+1)*2, getitemlink(BlackMambaEgg)); + mesc l("@@/@@ @@", countitem(MoubooSteak), (getskilllv(KN_AUTOCOUNTER)+1)*4, getitemlink(MoubooSteak)); + mesc l("@@/@@ @@", countitem(IronIngot), (getskilllv(KN_AUTOCOUNTER)+1)*1, getitemlink(IronIngot)); + next; + if (askyesno() == ASK_YES) { + if ( + countitem(PiberriesInfusion) < (getskilllv(KN_AUTOCOUNTER)+1)*10 || + countitem(BlackMambaEgg) < (getskilllv(KN_AUTOCOUNTER)+1)*2 || + countitem(MoubooSteak) < (getskilllv(KN_AUTOCOUNTER)+1)*4 || + countitem(IronIngot) < (getskilllv(KN_AUTOCOUNTER)+1)*1) goto L_Missing; + + delitem PiberriesInfusion, (getskilllv(KN_AUTOCOUNTER)+1)*10; + delitem BlackMambaEgg, (getskilllv(KN_AUTOCOUNTER)+1)*2; + delitem MoubooSteak, (getskilllv(KN_AUTOCOUNTER)+1)*4; + delitem IronIngot, (getskilllv(KN_AUTOCOUNTER)+1)*1; + + sk_lvup(KN_AUTOCOUNTER); + + next; + } + break; + case 3: + mesn; + mesq l("This useful skill will only require:"); + mesc l("@@/@@ @@", countitem(Cheese), (getskilllv(CR_TRUST)+1)*50, getitemlink(Cheese)); + mesc l("@@/@@ @@", countitem(Coral), (getskilllv(CR_TRUST)+1)*30, getitemlink(Coral)); + mesc l("@@/@@ @@", countitem(PiberriesInfusion), (getskilllv(CR_TRUST)+1)*20, getitemlink(PiberriesInfusion)); + mesc l("@@/@@ @@", countitem(HastePotion), (getskilllv(CR_TRUST)+1)*10, getitemlink(HastePotion)); + mesc l("@@/@@ @@", countitem(DiamondPowder), (getskilllv(CR_TRUST)+1)*3, getitemlink(DiamondPowder)); + mesc l("@@/@@ @@", countitem(ElixirOfLife), (getskilllv(CR_TRUST)+1)*1, getitemlink(ElixirOfLife)); + next; + if (askyesno() == ASK_YES) { + if ( + countitem(Cheese) < (getskilllv(CR_TRUST)+1)*50 || + countitem(Coral) < (getskilllv(CR_TRUST)+1)*30 || + countitem(PiberriesInfusion) < (getskilllv(CR_TRUST)+1)*20 || + countitem(HastePotion) < (getskilllv(CR_TRUST)+1)*10 || + countitem(DiamondPowder) < (getskilllv(CR_TRUST)+1)*3 || + countitem(ElixirOfLife) < (getskilllv(CR_TRUST)+1)*1) goto L_Missing; + + delitem Cheese, (getskilllv(CR_TRUST)+1)*50; + delitem Coral, (getskilllv(CR_TRUST)+1)*30; + delitem PiberriesInfusion, (getskilllv(CR_TRUST)+1)*20; + delitem HastePotion, (getskilllv(CR_TRUST)+1)*10; + delitem DiamondPowder, (getskilllv(CR_TRUST)+1)*3; + delitem ElixirOfLife, (getskilllv(CR_TRUST)+1)*1; + + sk_lvup(SM_ENDURE); + + next; + } + break; + default: + goto L_Close; + } + + goto L_Member; + +OnInit: + .@npcId = getnpcid(0, .name$); + setunitdata(.@npcId, UDT_HEADTOP, WarlordHelmet); + setunitdata(.@npcId, UDT_HEADMIDDLE, GoldenWarlordPlate); + setunitdata(.@npcId, UDT_HEADBOTTOM, ShortGladius); + setunitdata(.@npcId, UDT_WEAPON, JeansChaps); + setunitdata(.@npcId, UDT_HAIRSTYLE, 2); + setunitdata(.@npcId, UDT_HAIRCOLOR, 4); + + .sex=G_MALE; + .distance=5; + end; +} + diff --git a/npc/functions/class.txt b/npc/functions/class.txt index 427e32687..e10a6f399 100644 --- a/npc/functions/class.txt +++ b/npc/functions/class.txt @@ -25,8 +25,16 @@ function script ClassMaster { if (getskilllv(.@CLASS) == 1 && MAGIC_LVL >= 2 && ST_TIER >= 1) goto L_T2_S0; // Sanity check - if (getskilllv(.@SK_T1) >= 1) mesq l("Are you using my skill?"); - if (getskilllv(.@SK_T1) >= 1) close; + if (getskilllv(.@CLASS) >= 1) { + mesn; + mesq l("The Warriors have three other subclasses:"); + mesn lg("Paladin"); + mesc l("The well-round guy, with reasonable def and attack. Approximate from the Priest."); + mesn lg("Berserker"); + mesc l("The full-attack guy. Two hand swords works best!"); + mesn lg("Tanker"); + mesc l("The full-defense guy. Most skills require a shield."); + } close; L_SignUp: diff --git a/npc/functions/util.txt b/npc/functions/util.txt index de172bda6..a72d6e5fb 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -249,7 +249,7 @@ function script total_subclass { .@i+=1; if (MAGIC_SUBCLASS & CL_TANKER) .@i+=1; - if (MAGIC_SUBCLASS & CL_BERSEKER) + if (MAGIC_SUBCLASS & CL_BERSERKER) .@i+=1; if (MAGIC_SUBCLASS & CL_RANGER) .@i+=1; diff --git a/npc/items/books.txt b/npc/items/books.txt index a46a3f417..87877ec27 100644 --- a/npc/items/books.txt +++ b/npc/items/books.txt @@ -213,21 +213,21 @@ OnInit: case 3: mesc l("You currently have @@/@@ subclass(es).", total_subclass(),max_subclass()); if (MAGIC_SUBCLASS & CL_PALADIN) - mesc lg("* Paladin"); + mesc lg("Paladin"); if (MAGIC_SUBCLASS & CL_TANKER) - mesc lg("* Tanker"); - if (MAGIC_SUBCLASS & CL_BERSEKER) - mesc lg("* Berseker"); + mesc lg("Tanker"); + if (MAGIC_SUBCLASS & CL_BERSERKER) + mesc lg("Berserker"); if (MAGIC_SUBCLASS & CL_RANGER) - mesc lg("* Ranger"); + mesc lg("Ranger"); if (MAGIC_SUBCLASS & CL_SNIPER) - mesc lg("* Sniper"); + mesc lg("Sniper"); if (MAGIC_SUBCLASS & CL_WIZARD) - mesc lg("* Wizard"); + mesc lg("Wizard"); if (MAGIC_SUBCLASS & CL_SAGE) - mesc lg("* Sage"); + mesc lg("Sage"); if (MAGIC_SUBCLASS & CL_PRIEST) - mesc lg("* Priest"); + mesc lg("Priest"); next; break; case 4: |