|
3 | 3 | //===== By: ================================================== |
4 | 4 | //= Euphy |
5 | 5 | //===== Current Version: ===================================== |
6 | | -//= 1.1 |
| 6 | +//= 1.2 |
7 | 7 | //===== Description: ========================================= |
8 | 8 | //= Changes your hair style, hair color, and cloth color. |
9 | 9 | //===== Additional Comments: ================================= |
10 | 10 | //= 1.1 Switched to 'getbattleflag', credits to Saithis. [Euphy] |
| 11 | +//= 1.2 Fix style start at min_style, add Job_Summoner [AnnieRuru] |
11 | 12 | //============================================================ |
12 | 13 |
|
13 | 14 | prontera,170,180,1 script Stylist#custom_stylist 2_M_DYEINGER,{ |
14 | | - |
15 | | - setarray .@styles[1],getbattleflag("max_cloth_color"),getbattleflag("max_hair_style"),getbattleflag("max_hair_color"); |
16 | | - setarray .@Look[1],7,1,6; |
17 | | - set .@s, select(" ~ Cloth color", " ~ Hairstyle", " ~ Hair color"); |
18 | | - set .@Revert, getlook(.@Look[.@s]); |
19 | | - set .@style,1; |
20 | | - while(1) { |
21 | | - setlook .@Look[.@s], .@style; |
22 | | - message strcharinfo(PC_NAME),"This is style #"+.@style+"."; |
23 | | - 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)"; |
24 | | - switch(select(.@menu$)) { |
25 | | - case 1: set .@style, ((.@style!=.@styles[.@s])?.@style+1:1); break; |
26 | | - case 2: set .@style, ((.@style!=1)?.@style-1:.@styles[.@s]); break; |
27 | | - case 3: message strcharinfo(PC_NAME),"Choose a style between 1 - "+.@styles[.@s]+"."; |
28 | | - input .@style,0,.@styles[.@s]; |
29 | | - if (!.@style) set .@style, rand(1,.@styles[.@s]); |
30 | | - break; |
31 | | - case 4: set .@style, .@Revert; setlook .@Look[.@s], .@Revert; break; |
| 15 | + .@choose = select("Hair style", "Hair color", "Cloth color") - 1; |
| 16 | + .@part = .look[.@choose]; |
| 17 | + if (BaseClass != Job_Summoner) |
| 18 | + callsub(L_styles, .@part, .minstyle[.@part], .maxstyle[.@part]); |
| 19 | + else |
| 20 | + callsub(L_styles, .@part, .summoner_minstyle[.@part], .summoner_maxstyle[.@part]); |
| 21 | +L_styles: |
| 22 | + .@lookpart = getarg(0); |
| 23 | + .@minstyle = getarg(1); |
| 24 | + .@maxstyle = getarg(2); |
| 25 | + .@i = .@revert = getlook(.@lookpart); |
| 26 | + while (true) { |
| 27 | + setlook(.@lookpart, .@i); |
| 28 | + message(strcharinfo(PC_NAME), sprintf("This is style #%d.", .@i)); |
| 29 | + if (.@i == .@maxstyle) |
| 30 | + .@next = .@minstyle; |
| 31 | + else |
| 32 | + .@next = .@i + 1; |
| 33 | + if (.@i == .@minstyle) |
| 34 | + .@previous = .@maxstyle; |
| 35 | + else |
| 36 | + .@previous = .@i - 1; |
| 37 | + 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)))) { |
| 38 | + case 1: |
| 39 | + .@i = .@next; |
| 40 | + break; |
| 41 | + case 2: |
| 42 | + .@i = .@previous; |
| 43 | + break; |
| 44 | + case 3: |
| 45 | + message(strcharinfo(PC_NAME), sprintf("Choose a style between %d - %d.", .@minstyle, .@maxstyle)); |
| 46 | + input(.@i, .@minstyle, .@maxstyle); |
| 47 | + break; |
| 48 | + case 4: |
| 49 | + .@i = .@revert; |
32 | 50 | } |
33 | 51 | } |
| 52 | + end; |
| 53 | +OnInit: |
| 54 | + .minstyle[LOOK_HAIR] = getbattleflag("min_hair_style"); |
| 55 | + .maxstyle[LOOK_HAIR] = getbattleflag("max_hair_style"); |
| 56 | + .minstyle[LOOK_HAIR_COLOR] = getbattleflag("min_hair_color"); |
| 57 | + .maxstyle[LOOK_HAIR_COLOR] = getbattleflag("max_hair_color"); |
| 58 | + .minstyle[LOOK_CLOTHES_COLOR] = getbattleflag("min_cloth_color"); |
| 59 | + .maxstyle[LOOK_CLOTHES_COLOR] = getbattleflag("max_cloth_color"); |
| 60 | + |
| 61 | + .summoner_minstyle[LOOK_HAIR] = getbattleflag("min_hair_style"); |
| 62 | + .summoner_maxstyle[LOOK_HAIR] = getbattleflag("max_hair_style"); |
| 63 | + .summoner_minstyle[LOOK_HAIR_COLOR] = getbattleflag("min_hair_color"); |
| 64 | + .summoner_maxstyle[LOOK_HAIR_COLOR] = getbattleflag("max_hair_color"); |
| 65 | + .summoner_minstyle[LOOK_CLOTHES_COLOR] = getbattleflag("min_cloth_color"); |
| 66 | + .summoner_maxstyle[LOOK_CLOTHES_COLOR] = getbattleflag("max_cloth_color"); |
| 67 | + |
| 68 | + setarray .look[0], LOOK_HAIR, LOOK_HAIR_COLOR, LOOK_CLOTHES_COLOR; |
| 69 | + end; |
34 | 70 | } |
0 commit comments