summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-18 23:16:10 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-18 23:16:10 -0300
commita338dd0890edc9cda2bf6f5ff09cf750a9a3e102 (patch)
treed232831417d505ccf87da23e987236f584f0d821
parent5e79480b624b7e70db290bd9cedb3897e48cee78 (diff)
downloadserverdata-a338dd0890edc9cda2bf6f5ff09cf750a9a3e102.tar.gz
serverdata-a338dd0890edc9cda2bf6f5ff09cf750a9a3e102.tar.bz2
serverdata-a338dd0890edc9cda2bf6f5ff09cf750a9a3e102.tar.xz
serverdata-a338dd0890edc9cda2bf6f5ff09cf750a9a3e102.zip
This will provide minimal function for Wizards. So now, only three class are missing:
Priests (evolution from Mages), Rangers and Snipers (independent subclass)
-rw-r--r--db/re/skill_db.conf20
-rw-r--r--npc/003-0/_import.txt1
-rw-r--r--npc/003-0/wizard.txt227
3 files changed, 238 insertions, 10 deletions
diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf
index 69807ef84..c22b27699 100644
--- a/db/re/skill_db.conf
+++ b/db/re/skill_db.conf
@@ -1018,16 +1018,16 @@ skill_db: (
}
Requirements: {
SPCost: {
- Lv1: 12
- Lv2: 14
- Lv3: 16
- Lv4: 18
- Lv5: 20
- Lv6: 22
- Lv7: 24
- Lv8: 26
- Lv9: 28
- Lv10: 30
+ Lv1: 100
+ Lv2: 120
+ Lv3: 140
+ Lv4: 160
+ Lv5: 180
+ Lv6: 200
+ Lv7: 220
+ Lv8: 240
+ Lv9: 260
+ Lv10: 300
}
}
},
diff --git a/npc/003-0/_import.txt b/npc/003-0/_import.txt
index a59b9c25d..29256964f 100644
--- a/npc/003-0/_import.txt
+++ b/npc/003-0/_import.txt
@@ -8,3 +8,4 @@
"npc/003-0/sage.txt",
"npc/003-0/tanker.txt",
"npc/003-0/warriors.txt",
+"npc/003-0/wizard.txt",
diff --git a/npc/003-0/wizard.txt b/npc/003-0/wizard.txt
new file mode 100644
index 000000000..9e19b9981
--- /dev/null
+++ b/npc/003-0/wizard.txt
@@ -0,0 +1,227 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Leader of the WIZARD class
+// TODO: Improve Fireball
+
+003-0,55,25,0 script Wizard Master NPC_PLAYER,{
+ if (!(MAGIC_SUBCLASS & CL_WIZARD))
+ 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(WIZARD_MAGE) < 2)
+ goto L_Close;
+ mesn;
+ mesq l("Hey there! Do you want to join the Wizard 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_WIZARD;
+ mesn;
+ mesq l("Welcome to the wizard 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
+// Wizard
+// MG_COLDBOLT (ice)
+// MG_LIGHTNINGBOLT (wind)
+// WZ_EARTHSPIKE (earth)
+// MG_NAPALMBEAT (ghost)
+// MG_ENERGYCOAT (For 5 minutes, raise damage reduction, but that eats MP)
+// TODO: We have many other cool skills for Wizard (more AoE skills, more damage, etc)
+// I will worry with that later, as that also means providing extra skills for Sage & Priest
+// Note: the number of hits of bolts is the same as the skill level :D
+
+L_Member:
+ mesn;
+ mesq l("Hey there! Do you want to learn new skills for a very small teaching fee?");
+ select
+ rif(sk_intcost(MG_ENERGYCOAT) && !getskilllv(MG_ENERGYCOAT), l("Learn Energy Coating")),
+ rif(sk_intcost(MG_NAPALMBEAT) && sk_canlvup(MG_NAPALMBEAT), l("Improve Napalm Beat")),
+ rif(sk_intcost(MG_COLDBOLT) && sk_canlvup(MG_COLDBOLT), l("Improve Cold Bolt")),
+ rif(sk_intcost(MG_LIGHTNINGBOLT) && sk_canlvup(MG_LIGHTNINGBOLT), l("Improve Thunder Bolt")),
+ rif(sk_intcost(WZ_EARTHSPIKE) && sk_canlvup(WZ_EARTHSPIKE), l("Improve Earth Spike")),
+ rif(sk_intcost(MG_FIREBOLT) && sk_canlvup(MG_FIREBOLT), l("Improve Fire Bolt")),
+ l("Leave Subclass"),
+ l("Nothing at the moment.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ mesc l("[Energy Coating]");
+ mesc l("Drains Mana to reduce damage taken. The only defensive skill from wizards.");
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Tentacle), (getskilllv(MG_ENERGYCOAT)+1)*10, getitemlink(Tentacle));
+ mesc l("@@/@@ @@", countitem(MushroomSpores), (getskilllv(MG_ENERGYCOAT)+1)*5, getitemlink(MushroomSpores));
+ mesc l("@@/@@ @@", countitem(WolvernTooth), (getskilllv(MG_ENERGYCOAT)+1)*3, getitemlink(WolvernTooth));
+ mesc l("@@/@@ @@", countitem(RedScorpionClaw), (getskilllv(MG_ENERGYCOAT)+1)*1, getitemlink(RedScorpionClaw));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Tentacle) < (getskilllv(MG_ENERGYCOAT)+1)*10 ||
+ countitem(MushroomSpores) < (getskilllv(MG_ENERGYCOAT)+1)*5 ||
+ countitem(WolvernTooth) < (getskilllv(MG_ENERGYCOAT)+1)*3 ||
+ countitem(RedScorpionClaw) < (getskilllv(MG_ENERGYCOAT)+1)*1) goto L_Missing;
+
+ delitem Tentacle, (getskilllv(MG_ENERGYCOAT)+1)*10;
+ delitem MushroomSpores, (getskilllv(MG_ENERGYCOAT)+1)*5;
+ delitem WolvernTooth, (getskilllv(MG_ENERGYCOAT)+1)*3;
+ delitem RedScorpionClaw, (getskilllv(MG_ENERGYCOAT)+1)*1;
+
+ sk_lvup(MG_ENERGYCOAT);
+
+ next;
+ }
+ break;
+ case 2:
+ mesc l("[Napalm Beat]");
+ mesc l("Astral attack with low damage value, but which can send ghosts to rest.");
+ mesc l("Useful in PvP when your enemy have equipped a @@", getitemlink(AstralCube));
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(Acorn), (getskilllv(MG_NAPALMBEAT)+1)*60, getitemlink(Acorn));
+ mesc l("@@/@@ @@", countitem(Bread), (getskilllv(MG_NAPALMBEAT)+1)*30, getitemlink(Bread));
+ mesc l("@@/@@ @@", countitem(SmallMushroom), (getskilllv(MG_NAPALMBEAT)+1)*20, getitemlink(SmallMushroom));
+ mesc l("@@/@@ @@", countitem(PinkBlobime), (getskilllv(MG_NAPALMBEAT)+1)*20, getitemlink(PinkBlobime));
+ mesc l("@@/@@ @@", countitem(RedApple), (getskilllv(MG_NAPALMBEAT)+1)*15, getitemlink(RedApple));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(Acorn) < (getskilllv(MG_NAPALMBEAT)+1)*60 ||
+ countitem(Bread) < (getskilllv(MG_NAPALMBEAT)+1)*30 ||
+ countitem(SmallMushroom) < (getskilllv(MG_NAPALMBEAT)+1)*20 ||
+ countitem(PinkBlobime) < (getskilllv(MG_NAPALMBEAT)+1)*20 ||
+ countitem(RedApple) < (getskilllv(MG_NAPALMBEAT)+1)*15) goto L_Missing;
+
+ delitem Acorn, (getskilllv(MG_NAPALMBEAT)+1)*60;
+ delitem Bread, (getskilllv(MG_NAPALMBEAT)+1)*30;
+ delitem SmallMushroom, (getskilllv(MG_NAPALMBEAT)+1)*20;
+ delitem PinkBlobime, (getskilllv(MG_NAPALMBEAT)+1)*20;
+ delitem RedApple, (getskilllv(MG_NAPALMBEAT)+1)*15;
+
+ sk_lvup(MG_NAPALMBEAT);
+
+ next;
+ }
+ break;
+ // Magic Bolts
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ setarray .@ASkill, MG_COLDBOLT, MG_LIGHTNINGBOLT, WZ_EARTHSPIKE, MG_FIREBOLT;
+ setarray .@AItem, Coral, BatWing, PileOfAsh, Curshroom;
+ setarray .@BItem, Sapphire, Emerald, Topaz, Ruby;
+ setarray .@ASkill$, "Ice", "Wind", "Earth", "Fire";
+
+ .@index=@menu-4;
+
+ .@Skill$=.@ASkill$[.@index];
+ .@Skill=.@ASkill[.@index];
+ .@Item=.@AItem[.@index];
+ .@ItemB=.@BItem[.@index];
+
+ deletearray(.@ASkill);
+ deletearray(.@AItem);
+ deletearray(.@BItem);
+ deletearray(.@ASkill$);
+
+ mesc l("[@@ Bolt]", .@Skill$);
+ mesc l("Causes a @@ bolt on the enemy. Number of hits is the skill level.", .@Skill$);
+ mes "";
+ mesn;
+ mesq l("This useful skill will only require:");
+ mesc l("@@/@@ @@", countitem(.@Item), (getskilllv(.@Skill)+1)*30, getitemlink(.@Item));
+ mesc l("@@/@@ @@", countitem(FluoPowder), (getskilllv(.@Skill)+1)*15, getitemlink(FluoPowder));
+ mesc l("@@/@@ @@", countitem(HerbalTea), (getskilllv(.@Skill)+1)*3, getitemlink(HastePotion));
+ mesc l("@@/@@ @@", countitem(WoodenLog), (getskilllv(.@Skill)+1)*2, getitemlink(DiamondPowder));
+ mesc l("@@/@@ @@", countitem(.@ItemB), (getskilllv(.@Skill)+1)*1, getitemlink(.@ItemB));
+ next;
+ if (askyesno() == ASK_YES) {
+ if (
+ countitem(.@Item) < (getskilllv(.@Skill)+1)*30 ||
+ countitem(FluoPowder) < (getskilllv(.@Skill)+1)*15 ||
+ countitem(HerbalTea) < (getskilllv(.@Skill)+1)*3 ||
+ countitem(WoodenLog) < (getskilllv(.@Skill)+1)*2 ||
+ countitem(.@ItemB) < (getskilllv(.@Skill)+1)*1) goto L_Missing;
+
+ delitem .@Item, (getskilllv(.@Skill)+1)*30;
+ delitem FluoPowder, (getskilllv(.@Skill)+1)*15;
+ delitem HerbalTea, (getskilllv(.@Skill)+1)*3;
+ delitem WoodenLog, (getskilllv(.@Skill)+1)*2;
+ delitem .@ItemB, (getskilllv(.@Skill)+1)*1;
+
+ sk_lvup(.@Skill);
+
+ next;
+ }
+ break;
+ case 7:
+ // All skills related may include the basic class skills if they're related.
+ mesc l("WARNING: If you leave the subclass, you'll lose all skills related to it!"), 1;
+ mesc l("This cannot be undone. Are you sure?"), 1;
+ mes "";
+ if (askyesno() == ASK_YES) {
+ mes "";
+ if (validatepin()) {
+ skill MG_ENERGYCOAT, 0, 0;
+ skill SA_DRAGONOLOGY, 0, 0;
+ skill MG_NAPALMBEAT, 0, 0;
+ skill MG_COLDBOLT, 0, 0;
+ skill MG_LIGHTNINGBOLT, 0, 0;
+ skill WZ_EARTHSPIKE, 0, 0;
+ skill MG_FIREBOLT, 0, 0;
+ MAGIC_SUBCLASS=MAGIC_SUBCLASS^CL_WIZARD;
+ mesc l("You abandoned the WIZARD class!"), 1;
+ close;
+ } else {
+ mesc l("Failed to validate pin. Aborting.");
+ next;
+ }
+ } else {
+ mes "";
+ mesc l("Operation aborted. Phew!");
+ next;
+ }
+ break;
+ default:
+ goto L_Close;
+ }
+
+ goto L_Member;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FancyHat); // TODO: wizard hat
+ setunitdata(.@npcId, UDT_HEADMIDDLE, SorcererRobe);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, JeansShorts);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 5);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+