Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===== By: ==================================================
- //= EL Dragon
- //===== Current Version: =====================================
- //= 1.00
- //===== Compatible With: =====================================
- //= rAthena SVN
- //============================================================
- - script event -1,{
- OnInit:
- //---- Lucky Poring Event -----
- set .SpecialPorings,5;
- set .NormalPorings,666;
- //---- Bring Me Items Event -----
- setarray .BringMeItems[0],985,914,756,7054,7005,1034,7446,1035,7563,1095,739,7507,508,949,7210,7119,532,1068,7441,7753,7158,7215; // Farm Event Item max. 127
- //---- Join Event Warp Command -----
- .map_name1$ = "poring_w02";
- .map_x1 = 100;
- .map_y1 = 194;
- bindatcmd "joinevent", strnpcinfo(3) +"::OnEventWarp";
- //---------------------
- bindatcmd "event",strnpcinfo(3)+"::OnEvent", 40,99;
- end;
- L_BoxEnd:
- if(.th_event) announce "Treasure Hunter : All Hyrican Event Box(s) are Dead. The Event is Over!",bc_all,0xcc99ff;
- killmonster .map$,"All";
- set .th_event,0;
- end;
- Onth_win:
- dispbottom "Your prize is: "+getitemname(.th_prize)+". Congratulations!";
- getitem(.th_prize,.th_prize_amount);
- set .Event_Box, .Event_Box - 1;
- if( .Event_Box == 0 )
- goto L_BoxEnd;
- else
- announce "Treasure Hunter : " + .Event_Box + " Hyrican Event Box(s) are Alive!",bc_all,0xcc99ff;
- end;
- set .th_event, 0;
- Onpc_fail:
- dispbottom "Sorry, wrong Poring!";
- warp "prontera",156,178;
- end;
- Onpc_win:
- killmonster .map$,"All";
- dispbottom "That was correct. You win!";
- dispbottom "Your prize is: "+getitemname(.pc_prize)+". Congratulations!";
- getitem(.pc_prize,.pc_prize_amount);
- set .pc_event, 0;
- setmapflag .map$,mf_nomobloot;
- setmapflag .map$,mf_nodrop;
- announce strcharinfo(0)+" wins Poring Catcher Event. Congratulations!",0;
- end;
- OnSpecialKill:
- set .SpecialPorings[1],.SpecialPorings[1]-1;
- dispbottom "Your prize is: "+getitemname(.luky_prize)+". Congratulations!";
- getitem(.luky_prize,.luky_prize_amount);
- goto PoringCount;
- OnNormalKill:
- set .NormalPorings[1],.NormalPorings[1]-1;
- goto PoringCount;
- PoringCount:
- announce "Special Poring: " + .SpecialPorings[1] + " || Normal Poring: " + .NormalPorings[1],bc_map;
- if(!.SpecialPorings[1]) goto OnEndEvent;
- end;
- OnEndEvent:
- announce "The Poring Summon Event is now over!",bc_all;
- killmonster .Map$,"All";
- removemapflag .Map$,mf_nomobloot;
- removemapflag .Map$,mf_nodrop;
- set .Event,0;
- set .SpecialPorings[1],0;
- set .NormalPorings[1],0;
- end;
- OnEventWarp:
- if($joinevent == 0) goto OnEndWarp;
- warp .map_name1$, .map_x1, .map_y1;
- end;
- OnEndWarp:
- dispbottom "No Event at the moment.";
- end;
- OnEvent:
- if(getgmlevel()<97) end;
- if(.@atcmd_parameters$[0]=="lucky" && .@atcmd_parameters$[1]=="stop"){
- if(.lucky_event==0){
- dispbottom "Event didn't started.";
- end;
- }
- killmonster .map$,"All";
- set .lucky_event, 0;
- removemapflag .Map$,mf_nomobloot;
- removemapflag .Map$,mf_nodrop;
- announce "Lucky Poring Event was ended by "+strcharinfo(0)+".",0;
- end;
- }
- if(.@atcmd_parameters$[0]=="lucky" && .@atcmd_parameters$[1]=="start"){
- if(.lucky_event==1){
- dispbottom "Event is already running.";
- end;
- }
- set .luky_prize, .@atcmd_parameters$[2];
- set .luky_prize_amount, .@atcmd_parameters$[3];
- set .Event,0;
- set .lucky_event,1;
- set .SpecialPorings[1],0;
- set .NormalPorings[1],0;
- set $@ran, rand(1,8);
- if ($@ran == 8) set .Map$,"lighthalzen";
- if ($@ran == 7) set .Map$,"louyang";
- if ($@ran == 6) set .Map$,"comodo";
- if ($@ran == 5) set .Map$,"xmas";
- if ($@ran == 4) set .Map$,"aldebaran";
- if ($@ran == 3) set .Map$,"payon";
- if ($@ran == 2) set .Map$,"geffen";
- if ($@ran == 1) set .Map$,"morocc";
- killmonster .Map$,"All";
- setmapflag .Map$,mf_nomobloot;
- setmapflag .map$,mf_nodrop;
- monster .Map$,0,0,"Poring",1002,.SpecialPorings, strnpcinfo(0)+"::OnSpecialKill";
- monster .Map$,0,0,"Poring",1002,.NormalPorings, strnpcinfo(0)+"::OnNormalKill";
- set .SpecialPorings[1],.SpecialPorings;
- set .NormalPorings[1],.NormalPorings;
- announce "The Poring Event has begun!",bc_all;
- announce "Location: " + .Map$,bc_all;
- mapannounce ".Map$","Special Poring: " + .SpecialPorings,bc_all;
- mapannounce ".Map$","Normal Poring: " + .NormalPorings,bc_all;
- end;
- }
- if(.@atcmd_parameters$[0]=="poring" && .@atcmd_parameters$[1]=="stop"){
- if(.pc_event==0){
- dispbottom "Event didn't started.";
- end;
- }
- killmonster .map$,"All";
- set .pc_event, 0;
- removemapflag .Map$,mf_nomobloot;
- removemapflag .Map$,mf_nodrop;
- removemapflag .Map$,mf_noskill;
- announce "Poring Catcher Event was ended by "+strcharinfo(0)+".",0;
- end;
- }
- if(.@atcmd_parameters$[0]=="poring" && .@atcmd_parameters$[1]=="start"){
- if(.pc_event==1){
- dispbottom "Event is already running.";
- end;
- }
- getmapxy(.map$,.mapx,.mapy,0);
- set .@pc_x1,(.mapx-15);
- set .@pc_y1,(.mapy+15);
- set.@pc_x2,(.mapx+15);
- set .@pc_y2,(.mapy-15);
- set .pc_prize, .@atcmd_parameters$[2];
- set .pc_prize_amount, .@atcmd_parameters$[3];
- areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "P0ring", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
- areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Poriing", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
- areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Pooring", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
- areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Porinng", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
- areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Poporing", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
- areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Poríng", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
- areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Porìng", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
- areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Póring", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
- areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Pòring", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
- areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Porinq", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
- areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Poring", 1002, 1, strnpcinfo(0)+"::Onpc_win";
- setmapflag .map$,mf_nomobloot;
- setmapflag .map$,mf_nodrop;
- setmapflag .map$,mf_noskill;
- set .pc_event, 1;
- announce "Poring Catcher Event started in "+.map$+".",0;
- end;
- }
- if(.@atcmd_parameters$[0]=="box" && .@atcmd_parameters$[1]=="stop"){
- if(.th_event==0){
- dispbottom "Event didn't started.";
- end;
- }
- killmonster .map$,"All";
- set .th_event, 0;
- announce "Treasure Hunter Event was ended by "+strcharinfo(0)+".",0;
- end;
- }
- if(.@atcmd_parameters$[0]=="box" && .@atcmd_parameters$[1]=="start"){
- if(.th_event==1){
- dispbottom "Event is already running.";
- end;
- }
- getmapxy(.map$,.mapx,.mapy,0);
- set .th_prize, .@atcmd_parameters$[2];
- set .th_prize_amount, .@atcmd_parameters$[3];
- set .@rand,rand(1,6);
- if (.@rand == 1) set .Event_Box,"1";
- if (.@rand == 2) set .Event_Box,"2";
- if (.@rand == 3) set .Event_Box,"3";
- if (.@rand == 4) set .Event_Box,"2";
- if (.@rand == 5) set .Event_Box,"1";
- monster .map$, 0, 0, "Hyrican Event Box", 1732, .Event_Box, strnpcinfo(0)+"::Onth_win";
- set .th_event, 1;
- announce "Treasure Hunter Event started in "+.map$+".",0;
- announce "Treasure Hunter : " + .Event_Box + " Hyrican Event Box(s) are Alive!",bc_all,0xcc99ff;
- }
- if(.@atcmd_parameters$[0]=="dice" && .@atcmd_parameters$[1]=="stop"){
- if(.dc_event==0){
- dispbottom "Event didn't started.";
- end;
- }
- set .dc_event, 0;
- set $joinevent,0;
- announce "Dice Event was ended by "+strcharinfo(0)+".",0;
- end;
- }
- if(.@atcmd_parameters$[0]=="item" && .@atcmd_parameters$[1]=="stop"){
- if(.item_event==0){
- dispbottom "Event didn't started.";
- end;
- }
- set .item_event, 0;
- set $joinevent,0;
- announce "BringMeItems was ended by "+strcharinfo(0)+".",0;
- end;
- }
- if(.@atcmd_parameters$[0]=="dice" && .@atcmd_parameters$[1]=="start"){
- if(.dc_event==1){
- dispbottom "Event is already running.";
- end;
- }
- set getvariableofnpc(.dc_prize,"startevent"), .@atcmd_parameters$[2];;
- set getvariableofnpc(.dc_prize_amount,"itemfarmevent"), .@atcmd_parameters$[3];;
- announce "Dice Event: started in 1 minute at Event Jack. use @joinevent",0;
- set $joinevent,1;
- sleep2 60000;
- set .dc_event, 1;
- set $joinevent,0;
- announce "Dice Event: started talk to Event Jack.",0;
- end;
- }
- if(.@atcmd_parameters$[0]==""){
- dispbottom "Syntax:";
- dispbottom "@event Event Name#Start or Stop#Prize ID#ID Amount , without #";
- dispbottom "====================================";
- dispbottom "Events:";
- dispbottom "poring, box, dice, item, lucky";
- end;
- }
- if(.@atcmd_parameters$[0]=="item" && .@atcmd_parameters$[1]=="start"){
- if(.item_event==1){
- dispbottom "Event is already running.";
- end;
- }
- set getvariableofnpc(.item_prize,"itemfarmevent"), .@atcmd_parameters$[2];;
- set getvariableofnpc(.item_prize_amount,"itemfarmevent"), .@atcmd_parameters$[3];;
- announce "BringMeItems: started at Item Farmer. use @joinevent",0;
- set $joinevent,1;
- sleep2 100;
- set .item_event, 1;
- set .@i, rand( getarraysize( .BringMeItems ) );
- set $item, .BringMeItems[ .@i ];
- set $amount, rand( 20, 45 );
- announce "Itme Farmer: Bring me " + $amount + "x " + getitemname( $item ),0;
- end;
- }
- }
- //------------ Dice Event ------------
- poring_w02,101,202,4 script Event Jack::startevent 873,{
- if(getvariableofnpc(.dc_event,"event")==1) goto OnDCEvent;
- else mes "[^FF7700Event Jack^000000]";
- mes "No Event at the moment.";
- close;
- OnDCEvent:
- mes "[^FF7700Event Jack^000000]";
- mes "Hello my fellow friend, wanna try your luck with a dice?";
- next;
- switch(select("Yes:No")){
- case 1:
- mes "[^FF7700Event Jack^000000]";
- mes "If you dice a 6 you win.";
- next;
- L_dice:
- mes "[^FF7700Event Jack^000000]";
- mes "Good Luck!";
- next;
- switch(select("Dice:Stop")) {
- case 1:
- progressbar "00FF00",3;
- set .dc_rand, rand(1,100);
- if(.dc_rand<=3) { emotion 63, 1; dispbottom "Dice Number: 6. You won!"; goto L_DCWin; }
- if(.dc_rand>3 && .dc_rand<=15) { emotion 62, 1; dispbottom "Dice Number: 5. Almost!"; goto L_DCFail; }
- if(.dc_rand>15 && .dc_rand<=35) { emotion 61, 1; dispbottom "Dice Number: 4. A bit more."; goto L_DCFail; }
- if(.dc_rand>35 && .dc_rand<=60) { emotion 60, 1; dispbottom "Dice Number: 3. Try again!"; goto L_DCFail; }
- if(.dc_rand>60 && .dc_rand<=80) { emotion 59, 1; dispbottom "Dice Number: 2. Don't give up."; goto L_DCFail; }
- else { emotion 58, 1; dispbottom "Dice Number: 1. You can do it!"; goto L_DCFail; }
- case 2:
- goto L_close;
- end;
- }
- case 2:
- L_close:
- mes "[^FF7700Event Jack^000000]";
- mes "Maybe next time!";
- close;
- }
- L_DCWin:
- if(getvariableofnpc(.dc_event,"event")==0){
- mes "[^FF7700Event Jack^000000]";
- mes "The Event is over. Someone has won already.";
- close;
- }
- set getvariableofnpc(.dc_event,"event"), 0;
- dispbottom "Your prize is "+getitemname(.dc_prize)+".";
- getitem(.dc_prize,.dc_prize_amount);
- announce strcharinfo(0)+" wins Dice Event. Congratulations!",0;
- close;
- L_DCFail:
- if(getvariableofnpc(.dc_event,"event")==0){
- mes "[^FF7700Event Jack^000000]";
- mes "The Event is over. Someone has won!";
- close;
- }
- goto L_dice;
- end;
- }
- //------------ BringMeItems Event ------------
- poring_w02,96,202,4 script Item Farmer::itemfarmevent 866,{
- if(getvariableofnpc(.item_event,"event")==1) goto OnIDEvent;
- else mes "[^FF7700Item Farmer^000000]";
- mes "No Event at the moment.";
- close;
- OnIDEvent:
- if ( countitem( $item ) < $amount ) {
- mes "[^FF7700Item Farmer^000000]";
- mes "Bring me " + $amount + "x "+getitemname($item)+".";
- close;
- }
- delitem $item, $amount;
- announce strcharinfo(0)+" wins BringMeItems Event. Congratulations!",0;
- set getvariableofnpc(.item_event,"event"), 0;
- getitem(.item_prize,.item_prize_amount);
- set .item_event, .item_prize_amount;
- set $joinevent,0;
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement