Global_Functions.txt 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //===== eAthena Script =======================================
  2. //= Global Functions
  3. //===== By: ==================================================
  4. //= Lupus, kobra_k88
  5. //===== Current Version: =====================================
  6. //= 1.2
  7. //===== Compatible With: =====================================
  8. //= eAthena 1.0
  9. //===== Description: =========================================
  10. //= <Description>
  11. //===== Additional Comments: =================================
  12. //= Added F_ClearJobVar - on getting a new job it clears all Job Quest variables
  13. //= Removed individual job check functions as they were redundant [kobra_k88]
  14. //============================================================
  15. //=========================================
  16. // Function that clears job quest variables
  17. //=========================================
  18. function script F_ClearJobVar {
  19. // Misc ---------------------------------
  20. set JBLVL,0;
  21. // First Class Jobs ---------------------
  22. set job_acolyte_q,0; set job_acolyte_q2,0;
  23. set job_archer_q,0;
  24. set job_magician_q,0;
  25. set job_merchant_q,0; set job_merchant_q2,0; set job_merchant_q3,0;
  26. set job_sword_q,0; set job_sword_q2,0;
  27. set job_thief_q,0;
  28. // 2-1 Jobs ------------------------------
  29. set ASSIN_Q,0; set ASSIN_Q2,0;
  30. set BSMITH_Q,0; set BSMITH_Q2,0;
  31. set HNTR_Q,0; set HNTR_Q2,0;
  32. set KNIGHT_Q,0; set KNIGHT_Q2,0;
  33. set PRIEST_Q,0; set PRIEST_Q2,0; set PRIEST_Q3,0;
  34. set WIZ_Q,0; set WIZ_Q2,0;
  35. // 2-2 Jobs ------------------------------
  36. set ROGUE_Q,0; set ROGUE_Q2,0;
  37. set ALCH_Q,0; set ALCH_Q2,0;
  38. set MONK_Q,0;
  39. return;
  40. }
  41. //=====================================================
  42. // Functions used to check a players job class
  43. //----------------------------------------------------
  44. // HOW TO USE:
  45. // i.e. We need all holy classes but monks
  46. // if ( callfunc("Is_Holy_Class") && callfunc("Is_Monk")==0 ) goto L_Start;
  47. //=======================================================
  48. //------------------------------------------------------
  49. // returns 1 if the player is either Aco,Monk,Priest,Aco High,High Priest,
  50. // Champion, 0 otherwise
  51. function script Is_Holy_Class {
  52. return ( Class==Job_Acolyte || Class==Job_Priest || Class==Job_Monk || Class==4005 || Class==4009 || Class==4016 );
  53. }
  54. //------------------------------------------------------
  55. // returns 1 if the player is either Archer,Hunter,Bard,Dancer,Archer High,Sniper,
  56. // Clown,Gypsy, 0 otherwise
  57. function script Is_Bow_Class {
  58. return ( Class==Job_Archer || Class==Job_Hunter || Class==Job_Bard || Class==Job_Dancer || Class==4004 || Class==4012 || Class==4020 || Class==4021);
  59. }
  60. //------------------------------------------------------
  61. // returns 1 if the player is either Mage,Wizard,Sage,Mage High,High Wizard,
  62. // Professor, 0 otherwise
  63. function script Is_Magic_Class {
  64. return ( Class==Job_Mage || Class==Job_Wizard || Class==Job_Sage || Class==4003 || Class==4010 || Class==4017 );
  65. }
  66. //----------------------------------------------------
  67. // returns 1 if the player is either Merc,Blacksmith,Alchemist,Merc High,
  68. // Whitesmith,Creator, 0 otherwise
  69. function script Is_Merc_Class {
  70. return ( Class==Job_Merchant || Class==Job_Blacksmith || Class==Job_Alchem || Class==4006 || Class==4011 || Class==4019 );
  71. }
  72. //------------------------------------------------------
  73. // returns 1 if the player is either Thief,Assassin,Rogue,Thief High, Assassin Cross
  74. // Stalker, 0 otherwise
  75. function script Is_Thief_Class {
  76. return ( Class==Job_Thief || Class==Job_Assassin || Class==Job_Rogue || Class==4007 || Class==4013 || Class==4018 );
  77. }
  78. //-----------------------------------------------------
  79. // returns 1 if the player is either Swordy,Knight,Crusader,Swordy High,
  80. // Lord Knight,Paladin, 0 otherwise
  81. function script Is_Sword_Class {
  82. return ( Class==Job_Swordman || Class==Job_Knight || Class==Job_Knight2 || Class==Job_Crusader || Class==Job_Crusader2 || Class==4002 || Class==4008 || Class==4014 || Class==4015 || Class==4022 );
  83. }
  84. //-----------------------------------------------------
  85. // returns 1 if the player is either Super Novice or Super Baby, 0 otherwise
  86. function script Is_Super_Class {
  87. return ( Class==Job_Super_Baby || Class==Job_SuperNovice );
  88. }