diff options
Diffstat (limited to 'world')
-rw-r--r-- | world/map/conf/magic-quickdebug.sex | 3 | ||||
-rw-r--r-- | world/map/data/001-1.wlk | bin | 19042 -> 19042 bytes | |||
-rw-r--r-- | world/map/data/021-1.wlk | bin | 29908 -> 29908 bytes | |||
-rw-r--r-- | world/map/data/022-1.wlk | bin | 19354 -> 19354 bytes | |||
-rw-r--r-- | world/map/data/024-1.wlk | bin | 14522 -> 14522 bytes | |||
-rw-r--r-- | world/map/data/042-1.wlk | bin | 22564 -> 22564 bytes | |||
-rw-r--r-- | world/map/db/const.txt | 2 | ||||
-rw-r--r-- | world/map/db/generic_item_db.txt | 1 | ||||
-rw-r--r-- | world/map/db/trinket_item_db.txt | 2 | ||||
-rw-r--r-- | world/map/db/use_item_db.txt | 25 | ||||
-rw-r--r-- | world/map/npc/001-1/_warps.txt | 4 | ||||
-rw-r--r-- | world/map/npc/013-2/notes.txt | 6 | ||||
-rw-r--r-- | world/map/npc/021-1/_warps.txt | 16 | ||||
-rw-r--r-- | world/map/npc/042-1/_warps.txt | 8 | ||||
-rw-r--r-- | world/map/npc/functions/barber.txt | 156 | ||||
-rwxr-xr-x | world/map/npc/functions/debug.txt | 24 | ||||
-rw-r--r-- | world/map/npc/functions/headstyles.txt | 41 | ||||
-rw-r--r-- | world/map/npc/items/mirror.txt | 20 | ||||
-rw-r--r-- | world/map/npc/scripts.conf | 2 |
19 files changed, 192 insertions, 118 deletions
diff --git a/world/map/conf/magic-quickdebug.sex b/world/map/conf/magic-quickdebug.sex index 8b6e5939..63ff5ada 100644 --- a/world/map/conf/magic-quickdebug.sex +++ b/world/map/conf/magic-quickdebug.sex @@ -1,3 +1,6 @@ "--------------------------------------------------------------------------------" "Quickdebug Spells" "--------------------------------------------------------------------------------" +(SPELL (NONMAGIC SILENT) debug0 "#debug" () + (EFFECT + (SCRIPT "{if(!debug)end;callfunc \"Debug\";}"))) diff --git a/world/map/data/001-1.wlk b/world/map/data/001-1.wlk Binary files differindex 9050ad38..05f949c1 100644 --- a/world/map/data/001-1.wlk +++ b/world/map/data/001-1.wlk diff --git a/world/map/data/021-1.wlk b/world/map/data/021-1.wlk Binary files differindex e7afe900..af614879 100644 --- a/world/map/data/021-1.wlk +++ b/world/map/data/021-1.wlk diff --git a/world/map/data/022-1.wlk b/world/map/data/022-1.wlk Binary files differindex f84df1d7..ae5f314d 100644 --- a/world/map/data/022-1.wlk +++ b/world/map/data/022-1.wlk diff --git a/world/map/data/024-1.wlk b/world/map/data/024-1.wlk Binary files differindex 26d6e3fc..c15f1d51 100644 --- a/world/map/data/024-1.wlk +++ b/world/map/data/024-1.wlk diff --git a/world/map/data/042-1.wlk b/world/map/data/042-1.wlk Binary files differindex ccd506c8..da320f7e 100644 --- a/world/map/data/042-1.wlk +++ b/world/map/data/042-1.wlk diff --git a/world/map/db/const.txt b/world/map/db/const.txt index 52752c1d..90118b47 100644 --- a/world/map/db/const.txt +++ b/world/map/db/const.txt @@ -17,7 +17,7 @@ MaxSp 8 1 //StatusPoint 9 1 BaseLevel 11 1 //SkillPoint 12 1 -//Class 19 1 +Class 19 1 Zeny 20 1 Sex 21 1 //NextBaseExp 22 1 diff --git a/world/map/db/generic_item_db.txt b/world/map/db/generic_item_db.txt index 0b3732dc..efae1569 100644 --- a/world/map/db/generic_item_db.txt +++ b/world/map/db/generic_item_db.txt @@ -186,7 +186,6 @@ 2258, PurpleCottonCloth, Purple Cotton Cloth, 3, 400, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {} 2259, DarkGreenCottonCloth, Dark Green Cotton Cloth, 3, 400, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {} 3000, JackOLantern, Jack-o-Lantern, 3, 200, 100, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {} -3001, RubberBat, Rubber Bat, 3, 200, 100, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {} 3002, RealisticBrain, Realistic Brain, 3, 200, 100, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {} 3003, JarofBlood, Jar of Blood, 3, 200, 100, 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {} 3004, Tongue, Tongue, 3, 5, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {} diff --git a/world/map/db/trinket_item_db.txt b/world/map/db/trinket_item_db.txt index 81c2863d..f3b77bc9 100644 --- a/world/map/db/trinket_item_db.txt +++ b/world/map/db/trinket_item_db.txt @@ -11,7 +11,7 @@ 865, Grimoire, Grimoire, 5, 5000, 2500, 100, 0, 0, 0, 5, 0, 2, 8, 0, 0, 0, {}, {bonus bMaxSP, 30;} 879, HeartOfIsis, Heart of Isis, 5, 70000, 35000, 40, 0, 0, 0, 0, 0, 2, 8, 0, 85, 0, {}, {bonus bMaxHPrate, 15; bonus bHPrecovRate, 65;} 1197, SkeletonCharm, Skeleton Charm, 5, 0, 0, 10, 0, 0, 0, 0, 0, 2, 8, 0, 0, 0, {}, { callfunc "CheckMunro"; } -1244, DarkTalisman, Dark Talisman, 5, 0, 0, 0, 0, 30, 0, 100, 0, 2, 8, 0, 0, 0, {}, {set@minLvl, 1;callfunc "RestrictedItem"; set @val, getopt2; if(!(@val&1024))setopt2 getopt2 | 1024; bonus bMaxHp, 30000; bonus bFlee, -150;} +1244, DarkTalisman, Dark Talisman, 5, 0, 0, 0, 0, 30, 0, 100, 0, 2, 8, 0, 0, 0, {}, {set @minLvl, 1;callfunc "RestrictedItem";} 4008, DiamondRing, Diamond Ring, 5, 5000, 2500, 1, 0, 0, 0, 0, 0, 2, 128, 0, 0, 0, {}, {bonus bVit, 1;} 4009, RubyRing, Ruby Ring, 5, 5000, 2500, 1, 0, 0, 0, 0, 0, 2, 128, 0, 0, 0, {}, {bonus bStr, 1;} 4010, EmeraldRing, Emerald Ring, 5, 5000, 2500, 1, 0, 0, 0, 0, 0, 2, 128, 0, 0, 0, {}, {bonus bLuk, 1;} diff --git a/world/map/db/use_item_db.txt b/world/map/db/use_item_db.txt index 7f7ad2c6..0e5f3bde 100644 --- a/world/map/db/use_item_db.txt +++ b/world/map/db/use_item_db.txt @@ -54,17 +54,17 @@ 788, BeetleJuice, Beetle Juice, 0, 80, 30, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 50, 0;}, {} 789, GutBuster, Gut Buster Ale, 0, 100, 30, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 60, 0;}, {} 790, BloodWine, Blood Wine, 0, 150, 50, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 100, 0;}, {} -808, HitchhikersTowel, Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "HitchhikersTowel"; callfunc "WarpTowel";}, {} -809, WhiteHitchhikersTowel, White Hitchhiker's Towe, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "WhiteHitchhikersTowel"; callfunc "WarpTowel";}, {} -810, RedHitchhikersTowel, Red Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "RedHitchhikersTowel"; callfunc "WarpTowel";}, {} -811, GreenHitchhikersTowel, Green Hitchhiker's Towe, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "GreenHitchhikersTowel"; callfunc "WarpTowel";}, {} -812, BlueHitchhikersTowel, Blue Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "BlueHitchhikersTowel"; callfunc "WarpTowel";}, {} -813, YellowHitchhikersTowel, Yellow Hitchhiker's Tow, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "YellowHitchhikersTowel"; callfunc "WarpTowel";}, {} -814, PurpleHitchhikersTowel, Purple Hitchhiker's Tow, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "PurpleHitchhikersTowel"; callfunc "WarpTowel";}, {} -815, OrangeHitchhikersTowel, Orange Hitchhiker's Tow, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "OrangeHitchhikersTowel"; callfunc "WarpTowel";}, {} -816, PinkHitchhikersTowel, Pink Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "PinkHitchhikersTowel"; callfunc "WarpTowel";}, {} -817, TealHitchhikersTowel, Teal Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "TealHitchhikersTowel"; callfunc "WarpTowel";}, {} -818, LimeHitchhikersTowel, Lime Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "LimeHitchhikersTowel"; callfunc "WarpTowel";}, {} +808, HitchhikersTowel, Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "HitchhikersTowel"; callfunc "WarpTowel";}, {} +809, WhiteHitchhikersTowel, White Hitchhiker's Towe, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "WhiteHitchhikersTowel"; callfunc "WarpTowel";}, {} +810, RedHitchhikersTowel, Red Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "RedHitchhikersTowel"; callfunc "WarpTowel";}, {} +811, GreenHitchhikersTowel, Green Hitchhiker's Towe, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "GreenHitchhikersTowel"; callfunc "WarpTowel";}, {} +812, BlueHitchhikersTowel, Blue Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "BlueHitchhikersTowel"; callfunc "WarpTowel";}, {} +813, YellowHitchhikersTowel, Yellow Hitchhiker's Tow, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "YellowHitchhikersTowel"; callfunc "WarpTowel";}, {} +814, PurpleHitchhikersTowel, Purple Hitchhiker's Tow, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "PurpleHitchhikersTowel"; callfunc "WarpTowel";}, {} +815, OrangeHitchhikersTowel, Orange Hitchhiker's Tow, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "OrangeHitchhikersTowel"; callfunc "WarpTowel";}, {} +816, PinkHitchhikersTowel, Pink Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "PinkHitchhikersTowel"; callfunc "WarpTowel";}, {} +817, TealHitchhikersTowel, Teal Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "TealHitchhikersTowel"; callfunc "WarpTowel";}, {} +818, LimeHitchhikersTowel, Lime Hitchhiker's Towel, 0, 0, 0, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {set @warpTowelName$, "LimeHitchhikersTowel"; callfunc "WarpTowel";}, {} 825, TinyManaElixir, Tiny Mana Elixir, 0, 100, 10, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 0, 25;}, {} 826, SmallManaElixir, Small Mana Elixir, 0, 200, 20, 10, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 0, 50;}, {} 827, MediumManaElixir, Medium Mana Elixir, 0, 400, 40, 15, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 0, 100;}, {} @@ -85,11 +85,12 @@ 1258, Honey, Honey, 0, 100, 80, 20, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 45, 0;}, {} 1280, Scissors, Scissors, 0, 1000, 500, 120, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {callfunc "useScissors";}, {} 1281, ShockSweet, Shock Sweet, 0, 1000, 500, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {callfunc "useShockSweet";}, {} +3001, RubberBat, Rubber Bat, 0, 200, 100, 30, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {misceffect 403;getitem 3001,1;}, {} 3006, TonoriDelight, Tonori Delight, 0, 5, 1, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 10, 0;}, {} 3007, Marshmallow, Marshmallow, 0, 5, 1, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 10, 0;}, {} 3009, JellySkull, Jelly Skull, 0, 5, 1, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 10, 0;}, {} 3010, CandyPumpkin, Candy Pumpkin, 0, 5, 1, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 10, 0;}, {} 4035, PickledBeets, Pickled Beets, 0, 100, 50, 150, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 50, 0; setlook LOOK_HAIR_COLOR, HC_PURPLE;}, {} 4036, RoastedAcorn, Roasted Acorn, 0, 100, 50, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 15, 0;}, {} -5126, MTJarofOwnBlood, MTJar of Own Blood, 0, 200, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {itemheal -250, 0;getitem 5127, 1;}, {} +5126, MTJarofOwnBlood, MTJar of Own Blood, 0, 200, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {itemheal -250, 0;getitem 5127, 1;}, {} //ID, Name___________________, Label__________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript} diff --git a/world/map/npc/001-1/_warps.txt b/world/map/npc/001-1/_warps.txt index a15050cf..d113ba85 100644 --- a/world/map/npc/001-1/_warps.txt +++ b/world/map/npc/001-1/_warps.txt @@ -4,5 +4,5 @@ 001-1.gat,44,87|warp|To Sandstorm Desert|3,-1,002-1.gat,58,14 001-1.gat,44,20|warp|To North Tulimshar|3,-1,021-1.gat,55,145 001-1.gat,125,21|warp|To North Tulimshar|0,-1,021-1.gat,136,146 -001-1.gat,32,71|warp|To Tulimshar Indoor|-1,-1,001-2.gat,25,34 -001-1.gat,75,41|warp|To Tulimshar Indoor|-1,-1,001-2.gat,71,72 +001-1.gat,32,70|warp|To Tulimshar Indoor|-1,-1,001-2.gat,25,34 +001-1.gat,75,40|warp|To Tulimshar Indoor|-1,-1,001-2.gat,71,72 diff --git a/world/map/npc/013-2/notes.txt b/world/map/npc/013-2/notes.txt index 9b9f46dc..c8b386bd 100644 --- a/world/map/npc/013-2/notes.txt +++ b/world/map/npc/013-2/notes.txt @@ -27,10 +27,8 @@ next; mes "Your looks suddenly change..."; next; - set @style, rand(20); - set @color, rand(12); - setlook LOOK_HAIR_STYLE, @style; - setlook LOOK_HAIR_COLOR, @color + 1; + set @fixedMirror, 1; + callfunc "useMirror"; close; } diff --git a/world/map/npc/021-1/_warps.txt b/world/map/npc/021-1/_warps.txt index 429a522f..daa1a89d 100644 --- a/world/map/npc/021-1/_warps.txt +++ b/world/map/npc/021-1/_warps.txt @@ -8,18 +8,18 @@ 021-1.gat,135,119|warp|To Tulimshar Musuem|-1,-1,021-2.gat,90,177 021-1.gat,55,146|warp|To South Tulimshar|3,-1,001-1.gat,44,21 021-1.gat,136,147|warp|To South Tulimshar|0,-1,001-1.gat,125,22 -021-1.gat,53,134|warp|To Government Building|-1,-1,021-2.gat,27,29 -021-1.gat,55,134|warp|To Government Building|-1,-1,021-2.gat,33,29 -021-1.gat,57,134|warp|To Government Building|-1,-1,021-2.gat,39,29 -021-1.gat,103,100|warp|To Tulimshar Bakery|-1,-1,021-2.gat,91,27 +021-1.gat,53,133|warp|To Government Building|-1,-1,021-2.gat,27,29 +021-1.gat,55,133|warp|To Government Building|-1,-1,021-2.gat,33,29 +021-1.gat,57,133|warp|To Government Building|-1,-1,021-2.gat,39,29 +021-1.gat,103,99|warp|To Tulimshar Bakery|-1,-1,021-2.gat,91,27 021-1.gat,103,96|warp|To Bakery|-1,-1,021-2.gat,122,23 021-1.gat,49,64|warp|To Tulimshar Canyon|3,-1,024-1.gat,86,73 -021-1.gat,53,99|warp|To Wizard's Rest|-1,-1,021-2.gat,25,66 +021-1.gat,53,98|warp|To Wizard's Rest|-1,-1,021-2.gat,25,66 021-1.gat,52,95|warp|To Wizard's Rest|-1,-1,021-2.gat,70,63 021-1.gat,73,22|warp|To Tulimshar Port|3,-1,022-1.gat,73,109 021-1.gat,113,22|warp|To Tulimshar Port|3,-1,022-1.gat,113,109 -021-1.gat,132,31|warp|To Tulimshar Forge|-1,-1,021-2.gat,79,138 +021-1.gat,132,30|warp|To Tulimshar Forge|-1,-1,021-2.gat,79,138 021-1.gat,133,24|warp|To Tulimshar Forge|-1,-1,021-2.gat,75,92 021-1.gat,125,27|warp|To Tulimshar Forge|-1,-1,021-2.gat,124,68 -021-1.gat,125,31|warp|To Tulimshar Forge|-1,-1,021-2.gat,72,138 -021-1.gat,43,110|warp|To Store|-1,-1,021-2.gat,28,129 +021-1.gat,125,30|warp|To Tulimshar Forge|-1,-1,021-2.gat,72,138 +021-1.gat,43,109|warp|To Store|-1,-1,021-2.gat,28,129 diff --git a/world/map/npc/042-1/_warps.txt b/world/map/npc/042-1/_warps.txt index 8c1043ea..b8e20944 100644 --- a/world/map/npc/042-1/_warps.txt +++ b/world/map/npc/042-1/_warps.txt @@ -3,12 +3,12 @@ 042-1.gat,97,41|warp|To Tulismhar Docks|-1,2,022-1.gat,21,37 042-1.gat,65,20|warp|To Lighthouse Beach|0,-1,023-1.gat,64,143 -042-1.gat,91,73|warp|To Store House|-1,-1,042-2.gat,22,92 -042-1.gat,104,73|warp|To Store House|-1,-1,042-2.gat,44,92 -042-1.gat,65,75|warp|To Tulimshar Suburbs House|-1,-1,042-2.gat,29,61 +042-1.gat,91,72|warp|To Store House|-1,-1,042-2.gat,22,92 +042-1.gat,104,72|warp|To Store House|-1,-1,042-2.gat,44,92 +042-1.gat,65,74|warp|To Tulimshar Suburbs House|-1,-1,042-2.gat,29,61 042-1.gat,62,42|warp|To Sorfina's Dinner|-1,-1,042-2.gat,112,85 042-1.gat,51,43|warp|To Sorfina's House|-1,-1,042-2.gat,44,30 -042-1.gat,117,102|warp|To Magic School Research|-1,-1,042-2.gat,103,62 +042-1.gat,117,101|warp|To Magic School Research|-1,-1,042-2.gat,103,62 042-1.gat,112,95|warp|To Magic School Research|-1,-1,042-2.gat,94,54 042-1.gat,120,95|warp|To Magic School Research|-1,-1,042-2.gat,112,54 042-1.gat,117,85|warp|To Tulismhar Docks|-1,-1,022-1.gat,49,82 diff --git a/world/map/npc/functions/barber.txt b/world/map/npc/functions/barber.txt index 76b06dd7..0f9b4ffb 100644 --- a/world/map/npc/functions/barber.txt +++ b/world/map/npc/functions/barber.txt @@ -11,100 +11,124 @@ function|script|Barber|, { + callfunc "getHeadStyles"; + goto L_Main; + +L_Main: set @style, getlook(LOOK_HAIR_STYLE); set @color, getlook(LOOK_HAIR_COLOR); - set @style$, "Unknown"; set @color$, "Unknown"; if (@style >= 0 && @style < 20) - set @style$, $@HairStyles$[@style]; - if (@color >= 0 && @color < 20) - set @color$, $@HairColors$[@color]; + set @style$, @HairStyles$[@style]; + if (@color >= 0 && @color < 120) + set @color$, @HairColors$[@color]; if (@color == 127) set @color$, "Shocked White"; - mes "Your current style is " + @style$ + " and your current color is " + @color$ + "."; set @style$, ""; set @color$, ""; - goto L_Main; - -L_Main: menu "Change my style", L_Style, "Change my color", L_Color, "Nah, I'm fine", L_Done; L_Style: + if(!@hairOpts) set @HairStyles$[getarraysize(@HairStyles$)], "Surprise me"; + if(!@hairOpts) set @HairStyles$[getarraysize(@HairStyles$)], "Nah, I'm fine"; + if(!@hairOpts) set @hairOpts, 1; menu - "Bald", L_MenuItems, - "Flat ponytail", L_MenuItems, - "Bowl cut", L_MenuItems, - "Combed back", L_MenuItems, - "Emo", L_MenuItems, - "Mohawk", L_MenuItems, - "Pompadour", L_MenuItems, - "Center parting/Short and slick", L_MenuItems, - "Long and slick", L_MenuItems, - "Short and curly", L_MenuItems, - "Pigtails", L_MenuItems, - "Long and curly", L_MenuItems, - "Parted", L_MenuItems, - "Perky ponytail", L_MenuItems, - "Wave", L_MenuItems, - "Mane", L_MenuItems, - "Bun", L_MenuItems, - "Shoulder Length Flick", L_MenuItems, - "Fizzy", L_MenuItems, - "Long and Clipped", L_MenuItems, - "Surprise me", L_RandomStyle, - "Nah, I'm fine", L_Done; + @HairStyles$[0], L_MenuItems, + @HairStyles$[1], L_MenuItems, + @HairStyles$[2], L_MenuItems, + @HairStyles$[3], L_MenuItems, + @HairStyles$[4], L_MenuItems, + @HairStyles$[5], L_MenuItems, + @HairStyles$[6], L_MenuItems, + @HairStyles$[7], L_MenuItems, + @HairStyles$[8], L_MenuItems, + @HairStyles$[9], L_MenuItems, + @HairStyles$[10], L_MenuItems, + @HairStyles$[11], L_MenuItems, + @HairStyles$[12], L_MenuItems, + @HairStyles$[13], L_MenuItems, + @HairStyles$[14], L_MenuItems, + @HairStyles$[15], L_MenuItems, + @HairStyles$[16], L_MenuItems, + @HairStyles$[17], L_MenuItems, + @HairStyles$[18], L_MenuItems, + @HairStyles$[19], L_MenuItems, + @HairStyles$[20], L_MenuItems, + @HairStyles$[21], L_MenuItems, + @HairStyles$[22], L_MenuItems, + @HairStyles$[23], L_MenuItems, + @HairStyles$[24], L_MenuItems, + @HairStyles$[25], L_MenuItems; L_MenuItems: if (@menu - 1 == @style) goto L_SameStyle; - + if(@menu == (getarraysize(@HairStyles$) - 1)) goto L_RandomStyle; + if(@menu == getarraysize(@HairStyles$)) goto L_Done; setlook LOOK_HAIR_STYLE, @menu - 1; - goto L_Done; + goto L_Main; L_RandomStyle: - setlook LOOK_HAIR_STYLE, rand(20); - goto L_Done; + set @randomStyle, rand(0, (getarraysize(@HairStyles$) -4)); + if(@randomStyle == @style) goto L_RandomStyle; + setlook LOOK_HAIR_STYLE, @randomStyle; + menu + "Surprise me once again", L_RandomStyle, + "Go back", L_Main, + "Goodbye", L_Done; L_SameStyle: mes "Your hair already has that style."; goto L_Main; L_Color: + if(@style == Class) goto L_SameColor; // first headstyle of any class is bald + if(!@colorOpts) set @HairColors$[getarraysize(@HairColors$)], "Surprise me"; + if(!@colorOpts) set @HairColors$[getarraysize(@HairColors$)], "Nah, I'm fine"; + if(!@colorOpts) set @colorOpts, 1; menu - "Brunette", L_MenuItems1, - "Green", L_MenuItems1, - "Dark red", L_MenuItems1, - "Light purple", L_MenuItems1, - "Gray", L_MenuItems1, - "Blonde", L_MenuItems1, - "Teal", L_MenuItems1, - "Light red", L_MenuItems1, - "Blue", L_MenuItems1, - "Dark purple", L_MenuItems1, - "Black", L_MenuItems1, - "Pink", L_MenuItems1, - "Brown", L_MenuItems1, - "Surprise me", L_RandomColor, - "Nah, I'm fine", L_Done; + @HairColors$[0], L_MenuItems1, + @HairColors$[1], L_MenuItems1, + @HairColors$[2], L_MenuItems1, + @HairColors$[3], L_MenuItems1, + @HairColors$[4], L_MenuItems1, + @HairColors$[5], L_MenuItems1, + @HairColors$[6], L_MenuItems1, + @HairColors$[7], L_MenuItems1, + @HairColors$[8], L_MenuItems1, + @HairColors$[9], L_MenuItems1, + @HairColors$[10], L_MenuItems1, + @HairColors$[11], L_MenuItems1, + @HairColors$[12], L_MenuItems1, + @HairColors$[13], L_MenuItems1, + @HairColors$[14], L_MenuItems1, + @HairColors$[15], L_MenuItems1, + @HairColors$[16], L_MenuItems1; L_MenuItems1: if (@menu - 1 == @color) goto L_SameColor; - - setlook LOOK_HAIR_COLOR, @menu - 1; - goto L_Done; + if(@menu == (getarraysize(@HairColors$) - 1)) goto L_RandomColor; + if(@menu == getarraysize(@HairColors$)) goto L_Done; + setlook LOOK_HAIR_COLOR, ((@menu - 1) + (15 * Class)); + goto L_Main; L_RandomColor: - setlook LOOK_HAIR_COLOR, rand(13); - goto L_Done; + set @randomColor, rand((15 * Class), ((getarraysize(@HairColors$) -4) + (15 * Class))); + if(@randomColor == @color) goto L_RandomColor; + setlook LOOK_HAIR_COLOR, @randomColor; + menu + "Surprise me once again", L_RandomColor, + "Go back", L_Main, + "Goodbye", L_Done; L_SameColor: - mes "Your hair is already that color."; + mes "You are either bald or your hair is already that color."; goto L_Main; L_Done: @@ -112,23 +136,9 @@ L_Done: set @menu, 0; set @style, 0; set @color, 0; + cleararray @HairStyles$, "", getarraysize(@HairStyles$); + cleararray @HairColors$, "", getarraysize(@HairColors$); + set @hairOpts, 0; + set @colorOpts, 0; return; } - --|script|#BarberConfig|-1, -{ - end; - -OnInit: - setarray $@HairStyles$, - "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", "Long and Clipped"; - setarray $@HairColors$, - "Brunette", "Green", "Dark red", "Light purple", "Gray", "Blonde", - "Teal", "Light red", "Blue", "Dark purple", "Black", "Pink", - "Brown"; - end; -} diff --git a/world/map/npc/functions/debug.txt b/world/map/npc/functions/debug.txt index b4a66314..a41633fc 100755 --- a/world/map/npc/functions/debug.txt +++ b/world/map/npc/functions/debug.txt @@ -916,62 +916,62 @@ L_Close: } -042-2.gat,30,26,0|script|Debug0|154, +042-2.gat,30,26,0|script|Debug#0|154, { callfunc "Debug"; end; OnInit: if (!debug) - disablenpc "Debug0"; + disablenpc "Debug#0"; end; } -001-1.gat,41,29,0|script|Debug1|154, +001-1.gat,41,29,0|script|Debug#1|154, { callfunc "Debug"; end; OnInit: if (!debug) - disablenpc "Debug1"; + disablenpc "Debug#1"; end; } -009-1.gat,52,33,0|script|Debug2|154, +009-1.gat,52,33,0|script|Debug#2|154, { callfunc "Debug"; end; OnInit: if (!debug) - disablenpc "Debug2"; + disablenpc "Debug#2"; end; } -020-1.gat,75,85,0|script|Debug3|154, +020-1.gat,75,85,0|script|Debug#3|154, { callfunc "Debug"; end; OnInit: if (!debug) - disablenpc "Debug3"; + disablenpc "Debug#3"; end; } -017-9.gat,21,24,0|script|Debug4|154, +017-9.gat,21,24,0|script|Debug#4|154, { callfunc "Debug"; end; OnInit: if (!debug) - disablenpc "Debug4"; + disablenpc "Debug#4"; end; } -027-2.gat,125,103,0|script|Debug5|154, +027-2.gat,125,103,0|script|Debug#5|154, { callfunc "Debug"; end; OnInit: if (!debug) - disablenpc "Debug5"; + disablenpc "Debug#5"; end; } diff --git a/world/map/npc/functions/headstyles.txt b/world/map/npc/functions/headstyles.txt new file mode 100644 index 00000000..989bef83 --- /dev/null +++ b/world/map/npc/functions/headstyles.txt @@ -0,0 +1,41 @@ +// headstyles config file +// author: meko + +function|script|getHeadStyles|, +{ + set @HairStyles$, 0; + set @HairColors$, 0; + set @BaseClass, 0; // this is the default class + cleararray @HairStyles$, "", getarraysize(@HairStyles$); + cleararray @HairColors$, "", getarraysize(@HairColors$); + cleararray @ValidClasses, "", getarraysize(@ValidClasses); + setarray @ValidClasses, 0; // add new classes here + set @loop, 0; + goto L_LoopValid; + + L_LoopValid: + if(@ValidClasses[@loop] == Class) goto L_ValidClass; + set @loop, (@loop + 1); + if(@loop >= getarraysize(@ValidClasses)) goto L_FixClass; + goto L_LoopValid; + + L_FixClass: + set Class, @BaseClass; + goto L_ValidClass; + + L_ValidClass: + if(Class == 0) + setarray @HairStyles$, // TALPONIAN (human) + "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", "Long and Clipped"; + if(Class == 0) + setarray @HairColors$, // TALPONIAN (human) + "Brunette", "Green", "Dark red", "Light purple", "Gray", "Blonde", + "Teal", "Light red", "Blue", "Dark purple", "Black", "Pink", + "Brown";//, "(free slot)", "(free slot)"; + // adding a new species is as simple as adding another if(Class == X) and adding the class to @ValidClasses + return; +} diff --git a/world/map/npc/items/mirror.txt b/world/map/npc/items/mirror.txt new file mode 100644 index 00000000..fc2ca69b --- /dev/null +++ b/world/map/npc/items/mirror.txt @@ -0,0 +1,20 @@ +function|script|useMirror|, +{ + callfunc "getHeadStyles"; + goto L_Rand; + + L_Rand: + set @style, rand(0,(getarraysize(@HairStyles$) -2)); + set @color, rand((15 * Class),((getarraysize(@HairColors$) -2) + (15 * Class))); + if((getlook(LOOK_HAIR_STYLE) == @style) || (getlook(LOOK_HAIR_COLOR) == @color)) + goto L_Rand; + goto L_Proceed; + + L_Proceed: + if(@fixedMirror) + setlook LOOK_HAIR_STYLE, @style; + setlook LOOK_HAIR_COLOR, @color; + //if(!@fixedMirror) getitem "SilverMirror", 1; <== this can be used in the future to have a portable hair color changer (like scissors but for the color) + set @fixedMirror, 0; + return; +} diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf index 90c11883..047d7dbb 100644 --- a/world/map/npc/scripts.conf +++ b/world/map/npc/scripts.conf @@ -22,6 +22,7 @@ npc: npc/functions/debug.txt npc: npc/functions/lockpicking.txt npc: npc/functions/default_npc_checks.txt npc: npc/functions/undead_debug.txt +npc: npc/functions/headstyles.txt // Item Functions npc: npc/items/magic_gm_top_hat.txt @@ -35,6 +36,7 @@ npc: npc/items/warpTowels.txt npc: npc/items/unequipcb.txt npc: npc/items/launcher_ammo.txt npc: npc/items/check_wand.txt +npc: npc/items/mirror.txt import: npc/_import.txt // GM Events |