diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2011-08-29 20:46:50 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2011-08-29 20:46:50 -0700 |
commit | d7fd267447ece85cb053b0af6ef3542b96b0372f (patch) | |
tree | 00162384ee32fe55f768d95f653248d124d6a6cd /world/map/npc | |
parent | 40c846c886402ddcae3e7af614a5c868f150b9b7 (diff) | |
download | serverdata-d7fd267447ece85cb053b0af6ef3542b96b0372f.tar.gz serverdata-d7fd267447ece85cb053b0af6ef3542b96b0372f.tar.bz2 serverdata-d7fd267447ece85cb053b0af6ef3542b96b0372f.tar.xz serverdata-d7fd267447ece85cb053b0af6ef3542b96b0372f.zip |
add pink hair color and rewrite the script
Diffstat (limited to 'world/map/npc')
-rw-r--r-- | world/map/npc/013-2/notes.txt | 10 | ||||
-rw-r--r-- | world/map/npc/functions/barber.txt | 129 | ||||
-rw-r--r-- | world/map/npc/items/scissors.txt | 2 | ||||
-rw-r--r-- | world/map/npc/items/shock_sweet.txt | 2 |
4 files changed, 82 insertions, 61 deletions
diff --git a/world/map/npc/013-2/notes.txt b/world/map/npc/013-2/notes.txt index dcc1123b..de1ccf61 100644 --- a/world/map/npc/013-2/notes.txt +++ b/world/map/npc/013-2/notes.txt @@ -15,7 +15,7 @@ mes "The early bird catcheth the worm."; close; } - + 013-2.gat,27,21,0 script Mirror 127,{ mes "You say: \"Mirror mirror on the wall, who has the nicest haircut of them all?\""; next; @@ -23,10 +23,10 @@ next; mes "Your looks suddenly change..."; next; - set @style,rand(6); - set @color,rand(9); - setlook 1,@style+1; - setlook 6,@color; + set @style, rand(20); + set @color, rand(12); + setlook LOOK_HAIR_STYLE, @style + 1; + setlook LOOK_HAIR_COLOR, @color + 1; close; } diff --git a/world/map/npc/functions/barber.txt b/world/map/npc/functions/barber.txt index 8d0a32e3..f4ad055d 100644 --- a/world/map/npc/functions/barber.txt +++ b/world/map/npc/functions/barber.txt @@ -1,63 +1,84 @@ -// +// The Barber script has been around since before the repository split +// so it's hard to figure out who wrote it. -function script Barber { - menu - "Change my style", L_Style, - "Change my color", L_Color, - "Nah, I'm fine", L_Done; +// o11c updated it according to new scripting standards while adding pink. - goto L_Done; +// Note: there is a soft limit of 12 colors (0-11) and 20 styles (0-19) +// This is the number that can be set when creating a character +// or using GM commands, but scripts (such as this one) can set +// any value 0-255 + +function|script|Barber|{ + // TODO do something like this, but with names + //set @style, getlook(LOOK_HAIR_STYLE); + //set @color, getlook(LOOK_HAIR_COLOR); + //mes "Your current style is " + @style + " and your current color is " + @color + "."; + + menu + "Change my style", L_Style, + "Change my color", L_Color, + "Nah, I'm fine", L_Done; L_Style: - menu - "Bald", -, - "Flat ponytail", -, - "Bowl cut", -, - "Combed back", -, - "Emo", -, - "Mohawk", -, - "Pompadour", -, - "Center parting/Short and slick", -, - "Long and slick", -, - "Short and curly", -, - "Pigtails", -, - "Long and curly", -, - "Parted", -, - "Perky ponytail", -, - "Wave", -, - "Mane", -, - "Bun", -, - "Shoulder Length Flick", -, - "Fizzy", -, - "Surprise me", -, - "Nah, I'm fine", L_Done; - -L_Process_Style: - set @style, @menu - 1; - if (@style == 19) set @style, rand(19); - setlook 1, @style; - return; + menu + "Bald", -, + "Flat ponytail", -, + "Bowl cut", -, + "Combed back", -, + "Emo", -, + "Mohawk", -, + "Pompadour", -, + "Center parting/Short and slick", -, + "Long and slick", -, + "Short and curly", -, + "Pigtails", -, + "Long and curly", -, + "Parted", -, + "Perky ponytail", -, + "Wave", -, + "Mane", -, + "Bun", -, + "Shoulder Length Flick", -, + "Fizzy", -, + // "Last normal style (currently displayed as bald)", -, + "Surprise me", L_RandomStyle, + "Nah, I'm fine", L_Done; + + setlook LOOK_HAIR_STYLE, @menu - 1; + goto L_Done; + +L_RandomStyle: + setlook LOOK_HAIR_STYLE, rand(20); + goto L_Done; L_Color: - menu - "Brunette", -, - "Green", -, - "Dark red", -, - "Light purple", -, - "Gray", -, - "Blonde", -, - "Teal", -, - "Light red", -, - "Blue", -, - "Dark purple", -, - "Black", -, - "Surprise me", -, - "Nah, I'm fine", L_Done; - set @color, @menu - 1; - if (@color == 11) set @color, rand(11); - setlook 6, @color; - return; + menu + "Brunette", -, + "Green", -, + "Dark red", -, + "Light purple", -, + "Gray", -, + "Blonde", -, + "Teal", -, + "Light red", -, + "Blue", -, + "Dark purple", -, + "Black", -, + "Pink", -, + "Surprise me", L_RandomColor, + "Nah, I'm fine", L_Done; + + setlook LOOK_HAIR_COLOR, @menu - 1; + goto L_Done; + +L_RandomColor: + setlook LOOK_HAIR_COLOR, rand(12); + goto L_Done; L_Done: - return; + // cleanup + set @menu, 0; + //set @style, 0; + //set @color, 0; + return; } diff --git a/world/map/npc/items/scissors.txt b/world/map/npc/items/scissors.txt index 0e10453c..b806bb33 100644 --- a/world/map/npc/items/scissors.txt +++ b/world/map/npc/items/scissors.txt @@ -7,7 +7,7 @@ function script useScissors { end; L_Change: - setlook 1, rand(19); + setlook LOOK_HAIR_STYLE, rand(20); getitem "Scissors", 1; end; } diff --git a/world/map/npc/items/shock_sweet.txt b/world/map/npc/items/shock_sweet.txt index 3fc6d8e0..8255ee9b 100644 --- a/world/map/npc/items/shock_sweet.txt +++ b/world/map/npc/items/shock_sweet.txt @@ -6,7 +6,7 @@ function script useShockSweet { end; L_Change: - setlook 6, 127; + setlook LOOK_HAIR_COLOR, HC_WHITE; message strcharinfo(0), "Gah! That was some strong stuff!"; sc_start sc_poison, 1, 20; misceffect 15, strcharinfo(0); |