summaryrefslogtreecommitdiff
path: root/world/map
diff options
context:
space:
mode:
authortux9th <mr.x@aon.at>2012-10-20 23:33:46 +0200
committerJessica Tölke <jtoelke@mail.upb.de>2012-10-21 15:31:50 +0200
commit52d4b57c56390d6ca5d9ba065f65732dea2f7a4f (patch)
tree461e6e3b2513f07ef8796e91a38e3b754108ddad /world/map
parent677802b3b6094ea7e15ed475373765523308ceb9 (diff)
downloadserverdata-52d4b57c56390d6ca5d9ba065f65732dea2f7a4f.tar.gz
serverdata-52d4b57c56390d6ca5d9ba065f65732dea2f7a4f.tar.bz2
serverdata-52d4b57c56390d6ca5d9ba065f65732dea2f7a4f.tar.xz
serverdata-52d4b57c56390d6ca5d9ba065f65732dea2f7a4f.zip
New Dailyquest:
Added NPC Scripts for Mirak, notes and a barrier, added mapflags.
Diffstat (limited to 'world/map')
-rw-r--r--world/map/npc/056-2/_import.txt4
-rw-r--r--world/map/npc/056-2/barrier.txt17
-rw-r--r--world/map/npc/056-2/mapflags.txt1
-rw-r--r--world/map/npc/056-2/mirak.txt150
-rw-r--r--world/map/npc/056-2/notes.txt13
5 files changed, 185 insertions, 0 deletions
diff --git a/world/map/npc/056-2/_import.txt b/world/map/npc/056-2/_import.txt
index c7fdde56..619bd3b1 100644
--- a/world/map/npc/056-2/_import.txt
+++ b/world/map/npc/056-2/_import.txt
@@ -3,3 +3,7 @@
map: 056-2.gat
npc: npc/056-2/_mobs.txt
npc: npc/056-2/_warps.txt
+npc: npc/056-2/barrier.txt
+npc: npc/056-2/mapflags.txt
+npc: npc/056-2/mirak.txt
+npc: npc/056-2/notes.txt
diff --git a/world/map/npc/056-2/barrier.txt b/world/map/npc/056-2/barrier.txt
new file mode 100644
index 00000000..f678cce2
--- /dev/null
+++ b/world/map/npc/056-2/barrier.txt
@@ -0,0 +1,17 @@
+056-2.gat,23,33,0|script|#Barrier|45,1,1,{
+ if (Mirak_Bantime > gettimetick(2))
+ goto L_Block;
+ if (BaseLevel < 25)
+ goto L_Weak;
+ warp "056-2.gat", 63, 35;
+ end;
+
+L_Block:
+ message strcharinfo(0), "I cannot enter... That old man really made sure I cannot bother him agin.";
+ end;
+
+L_Weak:
+ message strcharinfo(0), "I cannot enter. The magic is to strong. Maybe I should train some more.";
+ end;
+
+}
diff --git a/world/map/npc/056-2/mapflags.txt b/world/map/npc/056-2/mapflags.txt
new file mode 100644
index 00000000..3701e121
--- /dev/null
+++ b/world/map/npc/056-2/mapflags.txt
@@ -0,0 +1 @@
+056-2.gat mapflag nosave 056-1, 56,62;
diff --git a/world/map/npc/056-2/mirak.txt b/world/map/npc/056-2/mirak.txt
new file mode 100644
index 00000000..9522ebd4
--- /dev/null
+++ b/world/map/npc/056-2/mirak.txt
@@ -0,0 +1,150 @@
+056-2.gat,67,24,0|script|Mirak|372,{
+// Variables to set:
+// @dq_cost - The number of points this quest uses
+// @dq_money - The money reward for doing the quest
+// @dq_exp - Experince gained by doing the quest
+
+// Variables used inside:
+// Mirak_Quest - This variable contains the @annoy level and the storyline (@talk)
+// Mirak_Bantime - Time you cannot come back to the NPC when you upset him
+// Mirak_Questtime - Time you cannot come back once you finished the quest
+// Update Dailyquest Points
+ callfunc "DailyQuestPoints";
+
+// Bitmasks
+ set @Mirak_MASK, NIBBLE_0_MASK;
+ set @Mirak_SHIFT, NIBBLE_0_SHIFT;
+
+ set @talk, ((QUEST_Mirak & @Mirak_MASK) >> @Mirak_SHIFT);
+
+ set @Mirak_Annoy_MASK, NIBBLE_1_MASK;
+ set @Mirak_Annoy_SHIFT, NIBBLE_1_SHIFT;
+
+ set @annoy, ((QUEST_Mirak & @Mirak_Annoy_MASK) >> @Mirak_Annoy_SHIFT);
+
+// Bitmasks END
+
+ if (Mirak_Questtime > gettimetick(2))
+ goto L_TooSoon;
+ if (@annoy > 3)
+ goto L_Kill;
+ if (Mirak_Bantime > gettimetick(2))
+ goto L_Ban;
+ if (@talk < 3)
+ goto L_Talk;
+
+L_Ban:
+ mes "[Mirak]";
+ mes "\"How did you get back here?\"";
+ goto L_Kill;
+
+L_Talk:
+ set Mirak_Bantime, 0;
+ set Mirak_Questtime, 0;
+ if (@talk == 1)
+ goto L_Talk1;
+ if (@talk == 2)
+ goto L_Talk2;
+ mes "The old man reads a book and looks up when he sees you comming";
+ mes "He looks at you angrily";
+ next;
+ mes "[Mirak]";
+ mes "\"Hi my name is Mirak. You might have the impression that I am nice, but I am NOT! I want to be left alone to read at piece! I tried that at my mansion in Port City but it did not work. My damn brother, he always kept going on about Bat Wings...\"";
+ next;
+ mes "Suddenly his face gets red. He breathes slowly three times...";
+ next;
+ mes "He seems to be calm again.";
+ next;
+ mes "[Mirak]";
+ mes "\"Eh... Ah! That's why I bought this house in this goddamn woods. I hoped nobody would come by here. It seems I was wrong. I believe that you did not read the notes I left behind. Read them on your way out.\"";
+ mes "He looks down on his book and ignores you.";
+ set @talk, 1;
+ callsub S_Update_Mask;
+ close;
+
+L_Talk1:
+ mes "[Mirak]";
+ mes "\"What?! You again? Get going!\"";
+ set @talk, 2;
+ callsub S_Update_Mask;
+ close;
+
+L_Talk2:
+ mes "[Mirak]";
+ mes "\"What do you want?!\"";
+ menu
+ "Nothing", -,
+ "Money!", L_Quest;
+ mes "[Mirak]";
+ mes "\"Ahhhh! Get lost, or you'll regret it!\"";
+ set @annoy, @annoy+1;
+ callsub S_Update_Mask_Annoy;
+ close;
+
+L_Quest:
+
+ set @dq_cost, DailyQuestPoints;
+ set @dq_money, 20;
+ set @dq_exp, 20;
+ mes "[Mirak]";
+ mes "\"If you have some energy which I need left I can give you money for it but only if you will leave me alone!\"";
+ menu
+ "Okay.", L_Trade,
+ "Nah, I won't leave you alone.", L_Kill;
+ goto L_Exit;
+
+L_TooSoon:
+ mes "Mirak looks up sees you and gets angry";
+ mes "[Mirak]";
+ mes "\"I told you not to bother me again! Thats why I paid you!\"";
+ goto L_Kill;
+
+L_Kill:
+ misceffect sfx_magic_war, strcharinfo(0);
+ percentheal -100, 0;
+ set @annoy, 0;
+ callsub S_Update_Mask_Annoy;
+ set Mirak_Bantime, gettimetick(2) + 30; // Real: 86400;
+ set Mirak_Questtime, 0;
+ mes "The old man stands up and looks at you angier than ever. He mumbles something and your head explodes.";
+ next;
+ mes "[Mirak]";
+ mes "\"That's what you get for annoying me! I studied under the Mage of Tulimshar!";
+ mes "I feel better now.\"";
+ next;
+ mes "The old man sits back down and continues to read.";
+ close;
+
+L_Trade:
+ if (DailyQuestPoints == 0)
+ goto L_NoPoints;
+ set Zeny, Zeny + (@dq_money * @dq_cost);
+ getexp @dq_exp * @dq_cost, 0;
+ set DailyQuestPoints, DailyQuestPoints - @dq_cost;
+
+ mes "[" + @dq_money * @dq_cost + " money]";
+ mes "[" + @dq_exp * @dq_cost + " experience points]";
+ mes "\"Now leave or you'll regret it. Don't come back!\"";
+ set Mirak_Questtime, gettimetick(2) + 30; //Real: 86400;
+ set Mirak_Bantime, 0;
+ close;
+
+L_NoPoints:
+ mes "[Mirak]";
+ mes "\"Why do you bother me!? You have no energy left!\"";
+ goto L_Kill;
+
+// Bitmasks
+
+S_Update_Mask_Annoy:
+ set QUEST_Mirak,
+ (QUEST_Mirak & ~(@Mirak_Annoy_MASK))
+ | (@annoy << @Mirak_Annoy_SHIFT);
+ return;
+
+S_Update_Mask:
+ set QUEST_Mirak,
+ (QUEST_Mirak & ~(@Mirak_MASK))
+ | (@talk << @Mirak_SHIFT);
+ return;
+}
diff --git a/world/map/npc/056-2/notes.txt b/world/map/npc/056-2/notes.txt
new file mode 100644
index 00000000..19f1ae68
--- /dev/null
+++ b/world/map/npc/056-2/notes.txt
@@ -0,0 +1,13 @@
+056-2.gat,77,34,0|script|Warning|127,{
+ mes "Turn around. Do not come any closer!";
+ mes "Go back upstairs and leave! I don't want to see anybody!";
+ mes "This is the last warning!";
+ mes "- Mirak";
+ close;
+}
+056-2.gat,29,30,0|script|Note|127,{
+ mes "DO NOT GO ANY FURTHER!";
+ mes "Put the supplies on the table and do not come downstairs. I don't want to be bothered.";
+ mes "- Mirak";
+ close;
+}