summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoams <toams85@gmail.com>2019-10-01 16:33:14 +0000
committerJesusaves <cpntb1@ymail.com>2019-10-01 16:33:14 +0000
commit109ce3ba475f38b221c948d2f861e5a27dd3ce42 (patch)
treebfb7dd0b5e29a19fe4fc0a19910260e3079b0edb
parent0d44f6fded91c4ab4845db37841ec59f34f64d1e (diff)
downloadserverdata-109ce3ba475f38b221c948d2f861e5a27dd3ce42.tar.gz
serverdata-109ce3ba475f38b221c948d2f861e5a27dd3ce42.tar.bz2
serverdata-109ce3ba475f38b221c948d2f861e5a27dd3ce42.tar.xz
serverdata-109ce3ba475f38b221c948d2f861e5a27dd3ce42.zip
instance for training room, training npc, new quest id
change warp system for avoid spam creation instance add dummy for skill wave to mob_db, and stupid change in script add few basic control, info about training, access by menu change bow wave, and add dummy for bow wave change collison wall to water wall etc.
-rw-r--r--db/quest_db.conf4
-rw-r--r--db/re/item_db.conf8
-rw-r--r--db/re/mob_db.conf104
-rw-r--r--db/re/mob_skill_db.conf15
-rw-r--r--db/re/skill_db.conf21
-rw-r--r--npc/001-2-34/doors.txt34
-rw-r--r--npc/001-2-36/_import.txt2
-rw-r--r--npc/001-2-36/hector.txt459
-rw-r--r--npc/001-2-36/training_room_npc.txt165
-rw-r--r--npc/commands/debug-quest.txt3
-rw-r--r--npc/functions/quest-debug/034-ArtisQuests_TrainingLegion.txt28
-rw-r--r--npc/scripts.conf2
12 files changed, 634 insertions, 211 deletions
diff --git a/db/quest_db.conf b/db/quest_db.conf
index 9d87df84..5f0b27ab 100644
--- a/db/quest_db.conf
+++ b/db/quest_db.conf
@@ -162,6 +162,10 @@ quest_db: (
Name: "Artis_Legion_Progress"
},
{
+ Id: 34
+ Name: "ArtisQuests_TrainingLegion"
+ },
+{
Id: 36
Name: "HurnscaldQuests_Hinnak"
},
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index 726da734..141196ff 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -4147,7 +4147,7 @@ item_db: (
WeaponLv: 1
EquipLv: 5
Refine: false
- Subtype: "W_DAGGER"
+ Subtype: "W_1HSWORD"
BindOnEquip: false
Delay: 0
Sprite: 0
@@ -4169,7 +4169,7 @@ item_db: (
WeaponLv: 1
EquipLv: 5
Refine: false
- Subtype: "W_DAGGER"
+ Subtype: "W_1HSWORD"
BindOnEquip: false
Delay: 0
Sprite: 0
@@ -4191,7 +4191,7 @@ item_db: (
WeaponLv: 1
EquipLv: 15
Refine: false
- Subtype: "W_DAGGER"
+ Subtype: "W_1HSWORD"
BindOnEquip: false
Delay: 0
Sprite: 0
@@ -4363,7 +4363,7 @@ item_db: (
WeaponLv: 1
EquipLv: 10
Refine: false
- Subtype: "W_DAGGER"
+ Subtype: "W_STAFF"
BindOnEquip: false
OnEquipScript: <"
doevent "#SpotlightMaster::OnTouch";
diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf
index e6d6b56a..12709953 100644
--- a/db/re/mob_db.conf
+++ b/db/re/mob_db.conf
@@ -927,7 +927,7 @@ mob_db: (
SpriteName: "Dummy"
Name: "Dummy"
Lv: 1
- Hp: 80
+ Hp: 25
Sp: 0
Exp: 1
JExp: 0
@@ -2977,4 +2977,106 @@ mob_db: (
Moss: 400
}
},
+{
+ Id: 1107
+ SpriteName: "Dummy2"
+ Name: "Dummy"
+ Lv: 1
+ Hp: 25
+ Sp: 0
+ Exp: 1
+ JExp: 0
+ AttackRange: 1
+ Attack: [1, 1]
+ Def: 100
+ Mdef: 1
+ Stats: {
+ Str: 1
+ Agi: 1
+ Vit: 1
+ Int: 1
+ Dex: 1
+ Luk: 1
+ }
+ ViewRange: 1
+ ChaseRange: 12
+ Size: 1
+ Race: 3
+ Element: (2, 1)
+ Mode: {
+ Plant: true
+ }
+ MoveSpeed: 1000
+ AttackDelay: 800
+ AttackMotion: 672
+ DamageMotion: 480
+ MvpExp: 0
+ SkillAttacks: {
+ SM_BASH: 0
+ }
+ WeaponAttacks: {
+ NoWeapon: 0
+ Daggers: 0
+ 1HSwords: 0
+ 2HSwords: 0
+ 1HSpears: 0
+ 2HSpears: 0
+ 1HAxes: 0
+ 2HAxes: 0
+ Maces: 0
+ 2HMaces: 0
+ Staves: 0
+ Bows: 10000
+ Knuckles: 0
+ Instruments: 0
+ Whips: 0
+ Katars: 0
+ Revolvers: 0
+ Rifles: 0
+ GatlingGuns: 0
+ Shotguns: 0
+ GrenadeLaunchers: 0
+ FuumaShurikens: 0
+ }
+},
+{
+ Id: 1108
+ SpriteName: "FireDummy"
+ Name: "Burning Dummy"
+ Lv: 1
+ Hp: 25
+ Sp: 1000
+ Exp: 1
+ JExp: 0
+ AttackRange: 1
+ Attack: [100, 100]
+ Def: 1
+ Mdef: 1
+ Stats: {
+ Str: 1
+ Agi: 100
+ Vit: 1
+ Int: 100
+ Dex: 100
+ Luk: 100
+ }
+ ViewRange: 1
+ ChaseRange: 12
+ Size: 1
+ Race: 3
+ Element: (2, 1)
+ Mode: {
+ CanMove: false
+ Aggressive: true
+ CanAttack: true
+ NoKnockback: true
+ }
+ MoveSpeed: 1000
+ AttackDelay: 800
+ AttackMotion: 672
+ DamageMotion: 480
+ MvpExp: 0
+ Drops: {
+ }
+},
)
diff --git a/db/re/mob_skill_db.conf b/db/re/mob_skill_db.conf
index 12c0cc33..8a3421fc 100644
--- a/db/re/mob_skill_db.conf
+++ b/db/re/mob_skill_db.conf
@@ -315,6 +315,21 @@ mob_skill_db:(
ConditionData: 7
}
}
+
+ /**********************************************************************/
+ FireDummy: {
+ MG_FIREWALL: {
+ SkillState: "MSS_BERSERK"
+ SkillLevel: 1
+ Rate: 9000
+ CastTime: 1800
+ Delay: 120000
+ Cancelable: true
+ SkillTarget: "MST_TARGET"
+ CastCondition: "MSC_ALWAYS"
+ ConditionData: 2
+ }
+ }
}
)
diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf
index 95adf795..6c190ed2 100644
--- a/db/re/skill_db.conf
+++ b/db/re/skill_db.conf
@@ -341,27 +341,6 @@ skill_db: (
}
WeaponTypes: {
NoWeapon: true
- Daggers: true
- 1HSwords: true
- 2HSwords: true
- 1HSpears: true
- 2HSpears: true
- 1HAxes: true
- 2HAxes: true
- Maces: true
- 2HMaces: true
- Staves: true
- Knuckles: true
- Instruments: true
- Whips: true
- Books: true
- Katars: true
- Revolvers: true
- Rifles: true
- GatlingGuns: true
- Shotguns: true
- GrenadeLaunchers: true
- FuumaShurikens: true
}
}
},
diff --git a/npc/001-2-34/doors.txt b/npc/001-2-34/doors.txt
index ca513945..e2ffee1f 100644
--- a/npc/001-2-34/doors.txt
+++ b/npc/001-2-34/doors.txt
@@ -1,29 +1,29 @@
// Evol scripts.
// Author:
// Reid
+// Omatt
+// Toams
+// Jesus
// Description:
// Doors NPCs.
001-2-34,23,29,0 script ToTrainingRoom#001-2-34 NPC_HIDDEN,0,0,{
-
OnTouch:
- if ((getmapusers($@MAP_NAME$) == 0) && ($@FightingIsActive > 0))
- {
- set $@FightingIsActive, 0;
- killmonsterall "001-2-36";
- }
- if (mobcount("001-2-36","all") > 0 && $@FightingIsActive > 0)
- {
- narrator
- l("You hear some sound behind the door."),
- l("Somebody is probably training, better wait for him to finish.");
- }
- else
- {
- warp "001-2-36", 36, 30;
+ .@q2=getq2(ArtisQuests_TrainingLegion);
+ // Map name limit: 4 chars (atl1)
+ .@mapn$="atl1@"+getcharid(0);
+ if (isinstance(.@q2) && .@q2 > 0) {
+ warp .@mapn$, 36, 30;
+ } else {
+ .@inst = instance_create("Training Room "+getcharid(0), getcharid(3), IOT_CHAR);
+ instance_attachmap("001-2-36", .@inst, false, .@mapn$);
+ // 30 minutes (1800s) inside, or 5 minutes (300s) outside
+ instance_set_timeout(1800, 300, .@inst);
+ instance_init(.@inst);
+ setq2 ArtisQuests_TrainingLegion, .@inst;
+ warp .@mapn$, 36, 30;
}
- closeclientdialog;
- close;
+ end;
}
diff --git a/npc/001-2-36/_import.txt b/npc/001-2-36/_import.txt
index 222e5a7f..57397efd 100644
--- a/npc/001-2-36/_import.txt
+++ b/npc/001-2-36/_import.txt
@@ -1,5 +1,5 @@
// Map 001-2-36: unnamed
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/001-2-36/_warps.txt",
+"npc/001-2-36/hector.txt",
"npc/001-2-36/mapflags.txt",
-"npc/001-2-36/training_room_npc.txt",
diff --git a/npc/001-2-36/hector.txt b/npc/001-2-36/hector.txt
new file mode 100644
index 00000000..f4c7176f
--- /dev/null
+++ b/npc/001-2-36/hector.txt
@@ -0,0 +1,459 @@
+// TrainingRoom
+// Author:
+// jak1
+// omatt
+// toams
+// Story:
+// Reid
+// Teru
+// Spellchecking & Dialogs:
+// Reid
+// toams
+// Variable:
+// .fightingActive
+// 0 = no fight active
+// 1 = swordfight active
+// 2 = bowfight active
+// 3 = skillfight
+// ArtisQuests_TrainingLegion
+// 0 not started at all
+// 1 swordTraining finished
+// 2 bowTraining finished
+// 3 bow and sword finished
+// 4 end of training
+// .mobID is related to quest state
+//
+// TODO adding rand messages like "try hit it harder..." for wave's
+// TODO in first, second, and third training, input some tips about related weapon given.
+
+
+001-2-36,32,36,0 script Hector#001-2-36 NPC_LUCAS,{
+
+
+ 'instanceID = instance_id();
+ 'npcName$ = strnpcinfo(NPC_NAME_UNIQUE); // required for call the label in the npc of this one instance
+ attachnpctimer;
+ initnpctimer;
+
+ function waveEnded {
+
+ if (.fightingActive == 1)
+ {
+ npctalk3(l("Well done, you aren't even bleeding that much!"));
+ if (getq(.quest_training) == 0)
+ setq(.quest_training, 1);
+ if (getq(.quest_training) == 2)
+ setq(.quest_training, 3);
+ }
+ if (.fightingActive == 2)
+ {
+ npctalk3(l("Great! Don't mind those scorched hairs, they will grow back."));
+ if (getq(.quest_training) == 0)
+ setq(.quest_training, 2);
+ if (getq(.quest_training) == 1)
+ setq(.quest_training, 3);
+ }
+ if (.fightingActive == 3)
+ {
+ if (getq(.quest_training) == 3)
+ {
+ npctalk3(l("Congratulations, you have finished your training."));
+ sleep2(2000);
+ npctalk3(l("The only way to improve yourself is practice, practice and some more practice."));
+ setq(.quest_training, 4);
+ setq(Artis_Legion_Progress, 2);
+ }
+ else
+ {
+ npctalk3(l("You finished training the bashing skill. Pretty powerful isn't it?"));
+ }
+ }
+
+ .currentWaveLevel = 1;
+ .fightingActive = 0;
+ 'mobDead = 0;
+ end;
+ }
+
+ function mobSpawn {
+
+ if (.fightingActive != 0)
+ {
+ if (.currentWaveLevel == .maxWaves)
+ {
+ npctalk3(l("Last Wave!"));
+ }
+ else
+ {
+ npctalk3(l("Wave " + .currentWaveLevel + "!"));
+ }
+
+ areamonster('map$, .mobCoordinate[0], .mobCoordinate[1], .mobCoordinate[2], .mobCoordinate[3],
+ /* map x1 y1 x2 y2 */
+ strmobinfo(1, .mobID[.fightingActive]), .mobID[.fightingActive], .currentWaveLevel, 'npcName$+"::OnTrainingMobDead");
+ /* mob display mob id amount label */
+ }
+
+ end;
+ }
+
+ function trainingEnd {
+
+ sleep2(1500);
+ npctalk3(l("This training is over!"));
+ .fightingActive = 0;
+ .currentWaveLevel = 1;
+ killmonster('map$, "All");
+ stopnpctimer();
+ end;
+ }
+
+ function checkWeapon {
+ // check for sword in swordtraining
+ if (getiteminfo(getequipid(EQI_HAND_R), ITEMINFO_SUBTYPE) != W_1HSWORD && .fightingActive == 1)
+ {
+ npctalk3(l("Hey! Use your sword!"));
+ trainingEnd;
+ }
+
+ // check for bow in bowtraining
+ if (getiteminfo(getequipid(EQI_HAND_R), ITEMINFO_SUBTYPE) != W_BOW && .fightingActive == 2)
+ {
+ npctalk3(l("Hey! Use your bow!"));
+ trainingEnd;
+ }
+
+ // no weapons may be equiped when training skill
+ if (getequipid(EQI_HAND_R) != -1 && .fightingActive == 3)
+ {
+ npctalk3(l("Hey! No weapons allowed this round!"));
+ trainingEnd;
+ }
+
+ }
+
+
+ function mobKilled {
+
+ 'mobDead = 0; // reset the count
+
+ checkWeapon; // check if correct weapon is in use
+
+ // on first skill training give SM_BASH skill and explain how to use it.
+ if (getq(.quest_training) == 3 && .currentWaveLevel == 1)
+ {
+ setcamnpc(strnpcinfo(NPC_NAME_UNIQUE)); // focus the npc when he talk to the player
+ speech(S_LAST_NEXT,
+ l("Using a skill consumes Mana."),
+ l("It takes a while to have full Mana again."),
+ l("The more intelligence points you have, the faster it goes."),
+ l("If you sit, you regain your Mana faster."),
+ l("Or you can drink a mana potion. This restores some Mana. How much depends on the potion."),
+ l("Here take one! I have plenty of them."));
+ closedialog;
+ getitem(.mana_potion, 1);
+ sleep2(3000);
+ }
+
+ if (.currentWaveLevel == .maxWaves )
+ {
+ waveEnded;
+ }
+
+
+ .currentWaveLevel++; // next wave after killed dummy
+
+ mobSpawn;
+ }
+
+ function swordTraining {
+ speech(S_LAST_BLANK_LINE | S_LAST_NEXT,
+ l("You chose the sword for this training, make sure to equip it or we can't start."));
+
+ speech(S_LAST_BLANK_LINE | S_NO_NPC_NAME,
+ l("I will place some dummies in the fighting arena. @@ waves of dummies, kill them to finish this training.", .maxWaves),
+ l("Ready?"));
+
+ askyesno;
+ if (@menu == ASK_NO)
+ {
+ closedialog;
+ end;
+ }
+
+ closedialog;
+ .fightingActive = 1;
+ initnpctimer;
+ }
+
+ function bowTraining {
+ speech(S_LAST_BLANK_LINE | S_LAST_NEXT,
+ l("You chose the bow for this training, make sure to equip it or we can't start."));
+
+ speech(S_LAST_BLANK_LINE | S_NO_NPC_NAME,
+ l("I've set these dummies on fire. Don't get too close to the dummies or the fire will hurt you."),
+ l("The range of your bow makes it possible to kill them from a distance."),
+ l("Ready?"));
+
+ askyesno;
+ if (@menu == ASK_NO)
+ {
+ closedialog;
+ end;
+ }
+
+ .fightingActive = 2;
+ initnpctimer;
+ }
+
+ function skillTraining {
+
+ if (getq(.quest_training) == 3)
+ {
+ //Give bashing skill
+ skill(.skill_name, 1, 0);
+
+ speech(S_LAST_BLANK_LINE | S_NO_NPC_NAME,
+ l("Lets teach you the bashing skill. This is a very powerful way to hit your enemy by using only your bare hands."),
+ l("To use the skill you have to open your skills menu. Here you select the offensive tab and select the bash skill. When the bash skill is selected, press the use button the use the skill."));
+ }
+
+ speech(S_LAST_BLANK_LINE | S_NO_NPC_NAME,
+ l("You can only use this skill with bare hands, so make sure to unequip your weapons."),
+ l("@@ waves of dummies, you know how that ends.", .maxWaves),
+ l("Ready?"));
+
+ askyesno;
+ if (@menu == ASK_NO)
+ {
+ closedialog;
+ end;
+ }
+
+ .fightingActive = 3;
+ initnpctimer;
+ }
+
+ function checkCombatZone {
+
+ getmapxy('map$, @x, @y, 0);
+ if (@x < 24 || @x > 32 || @y < 33 || @y > 43)
+ return 1;
+ return 0;
+ }
+
+ // choose training and start it
+ function trainingStart {
+
+ if (checkCombatZone())
+ {
+ npctalk3(l("Please enter the combat zone on the left."));
+ closedialog;
+ end;
+ }
+ if (.fightingActive == 0)
+ {
+ switch (getq(.quest_training))
+ {
+ case 0: speech(S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE,
+ l("Which weapon do you want to train? Bow or sword?"));
+
+ switch (select(l("I'll start with the sword."),
+ l("I would like to train the bow first."),
+ l("I don't feel like training today, see you later.")))
+ {
+ case 1: swordTraining; break;
+ case 2: bowTraining; break;
+ case 3: closedialog; end;
+ }
+ break;
+ case 1: speech(S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE,
+ l("You have finished the sword training. Do you want to start training the bow?"));
+
+ switch (select(l("Yes, I'm ready for some arrow shooting!"),
+ l("Can I train the sword some more?"),
+ l("I don't feel like training today, see you later.")))
+ {
+ case 1: bowTraining; break;
+ case 2: swordTraining; break;
+ case 3: closedialog; end;
+ }
+ break;
+ case 2: speech(S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE,
+ l("You have finished the bow training. Do you want to start training the sword?"));
+
+ switch (select(l("Yes, teach me how to cut and slice these dummies!"),
+ l("Can I train the bow some more?"),
+ l("I don't feel like training today, see you later.")))
+ {
+ case 1: swordTraining; break;
+ case 2: bowTraining; break;
+ case 3: closedialog; end;
+ }
+ break;
+ case 3: speech(S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE,
+ l("You have mastered both the bow and the sword. The only thing left to teach you is the bashing skill."));
+
+ switch (select(l("A skill? That sounds useful!"),
+ l("Can I train the sword some more?"),
+ l("I would rather like to train the bow again."),
+ l("I don't feel like training today, see you later.")))
+ {
+ case 1: skillTraining; break;
+ case 2: swordTraining; break;
+ case 3: bowTraining; break;
+ case 4: closedialog; end;
+ }
+ break;
+ case 4: speech(S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE,
+ l("Sure, which training do you want to start?"));
+
+ switch (select(l("Skill training please"),
+ l("Can I train the sword some more?"),
+ l("I would like to train the bow again."),
+ l("I've changed my mind, see you later.")))
+ {
+ case 1: skillTraining; break;
+ case 2: swordTraining; break;
+ case 3: bowTraining; break;
+ case 4: closedialog; end;
+ }
+ break;
+ }
+ closedialog;
+
+ npctalk3(l("Let's begin"));
+
+ mobSpawn;
+ }
+ }
+
+ function mainLoop {
+
+ // if fighting is active say encouraging words to the player
+ if (.fightingActive != 0)
+ {
+ switch (.fightingActive)
+ {
+ case 1: npctalk3(l("Attack with your sword and kill them!")); end;
+ case 2: npctalk3(l("Use your bow and kill them!")); end;
+ case 3: npctalk3(l("Hey lazy bum! Attack the dummies")); end;
+ default: break;
+ }
+ }
+
+ // only start if player talked with Lozerk
+ if (getq(Artis_Legion_Progress) < 1 )
+ {
+ speech(S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("This is the training ground. And I ain't training nobody unless Lieutenant Lozerk tells me to!"),
+ l("So please get out!"));
+ closedialog;
+ end;
+ }
+ else
+ {
+ switch (getq(.quest_training))
+ {
+ case 0: speech(S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l(.mockingGreeting$[rand(getarraysize(.mockingGreeting$))]),
+ l("Do you want some training? To be honest, it looks like you could use some..."));
+ break;
+ case 4: speech(S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Your training is finished, I taught you all I know."),
+ l("So now go and explore the world!"));
+ switch (select(
+ l("Can I first have an other look at your book?"),
+ l("Before doing that can I improve my fighting skills some more?"),
+ l("Okay!")))
+ {
+ case 1: doevent("#EvolTutorial::OnRemoteHelp");; break;
+ case 2: trainingStart; break;
+ case 3: closedialog; end;
+ }
+ closedialog;
+ end;
+ default: speech(S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Hello again, ready to continue your lessons?")); break;
+ }
+
+ do
+ {
+ selectd(
+ l("Yes, train me!"),
+ l("Hmm... But what is exactly this training?"),
+ l("I'm a bit lost in this game, can you first give me few tips?"),
+ l("Not right now, it looks like I got other stuff to do."));
+
+ switch (@menu)
+ {
+ case 1: trainingStart; break;
+ case 2:
+ // here text who explain what is the training of this npc
+ speech(S_FIRST_BLANK_LINE | S_LAST_NEXT | S_LAST_BLANK_LINE | S_NO_NPC_NAME,
+ l("In this training, my goal is to teach you how to be a skilled warrior, who can use a sword, a bow and a skill."),
+ l("For this, you need a sword and a bow."),
+ l("After you gathered your weapons, I will teach you how to use them."));
+ break;
+ case 3:
+ speech(S_FIRST_BLANK_LINE | S_LAST_NEXT | S_LAST_BLANK_LINE | S_NO_NPC_NAME,
+ l("I have a book with all the info you need, do you want to read it?"));
+ askyesno;
+ if (@menu == ASK_YES)
+ {
+ doevent("#EvolTutorial::OnRemoteHelp");
+ closedialog;
+ end;
+ }
+ break;
+ case 4: closedialog; end;
+
+ default: closedialog; end;
+ }
+ } while (1);
+ }
+ }
+
+ mainLoop;
+ closedialog;
+ end;
+
+OnTimer1000:
+ if (.fightingActive != 0)
+ {
+ if (checkCombatZone())
+ {
+ npctalk3(l("You left the combat zone!"));
+ trainingEnd;
+ }
+ checkWeapon;
+ initnpctimer;
+ }
+ end;
+
+OnTrainingMobDead:
+ // the amount of mob spawned depend on currentwave
+ if (++'mobDead == .currentWaveLevel)
+ {
+ mobKilled;
+ }
+ end;
+
+OnInit:
+ .mana_potion = LargeMana;
+ .skill_name = SM_BASH;
+ .quest_training = ArtisQuests_TrainingLegion;
+ .quest_debug = .quest_training;
+ .maxWaves = 3;
+
+ .currentWaveLevel = 1;
+ .fightingActive = 0;
+
+ // here input some sentences "hello noob" like, the npc pick randomly a sentence
+ setarray .mockingGreeting$[0], "Hey noob!", "Hey somethingwholooklikeawarrior...", "Sup' chibi.";
+ setarray .mobID[0],0, Dummy, FireDummy, Dummy2; // an array of dummies, one for each training
+ setarray .mobCoordinate[0], 24, 34, 31, 41; // this represent the square of "ring" training
+
+ end;
+
+}
diff --git a/npc/001-2-36/training_room_npc.txt b/npc/001-2-36/training_room_npc.txt
deleted file mode 100644
index 022b5d2e..00000000
--- a/npc/001-2-36/training_room_npc.txt
+++ /dev/null
@@ -1,165 +0,0 @@
-// TrainingRoom
-//
-// Author:
-// jak1
-//
-// Story:
-// Akko Teru
-// Reid
-//
-// Spellchecking & Dialogs
-// Reid
-
-// ~~ VARS ~~
-// $@FightingIsActive
-// 0 = can Warp in Room (non active fight)
-// 1 = can't Warp in Room (active fight)
-
-//TODO adding rand messages like "try hit it harder..." for wave's
-
-
-001-2-36,32,36,0 script FightNPCName NPC_LUCAS,{
-
- set $@NPCNAME$, "FightNPCName";
- set $@NPCNEXTNAME$, "Samantha";
- set $@MOB_ID, 1021;
- set $@MOB_NAME$, "Dummy";
- set $@CURRENT_WAVE_LEVEL, 1;
- set $@MAX_WAVES, 10;
-
- //Room and Mobspawn Coordinates
- // TL BR
- setarray $@MOB_SPAWN_COORDINATES, 24, 34, 31, 41;
- setarray $@MAP_NAME$, "001-2-36";
-
- set @roomPlayers, getmapusers($@MAP_NAME$);
-
- if(@roomPlayers > 1)
- goto NotAlone;
-
- if ($@FightingIsActive == 1)
- {
- npctalk3 "You are not done now!";
- end;
- }
-
- //call in Warp door if (1 = block)
- set $@FightingIsActive, 1;
-
- if (!debug || !is_dev())
- goto start;
-
- //can be removed later!
- menu
- "get debug vars", debug_it,
- "reset char var", resetVar,
- "start training", -;
-
-
-start:
- if (FIGHT_TRAINING >= 1)
- goto JobIsDone;
-
- getmapxy(.@map$, .@x, .@y, 0);
- if (.@x < 24 || .@x > 32 || .@y < 33 || .@y > 43)
- {
- speech S_FIRST_BLANK_LINE, l("Please enter the combat zone on the left.");
- close;
- }
-
- setcells "001-2-36", 33, 35, 33, 38, 1, "fence";
- initnpctimer;
- setnpctimer 0;
- startnpctimer;
-
- npctalk3 l("Let's begin");
- end;
-
-
-//cancel all actions, the Player needs to be alone in this Room
-NotAlone:
- npctalk3 "You dont feel so great with audience!";
- set $@FightingIsActive, 0;
- end;
-
-
-//If a Spawned Mob gets Killed
-OnTrainingMobDead:
- if ($@CURRENT_WAVE_LEVEL == $@MAX_WAVES )
- goto FinishedTraining;
-
- set $@CURRENT_WAVE_LEVEL, $@CURRENT_WAVE_LEVEL + 1;
- setnpctimer 0;
- startnpctimer;
- end;
-
-
-SpawnMonster:
- if ( $@FightingIsActive == 1 )
- {
- if ($@CURRENT_WAVE_LEVEL == $@MAX_WAVES)
- {
- npctalk "Last Wave!", $@NPCNAME$;
- }
- else
- {
- npctalk "Wave " + $@CURRENT_WAVE_LEVEL + "!", $@NPCNAME$;
- }
-
- areamonster "001-2-36", $@MOB_SPAWN_COORDINATES[0], $@MOB_SPAWN_COORDINATES[1], $@MOB_SPAWN_COORDINATES[2], $@MOB_SPAWN_COORDINATES[3], $@MOB_NAME$, $@MOB_ID, 1, $@NPCNAME$ + "::OnTrainingMobDead";
- stopnpctimer;
- setnpctimer 0;
- }
- else
- {
- set $@CURRENT_WAVE_LEVEL, 0;
- }
- stopnpctimer;
- setnpctimer 0;
- end;
-
-
-//15 Secounds Waiting (Regeneration for fightRoom)
-OnTimer5000:
- goto SpawnMonster;
-
-
-FinishedTraining:
- //... TODO
-
- npctalk "Con. u finished it...", $@NPCNAME$;
- stopnpctimer;
- setnpctimer 0;
- set $@CURRENT_WAVE_LEVEL, 0;
- delcells "fence";
- if (FIGHT_TRAINING >= 1)
- end;
- set FIGHT_TRAINING, 1;
- end;
-
-JobIsDone:
- mes "Well done, you should talk to \"" + $@NPCNEXTNAME$ + "\"...";
- close;
-
-
-// ----- DEBUG START ! -----
-
-debug_it:
- mes "DEBUG INFO";
- mes "- CharVariable:FIGHT_TRAINING "+ FIGHT_TRAINING;
- mes "- maxWaves "+ $@MAX_WAVES;
- mes "- currentWave "+ $@CURRENT_WAVE_LEVEL;
- mes "- npcName "+ $@NPCNAME$;
- mes "- mobName "+ $@MOB_NAME$;
- mes "- mobID "+ $@MOB_ID;
- close;
-
-resetVar:
- set FIGHT_TRAINING , 0;
-// ----- DEBUG END ! -----
-
-
-OnInit:
- end;
-
-}
diff --git a/npc/commands/debug-quest.txt b/npc/commands/debug-quest.txt
index 96a8e290..34bdf63b 100644
--- a/npc/commands/debug-quest.txt
+++ b/npc/commands/debug-quest.txt
@@ -80,7 +80,8 @@ function script GlobalQuestDebug {
"Fexil", ArtisQuests_Fexil,
"Lloyd", ArtisQuests_Lloyd,
l("Mona's dad"), ArtisQuests_MonaDad,
- l("Artis legion progress"), Artis_Legion_Progress;
+ l("Artis legion progress"), Artis_Legion_Progress,
+ l("Legion training"), ArtisQuests_TrainingLegion;
switch (@menuret)
{
diff --git a/npc/functions/quest-debug/034-ArtisQuests_TrainingLegion.txt b/npc/functions/quest-debug/034-ArtisQuests_TrainingLegion.txt
new file mode 100644
index 00000000..ba72fd07
--- /dev/null
+++ b/npc/functions/quest-debug/034-ArtisQuests_TrainingLegion.txt
@@ -0,0 +1,28 @@
+// Training Legion quest
+// Authors:
+// omatt
+
+function script QuestDebug34 {
+ do
+ {
+ clear;
+ setnpcdialogtitle l("Quest debug");
+ mes "ArtisQuests_TrainingLegion";
+ mes "---";
+ mes l("Quest state: @@", getq(ArtisQuests_TrainingLegion));
+ next;
+
+ GenericQuestDebug ArtisQuests_TrainingLegion,
+ l("Does not have the quest"), 0,
+ l("Finished sword training"), 1,
+ l("Finished bow training"), 2,
+ l("Both sword and bow training are finished"), 3,
+ l("Skill training finished, end of quest"), 4;
+
+ if (@menuret < 0)
+ {
+ return;
+ }
+
+ } while (1);
+}
diff --git a/npc/scripts.conf b/npc/scripts.conf
index f593cade..1106d6e6 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -87,7 +87,7 @@
"npc/functions/quest-debug/031-General_Janus.txt",
"npc/functions/quest-debug/032-ArtisQuests_MonaDad.txt",
"npc/functions/quest-debug/033-Artis_Legion_Progress.txt",
-// 034: ???
+"npc/functions/quest-debug/034-ArtisQuests_TrainingLegion.txt",
// 035: ???
"npc/functions/quest-debug/036-HurnscaldQuests_Hinnak.txt",
"npc/functions/quest-debug/037-HurnscaldQuests_Soup.txt",