Jump to content
  • 0

Emp Breaker Test Help


Eivohr

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  71
  • Reputation:   0
  • Joined:  01/14/13
  • Last Seen:  

Hi, First I'm sorry for the contributor of this script (Vincent of eathena board).

Due to the owner doesn't response when I was post in eathena board. Maybe he is not active anymore.

This script is eathena script and working properly to my server emulator (eathena SVN). I would ask to add to this script

atleast Top 5 fastest EmpTest Breaker ladder. Because my player request like that. I hope you can

//===== English ==============================================
//===== eAthena Script =======================================
//= Emperium Breaker Test (No Skills Allowed)
//===== By: ==================================================
//= Vincent (for AidiRO)
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= TXT & SQL
//============================================================
//If you want to disable player using skill in this map, Go to >> http://bit.ly/skilldbnocast and edit your "db/skilldbnocast.txt" into that skilldbnocast
pvp_n_4-5 mapflag restricted 7
prontera,127,212,0 script Emperium Breaker Test 1288,{

   set @time, $empbrk_record;
   set @m, @time / 60000;
   set @time, @time - (@m * 60000);
   set @s, @time /1000;
   set @time, @time - (@s * 1000);

   mes "[Emperium Breaker Test]";
   mes "Official Record by ^5050A0"+$empbrk_record$+"^000000";
   mes " ^000080"+@m+"^000000m ^000080"+@s+"^000000s ^000080"+@time+"^000000ms";

   set @time, empbrk_record;
   set @m, @time / 60000;
   set @time, @time - (@m * 60000);
   set @s, @time /1000;
   set @time, @time - (@s * 1000);
   mes "Your Own Record:";
   mes " ^000080"+@m+"^000000m ^000080"+@s+"^000000s ^000080"+@time+"^000000ms";

   mes "Would you like to try a new record?";
   next;
   if (getgmlevel()==99) { menu "Standard Menu",-,"Reset",L_reset,"Reset Rooms",L_emptyrooms,"Exit",L_exit;}
   menu "Yes",-,"No",L_exit,"Reset",L_resc;
   cleararray .arena$[0],"",4;
   mes "[Emperium Breaker Test]";
   if (getareausers("pvp_n_4-5",94,128,105,139)) mes "Emp n? ^0000DF1 ^FF0000 Busy^000000";
   else{ mes "Emp n? ^0000DF1 ^00A000 Free^000000";  set .arena$[0],"^0000DFEmperium^000000";}
   if (getareausers("pvp_n_4-5",60,94,71,105)) mes "Emp n? ^B05D002 ^FF0000 Busy^000000";
   else{ mes "Emp n? ^B05D002 ^00A000 Free^000000"; set .arena$[1],"^B05D00Emperium^000000";}
   if (getareausers("pvp_n_4-5",94,60,105,71)) mes "Emp n? ^B00FB03 ^FF0000 Busy^000000";
   else{ mes "Emp n? ^90AF003 ^00A000 Free^000000"; set .arena$[2],"^90AF00Emperium^000000";}
   if (getareausers("pvp_n_4-5",128,94,139,105)) mes "Emp n? ^50AF004 ^FF0000 Busy^000000";
   else{ mes "Emp n? ^500F004 ^00A000 Free^000000"; set .arena$[3],"^500F00Emperium^000000";}
   next;
getmapxy(@mpempbrk$,@empbrkx,@empbrky,0,strcharinfo(0));
   switch (select(.arena$[0],.arena$[1],.arena$[2],.arena$[3],"Quit")){

   case 1:
   if (getareausers("pvp_n_4-5",60,94,71,105) == 0){
   if($@someonegotin1 > 0){ mes "Room is now BUSY"; close;}
   set $@someonegotin1, 1;
   warp "pvp_n_4-5",99,128;
   killmonster "pvp_n_4-5","EmpBrk#1::OnThisMobDeath";
   initnpctimer "EmpBrk#1";}
   break;

   case 2:
   if (getareausers("pvp_n_4-5",60,94,71,105) == 0){   
   if($@someonegotin2 > 0){ mes "Room is now BUSY"; close;}
   set $@someonegotin2, 1;    
   warp "pvp_n_4-5",68,99;
   killmonster "pvp_n_4-5","EmpBrk#2::OnThisMobDeath";
   initnpctimer "EmpBrk#2";}
   break;
   case 3:
   if (getareausers("pvp_n_4-5",94,60,105,71) == 0){  
   if($@someonegotin3 > 0){ mes "Room is now BUSY"; close;}
   set $@someonegotin3, 1;     
   warp "pvp_n_4-5",100,68;
   killmonster "pvp_n_4-5","EmpBrk#3::OnThisMobDeath";
   initnpctimer "EmpBrk#3";}
   break;
   case 4:
   if (getareausers("pvp_n_4-5",128,94,139,105) == 0){ 
   if($@someonegotin4 > 0){ mes "Room is now BUSY"; close;}
   set $@someonegotin4, 1;      
   warp "pvp_n_4-5",130,99;
   killmonster "pvp_n_4-5","EmpBrk#4::OnThisMobDeath";
   initnpctimer "EmpBrk#4";}
   break;

   default:
   close;

   }
sc_end SC_ALL;
close;
L_reset:
   mes "[Emperium Breaker Test]";
   mes "Are you sure to reset official record ?";
   menu "Yes",-,"No",L_exit;
   set $empbrk_record, 0;
   set $empbrk_record$, "";
close;
L_resc:
   mes "[Emperium Breaker Test]";
   mes "Are you suere to rest your record?";
   menu "Yes",-,"No",L_exit;
   set empbrk_record, 0;
L_emptyrooms:
set $@someonegotin1, 0;
set $@someonegotin2, 0;
set $@someonegotin3, 0;
set $@someonegotin4, 0;
close;
L_exit:
close;   

}
- script EmpBrk#1 -1,{
OnTimer3000:
   if (.end == 1) {    warpchar "prontera",150,172,.charid;
   stopnpctimer;
   set .end, 0;
   }
end;   

OnTimer5000:
   set .x1,94;
   set .y1,128;
   set .x2,105;
   set .y2,139;
   set .xe,100;
   set .ye,134;

areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Let's ready to break the Emperium",0;
set $@someonegotin1, 0;
end;

OnTimer7000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",0;
end;
OnTimer8000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",0;
end;
OnTimer9000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",0;
end;
OnTimer10000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",0;
end;
OnTimer11000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",0;
end;
OnTimer12000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",0;
monster "pvp_n_4-5",.xe,.ye,"Emperium",1288,1,"EmpBrk#1::OnThisMobDeath";
end;
OnTimer1200000:
warpchar "prontera",150,172,.charid;
stopnpctimer;
set .end, 1;
end;
OnThisMobDeath:
   stopnpctimer "EmpBrk#1";
   set .time, getnpctimer(0,"EmpBrk#1");
   set .time, .time - 12000;
   if (.time < empbrk_record || empbrk_record == 0)
   {
       areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",0;
       set empbrk_record, .time;

   }
   if (.time < $empbrk_record || $empbrk_record == 0)
   {
       areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Official Record!!!",0;
announce strcharinfo(0)+" is now the NO. 1 Emperium Breaker!!",0;
       set $empbrk_record, .time;
       set $empbrk_record$,strcharinfo(0);
   }
   set .m, .time / 60000;
   set .time, .time - (.m * 60000);
   set .s, .time /1000;
   set .time, .time - (.s * 1000);
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.time+"ms",0;
   set .end,1;
   set .charid,getcharid(0);
   initnpctimer;
end;
}
pvp_n_4-5,99,125,0 script EmpBrk#1_touch -1,2,1,{
   OnTouch:
   killmonster "pvp_n_4-5","EmpBrk#1::OnThisMobDeath";
   mes "[Emperium Breaker Test]";
   mes "You cannot exit from small sqare.";
   close2;
set $@someonegotin1, 0;
       warp @mpempbrk$,@empbrkx,@empbrky;
   close;

}
- script EmpBrk#2 -1,{

OnTimer3000:
   if (.end == 1) {    warpchar "prontera",150,172,.charid;
   stopnpctimer;
   set .end, 0;
   }
end;

OnTimer5000:
   set .x1,60;
   set .y1,94;
   set .x2,71;
   set .y2,105;
   set .xe,65;
   set .ye,99;

areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Let's ready to break the Emperium",0;
set $@someonegotin2, 0;
end;

OnTimer7000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",0;
end;
OnTimer8000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",0;
end;
OnTimer9000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",0;
end;
OnTimer10000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",0;
end;
OnTimer11000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",0;
end;
OnTimer12000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",0;
monster "pvp_n_4-5",.xe,.ye,"Emperium",1288,1,"EmpBrk#2::OnThisMobDeath";
end;
OnTimer1200000:
warpchar "prontera",150,172,.charid;
stopnpctimer;
set .end, 1;
end;
OnThisMobDeath:
   stopnpctimer "EmpBrk#2";
   set .time, getnpctimer(0,"EmpBrk#2");
   set .time, .time - 12000;
   if (.time < empbrk_record || empbrk_record == 0)
   {
       areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",0;
       set empbrk_record, .time;

   }
   if (.time < $empbrk_record || $empbrk_record == 0)
   {
       areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Official Record!!!",0;
announce strcharinfo(0)+" is now the NO. 1 Emperium Breaker!!",0;
       set $empbrk_record, .time;
       set $empbrk_record$,strcharinfo(0);
   }
   set .m, .time / 60000;
   set .time, .time - (.m * 60000);
   set .s, .time /1000;
   set .time, .time - (.s * 1000);
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.time+"ms",0;
   set .end,1;
   set .charid,getcharid(0);
   initnpctimer;
end;
}
pvp_n_4-5,74,99,0 script EmpBrk#2_touch -1,1,2,{
   OnTouch:
   killmonster "pvp_n_4-5","EmpBrk#2::OnThisMobDeath";
   mes "[Emperium Breaker Test]";
   mes "You cannot exit from small sqare.";
   close2;
set $@someonegotin2, 0;
       warp @mpempbrk$,@empbrkx,@empbrky;
   close;

}
- script EmpBrk#3 -1,{
OnTimer3000:
   if (.end == 1) {    warpchar "prontera",150,172,.charid;
   stopnpctimer;
   set .end, 0;
   }
end;   

OnTimer5000:
   set .x1,94;
   set .y1,60;
   set .x2,105;
   set .y2,71;
   set .xe,99;
   set .ye,65;

areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Let's ready to break the Emperium",0;
set $@someonegotin3, 0;
end;

OnTimer7000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",0;
end;
OnTimer8000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",0;
end;
OnTimer9000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",0;
end;
OnTimer10000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",0;
end;
OnTimer11000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",0;
end;
OnTimer12000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",0;
monster "pvp_n_4-5",.xe,.ye,"Emperium",1288,1,"EmpBrk#3::OnThisMobDeath";
end;
OnTimer1200000:
warpchar "prontera",150,172,.charid;
stopnpctimer;
set .end, 1;
end;
OnThisMobDeath:
   stopnpctimer "EmpBrk#3";
   set .time, getnpctimer(0,"EmpBrk#3");
   set .time, .time - 12000;
   if (.time < empbrk_record || empbrk_record == 0)
   {
       areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",0;
       set empbrk_record, .time;

   }
   if (.time < $empbrk_record || $empbrk_record == 0)
   {
       areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Official Record!!!",0;
announce strcharinfo(0)+" is now the NO. 1 Emperium Breaker!!",0;
       set $empbrk_record, .time;
       set $empbrk_record$,strcharinfo(0);
   }
   set .m, .time / 60000;
   set .time, .time - (.m * 60000);
   set .s, .time /1000;
   set .time, .time - (.s * 1000);
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.time+"ms",0;
   set .end,1;
   set .charid,getcharid(0);
   initnpctimer;
end;
}
pvp_n_4-5,100,74,0 script EmpBrk#3_touch -1,2,1,{
   OnTouch:
   killmonster "pvp_n_4-5","EmpBrk#3::OnThisMobDeath";
   mes "[Emperium Breaker Test]";
   mes "You cannot exit from small sqare.";
   close2;
set $@someonegotin3, 0;
       warp @mpempbrk$,@empbrkx,@empbrky;
   close;

}

- script EmpBrk#4 -1,{
OnTimer3000:
   if (.end == 1) {    warpchar "prontera",150,172,.charid;
   stopnpctimer;
   set .end, 0;
   }
end;   

OnTimer5000:
   set .x1,128;
   set .y1,94;
   set .x2,139;
   set .y2,105;
   set .xe,134;
   set .ye,99;

areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Let's ready to break the Emperium",0;
set $@someonegotin4, 0;
end;

OnTimer7000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",0;
end;
OnTimer8000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",0;
end;
OnTimer9000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",0;
end;
OnTimer10000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",0;
end;
OnTimer11000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",0;
end;
OnTimer12000:
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",0;
monster "pvp_n_4-5",.xe,.ye,"Emperium",1288,1,"EmpBrk#4::OnThisMobDeath";
end;
OnTimer1200000:
warpchar "prontera",150,172,.charid;
stopnpctimer;
set .end, 1;
end;
OnThisMobDeath:
   stopnpctimer "EmpBrk#4";
   set .time, getnpctimer(0,"EmpBrk#4");
   set .time, .time - 12000;
   if (.time < empbrk_record || empbrk_record == 0)
   {
       areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",0;
       set empbrk_record, .time;

   }
   if (.time < $empbrk_record || $empbrk_record == 0)
   {
       areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Official Record!!!",0;
announce strcharinfo(0)+" is now the NO. 1 Emperium Breaker!!",0;
       set $empbrk_record, .time;
       set $empbrk_record$,strcharinfo(0);
   }
   set .m, .time / 60000;
   set .time, .time - (.m * 60000);
   set .s, .time /1000;
   set .time, .time - (.s * 1000);
areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.time+"ms",0;
   set .end,1;
   set .charid,getcharid(0);
   initnpctimer;
end;
}
pvp_n_4-5,125,100,0 script EmpBrk#4_touch -1,1,2,{
   OnTouch:
   killmonster "pvp_n_4-5","EmpBrk#4::OnThisMobDeath";
   mes "[Emperium Breaker Test]";
   mes "You cannot exit from small sqare.";
   close2;
set $@someonegotin4, 0;
       warp @mpempbrk$,@empbrkx,@empbrky;
   close;

}

help me. Thanks in advance.

Edited by AnnieRuru
use [codebox] if the script > 10 lines
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


pvp_n_4-5    mapflag    restricted    7

prontera,127,212,0    script    Emperium Breaker Test    1288,{

   set .@gm, getgmlevel();
   explode( .@b$, $empbrk_record$, "|" );

// Display records
// ---------------
   mes "^FF0000~~ Emperium Breaker Test ~~^000000";
   mes "Breaker Top 5 :";
   if( !getarraysize( .@b$ ) )
       mes "^777777*empty*^000000";
   for( set .@i, 0; .@i < getarraysize( .@b$ ); set .@i, .@i + 1 )
       mes "^777777"+ ( .@i + 1 ) +"- ^5050A0"+ .@b$[ .@i ] +"^000000"+ callsub( L_time_, $empbrk_record[ .@i ] );

   if( empbrk_record ) {
       mes "______________________________";
       set .@rec$, callsub( L_time_, empbrk_record );
       mes "Your Own Record:"+ .@rec$;
   }
   next;

   mes "^FF0000~~ Emperium Breaker Test ~~^000000";
   mes "Would you like to try a new record?";
   if( empbrk_record ) {
       mes "______________________________";
       mes "Your Own Record:"+ .@rec$;
   }
   next;

   menu "^777777~ Yes^000000", -, ( empbrk_record ? "^777777~ Reset my record^000000" : "" ), L_resc,
       ( .@gm > 98 && $empbrk_record$ != "" ? "^777777~ [ GM ] Reset all^000000" : "" ), L_reset, ( .@gm > 98 ? "^777777~ [ GM ] Reset Rooms^000000" : "" ), L_emptyrooms, "^777777~ Exit^000000", L_exit;
   deletearray .arena$;

// Area arena for getareausers
// ---------------------------
   setarray .@A1, 94,128,105,139;
   setarray .@A2, 60,94,71,105;
   setarray .@A3, 94,60,105,71;
   setarray .@A4, 128,94,139,105;

   mes "^FF0000~~ Emperium Breaker Test ~~^000000";
   for( set .@i, 1; .@i <= 4; set .@i, .@i + 1 ) {
       if ( getareausers("pvp_n_4-5", getd( ".@A"+ .@i +"[ 0 ]" ), getd( ".@A"+ .@i +"[ 1 ]" ), getd( ".@A"+ .@i +"[ 2 ]" ), getd( ".@A"+ .@i +"[ 3 ]" ) ) )
           mes "Emp n° ^0000DF"+ .@i +" ^FF0000 <Busy>^000000";
       else {
           mes "Emp n° ^0000DF"+ .@i +" ^00A000 <Free>^000000";
           set .arena$[ .@i -1 ],"^0000DFRoom n°"+ .@i +"^000000";
       }
   }
   next;

   getmapxy( @mpempbrk$, @empbrkx, @empbrky, 0 );
// menu arena
// ----------
   set .@a, select( .arena$[0], .arena$[1], .arena$[2], .arena$[3], "Quit" );
   if( .@a == 5 ) close;

// x, y for user warp / arena ; x1, y1, x2, y2...
// ----------------------------------------------
   setarray .@xy[ 2 ], 99, 128, 68, 99, 100, 68, 130, 99;

// select arena is empty ?
// -----------------------
   if ( !getareausers("pvp_n_4-5", getd( ".@A"+ .@a +"[ 0 ]" ), getd( ".@A"+ .@a +"[ 1 ]" ), getd( ".@A"+ .@a +"[ 2 ]" ), getd( ".@A"+ .@a +"[ 3 ]" ) ) ) {
       warp "pvp_n_4-5", .@xy[ .@a * 2 ], .@xy[ .@a * 2 + 1 ];
       killmonster "pvp_n_4-5","EmpBrk#"+ .@a +"::OnThisMobDeath";
       donpcevent "EmpBrk#"+ .@a +"::OnEmpBreak";
       sc_end SC_ALL;
   }
   else
       mes "Room is now BUSY";
   close;

// reset top 5
// -----------
L_reset:
   mes "^FF0000~~ Emperium Breaker Test ~~^000000";
   mes "Are you sure to reset official record ?";

   if( select( "Yes", "No" ) -1 ) close;
   mes "All records had been reset.";
   set $empbrk_record, 0;
   set $empbrk_record$, "";
   close;

// reset your record ( + reset record if in top 5 )
// ------------------------------------------------
L_resc:
   mes "^FF0000~~ Emperium Breaker Test ~~^000000";
   mes "Are you sure to reset your record?";
   if( select( "Yes", "No" ) -1 ) close;
   if( $empbrk_record$ != "" ) {
       explode( .@b$, $empbrk_record$, "|" );
       for( set .@i, 0; .@i < getarraysize( .@b$ ); set .@i, .@i + 1 )
           if( .@b$[ .@i ] == strcharinfo(0) ) {
               deletearray .@b$[ .@i ], 1;
               deletearray $empbrk_record[ .@record ], 1;
           }
       set $empbrk_record$, implode( .@b$, "|" );
   }
   mes "Your record has been reset.";
   set empbrk_record, 0;
   close;

// warp all people out of arena
// ----------------------------
L_emptyrooms:
   mapwarp "pvp_n_4-5","prontera",0,0;
L_exit:
   close;

// return time of record ( min sec ms )
// ------------------------------------
L_time_:
   set .@time, getarg(0);
   set .@m, .@time / 60000;
   set .@time, .@time - ( .@m * 60000 );
   set .@s, .@time /1000;
   set .@time, .@time - ( .@s * 1000 );
   set .@text$, " ^000080"+ .@m +"^000000m ^000080"+ .@s +"^000000s ^000080"+ .@time +"^000000ms";
   return .@text$;
}


pvp_n_4-5,99,125,0    script    EmpBrk#1    -1,2,1,{
OnTouch:
   killmonster "pvp_n_4-5", strnpcinfo(0) +"::OnThisMobDeath";

   mes "^FF0000~~ Emperium Breaker Test ~~^000000";
   mes " ";
   mes "You cannot exit from small square.";
   close2;
   stopnpctimer;
   set getd( "$@someonegotin"+ strnpcinfo(2) ), 0;
   warp .map_npc$, .x_npc, .y_npc;
   end;

// Spawn emp
// ---------
OnEmpBreak:
   copyarray .@xy[ 0 ], getd( ".xy" + strnpcinfo(2) +"[ 0 ]" ), 6;

   sleep 3000;
   if ( !getareausers("pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ] ) ) end;
   areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"Let's ready to break the Emperium",0;
   sleep 5000;
   if ( !getareausers("pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ] ) ) end;
   for( set .@i, 5; .@i > 0; set .@i, .@i - 1 ) {
       areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ], (.@i +""),0;
       sleep 1000;
   }

   if ( !getareausers("pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ] ) ) end;
   areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"GO!!!",0;
   monster "pvp_n_4-5", .@xy[ 4 ], .@xy[ 5 ],"Emperium",1288,1,"EmpBrk#"+ strnpcinfo(2) +"::OnThisMobDeath";
   initnpctimer;
   end;


OnThisMobDeath:
   copyarray .@xy[ 0 ], getd( ".xy" + strnpcinfo(2) +"[ 0 ]" ), 6;
   stopnpctimer;
   set .@time, getnpctimer( 0,"EmpBrk#"+ strnpcinfo(2) );

   if ( .@time < empbrk_record || !empbrk_record ) {
       areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"New Own Record!!!",0;
       set empbrk_record, .@time;
   }

// set top 5 record ; GM level > 50 excluded
// -----------------------------------------
   if( getgmlevel() < 50 ) {
       if ( .@time < $empbrk_record[ 0 ] && !$empbrk_record[ 0 ] ) {
           areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"New Official Record!!!",0;
           announce strcharinfo(0)+" is now the NO. 1 Emperium Breaker!!",0;
       }
       explode( .@b$, $empbrk_record$, "|" );
       if( $empbrk_record$ == "" )
           set .@no_mark, 1;
       else {
           for( set .@i, 0; .@i < 5; set .@i, .@i + 1 ) {
               if( .@b$[ .@i ] == strcharinfo(0) ) {
                   if( .@time < $empbrk_record[ .@i ] ) {
                       deletearray .@b$[ .@i ], 1;
                       deletearray $empbrk_record[ .@i ], 1;
                       set .@no_mark, 1;
                   }
                   else
                       set .@no_mark, 0;
                   break;
               }
               else if( .@time < $empbrk_record[ .@i ] || !$empbrk_record[ .@i ] )
                   set .@no_mark, 1;
           }
       }
   }
   if( .@no_mark ) {
       for( set .@i, 0; .@i < 5; set .@i, .@i + 1 )
           if ( .@time < $empbrk_record[ .@i ] || !$empbrk_record[ .@i ] ) {
               if( .@i != 4 ) {
                   copyarray .@b$[ .@i+1 ], .@b$[ .@i ], 4 - .@i;
                   copyarray $empbrk_record[ .@i+1 ], $empbrk_record[ .@i ], 4 - .@i;
                   set .@b$[ .@i ], strcharinfo(0);
                   set $empbrk_record[ .@i ], .@time;
               }
               else {
                   set .@b$[ getarraysize( .@b$ ) -1 ], strcharinfo(0);
                   set $empbrk_record[ getarraysize( .@b$ ) -1 ], .@time;
               }
               set $empbrk_record$, implode( .@b$, "|" );
               break;
           }
   }
   set .@m, .@time / 60000;
   set .@time, .@time - (.@m * 60000);
   set .@s, .@time /1000;
   set .@time, .@time - (.@s * 1000);

   areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"Your time is "+ .@m +"m "+ .@s +"s "+ .@time +"ms",0;
   sleep 2000;
// Debug : warp 20 min later if afk
// --------------------------------
OnTimer1200000:
   areawarp "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ], .map_npc$, .x_npc, .y_npc;
   stopnpctimer;
   end;

OnInit:
   getmapxy( .map_npc$, .x_npc, .y_npc, 1, "Emperium Breaker Test" );
// set area for announce + x, y to spawn emp
// -----------------------------------------
   switch( strnpcinfo(2) ) {
       case 1:
           setarray .xy1, 94, 128, 105, 139, 100, 134;
           break;
       case 2:
           setarray .xy2, 60, 94, 71, 105, 65, 99;
           break;
       case 3:
           setarray .xy3, 94, 60, 105, 71, 99, 65;
           break;
       case 4:
           setarray .xy4, 128, 94, 139, 105, 134, 99;
   }
   end;
}

pvp_n_4-5,74,99,0    duplicate(EmpBrk#1)    EmpBrk#2    -1,1,2
pvp_n_4-5,100,74,0    duplicate(EmpBrk#1)    EmpBrk#3    -1,1,2
pvp_n_4-5,125,100,0    duplicate(EmpBrk#1)    EmpBrk#4    -1,1,2

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  71
  • Reputation:   0
  • Joined:  01/14/13
  • Last Seen:  


pvp_n_4-5	mapflag	restricted	7

prontera,127,212,0	script	Emperium Breaker Test	1288,{

set .@gm, getgmlevel();
explode( .@b$, $empbrk_record$, "|" );

// Display records
// ---------------
mes "^FF0000~~ Emperium Breaker Test ~~^000000";
mes "Breaker Top 5 :";
if( !getarraysize( .@b$ ) )
	mes "^777777*empty*^000000";
for( set .@i, 0; .@i < getarraysize( .@b$ ); set .@i, .@i + 1 )
	mes "^777777"+ ( .@i + 1 ) +"- ^5050A0"+ .@b$[ .@i ] +"^000000"+ callsub( L_time_, $empbrk_record[ .@i ] );

if( empbrk_record ) {
	mes "______________________________";
	set .@rec$, callsub( L_time_, empbrk_record );
	mes "Your Own Record:"+ .@rec$;
}
next;

mes "^FF0000~~ Emperium Breaker Test ~~^000000";
mes "Would you like to try a new record?";
if( empbrk_record ) {
	mes "______________________________";
	mes "Your Own Record:"+ .@rec$;
}
next;

menu "^777777~ Yes^000000", -, ( empbrk_record ? "^777777~ Reset my record^000000" : "" ), L_resc,
	( .@gm > 98 && $empbrk_record$ != "" ? "^777777~ [ GM ] Reset all^000000" : "" ), L_reset, ( .@gm > 98 ? "^777777~ [ GM ] Reset Rooms^000000" : "" ), L_emptyrooms, "^777777~ Exit^000000", L_exit;
deletearray .arena$;

// Area arena for getareausers
// ---------------------------
setarray .@A1, 94,128,105,139;
setarray .@A2, 60,94,71,105;
setarray .@A3, 94,60,105,71;
setarray .@A4, 128,94,139,105;

mes "^FF0000~~ Emperium Breaker Test ~~^000000";
for( set .@i, 1; .@i <= 4; set .@i, .@i + 1 ) {
	if ( getareausers("pvp_n_4-5", getd( ".@A"+ .@i +"[ 0 ]" ), getd( ".@A"+ .@i +"[ 1 ]" ), getd( ".@A"+ .@i +"[ 2 ]" ), getd( ".@A"+ .@i +"[ 3 ]" ) ) )
		mes "Emp n° ^0000DF"+ .@i +" ^FF0000 <Busy>^000000";
	else {
		mes "Emp n° ^0000DF"+ .@i +" ^00A000 <Free>^000000";
		set .arena$[ .@i -1 ],"^0000DFRoom n°"+ .@i +"^000000";
	}
}
next;

getmapxy( @mpempbrk$, @empbrkx, @empbrky, 0 );
// menu arena
// ----------
set .@a, select( .arena$[0], .arena$[1], .arena$[2], .arena$[3], "Quit" );
if( .@a == 5 ) close;

// x, y for user warp / arena ; x1, y1, x2, y2...
// ----------------------------------------------
setarray .@xy[ 2 ], 99, 128, 68, 99, 100, 68, 130, 99;

// select arena is empty ?
// -----------------------
if ( !getareausers("pvp_n_4-5", getd( ".@A"+ .@a +"[ 0 ]" ), getd( ".@A"+ .@a +"[ 1 ]" ), getd( ".@A"+ .@a +"[ 2 ]" ), getd( ".@A"+ .@a +"[ 3 ]" ) ) ) {
	warp "pvp_n_4-5", .@xy[ .@a * 2 ], .@xy[ .@a * 2 + 1 ];
	killmonster "pvp_n_4-5","EmpBrk#"+ .@a +"::OnThisMobDeath";
	donpcevent "EmpBrk#"+ .@a +"::OnEmpBreak";
	sc_end SC_ALL;
}
else
	mes "Room is now BUSY";
close;

// reset top 5
// -----------
L_reset:
mes "^FF0000~~ Emperium Breaker Test ~~^000000";
mes "Are you sure to reset official record ?";

if( select( "Yes", "No" ) -1 ) close;
mes "All records had been reset.";
set $empbrk_record, 0;
set $empbrk_record$, "";
close;

// reset your record ( + reset record if in top 5 )
// ------------------------------------------------
L_resc:
mes "^FF0000~~ Emperium Breaker Test ~~^000000";
mes "Are you sure to reset your record?";
if( select( "Yes", "No" ) -1 ) close;
if( $empbrk_record$ != "" ) {
	explode( .@b$, $empbrk_record$, "|" );
	for( set .@i, 0; .@i < getarraysize( .@b$ ); set .@i, .@i + 1 )
		if( .@b$[ .@i ] == strcharinfo(0) ) {
			deletearray .@b$[ .@i ], 1;
			deletearray $empbrk_record[ .@record ], 1;
		}
	set $empbrk_record$, implode( .@b$, "|" );
}
mes "Your record has been reset.";
set empbrk_record, 0;
close;

// warp all people out of arena
// ----------------------------
L_emptyrooms:
mapwarp "pvp_n_4-5","prontera",0,0;
L_exit:
close;

// return time of record ( min sec ms )
// ------------------------------------
L_time_:
set .@time, getarg(0);
set .@m, .@time / 60000;
set .@time, .@time - ( .@m * 60000 );
set .@s, .@time /1000;
set .@time, .@time - ( .@s * 1000 );
set .@text$, " ^000080"+ .@m +"^000000m ^000080"+ .@s +"^000000s ^000080"+ .@time +"^000000ms";
return .@text$;
}


pvp_n_4-5,99,125,0	script	EmpBrk#1	-1,2,1,{
OnTouch:
killmonster "pvp_n_4-5", strnpcinfo(0) +"::OnThisMobDeath";

mes "^FF0000~~ Emperium Breaker Test ~~^000000";
mes " ";
mes "You cannot exit from small square.";
close2;
stopnpctimer;
set getd( "$@someonegotin"+ strnpcinfo(2) ), 0;
warp .map_npc$, .x_npc, .y_npc;
end;

// Spawn emp
// ---------
OnEmpBreak:
copyarray .@xy[ 0 ], getd( ".xy" + strnpcinfo(2) +"[ 0 ]" ), 6;

sleep 3000;
if ( !getareausers("pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ] ) ) end;
areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"Let's ready to break the Emperium",0;
sleep 5000;
if ( !getareausers("pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ] ) ) end;
for( set .@i, 5; .@i > 0; set .@i, .@i - 1 ) {
	areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ], (.@i +""),0;
	sleep 1000;
}

if ( !getareausers("pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ] ) ) end;
areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"GO!!!",0;
monster "pvp_n_4-5", .@xy[ 4 ], .@xy[ 5 ],"Emperium",1288,1,"EmpBrk#"+ strnpcinfo(2) +"::OnThisMobDeath";
initnpctimer;
end;


OnThisMobDeath:
copyarray .@xy[ 0 ], getd( ".xy" + strnpcinfo(2) +"[ 0 ]" ), 6;
stopnpctimer;
set .@time, getnpctimer( 0,"EmpBrk#"+ strnpcinfo(2) );

if ( .@time < empbrk_record || !empbrk_record ) {
	areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"New Own Record!!!",0;
	set empbrk_record, .@time;
}

// set top 5 record ; GM level > 50 excluded
// -----------------------------------------
if( getgmlevel() < 50 ) {
	if ( .@time < $empbrk_record[ 0 ] && !$empbrk_record[ 0 ] ) {
		areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"New Official Record!!!",0;
		announce strcharinfo(0)+" is now the NO. 1 Emperium Breaker!!",0;
	}
	explode( .@b$, $empbrk_record$, "|" );
	if( $empbrk_record$ == "" )
		set .@no_mark, 1;
	else {
		for( set .@i, 0; .@i < 5; set .@i, .@i + 1 ) {
			if( .@b$[ .@i ] == strcharinfo(0) ) {
				if( .@time < $empbrk_record[ .@i ] ) {
					deletearray .@b$[ .@i ], 1;
					deletearray $empbrk_record[ .@i ], 1;
					set .@no_mark, 1;
				}
				else
					set .@no_mark, 0;
				break;
			}
			else if( .@time < $empbrk_record[ .@i ] || !$empbrk_record[ .@i ] )
				set .@no_mark, 1;
		}
	}
}
if( .@no_mark ) {
	for( set .@i, 0; .@i < 5; set .@i, .@i + 1 )
		if ( .@time < $empbrk_record[ .@i ] || !$empbrk_record[ .@i ] ) {
			if( .@i != 4 ) {
				copyarray .@b$[ .@i+1 ], .@b$[ .@i ], 4 - .@i;
				copyarray $empbrk_record[ .@i+1 ], $empbrk_record[ .@i ], 4 - .@i;
				set .@b$[ .@i ], strcharinfo(0);
				set $empbrk_record[ .@i ], .@time;
			}
			else {
				set .@b$[ getarraysize( .@b$ ) -1 ], strcharinfo(0);
				set $empbrk_record[ getarraysize( .@b$ ) -1 ], .@time;
			}
			set $empbrk_record$, implode( .@b$, "|" );
			break;
		}
}
set .@m, .@time / 60000;
set .@time, .@time - (.@m * 60000);
set .@s, .@time /1000;
set .@time, .@time - (.@s * 1000);

areaannounce "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ],"Your time is "+ .@m +"m "+ .@s +"s "+ .@time +"ms",0;
sleep 2000;
// Debug : warp 20 min later if afk
// --------------------------------
OnTimer1200000:
areawarp "pvp_n_4-5", .@xy[ 0 ], .@xy[ 1 ], .@xy[ 2 ], .@xy[ 3 ], .map_npc$, .x_npc, .y_npc;
stopnpctimer;
end;

OnInit:
getmapxy( .map_npc$, .x_npc, .y_npc, 1, "Emperium Breaker Test" );
// set area for announce + x, y to spawn emp
// -----------------------------------------
switch( strnpcinfo(2) ) {
	case 1:
		setarray .xy1, 94, 128, 105, 139, 100, 134;
		break;
	case 2:
		setarray .xy2, 60, 94, 71, 105, 65, 99;
		break;
	case 3:
		setarray .xy3, 94, 60, 105, 71, 99, 65;
		break;
	case 4:
		setarray .xy4, 128, 94, 139, 105, 134, 99;
}
end;
}

pvp_n_4-5,74,99,0	duplicate(EmpBrk#1)	EmpBrk#2	-1,1,2
pvp_n_4-5,100,74,0	duplicate(EmpBrk#1)	EmpBrk#3	-1,1,2
pvp_n_4-5,125,100,0	duplicate(EmpBrk#1)	EmpBrk#4	-1,1,2

Thanks, but why the emp doesn't spawn? can you fix it? ^^

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

I just re-test and it works for me on eathena. Can you explain what you do or post if you have any error ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  71
  • Reputation:   0
  • Joined:  01/14/13
  • Last Seen:  

I just re-test and it works for me on eathena. Can you explain what you do or post if you have any error ?

First, I change the spawn location. I add in my Scripts directory. then @loadnpc npc/custom/Scripts/<emp breaker test name>.

It,s spawn in the right place. I enter in the rooms <all room i check it.> (mapflag as it is <restricted 7>. Definitely, when I enter in the room definitely the announce for emp test breaker will show then count. But it doesn't show like that. so no announce & no Emp Spawn inside the room.

By the way, can you make it the emp life will be 500,000 also emp in the woe. or teach me how to do that?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

First, I change the spawn location. I add in my Scripts directory. then @loadnpc npc/custom/Scripts/<emp breaker test name>.

@reloadscript

By the way, can you make it the emp life will be 500,000 also emp in the woe. or teach me how to do that?

For the Emp in WOE

Open db/mob_db.txt search

// ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper
1288,EMPELIUM,Emperium,Emperium,90,68430,0,0,0,1,60,71,40,50,1,17,80,50,26,20,10,12,0,8,26,0x120,300,1288,288,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

68430 are the HP

For your NPC emp breaker, I suggest to do a duplicate ID of the emperium, otherwise you will always have an error on mapserv (you can't spawn an emperium outside a castle normally). To do this, 3 steps :

1/ Open db/mob_avail.txt and add

2500,1288,0

2/ Open db/mob_db2.txt and add

2500,EMPELIUM,Emperium,Emperium,90,68430,0,0,0,1,60,71,40,50,1,17,80,50,26,20,10,12,0,8,26,0x120,300,1288,288,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

3/ Open your NPC file EmpTest Breaker ladder then search and replace 1288 (ID emperium) by 2500 (ID duplicate)

Or you can take Emistry's Emperium Breaker it should work for eathena (not Breaker Room 3.0 which is better btw)

Edited by Capuche
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  71
  • Reputation:   0
  • Joined:  01/14/13
  • Last Seen:  

try this?

@Emistry, the breaker 3.0 doesn't work. Npc was spawn but I click to open the message. nothing happen. i try to @reloadscript but the same doesn't work. What can i do?

First, I change the spawn location. I add in my Scripts directory. then @loadnpc npc/custom/Scripts/<emp breaker test name>.

@reloadscript

By the way, can you make it the emp life will be 500,000 also emp in the woe. or teach me how to do that?

For the Emp in WOE

Open db/mob_db.txt search

// ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper
1288,EMPELIUM,Emperium,Emperium,90,68430,0,0,0,1,60,71,40,50,1,17,80,50,26,20,10,12,0,8,26,0x120,300,1288,288,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

68430 are the HP

For your NPC emp breaker, I suggest to do a duplicate ID of the emperium, otherwise you will always have an error on mapserv (you can't spawn an emperium outside a castle normally). To do this, 3 steps :

1/ Open db/mob_avail.txt and add

2500,1288,0

2/ Open db/mob_db2.txt and add

2500,EMPELIUM,Emperium,Emperium,90,68430,0,0,0,1,60,71,40,50,1,17,80,50,26,20,10,12,0,8,26,0x120,300,1288,288,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

3/ Open your NPC file EmpTest Breaker ladder then search and replace 1288 (ID emperium) by 2500 (ID duplicate)

Or you can take Emistry's Emperium Breaker it should work for eathena (not Breaker Room 3.0 which is better btw)

@Capuche. thanks, but nothing spawn the emp. I dont know why. But the life of emp is work. thanks BTW.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Last resort: Upgrade your emulator to rAthena /ok

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...