summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-06-30 20:33:59 +0200
committerGitHub <noreply@github.com>2019-06-30 20:33:59 +0200
commit238cfaa6b6496da1a8569ad0a6f50d2c722c7d54 (patch)
treec0ddd648eeffaded7d7fee1c8706fc6bbd55f09f
parent1bda26086c0fea3d439468559f1c6b3f0acce0dc (diff)
parent1865395d72c9beacf2d8b64422891637253fa3c2 (diff)
downloadhercules-238cfaa6b6496da1a8569ad0a6f50d2c722c7d54.tar.gz
hercules-238cfaa6b6496da1a8569ad0a6f50d2c722c7d54.tar.bz2
hercules-238cfaa6b6496da1a8569ad0a6f50d2c722c7d54.tar.xz
hercules-238cfaa6b6496da1a8569ad0a6f50d2c722c7d54.zip
Merge pull request #2357 from AnnieRuru/51-stylist
Update stylist.txt
-rw-r--r--npc/custom/stylist.txt78
1 files changed, 59 insertions, 19 deletions
diff --git a/npc/custom/stylist.txt b/npc/custom/stylist.txt
index 0ee7d8822..188a91ca7 100644
--- a/npc/custom/stylist.txt
+++ b/npc/custom/stylist.txt
@@ -3,32 +3,72 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
-//= 1.1
+//= 1.2
//===== Description: =========================================
//= Changes your hair style, hair color, and cloth color.
//===== Additional Comments: =================================
//= 1.1 Switched to 'getbattleflag', credits to Saithis. [Euphy]
+//= 1.2 Fix style start at min_style, add Job_Summoner [AnnieRuru]
//============================================================
prontera,170,180,1 script Stylist#custom_stylist 2_M_DYEINGER,{
-
- setarray .@styles[1],getbattleflag("max_cloth_color"),getbattleflag("max_hair_style"),getbattleflag("max_hair_color");
- setarray .@Look[1],7,1,6;
- set .@s, select(" ~ Cloth color", " ~ Hairstyle", " ~ Hair color");
- set .@Revert, getlook(.@Look[.@s]);
- set .@style,1;
- while(1) {
- setlook .@Look[.@s], .@style;
- message strcharinfo(PC_NAME),"This is style #"+.@style+".";
- set .@menu$, " ~ Next (^0055FF"+((.@style!=.@styles[.@s])?.@style+1:1)+"^000000): ~ Previous (^0055FF"+((.@style!=1)?.@style-1:.@styles[.@s])+"^000000): ~ Jump to...: ~ Revert to original (^0055FF"+.@Revert+"^000000)";
- switch(select(.@menu$)) {
- case 1: set .@style, ((.@style!=.@styles[.@s])?.@style+1:1); break;
- case 2: set .@style, ((.@style!=1)?.@style-1:.@styles[.@s]); break;
- case 3: message strcharinfo(PC_NAME),"Choose a style between 1 - "+.@styles[.@s]+".";
- input .@style,0,.@styles[.@s];
- if (!.@style) set .@style, rand(1,.@styles[.@s]);
- break;
- case 4: set .@style, .@Revert; setlook .@Look[.@s], .@Revert; break;
+ .@choose = select("Hair style", "Hair color", "Cloth color") - 1;
+ .@part = .look[.@choose];
+ if (BaseClass != Job_Summoner)
+ callsub(L_styles, .@part, .minstyle[.@part], .maxstyle[.@part]);
+ else
+ callsub(L_styles, .@part, .summoner_minstyle[.@part], .summoner_maxstyle[.@part]);
+L_styles:
+ .@lookpart = getarg(0);
+ .@minstyle = getarg(1);
+ .@maxstyle = getarg(2);
+ .@i = .@revert = getlook(.@lookpart);
+ while (true) {
+ setlook(.@lookpart, .@i);
+ message(strcharinfo(PC_NAME), sprintf(_("This is style #%d."), .@i));
+ if (.@i == .@maxstyle)
+ .@next = .@minstyle;
+ else
+ .@next = .@i + 1;
+ if (.@i == .@minstyle)
+ .@previous = .@maxstyle;
+ else
+ .@previous = .@i - 1;
+ switch(select(
+ sprintf(_(" ~ Next (%s%d%s)"), F_MesColor(C_BLUE), .@next, F_MesColor(C_BLACK)),
+ sprintf(_(" ~ Previous (%s%d%s)"), F_MesColor(C_BLUE), .@previous, F_MesColor(C_BLACK)),
+ " ~ Jump to...",
+ sprintf(_(" ~ Revert to original (%s%d%s)"), F_MesColor(C_BLUE), .@revert, F_MesColor(C_BLACK)))) {
+ case 1:
+ .@i = .@next;
+ break;
+ case 2:
+ .@i = .@previous;
+ break;
+ case 3:
+ message(strcharinfo(PC_NAME), sprintf(_("Choose a style between %d - %d."), .@minstyle, .@maxstyle));
+ input(.@i, .@minstyle, .@maxstyle);
+ break;
+ case 4:
+ .@i = .@revert;
}
}
+ end;
+OnInit:
+ setarray .look[0], LOOK_HAIR, LOOK_HAIR_COLOR, LOOK_CLOTHES_COLOR;
+
+ .minstyle[LOOK_HAIR] = getbattleflag("min_hair_style");
+ .maxstyle[LOOK_HAIR] = getbattleflag("max_hair_style");
+ .minstyle[LOOK_HAIR_COLOR] = getbattleflag("min_hair_color");
+ .maxstyle[LOOK_HAIR_COLOR] = getbattleflag("max_hair_color");
+ .minstyle[LOOK_CLOTHES_COLOR] = getbattleflag("min_cloth_color");
+ .maxstyle[LOOK_CLOTHES_COLOR] = getbattleflag("max_cloth_color");
+
+ .summoner_minstyle[LOOK_HAIR] = getbattleflag("min_hair_style");
+ .summoner_maxstyle[LOOK_HAIR] = getbattleflag("max_hair_style");
+ .summoner_minstyle[LOOK_HAIR_COLOR] = getbattleflag("min_hair_color");
+ .summoner_maxstyle[LOOK_HAIR_COLOR] = getbattleflag("max_hair_color");
+ .summoner_minstyle[LOOK_CLOTHES_COLOR] = getbattleflag("min_cloth_color");
+ .summoner_maxstyle[LOOK_CLOTHES_COLOR] = getbattleflag("max_cloth_color");
+ end;
}