From c13f503a7a49410c410eb85fe5922b307c836aaf Mon Sep 17 00:00:00 2001 From: Reid Date: Fri, 5 Aug 2016 06:18:34 +0200 Subject: Add 001-2-41 (Edouard's house) and improve the barber system. --- conf/maps.conf | 1 + db/map_index.txt | 1 + db/re/map_cache.dat | Bin 10176 -> 10281 bytes npc/001-2-29/_import.txt | 1 - npc/001-2-29/edouard.txt | 77 --------------------- npc/001-2-31/_warps.txt | 1 + npc/001-2-41/_import.txt | 4 ++ npc/001-2-41/_warps.txt | 2 + npc/001-2-41/edouard.txt | 169 ++++++++++++++++++++++++++++++++++++++++++++++ npc/001-2-41/mapflags.txt | 1 + npc/_import.txt | 1 + 11 files changed, 180 insertions(+), 78 deletions(-) delete mode 100644 npc/001-2-29/edouard.txt create mode 100644 npc/001-2-41/_import.txt create mode 100644 npc/001-2-41/_warps.txt create mode 100644 npc/001-2-41/edouard.txt create mode 100644 npc/001-2-41/mapflags.txt diff --git a/conf/maps.conf b/conf/maps.conf index 97b01cad..a3470c7b 100644 --- a/conf/maps.conf +++ b/conf/maps.conf @@ -50,4 +50,5 @@ map: 001-2-38 map: 000-2-4 map: 001-2-39 map: 001-2-40 +map: 001-2-41 map: 000-0-1 diff --git a/db/map_index.txt b/db/map_index.txt index 1391a8bb..7ecd699e 100644 --- a/db/map_index.txt +++ b/db/map_index.txt @@ -51,3 +51,4 @@ testbg 38 001-2-39 51 001-2-40 52 000-0-1 53 +001-2-41 54 diff --git a/db/re/map_cache.dat b/db/re/map_cache.dat index 486cbfbe..49cbd41b 100644 Binary files a/db/re/map_cache.dat and b/db/re/map_cache.dat differ diff --git a/npc/001-2-29/_import.txt b/npc/001-2-29/_import.txt index 576e384f..6c0280cc 100644 --- a/npc/001-2-29/_import.txt +++ b/npc/001-2-29/_import.txt @@ -1,5 +1,4 @@ // Map 001-2-29: Artis, Red Plush Inn, First Floor npc: npc/001-2-29/_warps.txt -npc: npc/001-2-29/edouard.txt npc: npc/001-2-29/mapflags.txt npc: npc/001-2-29/savepoint.txt diff --git a/npc/001-2-29/edouard.txt b/npc/001-2-29/edouard.txt deleted file mode 100644 index 2cd948df..00000000 --- a/npc/001-2-29/edouard.txt +++ /dev/null @@ -1,77 +0,0 @@ -// Evol scripts. -// Authors: -// Reid -// Travolta -// Description: -// Barber of Aemil, should be placed on the 29th indoor but it's still a WIP - -001-2-29,37,31,0 script Edouard#001-2-29 NPC_EDOUARD,{ - - function tellStory { - if (Edouard_StoryTold != 0) - { - mes ""; - mesn; - } - speech 12, - l("I am new in this town, just like you are."), - l("I came here, looking for a better life."), - l("I still didn't find a cheap building to open my own business, so for now I will stay in this inn."), - l("I'm a barber, you see. I can change your hair style or color to your liking."); - - Edouard_StoryTold = 1; - - return; - } - - speech 4, - lg("Hello, young lady.", "Hello, young man."); - - if (Edouard_StoryTold == 0) - tellStory; - - speech 12, - l("What would you like me to do?"); - - do - { - menuint - l("What is my current hairstyle and hair color?"), 1, - l("I'd like to get a different style."), 2, - l("Can you do something with my color?"), 3, - l("What's your story again?"), 4, - l("I'm fine for now, thank you."), 5; - - switch (@menuret) - { - case 1: - BarberSayStyle 3; - break; - case 2: - BarberChangeStyle; - speech 5, - l("Enjoy your new style."); - l("Anything else?"); - break; - case 3: - BarberChangeColor; - speech 5, - l("I hope you like this color."); - l("Anything else?"); - break; - case 4: - tellStory; - break; - case 5: - speech 5, - l("Feel free to come visit me another time."); - - goodbye; - } - } while (1); - -OnInit: - .sex = G_MALE; - .distance = 2; - end; -} diff --git a/npc/001-2-31/_warps.txt b/npc/001-2-31/_warps.txt index b04452d3..e085d649 100644 --- a/npc/001-2-31/_warps.txt +++ b/npc/001-2-31/_warps.txt @@ -1,2 +1,3 @@ // Map 001-2-31: 001-2-31,32,40,0 warp ToArtis#001-2-31 0,0,001-1,49,97 +001-2-31,36,32,0 warp ToBarber#001-2-31 0,0,001-2-41,25,32 diff --git a/npc/001-2-41/_import.txt b/npc/001-2-41/_import.txt new file mode 100644 index 00000000..22042e39 --- /dev/null +++ b/npc/001-2-41/_import.txt @@ -0,0 +1,4 @@ +// Map 001-2-41: +npc: npc/001-2-41/_warps.txt +npc: npc/001-2-41/mapflags.txt +npc: npc/001-2-41/edouard.txt diff --git a/npc/001-2-41/_warps.txt b/npc/001-2-41/_warps.txt new file mode 100644 index 00000000..48ff7b05 --- /dev/null +++ b/npc/001-2-41/_warps.txt @@ -0,0 +1,2 @@ +// Map 001-2-41: +001-2-41,24,32,0 warp ToHall#001-2-41 0,0,001-2-31,35,32 diff --git a/npc/001-2-41/edouard.txt b/npc/001-2-41/edouard.txt new file mode 100644 index 00000000..aba5367c --- /dev/null +++ b/npc/001-2-41/edouard.txt @@ -0,0 +1,169 @@ +// Evol scripts. +// Authors: +// Reid +// Travolta +// Description: +// Barber of Aemil + +function script EdouardCheckChair { + + getmapxy(.@map$, .@x, .@y, UNITTYPE_PC); + + if ((.@map$ != getarg(0)) || (.@x != getarg(1)) || (.@y != getarg(2))) + { + doevent "Edouard#001-2-41::OnWrongPlace"; + } + else if (!issit()) + { + doevent "Edouard#001-2-41::OnNotSit"; + } + else + { + doevent "Edouard#001-2-41::OnChair"; + } + + close; +} + +001-2-41,29,23,0 script Chair#Chair1-001-2-41 NPC_NO_SPRITE,{ + + EdouardCheckChair .map$, .x, .y; + +OnInit: + .sex = G_OTHER; + .distance = 1; + end; +} + +001-2-41,31,23,0 script Chair#Chair2-001-2-41 NPC_NO_SPRITE,{ + + EdouardCheckChair .map$, .x, .y; + +OnInit: + .sex = G_OTHER; + .distance = 1; + end; +} + +001-2-41,35,27,0 script Chair#Chair3-001-2-41 NPC_NO_SPRITE,{ + + EdouardCheckChair .map$, .x, .y; + +OnInit: + .sex = G_OTHER; + .distance = 1; + end; +} + +001-2-41,35,29,0 script Chair#Chair4-001-2-41 NPC_NO_SPRITE,{ + + EdouardCheckChair .map$, .x, .y; + +OnInit: + .sex = G_OTHER; + .distance = 1; + end; +} + +001-2-41,35,35,0 script Chair#Chair5-001-2-41 NPC_NO_SPRITE,{ + + EdouardCheckChair .map$, .x, .y; + +OnInit: + .sex = G_OTHER; + .distance = 1; + end; +} + +001-2-41,35,37,0 script Chair#Chair6-001-2-41 NPC_NO_SPRITE,{ + + EdouardCheckChair .map$, .x, .y; + +OnInit: + .sex = G_OTHER; + .distance = 1; + end; +} + +001-2-41,30,29,0 script Edouard#001-2-41 NPC_EDOUARD,{ + + function tellStory { + if (Edouard_StoryTold != 0) + { + mes ""; + mesn; + } + speech 12, + l("I am new in this town, just like you are."), + l("I came here, looking for a better life."), + l("And so far, the Merchant Guild helped me to find this appartment so I don't complain!"), + l("Anyway."), + l("I'm a barber, you see. I can change your hair style or color to your liking."); + + Edouard_StoryTold = 1; + + return; + } + +OnWrongPlace: + npctalkonce ("Sit on the chair I will come in a second!"); + close; + +OnNotSit: + npctalkonce ("Please sit."); + close; + +OnChair: + speech 4, + lg("Hello, young lady.", "Hello, young man."); + + if (Edouard_StoryTold == 0) + { + tellStory; + } + + speech 12, + l("What would you like me to do?"); + + do + { + menuint + l("What is my current hairstyle and hair color?"), 1, + l("I'd like to get a different style."), 2, + l("Can you do something with my color?"), 3, + l("What's your story again?"), 4, + l("I'm fine for now, thank you."), 5; + + switch (@menuret) + { + case 1: + BarberSayStyle 3; + break; + case 2: + BarberChangeStyle; + speech 5, + l("Enjoy your new style."); + l("Anything else?"); + break; + case 3: + BarberChangeColor; + speech 5, + l("I hope you like this color."); + l("Anything else?"); + break; + case 4: + tellStory; + break; + case 5: + speech 5, + l("Feel free to come visit me another time."); + + goodbye; + } + } while (1); + +OnInit: + .sex = G_MALE; + .distance = 2; + end; +} diff --git a/npc/001-2-41/mapflags.txt b/npc/001-2-41/mapflags.txt new file mode 100644 index 00000000..eb1b712b --- /dev/null +++ b/npc/001-2-41/mapflags.txt @@ -0,0 +1 @@ +001-2-41 mapflag town diff --git a/npc/_import.txt b/npc/_import.txt index d3509117..0f66b8c0 100644 --- a/npc/_import.txt +++ b/npc/_import.txt @@ -49,5 +49,6 @@ import: npc/001-2-37/_import.txt import: npc/001-2-38/_import.txt import: npc/001-2-39/_import.txt import: npc/001-2-40/_import.txt +import: npc/001-2-41/_import.txt import: npc/test/_import.txt import: npc/testbg/_import.txt -- cgit v1.2.3-60-g2f50