Stylist NPC Changes
3 posters
:: The Lounge :: Suggestions
Page 1 of 1
Stylist NPC Changes
While the Stylist NPC is functional as it is...
How about adding a "Forwards" and "Backwards" feature.
As in
Hello, welcome to the stylist? How may i help you?
-Root menu-
-When section is chosen-
"I want to start from the beginning"
"I know what i want"
"Surprise me"
When "I want to start from the beginning" is chosen.
Next hairstyle
Previous Hairstyle
I like this one
It saves you the trouble of having to scroll all the way through the palettes, and doesnt require that you remember any tedious palette numbers.
Also, an extra option is to have the palette number displayed next to "I like this one"
As in...
"I like this one"(214)
I dont know, i just know certain NPC's can be tedious if you dont add in shortcuts ^^
I can probobally get you guys a working version of this NPC if you would like.
How about adding a "Forwards" and "Backwards" feature.
As in
Hello, welcome to the stylist? How may i help you?
-Root menu-
-When section is chosen-
"I want to start from the beginning"
"I know what i want"
"Surprise me"
When "I want to start from the beginning" is chosen.
Next hairstyle
Previous Hairstyle
I like this one
It saves you the trouble of having to scroll all the way through the palettes, and doesnt require that you remember any tedious palette numbers.
Also, an extra option is to have the palette number displayed next to "I like this one"
As in...
"I like this one"(214)
I dont know, i just know certain NPC's can be tedious if you dont add in shortcuts ^^
I can probobally get you guys a working version of this NPC if you would like.
Radical- Moderator
- Posts : 43
Join date : 2010-01-10
Age : 38
Location : Texas, USA
Re: Stylist NPC Changes
yeah this is a good idea
still I have a lot of works these days with my exams and the few time I have for the server is usually devoted to complete the new pvp system.
but as soon as my exams are over (in one week) I'll have much more time to spend on the server so things will (I hope) go faster and I'll hope to have more time for little details like this one ^^ (yeah sorry but even though it's a good idea, it's still a detail ^^)
still I have a lot of works these days with my exams and the few time I have for the server is usually devoted to complete the new pvp system.
but as soon as my exams are over (in one week) I'll have much more time to spend on the server so things will (I hope) go faster and I'll hope to have more time for little details like this one ^^ (yeah sorry but even though it's a good idea, it's still a detail ^^)
PhoenixTrainer- Administrator
- Posts : 112
Join date : 2009-11-09
Age : 36
Location : Morges, Switzerland
Re: Stylist NPC Changes
I can actually handle this script for you. May i email it to you?
Radical- Moderator
- Posts : 43
Join date : 2010-01-10
Age : 38
Location : Texas, USA
Re: Stylist NPC Changes
How about something like this....
Be sure to put in the NPC coordinates
- Code:
prontera.gat,-coordinates here- script Stylist 122,{
set @name$,"[^FF8000Stylist^000000]";
setarray @max[1],300,251,24; // Number of cloths, haircolors, hairstyles in client
setarray @blacklist[0],188,143,261; // 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 touch
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;
}
Be sure to put in the NPC coordinates
Radical- Moderator
- Posts : 43
Join date : 2010-01-10
Age : 38
Location : Texas, USA
Re: Stylist NPC Changes
And a newer version of the same script.
- Code:
prontera.gat,164,171,1 script Stylist 122,{
set .@name$,"[^FF8000Stylist^000000]";
setarray .@max[1],300,251,24; // Number of cloths, haircolors, hairstyles in client
setarray .@blacklist[0],188,143,261; // 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;
}
Radical- Moderator
- Posts : 43
Join date : 2010-01-10
Age : 38
Location : Texas, USA
Re: Stylist NPC Changes
damn! another fan of menu and goto! =O
Except for the fact that I noticed you used those two guys I don't have time right now to examine it right now but I'll try to find some time this evening when i get back home.... =)
Except for the fact that I noticed you used those two guys I don't have time right now to examine it right now but I'll try to find some time this evening when i get back home.... =)
PhoenixTrainer- Administrator
- Posts : 112
Join date : 2009-11-09
Age : 36
Location : Morges, Switzerland
Re: Stylist NPC Changes
These are both from eathena.ws
I believe they are fully functional, from what i read.
I believe they are fully functional, from what i read.
Radical- Moderator
- Posts : 43
Join date : 2010-01-10
Age : 38
Location : Texas, USA
Re: Stylist NPC Changes
ow ok I see.
but still, I don't like "functionnal" being the target level of a script.
even if you can do 100% functionnal bug-free scripts with goto, it makes the code messy and hard to read for a human eye. The ea script implements more advanced structured functions, like loops, switch and so on...
Using goto can and should always be avoided ^^.
Now about that ea script, if can be a temporary solution, because I'd like to have something better, at least on the Alpha server...
but still, I don't like "functionnal" being the target level of a script.
even if you can do 100% functionnal bug-free scripts with goto, it makes the code messy and hard to read for a human eye. The ea script implements more advanced structured functions, like loops, switch and so on...
Using goto can and should always be avoided ^^.
Now about that ea script, if can be a temporary solution, because I'd like to have something better, at least on the Alpha server...
PhoenixTrainer- Administrator
- Posts : 112
Join date : 2009-11-09
Age : 36
Location : Morges, Switzerland
Re: Stylist NPC Changes
Agreed.
I know using fully unique scripts is preferable, but a temporary solution works as well, until you have the time.
I know using fully unique scripts is preferable, but a temporary solution works as well, until you have the time.
Radical- Moderator
- Posts : 43
Join date : 2010-01-10
Age : 38
Location : Texas, USA
Re: Stylist NPC Changes
PhoenixTrainer wrote:damn! another fan of menu and goto! =O
>.> (goto FTW)
I liked the "Surprise Me" thing.
Re: Stylist NPC Changes
Also... is this server running the satan morroc episode?
Or is it pre-SM?
I notice morroc is not destroyed... but that would mean this server is 2 episodes behind.
I'm guessing there is a way to return to satan morroc's time?
Or is it pre-SM?
I notice morroc is not destroyed... but that would mean this server is 2 episodes behind.
I'm guessing there is a way to return to satan morroc's time?
Radical- Moderator
- Posts : 43
Join date : 2010-01-10
Age : 38
Location : Texas, USA
:: The Lounge :: Suggestions
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum