Advertisement
johnlol

Euphy's MVP Ladder v1.3

May 19th, 2019
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
  2. // * ~~~~~~~~  Euphy's MVP Ladder v1.3  ~~~~~~~~ *
  3. // * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
  4.  
  5. sec_in02.gat,169,150,2  script  MVP Ladder  4_m_bosscat,{
  6.     mes "[Rank MVP]";
  7.     mes "Hello.";
  8.     mes "What are you doing here?";
  9.     next;
  10.     switch(select("Check Ranking.:My points.:Exchange Coin.:Nothing...")) {
  11.         case 1:
  12.             mes "[Rank MVP]";
  13.             query_sql("SELECT char_id, CAST(`value` AS SIGNED) FROM `char_reg_num` WHERE `key` = 'MVP_Rank' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 20",.@cid,.@value);
  14.             for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) {
  15.                 query_sql("SELECT `name` FROM `char` WHERE char_id = "+.@cid[.@i]+";",.@j$);
  16.                 set .@name$[.@i], .@j$;
  17.             }
  18.             if (!getarraysize(.@cid))
  19.                 mes "The rankings are empty.";
  20.             else for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1)
  21.             mes "["+(.@i+1)+"] "+.@name$[.@i]+" ~ "+.@value[.@i]+" kills";
  22.             close;
  23.            
  24.         case 2:
  25.             mes "[Rank MVP]";
  26.             mes "You killed "+((MVP_Rank)?"^0055FF"+MVP_Rank:"no")+"^000000 MVP"+((MVP_Rank == 1)?".":"s.");
  27.             close;
  28.         case 3:
  29.             goto H_menu;
  30.             //Item Menu ================================================
  31.             H_menu:
  32.                 menu
  33.                 "Elunium",R_elu,
  34.                 "Oridecon",R_ori,
  35.                 "(Costume)There is Somthing (7days)",R_rtis,
  36.                 "(Costume)There is Somthing",R_tis,
  37.                 "(Costume)Red Wind Hat (7days)",R_rwh,
  38.                 "(Costume)Red Wind Hat",R_wh,
  39.                 "(Costume)12th Anniversary Fairy Ears (7days)",R_r12,
  40.                 "(Costume)12th Anniversary Fairy Ears",R_12,
  41.                 "(Costume)Ninja Scroll (7days)",R_rns,
  42.                 "(Costume)Ninja Scroll",R_ns,
  43.                 "(Costume)Gang Scarf (7days)",R_rgs,
  44.                 "(Costume)Gang Scarf",R_gs,
  45.                 "(Costume)Holy Mom Love (7days)",R_rhm,
  46.                 "(Costume)Holy Mom Love",R_hm,
  47.                 "(Costume)Bread Bag (7days)",R_rbb,
  48.                 "(Costume)Bread Bag",R_bb,
  49.                 "(Costume)Diadem (7days)",R_rdia,
  50.                 "(Costume)Diadem",R_dia,
  51.                 "(Costume)Ascension Black Dragon (7days)",R_rasc,
  52.                 "(Costume)Ascension Black Dragon",R_asc,
  53.                 "(Costume)Marcher Hat (7days)",R_rmh,
  54.                 "(Costume)Marcher Hat",R_mh,
  55.                 "Cancel",H_cancel;
  56.             //Required =================================================
  57.             R_elu:
  58.                 next;
  59.                 mes "1x MVP Coin";
  60.                 menu "Make",M_elu,"Return to Menu",H_menu;
  61.             R_ori:
  62.                 next;
  63.                 mes "1x MVP Coin";
  64.                 menu "Make",M_ori,"Return to Menu",H_menu;
  65.             R_rtis:
  66.                 next;
  67.                 mes "15x MVP Coin";
  68.                 menu "Make",M_rtis,"Return to Menu",H_menu;
  69.             R_tis:
  70.                 next;
  71.                 mes "60x MVP Coin";
  72.                 menu "Make",M_tis,"Return to Menu",H_menu;
  73.             R_rwh:
  74.                 next;
  75.                 mes "5x MVP Coin";
  76.                 menu "Make",M_rwh,"Return to Menu",H_menu;
  77.             R_wh:
  78.                 next;
  79.                 mes "30x MVP Coin";
  80.                 menu "Make",M_wh,"Return to Menu",H_menu;
  81.             R_r12:
  82.                 next;
  83.                 mes "15x MVP Coin";
  84.                 menu "Make",M_r12,"Return to Menu",H_menu;
  85.             R_12:
  86.                 next;
  87.                 mes "50x MVP Coin";
  88.                 menu "Make",M_12,"Return to Menu",H_menu;
  89.             R_rns:
  90.                 next;
  91.                 mes "9x MVP Coin";
  92.                 menu "Make",M_rns,"Return to Menu",H_menu;
  93.             R_ns:
  94.                 next;
  95.                 mes "35x MVP Coin";
  96.                 menu "Make",M_ns,"Return to Menu",H_menu;
  97.             R_rgs:
  98.                 next;
  99.                 mes "10x MVP Coin";
  100.                 menu "Make",M_rgs,"Return to Menu",H_menu;
  101.             R_gs:  
  102.                 next;
  103.                 mes "35x MVP Coin";
  104.                 menu "Make",M_gs,"Return to Menu",H_menu;
  105.             R_rhm: 
  106.                 next;
  107.                 mes "5x MVP Coin";
  108.                 menu "Make",M_rhm,"Return to Menu",H_menu;
  109.             R_hm:
  110.                 next;
  111.                 mes "30x MVP Coin";
  112.                 menu "Make",M_hm,"Return to Menu",H_menu;
  113.             R_rbb:
  114.                 next;
  115.                 mes "5x MVP Coin";
  116.                 menu "Make",M_rbb,"Return to Menu",H_menu;
  117.             R_bb:
  118.                 next;
  119.                 mes "30x MVP Coin";
  120.                 menu "Make",M_bb,"Return to Menu",H_menu;
  121.             R_rdia:
  122.                 next;
  123.                 mes "5x MVP Coin";
  124.                 menu "Make",M_rdia,"Return to Menu",H_menu;
  125.             R_dia:
  126.                 next;
  127.                 mes "30x MVP Coin";
  128.                 menu "Make",M_dia,"Return to Menu",H_menu;
  129.             R_rasc:
  130.                 next;
  131.                 mes "5x MVP Coin";
  132.                 menu "Make",M_rasc,"Return to Menu",H_menu;
  133.             R_asc:
  134.                 next;
  135.                 mes "30x MVP Coin";
  136.                 menu "Make",M_asc,"Return to Menu",H_menu;
  137.             R_rmh:
  138.                 next;
  139.                 mes "5x MVP Coin";
  140.                 menu "Make",M_rmh,"Return to Menu",H_menu;
  141.             R_mh:
  142.                 next;
  143.                 mes "30x MVP Coin";
  144.                 menu "Make",M_mh,"Return to Menu",H_menu;
  145.                
  146.             //Make Item ================================================
  147.             M_elu:
  148.                 if(countitem(7929)<1 )
  149.                 goto M_insufficient;
  150.                 delitem 7929,1;
  151.                 getitem 985,1;
  152.             close;
  153.             M_ori:
  154.                 if(countitem(7929)<1 )
  155.                 goto M_insufficient;
  156.                 delitem 7929,1;
  157.                 getitem 984,1;
  158.             close;
  159.             M_rtis:
  160.                 if(countitem(7929)<15 )
  161.                 goto M_insufficient;
  162.                 delitem 7929,15;
  163.                 rentitem 20183,604800;
  164.             close;
  165.             M_tis:
  166.                 if(countitem(7929)<60 )
  167.                 goto M_insufficient;
  168.                 delitem 7929,60;
  169.                 getitem 20183,1;
  170.             close;
  171.             M_rwh:
  172.                 if(countitem(7929)<5 )
  173.                 goto M_insufficient;
  174.                 delitem 7929,5;
  175.                 rentitem 19579,604800;
  176.             close;
  177.             M_wh:
  178.                 if(countitem(7929)<30 )
  179.                 goto M_insufficient;
  180.                 delitem 7929,30;
  181.                 getitem 19579,1;
  182.             close;
  183.             M_r12:
  184.                 if(countitem(7929)<15 )
  185.                 goto M_insufficient;
  186.                 delitem 7929,15;
  187.                 rentitem 20136,604800;
  188.             close;
  189.             M_12:
  190.                 if(countitem(7929)<50 )
  191.                 goto M_insufficient;
  192.                 delitem 7929,50;
  193.                 getitem 20136,1;
  194.             close;
  195.             M_rns:
  196.                 if(countitem(7929)<9 )
  197.                 goto M_insufficient;
  198.                 delitem 7929,9;
  199.                 rentitem 19606,604800;
  200.             close;
  201.             M_ns:
  202.                 if(countitem(7929)<35 )
  203.                 goto M_insufficient;
  204.                 delitem 7929,35;
  205.                 getitem 19606,1;
  206.             close;
  207.             M_rgs:
  208.                 if(countitem(7929)<10 )
  209.                 goto M_insufficient;
  210.                 delitem 7929,10;
  211.                 rentitem 19605,604800;
  212.             close;
  213.             M_gs:
  214.                 if(countitem(7929)<35 )
  215.                 goto M_insufficient;
  216.                 delitem 7929,35;
  217.                 getitem 19605,1;
  218.             close;
  219.             M_rhm:
  220.                 if(countitem(7929)<5 )
  221.                 goto M_insufficient;
  222.                 delitem 7929,5;
  223.                 rentitem 19756,604800;
  224.             close;
  225.             M_hm:
  226.                 if(countitem(7929)<30 )
  227.                 goto M_insufficient;
  228.                 delitem 7929,30;
  229.                 getitem 19756,1;
  230.             close;
  231.             M_rbb:
  232.                 if(countitem(7929)<5 )
  233.                 goto M_insufficient;
  234.                 delitem 7929,5;
  235.                 rentitem 19725,604800;
  236.             close;
  237.             M_bb:
  238.                 if(countitem(7929)<30 )
  239.                 goto M_insufficient;
  240.                 delitem 7929,30;
  241.                 getitem 19725,1;
  242.             close;     
  243.             M_rdia:
  244.                 if(countitem(7929)<5 )
  245.                 goto M_insufficient;
  246.                 delitem 7929,5;
  247.                 rentitem 19748,604800;
  248.             close;
  249.             M_dia:
  250.                 if(countitem(7929)<30 )
  251.                 goto M_insufficient;
  252.                 delitem 7929,30;
  253.                 getitem 19748,1;
  254.             close;
  255.             M_rasc:
  256.                 if(countitem(7929)<5 )
  257.                 goto M_insufficient;
  258.                 delitem 7929,5;
  259.                 rentitem 19575,604800;
  260.             close; 
  261.             M_asc: 
  262.                 if(countitem(7929)<30 )
  263.                 goto M_insufficient;
  264.                 delitem 7929,30;
  265.                 getitem 19575,1;
  266.             close;
  267.             M_rmh:
  268.                 if(countitem(7929)<5 )
  269.                 goto M_insufficient;
  270.                 delitem 7929,5;
  271.                 rentitem 19653,604800;
  272.             close;
  273.             M_mh:  
  274.                 if(countitem(7929)<30 )
  275.                 goto M_insufficient;
  276.                 delitem 7929,30;
  277.                 getitem 19653,1;
  278.             close;
  279.                
  280.             //Insufficient Coin ========================================
  281.             M_insufficient:
  282.             next;
  283.             mes "You don't have the enough coin.";
  284.             mes "Please come back when you do...";
  285.             menu "Return to Main Menu",H_menu,"Leave",H_cancel;
  286.             close;
  287.             //Cancel ===================================================
  288.             H_cancel:
  289.             close;
  290.                
  291.         case 4:
  292.             close;
  293.     }
  294.  
  295. OnNPCKillEvent:
  296.     if (getmonsterinfo(killedrid,22)) {
  297.         set MVP_Rank, MVP_Rank+1;
  298.     if (MVP_Rank == 1)
  299.         query_sql("INSERT INTO `char_reg_num` (`char_id`,`key`,`index`,`value`) VALUES ("+getcharid(0)+",'MVP_Rank','0',1)");
  300.     else
  301.         query_sql("UPDATE `char_reg_num` SET `value` = '"+MVP_Rank+"' WHERE char_id = "+getcharid(0)+" AND `key` ='MVP_Rank'");
  302.         dispbottom "~ You killed "+MVP_Rank+" MVP"+((MVP_Rank == 1)?"":"s")+". ~";
  303.         //dispbottom " ~ Reward: Cash +15 ~ ";
  304.         //set #CASHPOINTS, #CASHPOINTS + 15;
  305.         dispbottom " ~ Reward: BOP ~ ";
  306.         getitem 7929,1; //<<< THIS IS THE COIN REWARD FOR MVP ONLY<<<<<<<<<<<<
  307.         specialeffect2 313;
  308.     }
  309.     end;
  310. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement