Назад

[Вопрос]СубКлассы - скрипт сыпет ошибки.

Автор: Fayl: Дата: 01.23.2011

День добрый!
Как то на форуме ЕА находил отличный скрипт, там простая смена класса.
Подходишь к нпц, выбираешь сабкласс первой профессии, тебя делают новисом, качаешься сначала, но уже имеешь скилы новой и старой профы.
Как-то так это выглядело.
Но естественно, ссылка была благополучно проё...потерянна.
Сегодня искал на ЕА форуме, но найти не смог ничего, как будто пропало всё.
Нашелся только один скрипятка, но и тот видимо стар, так как хочет от меня невесть чего. Помогите понять, где ошибка:

//===================================================================\\
//===================================================================\\
//===== Sub Class npc ===============================================\
//===== Made By: Draon.exe ==========================================\\
//===== Admin of Evoke RO ====================================\\
//===== [email protected] ========================================\\
//===================================================================\\
//===== Help by: ====================================================\\
//===== These are their eAthena user names. the names may change ====\\
//===================================================================\\
//===================================================================\\
//===== V 1.0 =======================================================\\
//===== *grants level 5 skills of first and second class skills to ==\\
//===== anybody besides their respective class ==\\
//===== *no bugs currently found ==\\
//===== *please report bugs to the email adress provided above ==\\
//===================================================================\\
//===== V 1.1 =======================================================\\
//===== * added in new restrictions for class availability ==\\
//===== * Changed requirements for quest ==\\
//===== * Gave the npc a name ==\\
//===================================================================\\

prontera,50,50,4 script Jeshua 100,{

if (done == 1) goto Lfinished;
if (class == 1 || class == 2 || class == 3 || class == 4 || class == 5 || class == 6 || class == 7 || class == 8 || class == 9 || class == 10 || class == 11 || class == 12 || class == 13 || class == 14 || class == 15 || class == 16 || class == 17 || class == 18 || class == 19 || class == 20 || class == 4001 || class == 4002 || class == 4003 || class == 4003 || class == 4004 || class == 4005 || class == 4006 || class == 4007 || BaseLevel < 200) goto low;
mes "[Jeshua]";
mes "why hello their, i see you have found me";
mes "i guess since you found me. i'm the sub";
mes "class npc. i will give you a subclass";
mes "that you can be in order to make you more";
mes "powerful. any questions?";
next;
menu "No",n1,"What exactally do you do?",wedyd;

n1:
mes "[Jeshua]";
mes"ok i guess i will continue. in order for you";
mes "to obtain your subclass i will need to choose";
mes "from this list of Classes you would like to";
mes "become hybrid in";
next;
menu "Knight",Knight,"Crusader",Crusader,"Monk",Monk,"Priest",Priest,"Hunter",Hunter,"Bard/Dancer",Bard,"Blacksmith",Blacksmith,"Alchemist",Alchemist,"Assassin",Assassin,"Rogue",Rogue,"Wizard",Wizard,"Sage",Sage;

Knight:
if (Class == 4008) goto LKnight;

mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Knight huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";
next;

mes "so do you want to subclass in Knight?";
next;
menu "Yes",y2,"No",n2;
y2:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;
delitem 7113,1;
delitem 1004,1;
delitem 2621,1;
skill 2,5,0;
skill 3,5,0;
skill 4,5,0;
skill 5,5,0;
skill 6,5,0;
skill 7,5,0;
skill 8,5,0;
skill 55,5,0;
skill 56,5,0;
skill 57,5,0;
skill 58,5,0;
skill 59,3,0;
skill 60,5,0;
skill 61,3,0;
skill 62,5,0;
skill 63,1,0;
skill 64,5,0;
set done,1;
close;

mes "their you go. you now obtained the subclass of Knight";
mes "please have a fun time with it";
close;

Crusader:

if (Class == 4015) goto LKnight;

mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Crusader huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";
next;

mes "so do you want to subclass in Crusader?";
next;
menu "Yes",y3,"No",n2;
y3:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;

delitem 7113,1;
delitem 1004,1;
delitem 2621,1;

skill 2,5,0;
skill 3,5,0;
skill 4,5,0;
skill 5,5,0;
skill 6,5,0;
skill 7,5,0;
skill 8,5,0;
skill 22,5,0;
skill 23,5,0;
skill 28,5,0;
skill 35,1,0;
skill 55,5,0;
skill 63,1,0;
skill 64,3,0;
skill 248,5,0;
skill 249,5,0;
skill 250,3,0;
skill 251,3,0;
skill 252,3,0;
skill 253,5,0;
skill 254,5,0;
skill 255,3,0;
skill 256,3,0;
skill 257,3,0;
skill 258,5,0;

set done,1;
mes "their you go. you now obtained the subclass of Crusader";
mes "please have a fun time with it";
close;

Monk:

if (Class == 4016) goto LKnight;

mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Monk huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";
next;

mes "so do you want to subclass in Monk?";
next;
menu "Yes",y4,"No",n2;
y4:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;

delitem 7113,1;
delitem 1004,1;
delitem 2621,1;

Skill 22,5,0;
Skill 23,5,0;
Skill 24,1,0;
Skill 25,1,0;
Skill 26,1,0;
Skill 27,2,0;
Skill 28,5,0;
Skill 29,5,0;
Skill 30,5,0;
Skill 31,1,0;
Skill 32,5,0;
Skill 33,5,0;
Skill 34,5,0;
Skill 35,1,0;
Skill 259,5,0;
Skill 260,3,0;
Skill 261,5,0;
Skill 262,1,0;
Skill 263,5,0;
Skill 264,1,0;
Skill 265,5,0;
Skill 266,3,0;
Skill 267,3,0;
Skill 268,3,0;
Skill 269,3,0;
Skill 270,3,0;
Skill 271,3,0;
Skill 272,3,0;
Skill 273,3,0;

set done,1;
mes "their you go. you now obtained the subclass of Monk";
mes "please have a fun time with it";
close;

Priest:

if (Class == 4009) goto LKnight;

mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Priest huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";
next;

mes "so do you want to subclass in Priest?";
next;
menu "Yes",y5,"No",n2;
y5:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;

delitem 7113,1;
delitem 1004,1;
delitem 2621,1;

Skill 22,5,0;
Skill 23,5,0;
Skill 24,1,0;
Skill 25,1,0;
Skill 26,1,0;
Skill 27,2,0;
Skill 28,5,0;
Skill 29,5,0;
Skill 30,5,0;
Skill 31,1,0;
Skill 32,5,0;
Skill 33,5,0;
Skill 34,5,0;
Skill 35,1,0;
Skill 9,5,0;
Skill 12,5,0;
Skill 54,2,0;
Skill 65,5,0;
Skill 66,3,0;
Skill 67,2,0;
Skill 68,3,0;
Skill 69,3,0;
Skill 70,5,0;
Skill 71,2,0;
Skill 72,1,0;
Skill 73,5,0;
Skill 74,3,0;
Skill 75,3,0;
Skill 76,5,0;
Skill 77,5,0;
Skill 78,1,0;
Skill 79,5,0;

set done,1;
mes "their you go. you now obtained the subclass of Priest";
mes "please have a fun time with it";
close;

Hunter:
if (Class == 4012) goto LKnight;

mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Hunter huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";
next;

mes "so do you want to subclass in Hunter?";
next;
menu "Yes",y6,"No",n2;
y6:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;

delitem 7113,1;
delitem 1004,1;
delitem 2621,1;

skill 43,5,0;
skill 44,5,0;
skill 45,5,0;
skill 46,5,0;
skill 47,5,0;
skill 115,3,0;
skill 116,3,0;
skill 117,3,0;
skill 118,3,0;
skill 119,3,0;
skill 120,3,0;
skill 121,3,0;
skill 122,3,0;
skill 123,3,0;
skill 124,1,0;
skill 125,1,0;
skill 126,5,0;
skill 127,1,0;
skill 128,5,0;
skill 129,3,0;
skill 130,2,0;
skill 131,3,0;

set done,1;
mes "their you go. you now obtained the subclass of Hunter";
mes "please have a fun time with it";
close;

bard:

if (Class == 4020 || Class == 4021) goto LKnight;
mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Bard/Gypsy huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";
next;

mes "so do you want to subclass in Bard/Gypsy?";
next;
menu "Yes",y7,"No",n2;
y7:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;

delitem 7113,1;
delitem 1004,1;
delitem 2621,1;

skill 43,5,0;
skill 44,5,0;
skill 45,5,0;
skill 46,5,0;
skill 47,5,0;
skill 304,1,0;
skill 305,1,0;
skill 306,1,0;
skill 307,3,0;
skill 308,1,0;
skill 309,3,0;
skill 310,3,0;
skill 311,1,0;
skill 312,1,0;
skill 313,3,0;
skill 315,5,0;
skill 316,3,0;
skill 317,3,0;
skill 318,3,0;
skill 319,5,0;
skill 320,5,0;
skill 321,5,0;
skill 322,5,0;
skill 323,5,0;
skill 324,3,0;
skill 325,3,0;
skill 326,3,0;
skill 327,5,0;
skill 328,5,0;
skill 329,5,0;
skill 330,5,0;

set done,1;
mes "their you go. you now obtained the subclass of Bard/Gypsy";
mes "please have a fun time with it";
close;

blacksmith:
if (Class == 4011) goto LKnight;

mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Blacksmith huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";

mes "so do you want to subclass in Blacksmith?";
next;
menu "Yes",y8,"No",n2;
y8:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;

delitem 7113,1;
delitem 1004,1;
delitem 2621,1;

skill 36,5,0;
skill 37,5,0;
skill 38,5,0;
skill 39,5,0;
skill 40,1,0;
skill 41,5,0;
skill 42,5,0;
skill 94,3,0;
skill 95,3,0;
skill 96,3,0;
skill 97,3,0;
skill 98,2,0;
skill 99,2,0;
skill 100,2,0;
skill 101,2,0;
skill 102,2,0;
skill 103,2,0;
skill 104,2,0;
skill 105,1,0;
skill 106,1,0;
skill 107,5,0;
skill 108,1,0;
skill 109,3,0;
skill 110,3,0;
skill 111,3,0;
skill 112,3,0;
skill 113,3,0;
skill 114,3,0;

set done,1;
mes "their you go. you now obtained the subclass of Blacksmith";
mes "please have a fun time with it";
close;

Alchemist:
if (Class == 4019) goto LKnight;

mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Alchemist huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";
next;

mes "so do you want to subclass in Alchemist?";
next;
menu "Yes",y9,"No",n2;
y9:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;

delitem 7113,1;
delitem 1004,1;
delitem 2621,1;

skill 36,5,0;
skill 37,5,0;
skill 38,5,0;
skill 39,5,0;
skill 40,1,0;
skill 41,5,0;
skill 42,5,0;
skill 226,5,0;
skill 227,5,0;
skill 228,5,0;
skill 229,3,0;
skill 230,3,0;
skill 231,3,0;
skill 232,3,0;
skill 233,3,0;
skill 234,3,0;
skill 235,3,0;
skill 236,3,0;
skill 237,3,0;

set done,1;
mes "their you go. you now obtained the subclass of Alchemist";
mes "please have a fun time with it";
close;

Assassin:
if (Class == 4013) goto LKnight;

mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Assassin huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";
next;

mes "so do you want to subclass in Assassin?";
next;
menu "Yes",y10,"No",n2;
y10:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;
delitem 7113,1;
delitem 1004,1;
delitem 2621,1;

skill 48,5,0;
skill 49,5,0;
skill 50,5,0;
skill 51,5,0;
skill 52,5,0;
skill 53,1,0;
skill 132,3,0;
skill 133,3,0;
skill 134,5,0;
skill 135,5,0;
skill 136,5,0;
skill 137,3,0;
skill 138,5,0;
skill 139,5,0;
skill 140,5,0;
skill 141,5,0;

set done,1;
mes "their you go. you now obtained the subclass of Assassin";
mes "please have a fun time with it";
close;

Rogue:
if (Class == 4018) goto LKnight;

mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Rogue huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";
next;

mes "so do you want to subclass in Rogue?";
next;
menu "Yes",y11,"No",n2;
y11:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;

delitem 7113,1;
delitem 1004,1;
delitem 2621,1;

skill 48,5,0;
skill 49,5,0;
skill 50,5,0;
skill 51,5,0;
skill 52,5,0;
skill 53,1,0;
skill 2,5,0;
skill 44,5,0;
skill 46,5,0;
skill 124,1,0;
skill 210,5,0;
skill 211,5,0;
skill 212,5,0;
skill 213,3,0;
skill 214,3,0;
skill 215,3,0;
skill 216,3,0;
skill 217,3,0;
skill 218,3,0;
skill 219,3,0;
skill 220,3,0;
skill 221,3,0;
skill 222,1,0;
skill 223,1,0;
skill 224,3,0;
skill 225,5,0;

set done,1;
mes "their you go. you now obtained the subclass of Rogue";
mes "please have a fun time with it";
close;

Wizard:
if (Class == 4010) goto LKnight;

mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Wizard huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";
next;

mes "so do you want to subclass in Wizard?";
next;
menu "Yes",y12,"No",n2;
y12:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;

delitem 7113,1;
delitem 1004,1;
delitem 2621,1;

skill 9,5,0;
skill 10,1,0;
skill 11,5,0;
skill 12,5,0;
skill 13,5,0;
skill 14,5,0;
skill 15,5,0;
skill 16,5,0;
skill 17,5,0;
skill 18,5,0;
skill 19,5,0;
skill 20,5,0;
skill 21,5,0;
skill 80,5,0;
skill 81,5,0;
skill 82,5,0;
skill 83,5,0;
skill 84,5,0;
skill 85,5,0;
skill 86,3,0;
skill 87,5,0;
skill 88,5,0;
skill 89,5,0;
skill 90,3,0;
skill 91,3,0;
skill 92,3,0;
skill 93,1,0;

set done,1;
mes "their you go. you now obtained the subclass of Wizard";
mes "please have a fun time with it";
close;

Sage:
if (Class == 4017) goto LKnight;

mes "[Jeshua]";
mes "ahh so you want to learn the ways of the Sage huh?";
mes "well i will need the following items";
mes "1 ^3355FFBroken Pharaoh Emblem^000000";
mes "1 ^3355FFChivalry Emblem^000000";
mes "1 ^3355FFRing [1]^000000";
next;

mes "so do you want to subclass in Sage?";
next;
menu "Yes",y13,"No",n2;
y13:
if(countitem(7113) < 1 || countitem(1004) < 1 || countitem(2621) < 1) goto L_NOTENOUGH;

delitem 7113,1;
delitem 1004,1;
delitem 2621,1;

skill 9,5,0;
skill 10,1,0;
skill 11,5,0;
skill 12,5,0;
skill 13,5,0;
skill 14,5,0;
skill 15,5,0;
skill 16,5,0;
skill 17,5,0;
skill 18,5,0;
skill 19,5,0;
skill 20,5,0;
skill 21,5,0;
skill 90,3,0;
skill 91,3,0;
skill 93,1,0;
skill 274,5,0;
skill 275,3,0;
skill 276,3,0;
skill 277,3,0;
skill 278,5,0;
skill 279,5,0;
skill 280,3,0;
skill 281,3,0;
skill 282,3,0;
skill 283,3,0;
skill 284,1,0;
skill 285,3,0;
skill 286,3,0;
skill 287,3,0;
skill 288,3,0;
skill 289,3,0;
skill 290,5,0;

set done,1;
mes "their you go. you now obtained the subclass of Sage";
mes "please have a fun time with it";
close;

n2:
mes "[Jeshua]";
mes "ok well mabe another time then";
close;
Lfinished:
mes "[Jeshua]";
mes "Sorry but you have a subclass allready";
mes "if you have another personality mabe i";
mes "can squeeze you in for another subclass";
close;
low:
mes "[Jeshua]";
mes "sorry but your not at the appropriate level to recieve my gift";
mes "come back when you have grown up more";
close;
LKnight:
mes "[Jeshua]";
mes "Sorry but your the same class as the one";
mes "your trying to subclass. i cant do that";
mes "Sorry. please choose another class to sub";
mes "class in";
close;
wedyd:
mes "[Jeshua]";
mes "simply what i do is you pick a class which you wish to know more about, and i give you the skills of that job";
mes "of course i dont want you stronger than me, so i'll only give you half, or any requirements for another skill";
mes "thats basicly it";
close;
L_NOTENOUGH:
mes "[Jeshua]";
mes "sorry but you dont have the right items come back when you do";
close;
}
end;
}

Пишет ошибка в 714 строке.
UPD: Всё, спасибо, разобрался! Но буду благодарен, если кто подкинет ещё какойнибудь сабкласс скриптец.

Автор: Fayl: Дата: 01.23.2011

в конце скрипта две лишние скобки, убрал - вс1 заработало, но скрипт не устраивает.

Автор: Sanasol: Дата: 01.23.2011

http://www.eathena.ws/board/index.php?showtopic=261429&hl=sub-class

поисковая фраза sub-class.....

Автор: Fayl: Дата: 01.23.2011

Sanasol, огромное спасибо!
Веришь, я какие запросы только не делал:
subclass, sub+class, class system, sub system и тд)
UPD:
Возникла проблема, пока пробую разобраться, парелельно спрошу тут. В 40 строке ошибка, как я понимаю одна из скобок лишняя, но какая именно - вот вопрос, пробовал разные вариации, поочерёдно удаляя - всё равно.

prontera,163,188,3	script	[Тёмный Ангел]	403,{
set .@npcname$, "[Тёмный Ангел]"; //Input here NPC name
set .@subclass, 10000; //Input here sub-class change price (0 - disable it)


mes .@npcname$;
if ((class == 0) || (class == 4023) || (class == 4001)) {
mes "Sorry, but you have too little experience...";
close;
} else
mes "Hello, " + strcharinfo(0) + ". Want to change sub-class?";
if (.@subclass) mes "You need " + .@subclass + " zeny to change sub-class!";
next;
switch(select("-Change sub-class","-Cancel")) {

case 1:
mes .@npcname$;
if (zeny < .@subclass) {
mes "You do not have " + .@subclass + " zeny. Please come back later!";
close;
} else
query_sql "SELECT `char_id`, `class`, `base_level`, `job_level`, `base_exp`, `job_exp`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`, `max_sp`, `sp`, `status_point`, `skill_point` FROM `sub_class` WHERE char_id='"+getcharid(0)+"'", .@char_id, .@class, .@base_level, .@job_level, .@base_exp, .@job_exp, .@str, .@agi, .@vit, .@int, .@dex, .@luk, .@max_hp, .@hp, .@max_sp, .@sp, .@status_point, .@skill_point;
if (!.@char_id) query_sql "INSERT INTO `sub_class` (`char_id`) VALUES ('"+getcharid(0)+"')";
mes "Your info:";
mes "Job: " + jobname(class);
mes "Levels: " + baselevel + "/" + joblevel;
mes "Exp: " + baseexp + "/" + jobexp;
mes "STR: " + readparam(bStr) + "; AGI: " + readparam(bAgi) + "; VIT: " + readparam(bVit);
mes "INT: " + readparam(bInt) + "; DEX: " + readparam(bDex) + "; LUK: " + readparam(bLuk);
mes "НР: " + Hp + "/" + MaxHp;
mes "SP: " + Sp + "/" + MaxSP;
mes "Stat/Skill Points: " + StatusPoint + "/" + SkillPoint;
next;
switch(select("-" + jobname(.@class),"-Cancel")) {

case 1:
query_sql "DELETE FROM `sub_class_skill` WHERE `class_id` = "+class+" AND char_id = "+getcharid(0);
query_sql "UPDATE `sub_class` SET `class`='"+class+"', `base_level`='"+baselevel+"', `job_level`='"+joblevel+"', `base_exp`='"+baseexp+"', `job_exp`='"+jobexp+"', `str`='"+readparam(bStr)+"', `agi`='"+readparam(bAgi)+"', `vit`='"+readparam(bVit)+"', `int`='"+readparam(bInt)+"', `dex`='"+readparam(bDex)+"', `luk`='"+readparam(bLuk)+"', `max_hp`='"+MaxHp+"', `hp`='"+Hp+"', `max_sp`='"+MaxSp+"', `sp`='"+Sp+"', `status_point`='"+StatusPoint+"', `skill_point`='"+SkillPoint+"' WHERE char_id='"+getcharid(0)+"'";
getskilllist;
for(set .@i, 0; .@i < @skilllist_count; set .@i, .@i + ) {
query_sql "INSERT INTO `sub_class_skill` (`char_id`, `id`, `lv`, `class_id`) VALUES ('"+getcharid(0)+"','"+@skilllist_id[.@i]+"','"+@skilllist_lv[.@i]+"','"+class+"')";
}
logmes "Change from " + jobname(class) + " to " + jobname(.@class);
set zeny, zeny - .@subclass;
jobchange .@class, 0;
sc_end SC_All;
if (!.@class) {
callfunc "F_ClearJobVar";
resetlvl(1);
set StatusPoint, 48;
mes .@npcname$;
mes "Now you are " + jobname(.@class) + ".";
close;
} else
set baselevel, .@base_level;
set joblevel, .@job_level;
set baseexp, .@base_exp;
set jobexp, .@job_exp;
set .@StrUp, .@str - readparam(bStr);
set .@AgiUp, .@agi - readparam(bAgi);
set .@VitUp, .@vit - readparam(bVit);
set .@IntUp, .@int - readparam(bInt);
set .@DexUp, .@dex - readparam(bDex);
set .@LukUp, .@luk - readparam(bLuk);
statusup2 bStr, .@StrUp;
statusup2 bAgi, .@AgiUp;
statusup2 bVit, .@VitUp;
statusup2 bInt, .@IntUp;
statusup2 bDex, .@DexUp;
statusup2 bLuk, .@LukUp;
set MaxHp, .@max_hp;
set Hp, .@hp;
set MaxSp, .@max_sp;
set SP, .@sp;
set StatusPoint, .@status_point;
set SkillPoint, .@skill_point;
set .@query, query_sql ("SELECT `id`,`lv` FROM sub_class_skill WHERE class_id = "+.@class+" AND char_id = "+getcharid(0),.@SkID,.@SkLV);
for(set .@i, 0; .@i < .@query; set .@i, .@i + 1){
skill(.@SkID[.@i],.@SkLV[.@i],0);
}
mes .@npcname$;
mes "Now you are " + jobname(.@class) + ".";
close;

case 2:
mes .@npcname$;
mes "Come at any time.";
close;
}

case 2:
mes .@npcname$;
mes "Come at any time.";
close;
}
}

Ошибка: