//===== eAthena Script ======================================= //= Global Functions //===== By: ================================================== //= Lupus, kobra_k88 //===== Current Version: ===================================== //= 1.3b //===== Compatible With: ===================================== //= eAthena 1.0 //===== Description: ========================================= //= //===== Additional Comments: ================================= //= Added F_ClearJobVar - on getting a new job it clears all Job Quest variables //= Removed individual job check functions as they were redundant [kobra_k88] //= 1.3 Added Job Change Function for Baby/Normal Classes //= 1.3b a fix, due to const.txt change [Lupus] //============================================================ //========================================= // Function that clears job quest variables //========================================= function script F_ClearJobVar { // Misc --------------------------------- set JBLVL,0; // First Class Jobs --------------------- set job_acolyte_q,0; set job_acolyte_q2,0; set job_archer_q,0; set job_magician_q,0; set job_merchant_q,0; set job_merchant_q2,0; set job_merchant_q3,0; set job_sword_q,0; set job_sword_q2,0; set SWTEST, 0; set job_thief_q,0; // Super Novice set SUPNOV_Q,0; // 2-1 Jobs ------------------------------ set ASSIN_Q,0; set ASSIN_Q2,0; set BSMITH_Q,0; set BSMITH_Q2,0; set HNTR_Q,0; set HNTR_Q2,0; set KNIGHT_Q,0; set KNIGHT_Q2,0; set PRIEST_Q,0; set PRIEST_Q2,0; set PRIEST_Q3,0; set WIZ_Q,0; set WIZ_Q2,0; // 2-2 Jobs ------------------------------ set ROGUE_Q,0; set ROGUE_Q2,0; set ALCH_Q,0; set ALCH_Q2,0; set CRUS_Q,0; set MONK_Q,0; set SAGE_Q,0; set SAGE_Q2,0; set DANC_Q,0; return; } //===================================================== // Class = Internal Class ID // BaseJob = Base Job (0..23) // Upper : 0 - Default, 1 - Advanced, 2 - Baby function script Job_Change { if (Upper==0) jobchange getarg(0); //Change Job For Common if (Upper==2) jobchange getarg(0)+46; //Change Job For Baby Class return; } //===================================================== // Functions used to check a players job class //---------------------------------------------------- // HOW TO USE: // i.e. We need all holy classes but monks // if ( callfunc("Is_Holy_Class") && callfunc("Is_Monk")==0 ) goto L_Start; //======================================================= //------------------------------------------------------ // returns 1 if the player is either Aco,Monk,Priest,Aco High,High Priest, // Champion, 0 otherwise function script Is_Holy_Class { return ( BaseJob==Job_Acolyte || BaseJob==Job_Priest || BaseJob==Job_Monk ); } //------------------------------------------------------ // returns 1 if the player is either Archer,Hunter,Bard,Dancer,Archer High,Sniper, // Clown,Gypsy, 0 otherwise function script Is_Bow_Class { return ( BaseJob==Job_Archer || BaseJob==Job_Hunter || BaseJob==Job_Bard || BaseJob==Job_Dancer ); } //------------------------------------------------------ // returns 1 if the player is either Mage,Wizard,Sage,Mage High,High Wizard, // Professor, 0 otherwise function script Is_Magic_Class { return ( BaseJob==Job_Mage || BaseJob==Job_Wizard || BaseJob==Job_Sage ); } //---------------------------------------------------- // returns 1 if the player is either Merc,Blacksmith,Alchemist,Merc High, // Whitesmith,Creator, 0 otherwise function script Is_Merc_Class { return ( BaseJob==Job_Merchant || BaseJob==Job_Blacksmith || BaseJob==Job_Alchem ); } //------------------------------------------------------ // returns 1 if the player is either Thief,Assassin,Rogue,Thief High, Assassin Cross // Stalker, 0 otherwise function script Is_Thief_Class { return ( BaseJob==Job_Thief || BaseJob==Job_Assassin || BaseJob==Job_Rogue ); } //----------------------------------------------------- // returns 1 if the player is either Swordy,Knight,Crusader,Swordy High, // Lord Knight,Paladin, 0 otherwise function script Is_Sword_Class { return ( BaseJob==Job_Swordman || BaseJob==Job_Knight || BaseJob==Job_Knight2 || BaseJob==Job_Crusader || BaseJob==Job_Crusader2 ); }