Hello guys. I know we have the default jobmaster in our rathena. Well i disabled the 3rd job class there. I want a separate npc that can change players into 3rd job.
i have one here (one from my old server) its very dirty and doesnt do what i want.
here is the code
//===== eAthena Script =======================================
//= eAthena Jobchanger AKA Aone
//===== By: ==================================================
//= eAthena Dev Team [Ori:LunatikBunnie] [Cur:Lance]
//===== Current Version: =====================================
//= 1.5a
//===== Compatible With: =====================================
//= eAthena SVN Trunk 6674
//===== Description: =========================================
//= Changes your job without asking too much
//= For other info, please contact me at [email protected]
//= Editted menu to avoid button mashing.
//= 1.3 Added TK/SL/SG, thanks to Haplo. Fixed minor bugs [Lupus]
//= script leaves grabage variable: 'lastJob'
//= 1.4 Added NJ/GS, changed all job numbers to Job_* constants.
//= All credits go to pxxx [Skotlex]
//= 1.5 Rewrite everything from scratch. [Lance]
//= 1.5a fixed Baby -> Super Baby change. Switched to JobName() [Lupus]
//============================================================
prontera,163,190,5 script 3rd Job Master 703,{
mes "^ff0000[Jamie]^000000";
if(Class == Job_Lord_Knight || Class == Job_Paladin || Class == Job_Champion || Class == Job_High_Priest || Class == Job_High_Wizard || Class == Job_Professor ||Class == Job_Whitesmith || Class == Job_Creator || Class == Job_Stalker ||Class == Job_Assassin_Cross || Class == Job_Sniper || Class == Job_Gypsy || Class == Job_Clown){
mes "I know, I know, you wanna be a 3rd class, right?";
next;
mes "Now, don't feel down... I'm gonna change you right away...";
next;
mes "Unless you wanna change your mind?";
next;
menu "I don't want to yet...",E_quit,"Yes, Please!!~",N_change;
}
else{
mes "No more jobs are available";
next;
next;
mes "BYE BYE!!~";
close;
}
N_change:
RK:
if(Class == Job_Lord_Knight){
mes "To become Rune Knight,";
mes "you must have the following items.";
next;
mes "You need to give me these:";
mes "1 TCG";
mes "5 Poring Card.";
menu "Okay i have it!",RKc;
}
RG:
if(Class == Job_Paladin){
mes "RG";
mes "RG";
next;
menu "DO YOU HAVE IT ALL??",RGc;
close;
}
SURA:
if(Class == Job_Champion){
mes "SURA";
mes "SURA";
next;
menu "DO YOU HAVE IT ALL??",SURAc;
close;
}
AB:
if(Class == Job_High_Priest){
mes "AB";
mes "AB";
next;
menu "DO YOU HAVE IT ALL??",ABc;
close;
}
WL:
if(Class == Job_High_Wizard){
mes "WL";
mes "WL";
next;
menu "DO YOU HAVE IT ALL??",WLc;
close;
}
SORCE:
if(Class == Job_Professor){
mes "SORCE";
mes "SORCE";
next;
menu "DO YOU HAVE IT ALL??",SORCEc;
close;
}
GEN:
if(Class == Job_Creator){
mes "GEN";
mes "GEN";
next;
menu "DO YOU HAVE IT ALL??",GENc;
close;
}
MECH:
if(Class == Job_Whitesmith){
mes "MECH";
mes "MECH";
next;
menu "DO YOU HAVE IT ALL??",MECHc;
close;
}
SC:
if(Class == Job_Stalker){
mes "SC";
mes "SC";
next;
menu "DO YOU HAVE IT ALL??",SCc;
close;
}
GX:
if(Class == Job_Assassin_Cross){
mes "GX";
mes "GX";
next;
menu "DO YOU HAVE IT ALL??",GXc;
close;
}
RAN:
if(Class == Job_Sniper){
mes "RAN";
mes "RAN";
next;
menu "DO YOU HAVE IT ALL??",RANc;
close;
}
MW:
if(Class == Job_Gypsy || Class == Job_Clown){
mes "MW";
mes "MW";
next;
menu "DO YOU HAVE IT ALL??",MWc;
close;
}
RKc:
if(Class == Job_Lord_Knight && countitem(7227) > 5){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4060;
callfunc "F_ClearJobVar";
delitem 7227,5;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
RGc:
if(Class == Job_Paladin && countitem(1009) > 0){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4073;
callfunc "F_ClearJobVar";
delitem 7227,1;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
SURAc:
if(Class == Job_Champion){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4077;
callfunc "F_ClearJobVar";
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
ABc:
if(Class == Job_High_Priest){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4063;
callfunc "F_ClearJobVar";
delitem 7227,1;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
GENc:
if(Class == Job_Creator){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4078;
callfunc "F_ClearJobVar";
delitem 7227,1;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
MECHc:
if(Class == Job_Whitesmith){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4064;
callfunc "F_ClearJobVar";
delitem 7227,1;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
SCc:
if(Class == Job_Stalker){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4079;
callfunc "F_ClearJobVar";
delitem 7227,1;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
GXc:
if(Class == Job_Assassin_Cross){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4065;
callfunc "F_ClearJobVar";
delitem 7227,1;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
WLc:
if(Class == Job_High_Wizard){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4061;
callfunc "F_ClearJobVar";
delitem 7227,1;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
SORCEc:
if(Class == Job_Professor){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4074;
callfunc "F_ClearJobVar";
delitem 7227,1;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
RANc:
if(Class == Job_Sniper){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4062;
callfunc "F_ClearJobVar";
delitem 7227,1;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
MWc:
if(Class == Job_Clown){
mes "ABRA!!";
next;
mes "KADABRA~~";
next;
mes "ALAKAZAM!!~~";
next;
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4075;
callfunc "F_ClearJobVar";
delitem 7227,1;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
if(Class == Job_Gypsy){
set JobLevel, 1;
set SkillPoint, 0;
jobchange 4076;
callfunc "F_ClearJobVar";
delitem 7227,1;
mes "CONGRATS!!";
next;
mes "NOW YOU ARE A RUNE KNIGHT";
mes "KEEP PLAYING AND SUPPORT HELLRO~~";
next;
mes "KILL THEM ALL AND HAVE FUN!!";
close;
}
else{
next;
mes "ARE YOU AN IDIOT??";
next;
mes "PLEASE CHECK EVERYTHING BEFORE YOU TALK TO ME!!";
next;
mes "BYE~~";
close;
}
E_quit:
mes ".....";
mes "Well, I think it's okay if you're not ready yet.";
emotion e_sweat;
close;
}
It works alright. This is perfect for those free job change. What i want is these....
1. Player must be lvl 200 to be able to change into 3rd class (i set my server to 255 max joblevel)
2. Player must provide 2 to 5 items to be able to become 3rd class. (editable and can add or lessen the item requirements)
3. when player become 3rd class it will broadcast to the whole server like Wowowow! <playername> has become a Champion!
Question
Gidz Cross
Hello guys. I know we have the default jobmaster in our rathena. Well i disabled the 3rd job class there. I want a separate npc that can change players into 3rd job.
i have one here (one from my old server) its very dirty and doesnt do what i want.
here is the code
//===== eAthena Script ======================================= //= eAthena Jobchanger AKA Aone //===== By: ================================================== //= eAthena Dev Team [Ori:LunatikBunnie] [Cur:Lance] //===== Current Version: ===================================== //= 1.5a //===== Compatible With: ===================================== //= eAthena SVN Trunk 6674 //===== Description: ========================================= //= Changes your job without asking too much //= For other info, please contact me at [email protected] //= Editted menu to avoid button mashing. //= 1.3 Added TK/SL/SG, thanks to Haplo. Fixed minor bugs [Lupus] //= script leaves grabage variable: 'lastJob' //= 1.4 Added NJ/GS, changed all job numbers to Job_* constants. //= All credits go to pxxx [Skotlex] //= 1.5 Rewrite everything from scratch. [Lance] //= 1.5a fixed Baby -> Super Baby change. Switched to JobName() [Lupus] //============================================================ prontera,163,190,5 script 3rd Job Master 703,{ mes "^ff0000[Jamie]^000000"; if(Class == Job_Lord_Knight || Class == Job_Paladin || Class == Job_Champion || Class == Job_High_Priest || Class == Job_High_Wizard || Class == Job_Professor ||Class == Job_Whitesmith || Class == Job_Creator || Class == Job_Stalker ||Class == Job_Assassin_Cross || Class == Job_Sniper || Class == Job_Gypsy || Class == Job_Clown){ mes "I know, I know, you wanna be a 3rd class, right?"; next; mes "Now, don't feel down... I'm gonna change you right away..."; next; mes "Unless you wanna change your mind?"; next; menu "I don't want to yet...",E_quit,"Yes, Please!!~",N_change; } else{ mes "No more jobs are available"; next; next; mes "BYE BYE!!~"; close; } N_change: RK: if(Class == Job_Lord_Knight){ mes "To become Rune Knight,"; mes "you must have the following items."; next; mes "You need to give me these:"; mes "1 TCG"; mes "5 Poring Card."; menu "Okay i have it!",RKc; } RG: if(Class == Job_Paladin){ mes "RG"; mes "RG"; next; menu "DO YOU HAVE IT ALL??",RGc; close; } SURA: if(Class == Job_Champion){ mes "SURA"; mes "SURA"; next; menu "DO YOU HAVE IT ALL??",SURAc; close; } AB: if(Class == Job_High_Priest){ mes "AB"; mes "AB"; next; menu "DO YOU HAVE IT ALL??",ABc; close; } WL: if(Class == Job_High_Wizard){ mes "WL"; mes "WL"; next; menu "DO YOU HAVE IT ALL??",WLc; close; } SORCE: if(Class == Job_Professor){ mes "SORCE"; mes "SORCE"; next; menu "DO YOU HAVE IT ALL??",SORCEc; close; } GEN: if(Class == Job_Creator){ mes "GEN"; mes "GEN"; next; menu "DO YOU HAVE IT ALL??",GENc; close; } MECH: if(Class == Job_Whitesmith){ mes "MECH"; mes "MECH"; next; menu "DO YOU HAVE IT ALL??",MECHc; close; } SC: if(Class == Job_Stalker){ mes "SC"; mes "SC"; next; menu "DO YOU HAVE IT ALL??",SCc; close; } GX: if(Class == Job_Assassin_Cross){ mes "GX"; mes "GX"; next; menu "DO YOU HAVE IT ALL??",GXc; close; } RAN: if(Class == Job_Sniper){ mes "RAN"; mes "RAN"; next; menu "DO YOU HAVE IT ALL??",RANc; close; } MW: if(Class == Job_Gypsy || Class == Job_Clown){ mes "MW"; mes "MW"; next; menu "DO YOU HAVE IT ALL??",MWc; close; } RKc: if(Class == Job_Lord_Knight && countitem(7227) > 5){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4060; callfunc "F_ClearJobVar"; delitem 7227,5; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } RGc: if(Class == Job_Paladin && countitem(1009) > 0){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4073; callfunc "F_ClearJobVar"; delitem 7227,1; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } SURAc: if(Class == Job_Champion){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4077; callfunc "F_ClearJobVar"; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } ABc: if(Class == Job_High_Priest){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4063; callfunc "F_ClearJobVar"; delitem 7227,1; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } GENc: if(Class == Job_Creator){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4078; callfunc "F_ClearJobVar"; delitem 7227,1; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } MECHc: if(Class == Job_Whitesmith){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4064; callfunc "F_ClearJobVar"; delitem 7227,1; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } SCc: if(Class == Job_Stalker){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4079; callfunc "F_ClearJobVar"; delitem 7227,1; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } GXc: if(Class == Job_Assassin_Cross){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4065; callfunc "F_ClearJobVar"; delitem 7227,1; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } WLc: if(Class == Job_High_Wizard){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4061; callfunc "F_ClearJobVar"; delitem 7227,1; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } SORCEc: if(Class == Job_Professor){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4074; callfunc "F_ClearJobVar"; delitem 7227,1; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } RANc: if(Class == Job_Sniper){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4062; callfunc "F_ClearJobVar"; delitem 7227,1; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } MWc: if(Class == Job_Clown){ mes "ABRA!!"; next; mes "KADABRA~~"; next; mes "ALAKAZAM!!~~"; next; set JobLevel, 1; set SkillPoint, 0; jobchange 4075; callfunc "F_ClearJobVar"; delitem 7227,1; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } if(Class == Job_Gypsy){ set JobLevel, 1; set SkillPoint, 0; jobchange 4076; callfunc "F_ClearJobVar"; delitem 7227,1; mes "CONGRATS!!"; next; mes "NOW YOU ARE A RUNE KNIGHT"; mes "KEEP PLAYING AND SUPPORT HELLRO~~"; next; mes "KILL THEM ALL AND HAVE FUN!!"; close; } else{ next; mes "ARE YOU AN IDIOT??"; next; mes "PLEASE CHECK EVERYTHING BEFORE YOU TALK TO ME!!"; next; mes "BYE~~"; close; } E_quit: mes "....."; mes "Well, I think it's okay if you're not ready yet."; emotion e_sweat; close; }
It works alright. This is perfect for those free job change. What i want is these....
1. Player must be lvl 200 to be able to change into 3rd class (i set my server to 255 max joblevel)
2. Player must provide 2 to 5 items to be able to become 3rd class. (editable and can add or lessen the item requirements)
3. when player become 3rd class it will broadcast to the whole server like Wowowow! <playername> has become a Champion!
something like that.
thank you so much guys!
Edited by gidzdlcrzadditional infos
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.