Jump to content
  • 0

Stylist npc help :) Please!


Question

Posted (edited)

Please help me... My problem is that when my hair color reaches 21 until 40 the hair just goes weird. May i ask a help with you guys... example when it reaches 21 it will skip until 40 but the Counting of the npc is still counting 19..20..21..22..23... :) Thanks!

// +-------------------------------------------+
// | Advanced Stylist  |
// +-------------------------------------------+
// | By: Hudelf  |
// +-------------------------------------------+
// | Current Version: 2.1  |
// +-------------------------------------------+
// | Description:  |
// | This is the traditional stylist with  |
// | several new features. You can now scroll|
// | backwards or forwards, and save up to  |
// | three palettes while logged in  |
// +-------------------------------------------+
// | Changelog:  |
// | 02/08/07 - 1.0 - Script finished  |
// | 06/04/07 - 2.0 - Rewrote entire script  |
// | Added new features  |
// | 11/07/07 - 2.1 - Changed var types  |
// |	Fixed minor text issues |
// +-------------------------------------------+

prontera,170,180,1 script TaheeRO Stylist	  122,{

set .@name$,"[^FF8000Stylist^000000]";
setarray .@max[1],500,251,26; // Number of cloths, haircolors, hairstyles in client
setarray .@blacklist[0],188,143,261,232; // NPC will skip any cloth colors in this array.
//   Use for palettes that cause errors or just plain look bad.
// Leave first value at 0 to disable.
setarray .@type[1],7,6,1; // DO NOT EDIT
set .@style,0;

mes .@name$;
mes "I can change your appearance for you if you'd like.";
mes " ";
mes "Just choose what you'd like to change:";
next;
set .@s,select("Clothes color",
"Hair color",
"Hair style");

mes .@name$;
mes "Alright, how would you like to search?";
next;
menu "Start at the beginning",L_start,
"Choose where to start",-;

// CHOOSE WHERE TO START =====================================================
mes .@name$;
mes "Alright, choose a style between ^0000FF0 and " +.@max[.@s]+ "^000000.";
next;
input .@style;

if (.@style < 0 || .@style > .@max[.@s]) {
mes .@name$;
mes "Style chosen is out of range.";
close;
}

 L_start:
setarray @revert[1],getlook(.@type[.@s]),0,0;
mes .@name$;
mes "Alright here we go, starting at style ^007700" +.@style+ "^000000.";
next;

 // BEGINNING OF STYLE MENU LOOP ================================================
 L_menuloop:
if (.@blacklist[0]) {
for (set .@f,0; .@f < getarraysize(.@blacklist); set .@f,.@f+1) {
if (.@style == .@blacklist[.@f] && .@previous == 1 && .@s == 1) {
message strcharinfo(0),"GM Message - Cloth " +.@style+ " was removed.";
set .@style, .@style - 1;
goto L_menuloop;
} else if (.@style == .@blacklist[.@f] && .@s == 1) {
message strcharinfo(0),"GM Message - Cloth " +.@style+ " was removed.";
set .@style, .@style +1;
goto L_menuloop;
}
}
}
setlook .@type[.@s],.@style;
mes "This is style number ^007700" +.@style+ "^000000.";

set .@next, .@style + 1;
set .@prev, .@style - 1;

// MAXIMUM MENU
if (.@style == .@max[.@s]) {
set .@next,0;
message strcharinfo(0),"Limit Reached";
}

// MINIMUM MENU ==============================================================
if (.@style == 0) {
set .@prev,.@max[.@s];
message strcharinfo(0),"Beginning Reached";
}

// PREVIOUS MENU =============================================================
if (.@previous) {
menu "^FF0000Previous - " +.@prev+ "^000000",L_prev,
"^0000FFNext - " +.@next+ "^000000",L_next,
"Jump to",L_jump,
"Save",L_save,
"Load",L_load;
}

// DEFAULT MENU ==============================================================
menu "^0000FFNext - " +.@next+ "^000000",L_next,
"^FF0000Previous - " +.@prev+ "^000000",L_prev,
"Jump to",L_jump,
"Save",L_save,
"Load",L_load;

 L_next:
set .@previous,0;
set .@style, .@next;
goto L_menuloop;

 L_prev:
set .@previous,1;
set .@style, .@prev;
goto L_menuloop;

 L_jump:
next;
mes .@name$;
mes "Choose which style you'd like to jump to:";
next;
input .@style;
if (.@style < 0 || .@style > .@max[.@s]) {
mes .@name$;
mes "Style chosen is out of range.";
close;
}
goto L_menuloop;

 L_save:
next;
mes .@name$;
mes "Choose which slot you'd like to save to:";
set .@x, select("Slot 1 - [" +@revert[1]+ "]",
"Slot 2 - [" +@revert[2]+ "]",
"Slot 3 - [" +@revert[3]+ "]");

setarray @revert[.@x], .@style;
goto L_menuloop;

 L_load:
next;
mes .@name$;
mes "Choose which slot you'd like to load from:";
set .@x, select("Slot 1 - [" +@revert[1]+ "]",
"Slot 2 - [" +@revert[2]+ "]",
"Slot 3 - [" +@revert[3]+ "]");

set .@style, @revert[.@x];
goto L_menuloop;
}

Edited by Arcenciel
Codeboxed

5 answers to this question

Recommended Posts

Posted

The blacklist function is inside the script. You'll just have to add in the numbers into this array.

setarray .@blacklist[0],188,143,261,232; // NPC will skip any cloth colors in this array.

Posted (edited)

Simply edited from the script. Not tested.


// +-------------------------------------------+
// | Advanced Stylist |
// +-------------------------------------------+
// | By: Hudelf |
// +-------------------------------------------+
// | Current Version: 2.1 |
// +-------------------------------------------+
// | Description: |
// | This is the traditional stylist with |
// | several new features. You can now scroll|
// | backwards or forwards, and save up to |
// | three palettes while logged in |
// +-------------------------------------------+
// | Changelog: |
// | 02/08/07 - 1.0 - Script finished |
// | 06/04/07 - 2.0 - Rewrote entire script |
// | Added new features |
// | 11/07/07 - 2.1 - Changed var types |
// | Fixed minor text issues |
// +-------------------------------------------+
prontera,170,180,1 script TaheeRO Stylist 122,{
set .@name$,"[^FF8000Stylist^000000]";
setarray .@max[1],500,251,26; // Number of cloths, haircolors, hairstyles in client
setarray .@blacklist[0],188,143,261,232; // NPC will skip any cloth colors in this array.
setarray .@blacklist_hc[0],22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39; // Hair Color Blacklist
// Use for palettes that cause errors or just plain look bad.
// Leave first value at 0 to disable.
setarray .@type[1],7,6,1; // DO NOT EDIT
set .@style,0;
mes .@name$;
mes "I can change your appearance for you if you'd like.";
mes " ";
mes "Just choose what you'd like to change:";
next;
set .@s,select("Clothes color",
"Hair color",
"Hair style");
mes .@name$;
mes "Alright, how would you like to search?";
next;
menu "Start at the beginning",L_start,
"Choose where to start",-;
// CHOOSE WHERE TO START =====================================================
mes .@name$;
mes "Alright, choose a style between ^0000FF0 and " +.@max[.@s]+ "^000000.";
next;
input .@style;
if (.@style < 0 || .@style > .@max[.@s]) {
mes .@name$;
mes "Style chosen is out of range.";
close;
}
L_start:
setarray @revert[1],getlook(.@type[.@s]),0,0;
mes .@name$;
mes "Alright here we go, starting at style ^007700" +.@style+ "^000000.";
next;
// BEGINNING OF STYLE MENU LOOP ================================================
L_menuloop:
if (.@blacklist[0]) {
for (set .@f,0; .@f < getarraysize(.@blacklist); set .@f,.@f+1) {
if (.@style == .@blacklist[.@f] && .@previous == 1 && .@s == 1) {
message strcharinfo(0),"GM Message - Cloth " +.@style+ " was removed.";
set .@style, .@style - 1;
goto L_menuloop;
} else if (.@style == .@blacklist[.@f] && .@s == 1) {
message strcharinfo(0),"GM Message - Cloth " +.@style+ " was removed.";
set .@style, .@style +1;
goto L_menuloop;
}
}
}
if (.@blacklist_hc[0]) {
for (set .@f,0; .@f < getarraysize(.@blacklist_hc); set .@f,.@f+1) {
if (.@style == .@blacklist_hc[.@f] && .@previous == 1 && .@s == 2) {
message strcharinfo(0),"GM Message - Hair Color " +.@style+ " was removed.";
set .@style, .@style - 1;
goto L_menuloop;
} else if (.@style == .@blacklist_hc[.@f] && .@s == 2) {
message strcharinfo(0),"GM Message - Hair Color " +.@style+ " was removed.";
set .@style, .@style +1;
goto L_menuloop;
}
}
}
setlook .@type[.@s],.@style;
mes "This is style number ^007700" +.@style+ "^000000.";
set .@next, .@style + 1;
set .@prev, .@style - 1;
// MAXIMUM MENU
if (.@style == .@max[.@s]) {
set .@next,0;
message strcharinfo(0),"Limit Reached";
}
// MINIMUM MENU ==============================================================
if (.@style == 0) {
set .@prev,.@max[.@s];
message strcharinfo(0),"Beginning Reached";
}
// PREVIOUS MENU =============================================================
if (.@previous) {
menu "^FF0000Previous - " +.@prev+ "^000000",L_prev,
"^0000FFNext - " +.@next+ "^000000",L_next,
"Jump to",L_jump,
"Save",L_save,
"Load",L_load;
}
// DEFAULT MENU ==============================================================
menu "^0000FFNext - " +.@next+ "^000000",L_next,
"^FF0000Previous - " +.@prev+ "^000000",L_prev,
"Jump to",L_jump,
"Save",L_save,
"Load",L_load;
L_next:
set .@previous,0;
set .@style, .@next;
goto L_menuloop;
L_prev:
set .@previous,1;
set .@style, .@prev;
goto L_menuloop;
L_jump:
next;
mes .@name$;
mes "Choose which style you'd like to jump to:";
next;
input .@style;
if (.@style < 0 || .@style > .@max[.@s]) {
mes .@name$;
mes "Style chosen is out of range.";
close;
}
goto L_menuloop;
L_save:
next;
mes .@name$;
mes "Choose which slot you'd like to save to:";
set .@x, select("Slot 1 - [" +@revert[1]+ "]",
"Slot 2 - [" +@revert[2]+ "]",
"Slot 3 - [" +@revert[3]+ "]");
setarray @revert[.@x], .@style;
goto L_menuloop;
L_load:
next;
mes .@name$;
mes "Choose which slot you'd like to load from:";
set .@x, select("Slot 1 - [" +@revert[1]+ "]",
"Slot 2 - [" +@revert[2]+ "]",
"Slot 3 - [" +@revert[3]+ "]");
set .@style, @revert[.@x];
goto L_menuloop;
}
[/codeBOX]

Edited by Joseph
Posted

Again, simply edited. Not tested.

Find the following code and edit your hair style blacklist.

setarray .@blacklist_hs[0],1,2,3,4; // Hair Style Blacklist


// +-------------------------------------------+
// | Advanced Stylist |
// +-------------------------------------------+
// | By: Hudelf |
// +-------------------------------------------+
// | Current Version: 2.1 |
// +-------------------------------------------+
// | Description: |
// | This is the traditional stylist with |
// | several new features. You can now scroll|
// | backwards or forwards, and save up to |
// | three palettes while logged in |
// +-------------------------------------------+
// | Changelog: |
// | 02/08/07 - 1.0 - Script finished |
// | 06/04/07 - 2.0 - Rewrote entire script |
// | Added new features |
// | 11/07/07 - 2.1 - Changed var types |
// | Fixed minor text issues |
// +-------------------------------------------+
prontera,170,180,1 script TaheeRO Stylist 122,{
set .@name$,"[^FF8000Stylist^000000]";
setarray .@max[1],500,251,26; // Number of cloths, haircolors, hairstyles in client
setarray .@blacklist[0],188,143,261,232; // NPC will skip any cloth colors in this array.
setarray .@blacklist_hc[0],22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39; // Hair Color Blacklist
setarray .@blacklist_hs[0],1,2,3,4; // Hair Style Blacklist
// Use for palettes that cause errors or just plain look bad.
// Leave first value at 0 to disable.
setarray .@type[1],7,6,1; // DO NOT EDIT
set .@style,0;
mes .@name$;
mes "I can change your appearance for you if you'd like.";
mes " ";
mes "Just choose what you'd like to change:";
next;
set .@s,select("Clothes color",
"Hair color",
"Hair style");
mes .@name$;
mes "Alright, how would you like to search?";
next;
menu "Start at the beginning",L_start,
"Choose where to start",-;
// CHOOSE WHERE TO START =====================================================
mes .@name$;
mes "Alright, choose a style between ^0000FF0 and " +.@max[.@s]+ "^000000.";
next;
input .@style;
if (.@style < 0 || .@style > .@max[.@s]) {
mes .@name$;
mes "Style chosen is out of range.";
close;
}
L_start:
setarray @revert[1],getlook(.@type[.@s]),0,0;
mes .@name$;
mes "Alright here we go, starting at style ^007700" +.@style+ "^000000.";
next;
// BEGINNING OF STYLE MENU LOOP ================================================
L_menuloop:
if (.@blacklist[0]) {
for (set .@f,0; .@f < getarraysize(.@blacklist); set .@f,.@f+1) {
if (.@style == .@blacklist[.@f] && .@previous == 1 && .@s == 1) {
message strcharinfo(0),"GM Message - Cloth " +.@style+ " was removed.";
set .@style, .@style - 1;
goto L_menuloop;
} else if (.@style == .@blacklist[.@f] && .@s == 1) {
message strcharinfo(0),"GM Message - Cloth " +.@style+ " was removed.";
set .@style, .@style +1;
goto L_menuloop;
}
}
}
if (.@blacklist_hc[0]) {
for (set .@f,0; .@f < getarraysize(.@blacklist_hc); set .@f,.@f+1) {
if (.@style == .@blacklist_hc[.@f] && .@previous == 1 && .@s == 2) {
message strcharinfo(0),"GM Message - Hair Color " +.@style+ " was removed.";
set .@style, .@style - 1;
goto L_menuloop;
} else if (.@style == .@blacklist_hc[.@f] && .@s == 2) {
message strcharinfo(0),"GM Message - Hair Color " +.@style+ " was removed.";
set .@style, .@style +1;
goto L_menuloop;
}
}
}
if (.@blacklist_hs[0]) {
for (set .@f,0; .@f < getarraysize(.@blacklist_hs); set .@f,.@f+1) {
if (.@style == .@blacklist_hs[.@f] && .@previous == 1 && .@s == 3) {
message strcharinfo(0),"GM Message - Hair Style " +.@style+ " was removed.";
set .@style, .@style - 1;
goto L_menuloop;
} else if (.@style == .@blacklist_hs[.@f] && .@s == 3) {
message strcharinfo(0),"GM Message - Hair Style " +.@style+ " was removed.";
set .@style, .@style +1;
goto L_menuloop;
}
}
}
setlook .@type[.@s],.@style;
mes "This is style number ^007700" +.@style+ "^000000.";
set .@next, .@style + 1;
set .@prev, .@style - 1;
// MAXIMUM MENU
if (.@style == .@max[.@s]) {
set .@next,0;
message strcharinfo(0),"Limit Reached";
}
// MINIMUM MENU ==============================================================
if (.@style == 0) {
set .@prev,.@max[.@s];
message strcharinfo(0),"Beginning Reached";
}
// PREVIOUS MENU =============================================================
if (.@previous) {
menu "^FF0000Previous - " +.@prev+ "^000000",L_prev,
"^0000FFNext - " +.@next+ "^000000",L_next,
"Jump to",L_jump,
"Save",L_save,
"Load",L_load;
}
// DEFAULT MENU ==============================================================
menu "^0000FFNext - " +.@next+ "^000000",L_next,
"^FF0000Previous - " +.@prev+ "^000000",L_prev,
"Jump to",L_jump,
"Save",L_save,
"Load",L_load;
L_next:
set .@previous,0;
set .@style, .@next;
goto L_menuloop;
L_prev:
set .@previous,1;
set .@style, .@prev;
goto L_menuloop;
L_jump:
next;
mes .@name$;
mes "Choose which style you'd like to jump to:";
next;
input .@style;
if (.@style < 0 || .@style > .@max[.@s]) {
mes .@name$;
mes "Style chosen is out of range.";
close;
}
goto L_menuloop;
L_save:
next;
mes .@name$;
mes "Choose which slot you'd like to save to:";
set .@x, select("Slot 1 - [" +@revert[1]+ "]",
"Slot 2 - [" +@revert[2]+ "]",
"Slot 3 - [" +@revert[3]+ "]");
setarray @revert[.@x], .@style;
goto L_menuloop;
L_load:
next;
mes .@name$;
mes "Choose which slot you'd like to load from:";
set .@x, select("Slot 1 - [" +@revert[1]+ "]",
"Slot 2 - [" +@revert[2]+ "]",
"Slot 3 - [" +@revert[3]+ "]");
set .@style, @revert[.@x];
goto L_menuloop;
}
[/codeBOX]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...