summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaulc <lucashelaine14@gmail.com>2018-02-06 19:26:23 +0100
committerSaulc <lucashelaine14@gmail.com>2018-02-06 19:26:23 +0100
commit76ed64d09c767983c73eba2dfbb95af994e67934 (patch)
tree6d19181f9108cdd6962dfdca3a70926adeaa068f
parentf6e732ec840a24758099c481f9a941331d3382bc (diff)
downloadserverdata-76ed64d09c767983c73eba2dfbb95af994e67934.tar.gz
serverdata-76ed64d09c767983c73eba2dfbb95af994e67934.tar.bz2
serverdata-76ed64d09c767983c73eba2dfbb95af994e67934.tar.xz
serverdata-76ed64d09c767983c73eba2dfbb95af994e67934.zip
add Tolchi quest
-rw-r--r--db/quest_db.conf4
-rw-r--r--npc/005-4/rosen.txt24
-rw-r--r--npc/005-4/tolchi.txt175
3 files changed, 198 insertions, 5 deletions
diff --git a/db/quest_db.conf b/db/quest_db.conf
index 49b2fc530..bad26d61e 100644
--- a/db/quest_db.conf
+++ b/db/quest_db.conf
@@ -178,6 +178,10 @@ quest_db: (
Name: "CandorQuest_HAS"
},
{
+ Id: 37
+ Name: "CandorQuest_Tolchi"
+},
+{
Id: 1000
Name: "Test_testing1"
},
diff --git a/npc/005-4/rosen.txt b/npc/005-4/rosen.txt
index 60bf6c73f..958d74dee 100644
--- a/npc/005-4/rosen.txt
+++ b/npc/005-4/rosen.txt
@@ -14,7 +14,7 @@
// 5 Light Armor Shop quest delivered.
// 6 Light Armor Shop gave the cloths.
-005-4,29,36,0 script Rosen NPC_ELVEN_FEMALE_ARMOR_SHOP,{
+005-4,29,36,0 script Rosen 451,{
function explain_ironingot {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
@@ -69,9 +69,23 @@
}
} while (1);
+OnTimer1000:
+ domovestep;
OnInit:
- .sex = G_FEMALE;
- .distance = 2;
- end;
-}
+ initpath "move", 28, 36,
+ "dir", DOWN, 0,
+ "wait", 31, 0,
+ "move", 31, 36,
+ "dir", DOWN, 0,
+ "wait", 31, 0,
+ "move", 25, 35,
+ "dir", UP, 0,
+ "wait", 2, 0,
+ "move", 29, 36,
+ "dir", DOWN, 0,
+ "wait", 31, 0;
+ initialmove;
+ initnpctimer;
+ .distance = 5;
+}
diff --git a/npc/005-4/tolchi.txt b/npc/005-4/tolchi.txt
index 4653259a8..3fbcd7174 100644
--- a/npc/005-4/tolchi.txt
+++ b/npc/005-4/tolchi.txt
@@ -12,6 +12,181 @@
005-4,42,37,0 script Tolchi NPC_RAIJIN_FEMALE_LEGION_ARTIS,{
+ .Item1 = IronOre;
+ .Item2 = Coal;
+ .Item3 = IronIngot;
+
+ function quest_close {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Maybe next time.");
+ goodbye;
+ close;
+ }
+
+ function quest_giveitem {
+ .@tolchi = getq(CandorQuest_Tolchi);
+ if (.@tolchi == 2)
+ {
+ if (countitem("Iron Ingot") == 0)
+ {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("You don't have the item.");
+ goodbye;
+ close;
+ }
+ delitem .Item3, 1;
+ Zeny = Zeny + 8000;
+ getexp 1500,0;
+ setq CandorQuest_Tolchi, 3;
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Thanks mate that all i need ! Have a good day !");
+ }
+ if (.@tolchi == 1)
+ {
+ if (countitem("Coal") <= 2)
+ {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("You don't have the item.");
+ goodbye;
+ close;
+ }
+ delitem .Item2, 3;
+ Zeny = Zeny + 800;
+ getexp 100,0;
+ setq CandorQuest_Tolchi, 2;
+ }
+ if (.@tolchi == 0)
+ {
+ if (countitem("Iron Ore") == 0)
+ {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("You don't have the item.");
+ goodbye;
+ close;
+ }
+ delitem .Item1, 1;
+ Zeny = Zeny + 200;
+ getexp 50,0;
+ setq CandorQuest_Tolchi, 1;
+ }
+ close;
+ }
+
+ function quest_first {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Can you bring me 1 @@", getitemlink(.Item1));
+ do
+ {
+ select
+ l("Yes."),
+ l("No.");
+
+ switch (@menu)
+ {
+ case 1:
+ quest_giveitem;
+ break;
+ case 2:
+ quest_close;
+ break;
+ }
+ } while (@menu != 2);
+ }
+
+ function quest_second {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Can you bring me 3 @@", getitemlink(.Item2));
+ do
+ {
+ select
+ l("Yes."),
+ l("No.");
+
+ switch (@menu)
+ {
+ case 1:
+ quest_giveitem;
+ break;
+ case 2:
+ quest_close;
+ break;
+ }
+ } while (@menu != 2);
+ }
+
+ function quest_third {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Can you bring me 1 @@", getitemlink(.Item3));
+ do
+ {
+ select
+ l("Yes."),
+ l("No.");
+
+ switch (@menu)
+ {
+ case 1:
+ quest_giveitem;
+ break;
+ case 2:
+ quest_close;
+ break;
+ }
+ } while (@menu != 2);
+ }
+
+ .@tolchi = getq(CandorQuest_Tolchi);
+
+ if (BaseLevel <= 4)
+ {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("You aren't strong enought. Come Back Later.");
+ goodbye;
+ close;
+ }
+
+ if (.@tolchi == 3)
+ {
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Hey ! How are you today ? Thanks again for your help.");
+ goodbye;
+ close;
+ }
+
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Hello can you help me?");
+
+
+ do
+ {
+ select
+ rif(BaseLevel >= 5 && .@tolchi == 0, l("Yes.")),
+ rif(BaseLevel >= 10 && .@tolchi == 1, l("Yes.")),
+ rif(BaseLevel >= 15 && .@tolchi == 2, l("Yes.")),
+ l("No.");
+
+ switch (@menu)
+ {
+ case 1:
+ quest_first;
+ setq CandorQuest_Tolchi, 0;
+ break;
+ case 2:
+ quest_second;
+ break;
+ case 3:
+ quest_third;
+ break;
+ case 4:
+ quest_close;
+ goodbye;
+ break;
+ }
+ } while (@menu != 4);
+
+ closedialog;
+ goodbye;
+ close;
OnTimer1000:
domovestep;