Jump to content

MikZ

Members
  • Content Count

    416
  • Joined

  • Last visited

1 Follower

About MikZ

  • Rank
    Advanced Member

Recent Profile Visitors

2227 profile views
  1. Bubble gum drop rate script { sc_start SC_ITEMBOOST,1800000,200; },{},{} Field manual Exp rate script { sc_start SC_EXPBOOST,1800000,50; },{},{} you can check all item script if your want to have the same function with it.
  2. Hi @AnnieRuru, can you add reward system weekly and monthly ? player need to talk to npc to redeem the prize. I know i already made this request in other post. thanks!
  3. Hi @AnnieRuru, just like your MVP ladder Reset ladder weekly Also total for the month (if possible) I think its via SQL table, players will be the one to redeem from NPC. OnInit: // set reward here ... 1st place won 10 red pot, 2nd place won 9 orange pot ... etc ... setarray .reward, 7227, 7227, 7227, 7227, 7227, 25047, 25047, 25047, 25047, 25047; setarray .amount, 10, 8, 7, 6, 5, 10, 8, 7, 6, 5; if ( !$mvp_rank_1st_sunday ) query_sql "select curdate() - dayofweek( curdate() ) +1", $mvp_rank_1st_sunday; // TRICK !! how to save the 1st sunday once the script installed OnSun0000: query_sql "select datediff( curdate(), '"+ $mvp_rank_1st_sunday +"' ) /7", .this_week_index; if ( .this_week_index == $mvp_rank_week_index ) end; [email protected]$ = "SELECT char_id, `name`, IF(@d=t.`mvp_kills`, @r, @r:[email protected]), @d:=t.`mvp_kills`, @i:[email protected]+1 "; [email protected]$ += "FROM `mvp_rank` t, (SELECT @d:=0, @r:=0, @i:=1)q "; [email protected]$ += "ORDER BY `mvp_kills` DESC LIMIT 10"; [email protected] = query_sql([email protected]$, [email protected], [email protected]$, [email protected], [email protected], [email protected]); if ( [email protected] ) { for ( [email protected] = 0; [email protected] < [email protected]; [email protected] ) { [email protected]_query$[[email protected]] = "( "+ [email protected][[email protected]] +", "+ $mvp_rank_week_index +", "+ [email protected][[email protected]] +" )"; [email protected]_query$[[email protected]] = "( "+ $mvp_rank_week_index +", "+ [email protected][[email protected]] +", "+ [email protected][[email protected]] +", '"+ escape_sql([email protected]$[[email protected]]) +"', "+ [email protected][[email protected]] +" )"; } // query_sql "truncate table mvp_rank_archive"; // uncomment this line if you love to periodically clean your data query_sql "insert into mvp_rank_reward values "+ implode( [email protected]_query$, ", " ); query_sql "insert into mvp_rank_archive values "+ implode( [email protected]_query$, ", " ); query_sql "truncate table mvp_rank"; } $mvp_rank_week_index = .this_week_index; end;
  4. Good day Master Scripters May I request your help please. To convert this script compatible to hercules. // Basic Event Manager // By Mabuhay /*-=-=-=-=-=-=-=-=-=-=-=-=-=- Currently added are the ff : {#} NAME - "NPC_NAME" [1] Bombring - "Event_Bombring" [2] Dice - "Event_Dice" [3] Last Man Standing - "Event_LMS" [4] Novice V Zombie - "Event_NvZ" [5] Poring Catcher - "Poring_Catcher" [6] Poring Hunter - "Poring_Hunter" (Added 12-15-2019) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ // For easier management of Event NPCs ///////////////////////////////////// // NOTE: // ///////////////////////////////////// // I don't support any modifications unless I want to. // But if you want to change things especially the rewards, // Please refer to my F_Reward Functions // https://rathena.org/board/files/file/4068-itemvariablepoints-reward-function-for-beginners-or-lazy/ // You should be able to easily change the rewards // If you have basic scripting knowledge - script Event_Manager FAKE_NPC,{ OnInit: // 1 = item reward // 2 = variable/cashpoints reward // If you want to set item and variable/cashpoints rewards, do 1|2. // If you only want 1, just choose between 1 or 2 $event_options = 1; // If item reward enabled // What items will be rewarded setarray $event_item_reward, 501, 10, 502, 5; // If variable reward.. set to your variable. // If cashpoints.. set to #CASHPOINTS / #KAFRAPOINTS (Free Cash Points) $event_var$ = "#EVENTVARIABLE"; // Variable name? // If cash points, set to Cash Points // If your custom var, set to the name of that thing. $event_var_name$ = "Custom Points"; // How much points gain if #VAR / #CASHPOINTS / #KAFRAPOINTS? $event_var_gain = 1; $event_item_arr = getarraysize($event_item_reward); // @eventstart for GM bindatcmd "eventstart", strnpcinfo(0)+"::OnStart",60,60; // @eventjoin bindatcmd "eventjoin", strnpcinfo(0)+"::OnJoinEvent"; end; OnStart: mes "Select what event to start:"; next; switch(select("~ Bombring","~ Dice","~ LMS","~ Poring Catcher","~ NvZ","~ Poring Hunter")) { case 1: [email protected]$ = "Event_Bombring"; break; case 2: [email protected]$ = "Event_Dice"; break; case 3: [email protected]$ = "Event_LMS"; break; case 4: [email protected]$ = "Poring_Catcher"; break; case 5: [email protected]$ = "Event_NvZ"; break; case 6: [email protected]$ = "Poring_Hunter"; break; } donpcevent [email protected]$+"::OnStart"; end; OnJoinEvent: mes "[ Event Status ]"; mes "Event are as follows : "; next; switch(select( "Bombring Event - "+ ((getvariableofnpc(.start,"Event_Bombring") == 1) ? "^0000ffJoin Event":((getvariableofnpc(.start,"Event_Bombring") == 2) ? "^0000ffEvent On-Going":"^ff0000Not Available"))+"^000000", "Dice Event - "+ ((getvariableofnpc(.start,"Event_Dice") == 1) ? "^0000ffJoin Event":((getvariableofnpc(.start,"Event_Dice") == 2) ? "^0000ffEvent On-Going":"^ff0000Not Available"))+"^000000", "Last Man Standing - "+ ((getvariableofnpc(.start,"Event_LMS") == 1) ? "^0000ffJoin Event":((getvariableofnpc(.start,"Event_LMS") == 2) ? "^0000ffEvent On-Going":"^ff0000Not Available"))+"^000000", "Poring Catcher - "+ ((getvariableofnpc(.start,"Poring_Catcher") == 1) ? "^0000ffJoin Event":((getvariableofnpc(.start,"Poring_Catcher") == 2) ? "^0000ffEvent On-Going":"^ff0000Not Available"))+"^000000", "Novice v Zombie Event - "+ ((getvariableofnpc(.start,"Event_NvZ") == 1) ? "^0000ffJoin Event":((getvariableofnpc(.start,"Event_NvZ") == 2) ? "^0000ffEvent On-Going":"^ff0000Not Available"))+"^000000", "Poring Hunter Event - "+ ((getvariableofnpc(.start,"Poring_Hunter") == 1) ? "^0000ffJoin Event":((getvariableofnpc(.start,"Poring_Hunter") == 2) ? "^0000ffEvent On-Going":"^ff0000Not Available"))+"^000000" )) { case 1: [email protected] = getvariableofnpc(.start,"Event_Bombring"); [email protected]$ = "quiz_02"; [email protected] = 59; [email protected] = 345; break; case 2: [email protected] = getvariableofnpc(.start,"Event_Dice"); [email protected]$ = "quiz_02"; [email protected] = 55; [email protected] = 87; break; case 3: [email protected] = getvariableofnpc(.start,"Event_LMS"); [email protected]$ = "06guild_01"; [email protected] = 0; [email protected] = 0; break; case 4: [email protected] = getvariableofnpc(.start,"Poring_Catcher"); [email protected]$ = "poring_w01"; [email protected] = 100; [email protected] = 100; break; case 5: [email protected] = getvariableofnpc(.start,"Event_NvZ"); if ( BaseLevel > 1 || Class != 0 ) { mes "Only Lv 1 Novice can enter."; close; } getinventorylist; if ( @inventorylist_amount ) { mes "You store all your items first."; close2; @inventorylist_amount = false; end; } sc_start SC_DECREASEAGI,600000,10; [email protected]$ = "quiz_01"; [email protected] = 42; [email protected] = 369; break; case 6: [email protected] = getvariableofnpc(.start,"Poring_Hunter"); getinventorylist; if ( @inventorylist_count ) { mes "Make sure you dont have anything in your inventory."; close; } [email protected]$ = "pvp_n_1-2"; [email protected] = 0; [email protected] = 0; @phunter_points = 0; break; } if ( [email protected] ) { mes "Event is not available."; close; } else if ( [email protected] == 2 ) { mes "Event is on-going"; close; } sc_end SC_ALL; percentheal 100,100; warp [email protected]$, [email protected], [email protected]; end; // OnClock<hour><minute>: donpcevent "<npc_name>::OnStart"; OnClock0000: donpcevent "Event_Bombring::OnStart"; end; //----- 12 mn OnClock0100: donpcevent "Event_Dice::OnStart"; end; OnClock0200: donpcevent "Event_LMS::OnStart"; end; OnClock0300: donpcevent "Poring_Catcher::OnStart"; end; OnClock0400: donpcevent "Event_NvZ::OnStart"; end; OnClock0500: donpcevent "Poring_Hunter::OnStart"; end; OnClock0600: donpcevent "Event_Bombring::OnStart"; end; //----- 6 am OnClock0700: donpcevent "Event_Dice::OnStart"; end; OnClock0800: donpcevent "Event_LMS::OnStart"; end; OnClock0900: donpcevent "Poring_Catcher::OnStart"; end; OnClock1000: donpcevent "Event_NvZ::OnStart"; end; OnClock1100: donpcevent "Poring_Hunter::OnStart"; end; OnClock1200: donpcevent "Event_Bombring::OnStart"; end; //----- 12 nn OnClock1300: donpcevent "Event_Dice::OnStart"; end; OnClock1400: donpcevent "Event_LMS::OnStart"; end; OnClock1500: donpcevent "Poring_Catcher::OnStart"; end; OnClock1600: donpcevent "Event_NvZ::OnStart"; end; OnClock1700: donpcevent "Poring_Hunter::OnStart"; end; OnClock1800: donpcevent "Event_Bombring::OnStart"; end; //----- 6 pm OnClock1900: donpcevent "Event_Dice::OnStart"; end; OnClock2000: donpcevent "Event_LMS::OnStart"; end; OnClock2100: donpcevent "Poring_Catcher::OnStart"; end; OnClock2200: donpcevent "Event_NvZ::OnStart"; end; OnClock2300: donpcevent "Poring_Hunter::OnStart"; end; //----- 11 pm } // Bombring Event - script Event_Bombring -1,{ OnInit: // Mapflags setarray [email protected], MF_NOWARP, MF_NOWARPTO, MF_NOSKILL, MF_NOTELEPORT, MF_NOMEMO, MF_NOSAVE, MF_NOICEWALL, MF_NOBRANCH, MF_NORETURN, MF_NOCOMMAND; for ( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) setmapflag "quiz_02", [email protected][[email protected]]; end; OnStart: if ( .start ) end; .round = 0; .start = 1; killmonsterall "quiz_02"; announce "Bombring: We are going to have a Bombring event.",0; sleep 10000; announce "Bombring: For those who wants to join, use @eventjoin",0; sleep 10000; announce "Bombring: After 1 Minute Event will close.",0; sleep 10000; announce "Bombring: So please if you want to join. use @eventjoin",0; sleep 60000; announce "Bombring: The entry to the event is now closed.",bc_all,0x0ceedb; if ( getmapusers("quiz_02") < 1 ) { announce "Bombring: Not enough participants.",bc_all,0x0ceedb; .start = false; mapwarp "quiz_02", "prontera", 150, 180; // warp out. end; } .start = 2; sleep 3500; mapannounce "quiz_02","We're about to begin the event.",bc_map,0x0ceedb; sleep 2500; mapannounce "quiz_02","The rules are simple.",bc_map,0x0ceedb; sleep 2000; mapannounce "quiz_02","Event will run for 30 seconds for 5 total rounds.",bc_map,0x0ceedb; sleep 2500; mapannounce "quiz_02","All you have to do is avoid Bombrings and stay alive for 30 seconds.",bc_map,0x0ceedb; sleep 2000; mapannounce "quiz_02","That's all. Let's begin.",bc_map,0x0ceedb; sleep 3000; while ( .round < 5 ) { [email protected] = getmapusers("quiz_02"); .round++; mapannounce "quiz_02","Round "+.round,bc_map,0x0ceedb; areamonster "quiz_02",48,334,71,357,"Run for you life!",1904, 5 * [email protected] * .round; sleep 10000 - ( 1000*.round ); } [email protected] = getmapusers("quiz_02"); if ( [email protected] ) announce "Bombring: No one survived the bombrings.",bc_all,0x0ceedb; else if ( [email protected] ) { [email protected] = getunits(BL_PC,"quiz_02",[email protected]); if ( [email protected] > 1 ) announce "A lot players has won the Bombring Event.",bc_all,0x0ceedb; for ( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) { attachrid [email protected][[email protected]]; if ( [email protected] == 1 ) announce strcharinfo(0)+" has won the Bombring Event.",bc_all,0x0ceedb; if ( $event_options&1 ) { for ( [email protected] = 0; [email protected] < $event_item_arr; [email protected] += 2 ) getitem $event_item_reward[[email protected]], $event_item_reward[[email protected]+1]; } if ( $event_options&2 ) { setd $event_var$, getd($event_var$)+$event_var_gain; dispbottom "You gained "+$event_var_gain+" "+$event_var_name$+". You now have "+getd($event_var$)+" "+$event_var_name$+"."; } } detachrid; } .start = false; sleep 5000; mapwarp "quiz_02","prontera",rand(148,163),rand(167,186); end; OnPCDieEvent: if ( .start && strcharinfo(3) == "quiz_02" ) warp "prontera",rand(148,163),rand(167,186); end; } // Dice Event - script Event_Dice -1,{ OnInit: // Mapflags setarray [email protected], MF_NOWARP, MF_NOWARPTO, MF_NOSKILL, MF_NOTELEPORT, MF_NOMEMO, MF_NOSAVE, MF_NOICEWALL, MF_NOBRANCH, MF_NORETURN; for ( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) setmapflag "quiz_02", [email protected][[email protected]]; end; OnStart: if ( .start ) end; .start = 1; for([email protected] = 1;[email protected] <= 4;[email protected]++) { disablenpc "Back#"[email protected]; disablenpc "Box "[email protected]; } announce "Dice: We are going to have a Dice event.",0; sleep 10000; announce "Dice: For those who wants to join, use @eventjoin",0; sleep 10000; announce "Dice: After 1 Minute Event will close.",0; sleep 10000; announce "Dice: So please if you want to join. use @eventjoin",0; sleep 60000; announce "Dice: The entry to the event is now closed.",bc_all,0x0ceedb; if ( !getmapusers("quiz_02") ) { announce "Dice: Not enough participants.",bc_all,0x0ceedb; .start = false; end; } .start = 2; sleep 3500; mapannounce "quiz_02","We're about to begin the event.",bc_map,0x0ceedb; sleep 2500; mapannounce "quiz_02","The rules are simple.",bc_map,0x0ceedb; sleep 2500; mapannounce "quiz_02","You'll have to enter one of the 4 avaiaible boxes.",bc_map,0x0ceedb; sleep 2500; mapannounce "quiz_02","Then a four sides dice will be thrown. The number it shows will be the saved number.",bc_map,0x0ceedb; sleep 2500; mapannounce "quiz_02","Remember to enter the boxes!",bc_map,0x0ceedb; sleep 2000; mapannounce "quiz_02","That's all. Let's begin.",bc_map,0x0ceedb; sleep 3000; while([email protected] && .start && [email protected] < 5) { for([email protected] = 1;[email protected] <= 4;[email protected]++) { enablenpc "Back#"[email protected]; enablenpc "Box "[email protected]; } sleep 1500; mapannounce "quiz_02","The dice will soon be thrown. Enter the desired box clicking the metalic number inside them.",bc_map,0x0ceedb; sleep 20000; for([email protected] = 5;[email protected] > 0;[email protected]) { mapannounce "quiz_02",[email protected]+"...",bc_map,0x0ceedb; sleep 990; } for([email protected] = 1;[email protected] <= 4;[email protected]++) { disablenpc "Back#"[email protected]; disablenpc "Box "[email protected]; } areawarp "quiz_02",32,95,79,76,"prontera",rand(148,163),rand(167,186); areawarp "quiz_02",80,85,80,76,"prontera",rand(148,163),rand(167,186); areawarp "quiz_02",31,85,31,76,"prontera",rand(148,163),rand(167,186); [email protected] = rand(1,4); mapannounce "quiz_02","Time! The dice shows the number "[email protected]+".",bc_map,0x0ceedb; setarray [email protected][0],33,41; setarray [email protected][0],45,53; setarray [email protected][0],57,65; setarray [email protected][0],69,77; for([email protected] = 1;[email protected] <= 4;[email protected]++) { if([email protected] != [email protected]) areawarp "quiz_02",getd("[email protected]"[email protected]+"[0]"),52,getd("[email protected]"[email protected]+"[1]"),73,"prontera",rand(148,163),rand(167,186); } sleep 3000; [email protected] = getmapusers("quiz_02"); if([email protected] <= 3 && .start && [email protected]) { mapannounce "quiz_02","The event is now over! Winners, enjoy your prizes!",bc_map,0x0ceedb; [email protected] = getunits(BL_PC,"quiz_02",[email protected]); .start = false; for([email protected] = 0;[email protected] < [email protected];[email protected]++) { attachrid [email protected][[email protected]]; announce strcharinfo(0)+" has won the Dice Event.",bc_all,0x0ceedb; if ( $event_options&1 ) { for ( [email protected] = 0; [email protected] < $event_item_arr; [email protected] += 2 ) getitem $event_item_reward[[email protected]], $event_item_reward[[email protected]+1]; } if ( $event_options&2 ) { setd $event_var$, getd($event_var$)+$event_var_gain; dispbottom "You gained "+$event_var_gain+" "+$event_var_name$+". You now have "+getd($event_var$)+" "+$event_var_name$+"."; } warp "prontera",rand(148,163),rand(167,186); } } else if( [email protected] ) { [email protected] = true; .start = false; announce "There was no winner on the Dice Event.",bc_all,0x0ceedb; } else { mapannounce "quiz_02","There's no clear winners yet, let's roll the dice again.",bc_map,0x0ceedb; } [email protected]++; } if([email protected] >= 5) { mapannounce "quiz_02","There were no winner clear in all of the event. The event is now over.",bc_map,0x0ceedb; .start = false; } end; } quiz_02,37,80,3 script Box 1 HIDDEN_NPC,{ warp "quiz_02",rand(33,41),rand(52,73); end; } quiz_02,49,80,3 script Box 2 HIDDEN_NPC,{ warp "quiz_02",rand(45,53),rand(52,73); end; } quiz_02,61,80,3 script Box 3 HIDDEN_NPC,{ warp "quiz_02",rand(57,65),rand(52,73); end; } quiz_02,73,80,3 script Box 4 HIDDEN_NPC,{ warp "quiz_02",rand(69,77),rand(52,73); end; } quiz_02,55,90,3 script Back to Prontera#dice 4_BULLETIN_BOARD2,{ warp "prontera",rand(148,163),rand(167,186); end; } quiz_02,37,64,3 script Back#1 4_BULLETIN_BOARD2,{ warp "quiz_02",55,76; end; } quiz_02,49,64,3 duplicate(Back#1) Back#2 4_BULLETIN_BOARD2 quiz_02,61,64,3 duplicate(Back#1) Back#3 4_BULLETIN_BOARD2 quiz_02,73,64,3 duplicate(Back#1) Back#4 4_BULLETIN_BOARD2 // Last Man Standing - script Event_LMS -1,{ OnInit: // Mapflags setarray [email protected], MF_NOWARP, MF_NOWARPTO, MF_NOSKILL, MF_NOTELEPORT, MF_NOMEMO, MF_NOSAVE, MF_NOICEWALL, MF_NOBRANCH, MF_NORETURN; for ( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) setmapflag "06guild_01", [email protected][[email protected]]; end; OnStart: if ( .start ) end; .start = 1; pvpoff "06guild_01"; announce "LMS: We are going to have a Last Man Standing event.",0; sleep 10000; announce "LMS: For those who wants to join, use @eventjoin",0; sleep 10000; announce "LMS: After 1 Minute Event will close.",0; sleep 10000; announce "LMS: So please if you want to join. use @eventjoin",0; sleep 60000; announce "LMS: The entry to the event is now closed.",bc_all,0x0ceedb; if ( getmapusers("06guild_01") < 2 ) { announce "LMS: Not enough participants.",bc_all,0x0ceedb; .start = false; end; } .start = 2; sleep 3500; mapannounce "06guild_01","We're about to begin the event.",bc_map,0x0ceedb; sleep 2500; mapannounce "06guild_01","The rules are simple.",bc_map,0x0ceedb; sleep 2500; mapannounce "06guild_01","Kill everyone in the map.",bc_map,0x0ceedb; sleep 2500; mapannounce "06guild_01","Last Man Standing wins!",bc_map,0x0ceedb; sleep 2000; mapannounce "06guild_01","That's all. Let's begin.",bc_map,0x0ceedb; sleep 3000; for ([email protected] = 10; [email protected] > 0; [email protected]) { mapannounce "06guild_01", "LMS: -- "[email protected]+" --",bc_map,0x0ceedb; sleep 1000; } mapannounce "06guild_01", "LMS: Fight! ",bc_map,0x0ceedb; pvpon "06guild_01"; .timer = 0; initnpctimer; end; OnTimer5000: // check every 5 secs.. .timer++; [email protected] = getmapusers("06guild_01"); if ( [email protected] > 1 && .timer == 6 ) { .timer = 0; mapannounce "06guild_01", "LMS: "+ [email protected] +" players left..", bc_blue; } else if ( [email protected] <= 1 ) donpcevent strnpcinfo(3)+"::OnEndEvent"; setnpctimer 0; end; OnEndEvent: stopnpctimer; .start = false; pvpoff "06guild_01"; mapannounce "06guild_01", "LMS: Event ended!",bc_map,0x0ceedb; sleep 5000; [email protected] = getunits(BL_PC,"06guild_01",[email protected]); if ( [email protected] == 0 ) { announce "LMS: No winners.",0; end; } attachrid [email protected]; announce strcharinfo(0)+" has won the Last Man Standing Event.",bc_all,0x0ceedb; if ( $event_options&1 ) { for ( [email protected] = 0; [email protected] < $event_item_arr; [email protected] += 2 ) getitem $event_item_reward[[email protected]], $event_item_reward[[email protected]+1]; } if ( $event_options&2 ) { setd $event_var$, getd($event_var$)+$event_var_gain; dispbottom "You gained "+$event_var_gain+" "+$event_var_name$+". You now have "+getd($event_var$)+" "+$event_var_name$+"."; } warp "prontera",rand(148,163),rand(167,186); end; OnPCDieEvent: if ( .start && strcharinfo(3) == "06guild_01" ) { warp "prontera",rand(148,163),rand(167,186); [email protected] = getmapusers("06guild_01"); if ( [email protected] > 1 ) mapannounce "06guild_01", "LMS: "+ [email protected] +" players left..", bc_blue; else if ( [email protected] <= 1 ) donpcevent strnpcinfo(3)+"::OnEndEvent"; } end; } // Novice V Zombie - script Event_NvZ -1,{ OnInit: // Mapflags setarray [email protected], MF_NOWARP, MF_NOWARPTO, MF_NOSKILL, MF_NOTELEPORT, MF_NOMEMO, MF_NOSAVE, MF_NOICEWALL, MF_NOBRANCH, MF_NORETURN, MF_NOCOMMAND; for ( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) setmapflag "quiz_01", [email protected][[email protected]]; end; OnStart: if ( .start ) end; .start = 1; killmonsterall "quiz_01"; announce "NvZ: We are going to have a Novice Vs. Zombie event.",0; sleep 10000; announce "NvZ: For those who wants to join, use @eventjoin",0; sleep 10000; announce "NvZ: After 1 Minute Event will close.",0; sleep 10000; announce "NvZ: So please if you want to join. use @eventjoin",0; sleep 60000; announce "NvZ: The entry to the event is now closed.",bc_all,0x0ceedb; if ( getmapusers("quiz_01") <= 1 ) { announce "NvZ: Not enough participants.",bc_all,0x0ceedb; .start = false; mapwarp "quiz_01", "prontera", 150, 180; // warp out. end; } .start = 2; sleep 3500; mapannounce "quiz_01","We're about to begin the event.",bc_map,0x0ceedb; sleep 2500; mapannounce "quiz_01","The rules are simple.",bc_map,0x0ceedb; sleep 2500; mapannounce "quiz_01","Zombies will be spawned in the map.",bc_map,0x0ceedb; sleep 2500; mapannounce "quiz_01","and will apear every 20 seconds.",bc_map,0x0ceedb; sleep 2000; mapannounce "quiz_01","Last man surviving wins.",bc_map,0x0ceedb; sleep 2000; mapannounce "quiz_01","That's all. Let's begin.",bc_map,0x0ceedb; sleep 3000; monster "quiz_01",42,369,"Zombie",1036,4; initnpctimer; end; OnTimer20000: // 20 seconds timer and also player check on how many left in map monster "quiz_01",42,369,"Zombie",1036,10; setnpctimer 0; end; OnPCDieEvent: if ( .start && strcharinfo(3) == "quiz_01" ) { warp "prontera",rand(148,163),rand(167,186); if ( getmapusers("quiz_01") == 1 ) { stopnpctimer; killmonsterall "quiz_01"; [email protected] = getunits(BL_PC,"quiz_01",[email protected]); .start = false; attachrid [email protected]; announce strcharinfo(0)+" has won the Novice v Zombie Event.",bc_all,0x0ceedb; if ( $event_options&1 ) { for ( [email protected] = 0; [email protected] < $event_item_arr; [email protected] += 2 ) getitem $event_item_reward[[email protected]], $event_item_reward[[email protected]+1]; } if ( $event_options&2 ) { setd $event_var$, getd($event_var$)+$event_var_gain; dispbottom "You gained "+$event_var_gain+" "+$event_var_name$+". You now have "+getd($event_var$)+" "+$event_var_name$+"."; } warp "prontera",rand(148,163),rand(167,186); end; } } end; } // Poring Catcher - script Poring_Catcher -1,{ OnInit: // Mapflags setarray [email protected], MF_NOWARP, MF_NOWARPTO, MF_NOSKILL, MF_NOLOOT, MF_NOTELEPORT, MF_NOMEMO, MF_NOSAVE, MF_NOICEWALL, MF_NOBRANCH, MF_NORETURN; for ( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) setmapflag "poring_w01", [email protected][[email protected]]; end; OnStart: if ( .start ) end; .start = 1; announce "Poring Catcher: We are going to have a Poring Catcher event.",0; sleep 10000; announce "Poring Catcher: For those who wants to join, use @eventjoin",0; sleep 10000; announce "Poring Catcher: After 1 Minute Event will close.",0; sleep 10000; announce "Poring Catcher: So please if you want to join. use @eventjoin",0; sleep 60000; announce "Poring Catcher: The entry to the event is now closed.",bc_all,0x0ceedb; .start = 2; sleep 3500; if( !getmapusers("poring_w01") ) { announce "Poring Catcher: Not enough participants in the Event.",bc_all,0x0ceedb; sleep 2500; announce "Poring Catcher: Event will be halted.",bc_all,0x0ceedb; .start = false; end; } mapannounce "poring_w01","We're about to begin the event.",bc_map,0x0ceedb; sleep 2500; mapannounce "poring_w01","The rules are simple.",bc_map,0x0ceedb; sleep 2500; mapannounce "poring_w01","In a few seconds I'm going to spawn tons of porings..",bc_map,0x0ceedb; sleep 2500; mapannounce "poring_w01","..All you need to do is kill the Poring with the right name..",bc_map,0x0ceedb; sleep 2500; mapannounce "poring_w01","..Which would be Poring.",bc_map,0x0ceedb; sleep 2000; mapannounce "poring_w01","If you kill the wrong one, you're out!",bc_map,0x0ceedb; sleep 2000; mapannounce "poring_w01","That's all. Let's begin.",bc_map,0x0ceedb; sleep 3000; areamonster "poring_w01",84,119,124,90,"Poring",1002,1,strnpcinfo(0)+"::OnMobKilledWin"; areamonster "poring_w01",84,119,124,90,"Poking",1002,3*getmapusers("poring_w01"),strnpcinfo(0)+"::OnMobKilled"; areamonster "poring_w01",84,119,124,90,"Poiring",1002,3*getmapusers("poring_w01"),strnpcinfo(0)+"::OnMobKilled"; areamonster "poring_w01",84,119,124,90,"Poling",1002,3*getmapusers("poring_w01"),strnpcinfo(0)+"::OnMobKilled"; areamonster "poring_w01",84,119,124,90,"Porng",1002,3*getmapusers("poring_w01"),strnpcinfo(0)+"::OnMobKilled"; areamonster "poring_w01",84,119,124,90,"pH0ur1n6",1002,3*getmapusers("poring_w01"),strnpcinfo(0)+"::OnMobKilled"; areamonster "poring_w01",84,119,124,90,"P0ring",1002,3*getmapusers("poring_w01"),strnpcinfo(0)+"::OnMobKilled"; areamonster "poring_w01",84,119,124,90,"Porong",1002,3*getmapusers("poring_w01"),strnpcinfo(0)+"::OnMobKilled"; areamonster "poring_w01",84,119,124,90,"Powing",1002,3*getmapusers("poring_w01"),strnpcinfo(0)+"::OnMobKilled"; areamonster "poring_w01",84,119,124,90,"Poriing",1002,3*getmapusers("poring_w01"),strnpcinfo(0)+"::OnMobKilled"; areamonster "poring_w01",84,119,124,90,"Boring",1002,3*getmapusers("poring_w01"),strnpcinfo(0)+"::OnMobKilled"; areamonster "poring_w01",84,119,124,90,"Lolwut!?",1002,3*getmapusers("poring_w01"),"::OnMobKilled"; areamonster "poring_w01",84,119,124,90,"Kill me to win!",1002,3*getmapusers("poring_w01"),strnpcinfo(0)+"::OnMobKilled"; end; OnMobKilled: dispbottom "You killed the wrong Poring! Yerrrrrrrrrrrr out!"; warp "prontera",rand(148,163),rand(167,186); sleep 5000; if ( !getmapusers("poring_w01") ) { .start = false; killmonsterall "poring_w01"; announce "Poring Catcher: No one won the Poring Catcher Event!.",bc_all,0x0ceedb; } end; OnMobKilledWin: announce strcharinfo(0)+" won the Poring Catcher Event!",bc_all,0xFF7F50; if ( $event_options&1 ) { for ( [email protected] = 0; [email protected] < $event_item_arr; [email protected] += 2 ) getitem $event_item_reward[[email protected]], $event_item_reward[[email protected]+1]; } if ( $event_options&2 ) { setd $event_var$, getd($event_var$)+$event_var_gain; dispbottom "You gained "+$event_var_gain+" "+$event_var_name$+". You now have "+getd($event_var$)+" "+$event_var_name$+"."; } killmonsterall "poring_w01"; sleep 5000; mapwarp "poring_w01","prontera",rand(148,163),rand(167,186); .start = false; end; } poring_w01,105,123,3 script Back to Prontera 4_BULLETIN_BOARD2,{ warp "prontera",rand(148,163),rand(167,186); end; } // Poring Hunter https://rathena.org/board/topic/121969-rporing-hunter-event/#comment-370418 - script Poring_Hunter FAKE_NPC,{ OnInit: // Event duration default: 3 mins. .duration = 3; // Note : spawn counts would be multiplied by number of participants. ( count * player count ) // if you dont want it, remove the calculation below. .count[0] = 20; // poring count .count[1] = 10; // drops count .count[2] = 15; // poporing count // Mapflags setarray [email protected], MF_NOWARP, MF_NOWARPTO, MF_NOSKILL, MF_NOLOOT, MF_NOTELEPORT, MF_NOMEMO, MF_NOSAVE, MF_NOICEWALL, MF_NOBRANCH, MF_NORETURN, MF_NOCOMMAND; for ( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) setmapflag "quiz_02", [email protected]apflag[[email protected]]; end; OnStart: if ( .start ) end; pvpoff "pvp_n_1-2"; killmonsterall "pvp_n_1-2"; .start = 1; .cur_time = 0; announce "Poring Hunter: We are going to have a Poring Hunter event.",0; sleep 10000; announce "Poring Hunter: For those who wants to join, use @eventjoin",0; sleep 10000; announce "Poring Hunter: After 1 Minute Event will close.",0; sleep 10000; announce "Poring Hunter: So please if you want to join. use @eventjoin",0; sleep 60000; announce "Poring Hunter: The entry to the event is now closed.",bc_all,0x0ceedb; [email protected] = getmapusers("pvp_n_1-2"); if ( [email protected] < 2 ) { announce "Poring Hunter : Not enough participants.", bc_all,0x0ceedb; goto OnEnd; end; } announce "Poring Hunter : The portal for the event has been closed, the event has started, good luck to all players!", bc_all; .start = 2; mapannounce "pvp_n_1-2","We're about to begin the event.",bc_map,0x0ceedb; sleep 2500; mapannounce "pvp_n_1-2","Porings grant 1 point when killed, Drops 5 points, Poporings -10 points.",bc_map,0x0ceedb; sleep 2500; mapannounce "pvp_n_1-2","You will have "+.duration+" minutes to get as many points as possible.",bc_map,0x0ceedb; sleep 2500; mapannounce "pvp_n_1-2","The Player who gets the most points within the time alloted will be the winner of the event.",bc_map,0x0ceedb; sleep 2500; mapannounce "pvp_n_1-2","That's all. Let's begin.",bc_map,0x0ceedb; sleep 2000; // NOTE : if you wish not to multiply the spawn to participants, remove < *[email protected] > on all mob spawns. monster "pvp_n_1-2", 0, 0, "Poring", 1002, .count[0]*[email protected], strnpcinfo(0)+"::OnKillPoring"; monster "pvp_n_1-2", 0, 0, "Drops", 1113, .count[1]*[email protected], strnpcinfo(0)+"::OnKillDrops"; monster "pvp_n_1-2", 0, 0, "Poporing", 1031, .count[2]*[email protected], strnpcinfo(0)+"::OnKillPoporing"; initnpctimer; end; OnKillPoring: callsub OnKillMob, 1002, "Poring", "OnKillPoring", 1; OnKillDrops: callsub OnKillMob, 1113, "Drops", "OnKillDrops", 5; OnKillPoporing: callsub OnKillMob, 1031, "Poporing", "OnKillPoporing", -10; OnKillMob: [email protected] = getarg(0); [email protected]$ = getarg(1); [email protected]$ = getarg(2); [email protected] = getarg(3); @phunter_points += [email protected]; monster "pvp_n_1-2",0,0,[email protected]$,[email protected],1,strnpcinfo(0)+"::"[email protected]$; dispbottom "You have "+ @phunter_points +" Point(s)."; end; OnTimer60000: .cur_time++; if ( .cur_time < .duration ) { mapannounce "pvp_n_1-2", "You have "+( .duration - .cur_time )+" min(s) left.", bc_blue|bc_map; setnpctimer 0; end; } stopnpctimer; killmonsterall "pvp_n_1-2"; [email protected] = getunits(BL_PC,"pvp_n_1-2",[email protected][0]); freeloop(true); for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) { attachrid([email protected][[email protected]]); if ( @phunter_points > .most_points ) { .most_points = @phunter_points; .win_aid[0] = getcharid(3); .win_name$[0] = strcharinfo(0); } else if ( @phunter_points == .most_points && @phunter_points > 0 ) { .win_aid[getarraysize(.win_aid)] = getcharid(3); .win_name$[getarraysize(.win_name$)] = strcharinfo(0); } detachrid; } freeloop(false); [email protected] = getarraysize(.win_aid); if ( [email protected] > 1 ) announce "Poring Hunter : The event is over, and we have "[email protected]+" winners having "+.most_points+" points each! Congratulations!", bc_all,0xFF7F50; else if ( [email protected] == 1 ) announce "Poring Hunter : The event is over, and the winner is ["+.win_name$+"] with "+.most_points+" points! Congratulations!", bc_all,0xFF7F50; else announce "Poring Hunter : The event is over, and there are no winners.", bc_all,0x0ceedb; if ( [email protected] ) { for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) { attachrid(.win_aid[[email protected]]); if ( $event_options&1 ) { for ( [email protected] = 0; [email protected] < $event_item_arr; [email protected] += 2 ) getitem $event_item_reward[[email protected]], $event_item_reward[[email protected]+1]; } if ( $event_options&2 ) { setd $event_var$, getd($event_var$)+$event_var_gain; dispbottom "You gained "+$event_var_gain+" "+$event_var_name$+". You now have "+getd($event_var$)+" "+$event_var_name$+"."; } dispbottom "Here is your reward from Poring Hunter event."; detachrid; } } OnEnd: mapannounce "pvp_n_1-2", "Warping out in few sec..", bc_blue|bc_map; .most_points = .start = false; deletearray .win_aid; deletearray .win_name$; sleep 5000; mapwarp "pvp_n_1-2","prontera",rand(148,163),rand(167,186); pvpon "pvp_n_1-2"; end; } Thank you!
  5. simply add the array_find and the array_find script from here
  6. up please. seems not working tons of rework T_T
  7. Thanks! Now I'm having prob with convertpcinfo command.
  8. Good day! I found this timely gvg event in rathena. May I request to convert to Hercules please. Got error on below which cant test the script correctly. thank you!
  9. Sweet! Thank you so much!
  10. Hi Samuel, I see. wait let me try.
  11. Hi @meko Good day! I did check in https://haru.ws/scriptchecker/#output and got this error. Haven't tried in my server yet.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.