Advertisement
raphael014

Custom Achievement System

Nov 12th, 2014
1,296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.70 KB | None | 0 0
  1. - script achieve -1,{
  2. OnPrize:
  3. //============================================================================
  4. specialeffect2 338;
  5. specialeffect2 582;
  6. specialeffect2 202;
  7. specialeffect2 203;
  8. specialeffect2 203;
  9. specialeffect2 203;
  10. specialeffect2 679;
  11. specialeffect2 680;
  12. set #CASHPOINTS, #CASHPOINTS+1000;
  13. dispbottom "You now have "+#CASHPOINTS+" Cash points";
  14. set #VOTEPOINTS, #VOTEPOINTS+200;
  15. dispbottom "You now have "+#VOTEPOINTS+" Vote points";
  16. set #Treasure_Token, #Treasure_Token+500;
  17. dispbottom "You now have "+#Treasure_Token+" Treasure Token";
  18.  
  19. // Event achievement
  20. if(evntwin == 1 && claimevt == 0) {
  21. getitem 12399,20;
  22. getitem 14232,1000;
  23. getitem 14004,1000;
  24. set claimevt, 1;
  25. }
  26. // play time level 1
  27. if(#ollevel == 1 && claimol1 == 0) {
  28. getnameditem 29002,""+strcharinfo(0)+"";
  29. set claimol1, 1;
  30. }
  31. // play time level 2
  32. if(#ollevel == 2 && claimol2 == 0) {
  33. getnameditem 2679,""+strcharinfo(0)+"";
  34. getnameditem 2678,""+strcharinfo(0)+"";
  35. set claimol2, 1;
  36. }
  37. // play time level 3
  38. if(#ollevel == 3 && claimol3 == 0) {
  39. getitem2 2524,1,1,0,0,0,4081,4109,4095;
  40. set claimol3, 1;
  41. }
  42. // credit level 1
  43. if(firstclass == 1 && firstclaim1 == 0) {
  44. getnameditem 2410,""+strcharinfo(0)+"";
  45. set firstclaim1, 1;
  46. }
  47. // credit level 2
  48. if(firstclass == 2 && firstclaim2 == 0) {
  49. getitem2 2541,1,1,0,0,0,4285,0,0;
  50. set firstclaim2, 1;
  51. }
  52. // credit level 3
  53. if(firstclass == 3 && firstclaim3 == 0) {
  54. getitem2 2383,1,1,0,0,0,4105,0,0;
  55. set firstclaim3, 1;
  56. }
  57. // pvp level 1
  58. if(redplyr == 1 && r3dclaim1 == 0) {
  59. getitem2 1640,1,1,10,0,0,0,0,4365;
  60. set r3dclaim1, 1;
  61. }
  62. // pvp level 2
  63. if(redplyr == 2 && r3dclaim2 == 0) {
  64. getitem2 13401,1,1,10,0,0,0,0,4361;
  65. set r3dclaim2, 1;
  66. }
  67. // pvp level 3
  68. if(redplyr == 3 && r3dclaim3 == 0) {
  69. getitem2 1729,1,1,10,0,0,0,0,4407;
  70. set r3dclaim3, 1;
  71. }
  72. // beast master level 1
  73. if(b3ast == 1 && b3astclaim1 == 0) {
  74. getitem2 5138,1,1,0,0,0,4132,0,0;
  75. set b3astclaim1, 1;
  76. }
  77. // beast master level 2
  78. if(b3ast == 2 && b3astclaim2 == 0) {
  79. getitem2 29018,1,1,0,0,0,4709,4330,0;
  80. set b3astclaim2, 1;
  81. }
  82. // beast master level 3
  83. if(b3ast == 3 && b3astclaim3 == 0) {
  84. getitem2 5135,1,1,0,0,0,4704,4724,4714;
  85. set b3astclaim3, 1;
  86. }
  87. // thana hunter
  88. if(thahntr == 1 && thanaclaim1 == 0) {
  89. getitem2 1729,1,1,10,0,0,0,0,4399;
  90. getitem2 13401,1,1,10,0,0,0,0,4399;
  91. set thanaclaim1, 1;
  92. }
  93. // lighthalzen level 1
  94. if(lightmvp == 1 && lhzclaim1 == 0) {
  95. getitem2 2524,1,1,6,0,0,4704,4724,4714;
  96. set lhzclaim1, 1;
  97. }
  98. // lighthalzen level 2
  99. if(lightmvp == 2 && lhzclaim2 == 0) {
  100. getitem2 2524,2,1,7,0,0,4704,4724,4714;
  101. set lhzclaim2, 1;
  102. }
  103. // lighthalzen level 3
  104. if(lightmvp == 3 && lhzclaim3 == 0) {
  105. getitem2 2524,2,1,8,0,0,4704,4724,4714;
  106. set lhzclaim3, 1;
  107. }
  108. // lighthalzen level 4
  109. if(lightmvp == 4 && lhzclaim4 == 0) {
  110. getitem2 2524,2,1,9,0,0,4704,4724,4714;
  111. set lhzclaim4, 1;
  112. }
  113. // lighthalzen level 5
  114. if(lightmvp == 5 && lhzclaim5 == 0) {
  115. getitem2 2524,3,1,10,0,0,4704,4724,4714;
  116. set lhzclaim5, 1;
  117. }
  118. // mvp beast
  119. if(beastmvp == 1 && b3astmvpclaim1 == 0) {
  120. getitem2 5151,1,1,0,0,0,4704,4724,4714;
  121. set b3astmvpclaim1, 1;
  122. }
  123. //==================================================================================
  124. return;
  125. OnInit:
  126. //====================Configuration=========================================
  127. setarray .lhzid[0],1651,1650,1649,1648,1647,1646; // Lighthalzen MVPs
  128. //===================================================================================
  129. set .beastmstr1, 10000; // monster kills for beast master level 1
  130. set .beastmstr2, 50000; // monster kills for beast master level 2
  131. set .beastmstr3, 100000; // monster kills for beast master level 3
  132. //===================================================================================
  133. set .lhzlvl1, 150; // lighthalzen mvp kill for lhz level 1
  134. set .lhzlvl2, 300; // lighthalzen mvp kill for lhz level 2
  135. set .lhzlvl3, 450; // lighthalzen mvp kill for lhz level 3
  136. set .lhzlvl4, 600; // lighthalzen mvp kill for lhz level 4
  137. set .lhzlvl5, 1000; // lighthalzen mvp kill for lhz level 5
  138. //===================================================================================
  139. set .thahntr, 200; // Thanatos kill for Thanatos hunter level 1
  140. //===================================================================================
  141. set .creditlvl1, 10000; // first class player level 1
  142. set .creditlvl2, 20000; // first class player level 2
  143. set .creditlvl3, 30000; // first class player level 3
  144. //===================================================================================
  145. set .rdplyr1, 5000; // PK player level 1
  146. set .rdplyr2, 10000; // PK player level 2
  147. set .rdplyr3, 30000; // PK player level 3
  148. //===================================================================================
  149. set .oltime1, 8640000; // 100 days
  150. set .oltime2, 17280000; // 200 days
  151. set .oltime3, 25920000; // 300 days
  152. //===================================================================================
  153. set .mvpb3ast, 50000; // mvp kills for mvp beast master
  154. //===================================================================================
  155. set .evtw1nn3r, 10000; // events won
  156. //===================================================================================
  157. set .hofame, 7; // Number of achievements to be declared hall of fame
  158. //===================================================================================
  159. end; // end oninit
  160. //===================================================================================
  161. OnPCLoginEvent:
  162. //===================================================================================
  163. //======================Hall of Fame====================================
  164. if (#fam0us < 1) {
  165. if (hofame == .hofame) {
  166. announce ""+strcharinfo(0)+" just became EluneRO's Hall of Fame Member",0;
  167. set #fam0us, 1;
  168. set prgrss, 0;
  169. query_sql("INSERT INTO `achievement` VALUES (NULL, " + getcharid(3) + "," + getcharid(0) + ",'" + escape_sql(strcharinfo(0)) + "','Hall of Fame', 1)");
  170. callsub OnPrize;
  171. }
  172. }
  173. //===================Event Achievement ==========================================
  174. if (evntwin < 1) {
  175. if(evtjunk >= .evtw1nn3r) {
  176. set evntwin, 1;
  177. announce ""+strcharinfo(0)+" just achieved the 'Event Expert' Achievement",0;
  178. query_sql("INSERT INTO `achievement` VALUES (NULL, " + getcharid(3) + "," + getcharid(0) + ",'" + escape_sql(strcharinfo(0)) + "','Event Master', 1)");
  179. callsub OnPrize;
  180. }
  181. }
  182. //===================================================================================
  183. //========== Total Played Time ========================================================
  184. @login_time = gettimetick(2);
  185. if (#ollevel == 0 && #online_time >= .oltime1 && #online_time < .oltime2) {
  186. announce ""+strcharinfo(0)+" achieved '100 Days in eluneRO' Achievement",0;
  187. set #ollevel, 1;
  188. query_sql("INSERT INTO `achievement` VALUES (NULL, " + getcharid(3) + "," + getcharid(0) + ",'" + escape_sql(strcharinfo(0)) + "','Hundred Days', 1)");
  189. callsub OnPrize;
  190. }
  191. else if(#ollevel == 1 && #online_time >= .oltime2 && #online_time < .oltime3) {
  192. announce ""+strcharinfo(0)+" achieved '200 Days in eluneRO' Achievement",0;
  193. set #ollevel, 2;
  194. query_sql("UPDATE `achievement` SET `val`=2 WHERE `char_id`="+getcharid(0)+" and `achievement`='Hundred Days' ");
  195. callsub OnPrize;
  196. }
  197. else if(#ollevel == 2 && #online_time >= .oltime3 && #ollevel == 2) {
  198. announce ""+strcharinfo(0)+" achieved '300 Days in eluneRO' Achievement",0;
  199. set #ollevel, 3;
  200. set hofame, hofame+1;
  201. query_sql("UPDATE `achievement` SET `val`=3 WHERE `char_id`="+getcharid(0)+" and `achievement`='Hundred Days' ");
  202. callsub OnPrize;
  203. }
  204. //===================================================================================
  205. //==================== Credits Achievement ==========================================
  206. if(countitem(7227) >= .creditlvl1 && firstclass == 0){
  207. announce ""+strcharinfo(0)+" just achieved 'First Class Player' Achivement Level 1",0;
  208. set firstclass,1;
  209. query_sql("INSERT INTO `achievement` VALUES (NULL, " + getcharid(3) + "," + getcharid(0) + ",'" + escape_sql(strcharinfo(0)) + "','1st Class', 1)");
  210. callsub OnPrize;
  211. }
  212. else if(countitem(7227) >= .creditlvl2 && firstclass == 1){
  213. announce ""+strcharinfo(0)+" just achieved 'First Class Player' Achivement Level 2",0;
  214. set firstclass,2;
  215. query_sql("UPDATE `achievement` SET `val`=2 WHERE `char_id`="+getcharid(0)+" and `achievement`='1st Class' ");
  216. callsub OnPrize;
  217. }
  218. else if(countitem(7227) >= .creditlvl3 && firstclass == 2){
  219. announce ""+strcharinfo(0)+" just achieved 'First Class Player' Achivement Level 3",0;
  220. set firstclass,3;
  221. set hofame, hofame+1;
  222. query_sql("UPDATE `achievement` SET `val`=3 WHERE `char_id`="+getcharid(0)+" and `achievement`='1st Class' ");
  223. callsub OnPrize;
  224. }
  225. //===================================================================================
  226. end; // end onpclogin
  227. //===================================================================================
  228. OnPCLogoutEvent:
  229. //======================== Total Played Time ==========================================
  230. #online_time += ( gettimetick(2) - @login_time );
  231. //===================================================================================
  232. end; // end onpclogout
  233. //===================================================================================
  234. OnPCKillEvent:
  235. //=======================PvP Achievement ==========================================
  236. if (redplyr < 3) {
  237. set rdr3main1, .rdplyr1 - KILL;
  238. if (rdr3main1 < 0) { set rdr3main1, 0; }
  239. set rdr3main2, .rdplyr2 - KILL;
  240. if (rdr3main2 < 0) { set rdr3main2, 0; }
  241. set rdr3main3, .rdplyr3 - KILL;
  242. if (rdr3main3 < 0) { set rdr3main3, 0; }
  243. if (prgrss && redplyr == 0) { dispbottom " "+rdr3main1+" Player Kill to achieve Red Player Level 1"; }
  244. if (prgrss && redplyr == 1) { dispbottom " "+rdr3main2+" Player Kill to achieve Red Player Level 2"; }
  245. if (prgrss && redplyr == 2) { dispbottom " "+rdr3main3+" Player Kill to achieve Red Player Level 3"; }
  246. if (KILL == .rdplyr1 && redplyr == 0) {
  247. announce ""+strcharinfo(0)+" just achieved 'Red Player Level 1'",0;
  248. set redplyr, 1;
  249. query_sql("INSERT INTO `achievement` VALUES (NULL, " + getcharid(3) + "," + getcharid(0) + ",'" + escape_sql(strcharinfo(0)) + "','Red Player', 1)");
  250. callsub OnPrize;
  251. }
  252. else if (KILL == .rdplyr2 && redplyr == 1) {
  253. announce ""+strcharinfo(0)+" just achieved achieved 'Red Player Level 2'",0;
  254. set redplyr, 2;
  255. query_sql("UPDATE `achievement` SET `val`=2 WHERE `char_id`="+getcharid(0)+" and `achievement`='Red Player' ");
  256. callsub OnPrize;
  257. }
  258. else if (KILL == .rdplyr3 && redplyr == 2) {
  259. announce ""+strcharinfo(0)+" just achieved achieved 'Red Player Level 3'",0;
  260. set redplyr, 3;
  261. set hofame, hofame+1;
  262. query_sql("UPDATE `achievement` SET `val`=3 WHERE `char_id`="+getcharid(0)+" and `achievement`='Red Player' ");
  263. callsub OnPrize;
  264. }
  265. }
  266. //===================================================================================
  267. end; // end onpckill
  268. //===================================================================================
  269. OnNPCKillEvent:
  270. //=======================BEAST HUNTER ACHIEVEMENT===================================
  271.  
  272. if (b3ast < 3 && strcharinfo(3) != "ordeal_3-2") { // check if not yet finished
  273. set bstkilled, bstkilled+1; // Kill Counter
  274. set bstremain1, .beastmstr1 - bstkilled; // count how many more before achieving Beast Hunter 1
  275. if (bstremain1 < 0) { set bstremain1, 0; }
  276. set bstremain2, .beastmstr2 - bstkilled; // count how many more before achieving Beast Master 2
  277. if (bstremain2 < 0) { set bstremain2, 0; }
  278. set bstremain3, .beastmstr3 - bstkilled; // count how many more before achieving Beast Master 3
  279. if (bstremain3 < 0) { set bstremain3, 0; }
  280. if (prgrss && b3ast == 0) { dispbottom " "+bstremain1+" monsters to kill to achieve Beast Master Level 1"; }
  281. if (prgrss && b3ast == 1) { dispbottom " "+bstremain2+" monsters to kill to achieve Beast Master Level 2"; }
  282. if (prgrss && b3ast == 2) { dispbottom " "+bstremain3+" monsters to kill to achieve Beast Master Level 3"; }
  283. if (bstkilled == .beastmstr1) {
  284. announce ""+strcharinfo(0)+" just achieved the Beast Master Level 1",0;
  285. set b3ast,1;
  286. query_sql("INSERT INTO `achievement` VALUES (NULL, " + getcharid(3) + "," + getcharid(0) + ",'" + escape_sql(strcharinfo(0)) + "','Beast Master', 1)");
  287. callsub OnPrize;
  288. } // completed Beast Master Level 1
  289. if (bstkilled == .beastmstr2) {
  290. announce ""+strcharinfo(0)+" just achieved the Beast Master Level 2",0;
  291. set b3ast,2;
  292. query_sql("UPDATE `achievement` SET `val`=2 WHERE `char_id`="+getcharid(0)+" and `achievement`='Beast Master' ");
  293. callsub OnPrize;
  294. } // completed Beast Hunter Level 2
  295. if (bstkilled == .beastmstr3) {
  296. announce ""+strcharinfo(0)+" just achieved the Beast Master Level 3",0;
  297. set b3ast,3;
  298. set hofame, hofame+1;
  299. query_sql("UPDATE `achievement` SET `val`=3 WHERE `char_id`="+getcharid(0)+" and `achievement`='Beast Master' ");
  300. callsub OnPrize;
  301. } // completed Beast Hunter Level 3
  302.  
  303. }
  304. //===================================================================================
  305. //=======================THANATOS HUNTER=============================================
  306. if (thahntr < 1 && strcharinfo(3) == "thana_boss" && killedrid == 1708) {
  307. set thnkill, thnkill+1;
  308. set thnremain, .thahntr - thnkill; // count how many more before achieving Thanatos achievement
  309. if (prgrss && .thahntr == 0) { dispbottom " "+thnremain+" Thanatos MVP to kill to achieve Thanatos Hunter"; }
  310. if (thnkill == .thahntr) {
  311. announce ""+strcharinfo(0)+" just achieved the 'Thanatos Hunter' Achievement",0;
  312. set thahntr,1;
  313. set hofame, hofame+1;
  314. query_sql("INSERT INTO `achievement` VALUES (NULL, " + getcharid(3) + "," + getcharid(0) + ",'" + escape_sql(strcharinfo(0)) + "','Thanatos Hunter', 1)");
  315. callsub OnPrize;
  316. } // thanatos hunter completed
  317. }
  318.  
  319. //===================================================================================
  320. //===================LIGHTHALZEN MVP ACHIEVEMENT=====================================
  321. if ( lightmvp < 5 ) {
  322. for(set @c,0; @c < getarraysize(.lhzid); set @c, @c + 1) {
  323. if (killedrid == .lhzid[@c] && strcharinfo(3) == "lhz_dun03"){
  324. set lhzkill, lhzkill +1;
  325. set lhzremain1, .lhzlvl1 - lhzkill; // count how many more before achieving Lhz level 1;
  326. if (lhzremain1 < 0) { set lhzremain1, 0; }
  327. set lhzremain2, .lhzlvl2 - lhzkill; // count how many more before achieving Lhz level 2;
  328. if (lhzremain2 < 0) { set lhzremain2, 0; }
  329. set lhzremain3, .lhzlvl3 - lhzkill; // count how many more before achieving Lhz level 3;
  330. if (lhzremain3 < 0) { set lhzremain3, 0; }
  331. set lhzremain4, .lhzlvl4 - lhzkill; // count how many more before achieving Lhz level 4;
  332. if (lhzremain4 < 0) { set lhzremain4, 0; }
  333. set lhzremain5, .lhzlvl5 - lhzkill; // count how many more before achieving Lhz level 5;
  334. if (lhzremain5 < 0) { set lhzremain5, 0; }
  335. if (prgrss && lightmvp == 0) { dispbottom " "+lhzremain1+" Lighthalzen MVP to kill to achieve Lighthalzen Hunter Level 1"; }
  336. if (prgrss && lightmvp == 1) { dispbottom " "+lhzremain2+" Lighthalzen MVP to kill to achieve Lighthalzen Hunter Level 2"; }
  337. if (prgrss && lightmvp == 2) { dispbottom " "+lhzremain3+" Lighthalzen MVP to kill to achieve Lighthalzen Hunter Level 3"; }
  338. if (prgrss && lightmvp == 3) { dispbottom " "+lhzremain4+" Lighthalzen MVP to kill to achieve Lighthalzen Hunter Level 4"; }
  339. if (prgrss && lightmvp == 4) { dispbottom " "+lhzremain5+" Lighthalzen MVP to kill to achieve Lighthalzen Hunter Level 5"; }
  340. if (lhzkill == .lhzlvl1) {
  341. announce ""+strcharinfo(0)+" just achieved Lighthalzen Hunter Level 1.",0;
  342. set lightmvp,1;
  343. query_sql("INSERT INTO `achievement` VALUES (NULL, " + getcharid(3) + "," + getcharid(0) + ",'" + escape_sql(strcharinfo(0)) + "','Lighthalzen Hunter', 1)");
  344. callsub OnPrize;
  345. } // completed LHZ level 1
  346. if (lhzkill == .lhzlvl2) {
  347. announce ""+strcharinfo(0)+" just achieved Lighthalzen Hunter Level 2.",0;
  348. set lightmvp,2;
  349. query_sql("UPDATE `achievement` SET `val`=2 WHERE `char_id`="+getcharid(0)+" and `achievement`='Lighthalzen Hunter' ");
  350. callsub OnPrize;
  351. } // completed LHZ level 2
  352. if (lhzkill == .lhzlvl2) {
  353. announce ""+strcharinfo(0)+" just achieved Lighthalzen Hunter Level 3.",0;
  354. set lightmvp,3;
  355. query_sql("UPDATE `achievement` SET `val`=3 WHERE `char_id`="+getcharid(0)+" and `achievement`='Lighthalzen Hunter' ");
  356. callsub OnPrize;
  357. } // completed LHZ level 3
  358. if (lhzkill == .lhzlvl4) {
  359. announce ""+strcharinfo(0)+" just achieved Lighthalzen Hunter Level 4.",0;
  360. set lightmvp,4;
  361. query_sql("UPDATE `achievement` SET `val`=4 WHERE `char_id`="+getcharid(0)+" and `achievement`='Lighthalzen Hunter' ");
  362. callsub OnPrize;
  363. } // completed LHZ level 4
  364. if (lhzkill == .lhzlvl5) {
  365. announce ""+strcharinfo(0)+" just achieved Lighthalzen Hunter Level 5.",0;
  366. set lightmvp,5;
  367. set hofame, hofame+1;
  368. query_sql("UPDATE `achievement` SET `val`=5 WHERE `char_id`="+getcharid(0)+" and `achievement`='Lighthalzen Hunter' ");
  369. callsub OnPrize;
  370. } // completed LHZ level 5
  371. }
  372. }
  373. }
  374. //===================================================================================
  375. //====================MVP Beast Master=====================================
  376. if (beastmvp < 1) {
  377. for(set @c,0; @c < getarraysize(.lhzid); set @c, @c + 1) {
  378. if (killedrid != .lhzid[@c] && getmonsterinfo( killedrid,MOB_MVPEXP ) ){
  379. set mvpk1ller, mvpk1ller + 1;
  380. set mvpr3main, .mvpb3ast - mvpk1ller;
  381. if (mvpr3main < 0) { set mvp3main, 0; }
  382. if (prgrss && beastmvp == 0) { dispbottom " "+mvpr3main+" MvP kills to achieve MvP Beast Master Achievement"; }
  383. if (mvpk1ller == .mvpb3ast) {
  384. announce " "+strcharinfo(0)+" just achieved 'MVP Beast Master Achievement'",0;
  385. set beastmvp,1;
  386. set hofame, hofame+1;
  387. query_sql("INSERT INTO `achievement` VALUES (NULL, " + getcharid(3) + "," + getcharid(0) + ",'" + escape_sql(strcharinfo(0)) + "','MVP Beast Master', 1)");
  388. callsub OnPrize;
  389. }
  390. }
  391. }
  392. }
  393. //===================================================================================
  394. end; // end onnpckill
  395. //===================================================================================
  396.  
  397.  
  398. }
  399. //=====================Status/Ladder NPC===================================
  400. prontera,164,189,3 script Achievement Manager 415,{
  401.  
  402.  
  403.  
  404. mes "[ Achievement Manager ]";
  405. mes "Hello ^FF0000"+strcharinfo(0)+"^000000.";
  406. mes "How may I help you today?";
  407. switch(select("Information:View Top Players:View Hall of Fame Members:View my Progress:"+((prgrss < 1) ? ":Display Progress" : "Remove Progress Display" "") ) ) {
  408. case 1:
  409. next;
  410. mes "[ Achievement Manager ]";
  411. mes "Top players are those who struggle to be well known and respected in ^00CC00eluneRO^000000. All achievements are designed to be long term to determine player's resilence.";
  412. next;
  413. mes "[ Achievement Manager ]";
  414. mes "All players will receive the following for each unlocked achievement.";
  415. next;
  416. mes "[ Achievement Manager ]";
  417. mes "1. ^00CC00 1,000^000000 Cashpoints";
  418. mes "2. ^00CC00 200^000000 Vote points";
  419. mes "3. ^00CC00 500^000000 Token Points";
  420. mes "4. Achievement's ^00CC00Special Prize^000000";
  421. next;
  422. mes "[ Achievement Manager ]";
  423. mes "Players will receive a different special prize for each achievement.";
  424. close;
  425.  
  426. case 2:
  427. next;
  428. switch(select("Playing Time:Credit:Beast Master:PVP:Event")) {
  429.  
  430. case 1:
  431. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Hundred Days' and `val`=3", .@3hndrday$);
  432. mes "[ ^00CC00300^000000 Days ]";
  433. for(set .@i, 0; .@i < getarraysize(.@3hndrday$); set .@i, .@i + 1){
  434. mes .@i+1+". "+.@3hndrday$[.@i]+" ";
  435. }
  436. next;
  437. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Hundred Days' and `val`=2", .@2hndrday$);
  438. mes "[ ^00CC00200^000000 Days ]";
  439. for(set .@i, 0; .@i < getarraysize(.@2hndrday$); set .@i, .@i + 1){
  440. mes .@i+1+". "+.@2hndrday$[.@i]+" ";
  441. }
  442. next;
  443. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Hundred Days' and `val`=1", .@1hndrday$);
  444. mes "[ ^00CC00100^000000 Days ]";
  445. for(set .@i, 0; .@i < getarraysize(.@1hndrday$); set .@i, .@i + 1){
  446. mes .@i+1+". "+.@1hndrday$[.@i]+" ";
  447. }
  448. close;
  449.  
  450. case 2:
  451. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = '1st Class' and `val`=3", .@3rd$);
  452. mes "[ 1st Class ^00CC00Level 3^000000 ]";
  453. for(set .@i, 0; .@i < getarraysize(.@3rd$); set .@i, .@i + 1){
  454. mes .@i+1+". "+.@3rd$[.@i]+" ";
  455. }
  456. next;
  457. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = '1st Class' and `val`=2", .@2nd$);
  458. mes "[ 1st Class ^00CC00Level 2^000000 ]";
  459. for(set .@i, 0; .@i < getarraysize(.@2nd$); set .@i, .@i + 1){
  460. mes .@i+1+". "+.@2nd$[.@i]+" ";
  461. }
  462. next;
  463. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = '1st Class' and `val`=1", .@1st$);
  464. mes "[ 1st Class ^00CC00Level 1^000000 ]";
  465. for(set .@i, 0; .@i < getarraysize(.@1st$); set .@i, .@i + 1){
  466. mes .@i+1+". "+.@1st$[.@i]+" ";
  467. }
  468. close;
  469.  
  470. case 3:
  471. switch(select("Beast Master:Lighthalzen Hunter:Thanatos Hunter:MVP Beast Master")) {
  472.  
  473. case 1:
  474. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Beast Master' and `val`=3", .@3bst$);
  475. mes "[ Beast Master ^00CC00Level 3^000000 ]";
  476. for(set .@i, 0; .@i < getarraysize(.@3bst$); set .@i, .@i + 1){
  477. mes .@i+1+". "+.@3bst$[.@i]+" ";
  478. }
  479. next;
  480. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Beast Master' and `val`=2", .@2bst$);
  481. mes "[ Beast Master ^00CC00Level 2^000000 ]";
  482. for(set .@i, 0; .@i < getarraysize(.@2bst$); set .@i, .@i + 1){
  483. mes .@i+1+". "+.@2bst$[.@i]+" ";
  484. }
  485. next;
  486. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Beast Master' and `val`=1", .@1bst$);
  487. mes "[ Beast Master ^00CC00Level 1^000000 ]";
  488. for(set .@i, 0; .@i < getarraysize(.@1bst$); set .@i, .@i + 1){
  489. mes .@i+1+". "+.@1bst$[.@i]+" ";
  490. }
  491. close;
  492.  
  493. case 2:
  494. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Lighthalzen Hunter' and `val`=5", .@5lhz$);
  495. mes "[ Lighthalzen Hunter ^00CC00Level 5^000000 ]";
  496. for(set .@i, 0; .@i < getarraysize(.@5lhz$); set .@i, .@i + 1){
  497. mes .@i+1+". "+.@5lhz$[.@i]+" ";
  498. }
  499. next;
  500. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Lighthalzen Hunter' and `val`=4", .@4lhz$);
  501. mes "[ Lighthalzen Hunter ^00CC00Level 4^000000 ]";
  502. for(set .@i, 0; .@i < getarraysize(.@4lhz$); set .@i, .@i + 1){
  503. mes .@i+1+". "+.@4lhz$[.@i]+" ";
  504. }
  505. next;
  506. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Lighthalzen Hunter' and `val`=3", .@3lhz$);
  507. mes "[ Lighthalzen Hunter ^00CC00Level 3^000000 ]";
  508. for(set .@i, 0; .@i < getarraysize(.@3lhz$); set .@i, .@i + 1){
  509. mes .@i+1+". "+.@3lhz$[.@i]+" ";
  510. }
  511. next;
  512. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Lighthalzen Hunter' and `val`=2", .@2lhz$);
  513. mes "[ Lighthalzen Hunter ^00CC00Level 2^000000 ]";
  514. for(set .@i, 0; .@i < getarraysize(.@2lhz$); set .@i, .@i + 1){
  515. mes .@i+1+". "+.@2lhz$[.@i]+" ";
  516. }
  517. next;
  518. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Lighthalzen Hunter' and `val`=1", .@1lhz$);
  519. mes "[ Lighthalzen Hunter ^00CC00Level 1^000000 ]";
  520. for(set .@i, 0; .@i < getarraysize(.@1lhz$); set .@i, .@i + 1){
  521. mes .@i+1+". "+.@1lhz$[.@i]+" ";
  522. }
  523. close;
  524.  
  525. case 3:
  526. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Thanatos Hunter' and `val`=1", .@1thana$);
  527. mes "[ ^00CC00Thanatos Hunter^000000 ]";
  528. for(set .@i, 0; .@i < getarraysize(.@1thana$); set .@i, .@i + 1){
  529. mes .@i+1+". "+.@1thana$[.@i]+" ";
  530. }
  531. close;
  532.  
  533. case 4:
  534. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'MVP Beast Master' and `val`=1", .@1mvpb3ast$);
  535. mes "[ ^00CC00MVP Beast Master^000000 ]";
  536. for(set .@i, 0; .@i < getarraysize(.@1mvpb3ast$); set .@i, .@i + 1){
  537. mes .@i+1+". "+.@1mvpb3ast$[.@i]+" ";
  538. }
  539. close;
  540. }
  541.  
  542. case 4:
  543. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Red Player' and `val`=3", .@3pvp$);
  544. mes "[ Red Player ^00CC00Level 3^000000 ]";
  545. for(set .@i, 0; .@i < getarraysize(.@3pvp$); set .@i, .@i + 1){
  546. mes .@i+1+". "+.@3pvp$[.@i]+" ";
  547. }
  548. next;
  549. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Red Player' and `val`=2", .@2pvp$);
  550. mes "[ Red Player ^00CC00Level 2^000000 ]";
  551. for(set .@i, 0; .@i < getarraysize(.@2pvp$); set .@i, .@i + 1){
  552. mes .@i+1+". "+.@2pvp$[.@i]+" ";
  553. }
  554. next;
  555. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Red Player' and `val`=1", .@1pvp$);
  556. mes "[ Red Player ^00CC00Level 1^000000 ]";
  557. for(set .@i, 0; .@i < getarraysize(.@1pvp$); set .@i, .@i + 1){
  558. mes .@i+1+". "+.@1pvp$[.@i]+" ";
  559. }
  560. close;
  561.  
  562. case 5:
  563. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Event Master' and `val`=2", .@1evnt$);
  564. mes "[ ^00CC00Event Master^000000 ]";
  565. for(set .@i, 0; .@i < getarraysize(.@1evnt$); set .@i, .@i + 1){
  566. mes .@i+1+". "+.@1evnt$[.@i]+" ";
  567. }
  568. close;
  569. }
  570.  
  571. case 3:
  572. query_sql("SELECT `name` FROM `achievement` WHERE `achievement` = 'Hall of Fame'", .@hof$);
  573. next;
  574. mes "[ ^00CC00EluneRO's Hall of Fame Member^000000 ]";
  575. for(set .@i, 0; .@i < getarraysize(.@hof$); set .@i, .@i + 1){
  576. mes .@i+1+". "+.@hof$[.@i]+" ";
  577. }
  578. close;
  579.  
  580. case 4:
  581. next;
  582. if (#fam0us > 0) {
  583. mes "You already completed all Achievements";
  584. close;
  585. }
  586. switch(select("Playing Time Achievement:Credit Achievement:Beast Master Achievement:PVP Achievement:Event Achievement")) {
  587. case 1:
  588. next;
  589. set .@day, #online_time / 86400;
  590. set .@hr, (#online_time - (.@day * 86400)) / 3600;
  591. set .@min, (#online_time - (.@day * 86400) - (.@hr * 3600)) / 60;
  592. set .@sec, (#online_time - (.@day * 86400) - (.@hr * 3600) - (.@min * 60));
  593. if (#ollevel < 3) {
  594. mes "[ Achievement Manager ]";
  595. if (#ollevel == 0) { mes "^00CC00100^000000 days Achievement"; }
  596. if (#ollevel == 1) { mes "^00CC00200^000000 days Achievement"; }
  597. if (#ollevel == 2) { mes "^00CC00300^000000 days Achievement"; }
  598. mes "Current Playing Time:";
  599. mes "^FF0000"+.@day+"^000000days ^FF0000"+.@hr+"^000000hrs ^FF0000"+.@min+"^000000m ^FF0000"+.@sec+"^000000s";
  600. mes "Keep Playing to unlock this Achievement";
  601. }
  602. if (#ollevel == 3) {
  603. mes "[ Achievement Manager ]";
  604. mes "^00CC00300^000000 days Achievement";
  605. mes "Congratulations!";
  606. mes "You've completed this achievement!";
  607. }
  608. close;
  609.  
  610. case 2:
  611. next;
  612. if (firstclass == 0) {
  613. mes "[ Achievement Manager ]";
  614. mes "First Class Level: ^FF00001^000000";
  615. mes "Current Credits:";
  616. mes "("+countitem(7227)+"/^00CC00"+.creditlvl1+"^000000)";
  617. mes "Collect more Credits to unlock this Achievement!";
  618. }
  619. if (firstclass == 1) {
  620. mes "[ Achievement Manager ]";
  621. mes "First Class Level: ^FF00002^000000";
  622. mes "Current Credits:";
  623. mes "("+countitem(7227)+"/^00CC00"+.creditlvl2+"^000000)";
  624. mes "Collect more Credits to unlock this Achievement!";
  625. }
  626. if (firstclass == 2) {
  627. mes "[ Achievement Manager ]";
  628. mes "First Class Level: ^FF00003^000000";
  629. mes "Current Credits:";
  630. mes "("+countitem(7227)+"/^00CC00"+.creditlvl3+"^000000)";
  631. mes "Collect more Credits to unlock this Achievement!";
  632. }
  633. if (firstclass == 3) {
  634. mes "[ Achievement Manager ]";
  635. mes "First Class Level: ^FF00003^000000";
  636. mes "Congratulations!";
  637. mes "You've completed this achievement!";
  638. }
  639. close;
  640.  
  641. case 3:
  642. next;
  643. switch(select("Beast Master Achievement:Lighthalzen Hunter Achievement:Thanatos Hunter Achievement:MVP Beast Master Achievement")) {
  644. case 1:
  645. next;
  646. if (b3ast == 0) {
  647. mes "[ Achievement Manager ]";
  648. mes "Beast Master Level: ^FF00001^000000";
  649. mes "Current Kills:";
  650. mes "("+bstkilled+"/^00CC00"+.beastmstr1+"^000000)";
  651. mes "Kill more monsters to unlock this Achievement!";
  652. }
  653. if (b3ast == 1) {
  654. mes "[ Achievement Manager ]";
  655. mes "Beast Master Level: ^FF00002^000000";
  656. mes "Current Kills:";
  657. mes "("+bstkilled+"/^00CC00"+.beastmstr2+"^000000)";
  658. mes "Kill more monsters to unlock this Achievement!";
  659. }
  660. if (b3ast == 2) {
  661. mes "[ Achievement Manager ]";
  662. mes "Beast Master Level: ^FF00003^000000";
  663. mes "Current Kills:";
  664. mes "("+bstkilled+"/^00CC00"+.beastmstr3+"^000000)";
  665. mes "Kill more monsters to unlock this Achievement!";
  666. }
  667. if (b3ast == 3) {
  668. mes "[ Achievement Manager ]";
  669. mes "Beast Master Level: ^FF00003^000000";
  670. mes "Congratulations!";
  671. mes "You've completed this achievement!";
  672. }
  673. close;
  674. case 2:
  675. next;
  676. if (lightmvp == 0) {
  677. mes "[ Achievement Manager ]";
  678. mes "Lighthalzen Hunter Level: ^FF00001^000000";
  679. mes "Current Kills:";
  680. mes "("+lhzkill+"/^00CC00"+.lhzlvl1+"^000000)";
  681. mes "Kill more Biolab MVPs to unlock this Achievement!";
  682. }
  683. if (lightmvp == 1) {
  684. mes "[ Achievement Manager ]";
  685. mes "Lighthalzen Hunter Level: ^FF00002^000000";
  686. mes "Current Kills:";
  687. mes "("+lhzkill+"/^00CC00"+.lhzlvl2+"^000000)";
  688. mes "Kill more Biolab MVPs to unlock this Achievement!";
  689. }
  690. if (lightmvp == 2) {
  691. mes "[ Achievement Manager ]";
  692. mes "Lighthalzen Hunter Level: ^FF00003^000000";
  693. mes "Current Kills:";
  694. mes "("+lhzkill+"/^00CC00"+.lhzlvl3+"^000000)";
  695. mes "Kill more Biolab MVPs to unlock this Achievement!";
  696. }
  697. if (lightmvp == 3) {
  698. mes "[ Achievement Manager ]";
  699. mes "Lighthalzen Hunter Level: ^FF00004^000000";
  700. mes "Current Kills:";
  701. mes "("+lhzkill+"/^00CC00"+.lhzlvl4+"^000000)";
  702. mes "Kill more Biolab MVPs to unlock this Achievement!";
  703. }
  704. if (lightmvp == 4) {
  705. mes "[ Achievement Manager ]";
  706. mes "Lighthalzen Hunter Level: ^FF00005^000000";
  707. mes "Current Kills:";
  708. mes "("+lhzkill+"/^00CC00"+.lhzlvl5+"^000000)";
  709. mes "Kill more Biolab MVPs to unlock this Achievement!";
  710. }
  711. if (lightmvp == 5) {
  712. mes "[ Achievement Manager ]";
  713. mes "Lighthalzen Hunter Level: ^FF00005^000000";
  714. mes "Congratulations!";
  715. mes "You've completed this achievement!";
  716. }
  717. close;
  718. case 3:
  719. next;
  720. if (thahntr == 0) {
  721. mes "[ Achievement Manager ]";
  722. mes "Thanatos Hunter";
  723. mes "Current Kills:";
  724. mes "("+thnkill+"/^00CC00"+.thahntr+"^000000)";
  725. mes "Keep hunting Thanatos to unlock this Achievement!";
  726. }
  727. if (thahntr == 1) {
  728. mes "[ Achievement Manager ]";
  729. mes "Thanatos Hunter";
  730. mes "Congratulations!";
  731. mes "You've completed this achievement!";
  732. }
  733. close;
  734. case 4:
  735. next;
  736. if (beastmvp == 0) {
  737. mes "[ Achievement Manager ]";
  738. mes "MVP Beast Master";
  739. mes "Current Kills:";
  740. mes "("+mvpk1ller+"/^00CC00"+.mvpb3ast+"^000000)";
  741. mes "Keep hunting MVPs to unlock this Achievement!";
  742. }
  743. if (beastmvp == 1) {
  744. mes "[ Achievement Manager ]";
  745. mes "MVP Beast Master";
  746. mes "Congratulations!";
  747. mes "You've completed this achievement!";
  748. }
  749. close;
  750. }
  751. case 4:
  752. next;
  753. if (redplyr == 0) {
  754. mes "[ Achievement Manager ]";
  755. mes "Red Player Level: ^FF00001^000000";
  756. mes "Current PVP Kills:";
  757. mes "("+KILL+"/^00CC00"+.rdplyr1+"^000000)";
  758. mes "Commit more murders to unlock this Achievement!";
  759. }
  760. if (redplyr == 1) {
  761. mes "[ Achievement Manager ]";
  762. mes "Red Player Level: ^FF00002^000000";
  763. mes "Current PVP Kills:";
  764. mes "("+KILL+"/^00CC00"+.rdplyr2+"^000000)";
  765. mes "Commit more murders to unlock this Achievement!";
  766. }
  767. if (redplyr == 2) {
  768. mes "[ Achievement Manager ]";
  769. mes "Red Player Level: ^FF00003^000000";
  770. mes "Current PVP Kills:";
  771. mes "("+KILL+"/^00CC00"+.rdplyr3+"^000000)";
  772. mes "Commit more murders to unlock this Achievement!";
  773. }
  774. if (redplyr == 3) {
  775. mes "[ Achievement Manager ]";
  776. mes "Red Player Level: ^FF00003^000000";
  777. mes "Congratulations!";
  778. mes "You've completed this achievement!";
  779. }
  780. close;
  781.  
  782. case 5:
  783. next;
  784. if (evntwin == 0) {
  785. mes "[ Achievement Manager ]";
  786. mes "Event Expert";
  787. mes "Current Event Wins:";
  788. mes "("+evtjunk+"/^00CC00"+.evtw1nn3r+"^000000)";
  789. mes "Keep joining events to unlock this Achievement!";
  790. }
  791. if (evntwin == 1) {
  792. mes "[ Achievement Manager ]";
  793. mes "Event Expert";
  794. mes "Congratulations!";
  795. mes "You've completed this achievement!";
  796. }
  797. close;
  798. }
  799. case 5:
  800. next;
  801. if (#fam0us > 0) {
  802. mes "You already completed all Achievements";
  803. close;
  804. }
  805. mes "[ Achievement Manager ]";
  806. mes "Achievement Progress Display Removed";
  807. set prgrss, 0;
  808. close;
  809.  
  810. case 6:
  811. next;
  812. if (#fam0us > 0) {
  813. mes "You already completed all Achievements";
  814. close;
  815. }
  816. mes "[ Achievement Manager ]";
  817. mes "Achievement Progress Displayed";
  818. set prgrss, 1;
  819. close;
  820. }
  821. OnInit:
  822. //====================Configuration=========================================
  823. setarray .lhzid[0],1651,1650,1649,1648,1647,1646; // Lighthalzen MVPs
  824. //===================================================================================
  825. set .beastmstr1, 10000; // monster kills for beast master level 1
  826. set .beastmstr2, 50000; // monster kills for beast master level 2
  827. set .beastmstr3, 100000; // monster kills for beast master level 3
  828. //===================================================================================
  829. set .lhzlvl1, 150; // lighthalzen mvp kill for lhz level 1
  830. set .lhzlvl2, 300; // lighthalzen mvp kill for lhz level 2
  831. set .lhzlvl3, 450; // lighthalzen mvp kill for lhz level 3
  832. set .lhzlvl4, 600; // lighthalzen mvp kill for lhz level 4
  833. set .lhzlvl5, 1000; // lighthalzen mvp kill for lhz level 5
  834. //===================================================================================
  835. set .thahntr, 200; // Thanatos kill for Thanatos hunter level 1
  836. //===================================================================================
  837. set .creditlvl1, 10000; // first class player level 1
  838. set .creditlvl2, 20000; // first class player level 2
  839. set .creditlvl3, 30000; // first class player level 3
  840. //===================================================================================
  841. set .rdplyr1, 5000; // PK player level 1
  842. set .rdplyr2, 10000; // PK player level 2
  843. set .rdplyr3, 30000; // PK player level 3
  844. //===================================================================================
  845. set .oltime1, 8640000; // 100 days
  846. set .oltime2, 17280000; // 200 days
  847. set .oltime3, 25920000; // 300 days
  848. //===================================================================================
  849. set .mvpb3ast, 50000; // mvp kills for mvp beast master
  850. //===================================================================================
  851. set .evtw1nn3r, 10000; // events won
  852. //===================================================================================
  853. set .hofame, 7; // Number of achievements to be declared hall of fame
  854. //===================================================================================
  855.  
  856. end; // end oninit
  857. //===================================================================================
  858. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement