diff options
author | Jessica Tölke <jtoelke@mail.upb.de> | 2013-01-06 19:02:44 +0100 |
---|---|---|
committer | Jessica Tölke <jtoelke@mail.upb.de> | 2013-01-06 19:03:02 +0100 |
commit | 2f660ca694c0182353d2e0663e240a32f91135b8 (patch) | |
tree | aa025f1f2e9c248c71c3fa502212d90dc138477a /world/map/npc | |
parent | ea1ee652e8727640121e75b49936b4c484de3016 (diff) | |
download | serverdata-2f660ca694c0182353d2e0663e240a32f91135b8.tar.gz serverdata-2f660ca694c0182353d2e0663e240a32f91135b8.tar.bz2 serverdata-2f660ca694c0182353d2e0663e240a32f91135b8.tar.xz serverdata-2f660ca694c0182353d2e0663e240a32f91135b8.zip |
Tutorial: put setting the completed flag and resetting the used variables into a separate function.
Diffstat (limited to 'world/map/npc')
-rw-r--r-- | world/map/npc/022-1/tutorial.txt | 11 | ||||
-rw-r--r-- | world/map/npc/042-1/hasan.txt | 12 | ||||
-rw-r--r-- | world/map/npc/042-2/sorfina.txt | 6 |
3 files changed, 11 insertions, 18 deletions
diff --git a/world/map/npc/022-1/tutorial.txt b/world/map/npc/022-1/tutorial.txt index 1aafafdb..23a924f1 100644 --- a/world/map/npc/022-1/tutorial.txt +++ b/world/map/npc/022-1/tutorial.txt @@ -3,11 +3,16 @@ // if you enter the tutorial area from outside, it is set to be already done 022-1.gat,19,37,0|script|#tutorial|45,0,2{ - set FLAGS, FLAGS | FLAG_TUTORIAL_DONE; + callfunc "TutorialCompleted"; + warp "042-1.gat", 95, 69; + end; +} + +function|script|TutorialCompleted|{ set hasan, 0; set kaan, 0; set sorfina, 0; set tanisha, 0; - warp "042-1.gat", 95, 69; - end; + set FLAGS, FLAGS | FLAG_TUTORIAL_DONE; + return; } diff --git a/world/map/npc/042-1/hasan.txt b/world/map/npc/042-1/hasan.txt index bb4e1578..70b3a430 100644 --- a/world/map/npc/042-1/hasan.txt +++ b/world/map/npc/042-1/hasan.txt @@ -73,11 +73,7 @@ L_Pay: mes "He grins gloatingly."; mes "[Hasan]"; mes "\"Very well. You may pass.\""; - set hasan, 0; - set kaan, 0; - set sorfina, 0; - set tanisha, 0; - set FLAGS, FLAGS | FLAG_TUTORIAL_DONE; + callfunc "TutorialCompleted"; goto L_Close; L_Cheat: @@ -116,12 +112,8 @@ L_Thank: mes "\"Let me tell you a secret: Cool persons are allowed to pass for free."; mes "And you can have my Sharp Knife.\""; getitem "SharpKnife", 1; + callfunc "TutorialCompleted"; next; - set hasan, 0; - set kaan, 0; - set sorfina, 0; - set tanisha, 0; - set FLAGS, FLAGS | FLAG_TUTORIAL_DONE; mes "\"You want to go to the bazaar, right? Shall I tell you how to get there?\""; next; menu diff --git a/world/map/npc/042-2/sorfina.txt b/world/map/npc/042-2/sorfina.txt index f4b8b9f0..b1913efb 100644 --- a/world/map/npc/042-2/sorfina.txt +++ b/world/map/npc/042-2/sorfina.txt @@ -229,11 +229,7 @@ L_SkipTut: "Yeah, but thanks for the offer. Bye.",-; mes "[Sorfina]"; mes "\"Alright, if you say so. But take at least this."; - set hasan, 0; - set kaan, 0; - set sorfina, 0; - set tanisha, 0; - set FLAGS, FLAGS | FLAG_TUTORIAL_DONE; + callfunc "TutorialCompleted"; getitem "Knife", 1; getitem "CottonShirt", 1; set Zeny, Zeny + 50; |