i need help to change this script from map pvp to maintown only..
it will tell result when emperium break.
no need to warp to any map just at maintown can kill.
//===== rAthena Script =======================================//= Emperium Break Room//===== By: ==================================================//= Masao//===== Current Version: =====================================//= 1.0//===== Compatible With: =====================================//= rAthena SVN//===== Description: =========================================//= An little Emperium Break Room NPC in which you can test your//= strength and speed against Emperiums.//===== Additional Comments: =================================//= 1.0 First Version. [Masao]//============================================================prontera,140,180,0 script Emperium Breaker 1288,{ set .@emp_time,$empbrk_record; set .@emp_m,.@emp_time / 60000; set .@emp_s,.@emp_time / 1000; set .@emp_ms,.@emp_time / 10000; mes "[Emperium Breaker]"; mes "Current record holder is the Player ^5050A0"+$empbrk_master$+"^000000 ."; mes "With an time of ^000080"+.@emp_m+"^000000Minutes ^000080"+.@emp_s+"^000000Seconds ^000080"+.@emp_ms+"^000000Milliseconds until the Emperium got broke."; next; set .@time,empbrk_record; set .@m,.@time / 60000; set .@s,.@time / 1000; set .@ms,.@time / 10000; mes "[Emperium Breaker]"; mes "Your Own Record:"; mes "^000080"+.@m+"^000000m ^000080"+.@s+"^000000s ^000080"+.@ms+"^000000ms"; mes "[Emperium Breaker]"; mes "Would you like to try to set a new record?"; next; if (getgmlevel() >= 20) { menu "Standard Menu",-,"Reset",L_RO,"Reset Rooms",L_RR,"Cancel",L_C; menu "Yes",-,"No",L_C,"Reset",L_R; } else { menu "Yes",-,"No",L_C,"Reset",L_R; } cleararray .arena$[0],"",4; mes "[Emperium Breaker]"; 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; switch (select(.arena$[0],.arena$[1],.arena$[2],.arena$[3],"Exit")){ case 1: if (getareausers("pvp_n_4-5",60,94,71,105) == 0){ if($@empr_occupied[0] > 0){ mes "[Emperium Breaker]"; mes "This room is currently occupied, please try again later."; close; } close2; set $@empr_occupied[0],1; set $@empbrk_charid[0],getcharid(0); warp "pvp_n_4-5",99,128; initnpctimer "EmpBrk#1"; sc_end SC_ALL; end; } mes "[Emperium Breaker]"; mes "This room is currently occupied, please try again later."; close; case 2: if (getareausers("pvp_n_4-5",60,94,71,105) == 0){ if($@empr_occupied[1] > 0){ mes "[Emperium Breaker]"; mes "This room is currently occupied, please try again later."; close; } close2; set $@empr_occupied[1],1; set $@empbrk_charid[1],getcharid(0); warp "pvp_n_4-5",68,99; initnpctimer "EmpBrk#2"; sc_end SC_ALL; end; } mes "[Emperium Breaker]"; mes "This room is currently occupied, please try again later."; close; case 3: if (getareausers("pvp_n_4-5",94,60,105,71) == 0){ if($@empr_occupied[2] > 0){ mes "[Emperium Breaker]"; mes "This room is currently occupied, please try again later."; close; } close2; set $@empr_occupied[2],1; set $@empbrk_charid[2],getcharid(0); warp "pvp_n_4-5",100,68; initnpctimer "EmpBrk#3"; sc_end SC_ALL; end; } mes "[Emperium Breaker]"; mes "This room is currently occupied, please try again later."; close; case 4: if (getareausers("pvp_n_4-5",128,94,139,105) == 0){ if($@empr_occupied[3] > 0){ mes "[Emperium Breaker]"; mes "This room is currently occupied, please try again later."; close; } close2; set $@empr_occupied[3],1; set $@empbrk_charid[3],getcharid(0); warp "pvp_n_4-5",130,99; initnpctimer "EmpBrk#4"; sc_end SC_ALL; end; } mes "[Emperium Breaker]"; mes "This room is currently occupied, please try again later."; close; case 5: close; }L_RO: mes "[Emperium Breaker]"; mes "Are you sure you want to reset the official record?"; next; menu "Yes",-,"No",L_C; set $empbrk_record,0; set $empbrk_master$,""; close;L_R: mes "[Emperium Breaker]"; mes "Are you sure you want to reset your record?"; next; menu "Yes",-,"No",L_C; set empbrk_record,0; close;L_RR: mes "[Emperium Breaker]"; mes "Rooms have been reset."; cleararray $@empr_occupied[0],0,4; close;L_C: close;}- script EmpBrk#1 -1,{OnTimer5000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area; end;OnTimer8000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area; end;OnTimer9000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area; end;OnTimer10000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area; end;OnTimer11000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area; end;OnTimer12000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area; end;OnTimer13000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area; monster "pvp_n_4-5",.xe,.ye,"Emperium",1288,1,"EmpBrk#1::OnEmpBreak"; end;OnTimer600000: warpchar "prontera",155,180,$@empbrk_charid[0]; killmonster "pvp_n_4-5","EmpBrk#1::OnEmpBreak"; set $@empr_occupied[0],0; stopnpctimer; end;OnEmpBreak: stopnpctimer; set .current_time,getnpctimer(0,"EmpBrk#1"); set .new_time,.current_time - 13000; if (.new_time < empbrk_record || empbrk_record == 0) { areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area; set empbrk_record,.new_time; } if (.new_time < $empbrk_record || $empbrk_record == 0) { announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all; set $empbrk_record,.new_time; set $empbrk_master$,strcharinfo(0); } set .m,.new_time / 60000; set .s,.new_time / 1000; set .ms,.new_time / 10000; if(.m < 0){ set .m,0; } if(.s < 0){ set .s,0; } set $@empr_occupied[0],0; areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area; warpchar "prontera",155,180,$@empbrk_charid[0]; end;OnInit: set .x1,94; set .y1,128; set .x2,105; set .y2,139; set .xe,100; set .ye,134; end;}pvp_n_4-5,99,125,0 script EmpBrk#1_touch -1,3,1,{OnTouch: mes "[Emperium Breaker]"; mes "You cannot exit your square!"; close2; warp "pvp_n_4-5",99,128; end;}- script EmpBrk#2 -1,{OnTimer5000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area; end;OnTimer8000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area; end;OnTimer9000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area; end;OnTimer10000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area; end;OnTimer11000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area; end;OnTimer12000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area; end;OnTimer13000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area; monster "pvp_n_4-5",.xe,.ye,"Emperium",1288,1,"EmpBrk#2::OnEmpBreak"; end;OnTimer600000: warpchar "prontera",155,180,$@empbrk_charid[1]; killmonster "pvp_n_4-5","EmpBrk#2::OnEmpBreak"; set $@empr_occupied[1],0; stopnpctimer; end;OnEmpBreak: stopnpctimer; set .current_time,getnpctimer(0,"EmpBrk#2"); set .new_time,.current_time - 13000; if (.new_time < empbrk_record || empbrk_record == 0) { areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area; set empbrk_record,.new_time; } if (.new_time < $empbrk_record || $empbrk_record == 0) { announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all; set $empbrk_record,.new_time; set $empbrk_master$,strcharinfo(0); } set .m,.new_time / 60000; set .s,.new_time / 1000; set .ms,.new_time / 10000; if(.m < 0){ set .m,0; } if(.s < 0){ set .s,0; } areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area; warpchar "prontera",155,180,$@empbrk_charid[1]; set $@empr_occupied[1],0; end;OnInit: set .x1,60; set .y1,94; set .x2,71; set .y2,105; set .xe,65; set .ye,99; end;}pvp_n_4-5,74,99,0 script EmpBrk#2_touch -1,1,3,{OnTouch: mes "[Emperium Breaker]"; mes "You cannot exit your square!"; close2; warp "pvp_n_4-5",68,99; end;}- script EmpBrk#3 -1,{OnTimer5000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area; end;OnTimer8000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area; end;OnTimer9000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area; end;OnTimer10000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area; end;OnTimer11000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area; end;OnTimer12000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area; end;OnTimer13000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area; monster "pvp_n_4-5",.xe,.ye,"Emperium",1288,1,"EmpBrk#3::OnEmpBreak"; end;OnTimer600000: warpchar "prontera",155,180,$@empbrk_charid[2]; killmonster "pvp_n_4-5","EmpBrk#3::OnEmpBreak"; set $@empr_occupied[2],0; stopnpctimer; end;OnEmpBreak: stopnpctimer; set .current_time,getnpctimer(0,"EmpBrk#3"); set .new_time,.current_time - 13000; if (.new_time < empbrk_record || empbrk_record == 0) { areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area; set empbrk_record,.new_time; } if (.new_time < $empbrk_record || $empbrk_record == 0) { announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all; set $empbrk_record,.new_time; set $empbrk_master$,strcharinfo(0); } set .m,.new_time / 60000; set .s,.new_time / 1000; set .ms,.new_time / 10000; if(.m < 0){ set .m,0; } if(.s < 0){ set .s,0; } areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area; warpchar "prontera",155,180,$@empbrk_charid[2]; set $@empr_occupied[2],0; end;OnInit: set .x1,94; set .y1,60; set .x2,105; set .y2,71; set .xe,99; set .ye,65; end;}pvp_n_4-5,100,74,0 script EmpBrk#3_touch -1,3,1,{OnTouch: mes "[Emperium Breaker]"; mes "You cannot exit your square!"; close2; warp "pvp_n_4-5",100,68; end;}- script EmpBrk#4 -1,{OnTimer5000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area; end;OnTimer8000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area; end;OnTimer9000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area; end;OnTimer10000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area; end;OnTimer11000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area; end;OnTimer12000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area; end;OnTimer13000: areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area; monster "pvp_n_4-5",.xe,.ye,"Emperium",1288,1,"EmpBrk#4::OnEmpBreak"; end;OnTimer600000: warpchar "prontera",155,180,$@empbrk_charid[3]; killmonster "pvp_n_4-5","EmpBrk#4::OnEmpBreak"; set $@empr_occupied[3],0; stopnpctimer; end;OnEmpBreak: stopnpctimer; set .current_time,getnpctimer(0,"EmpBrk#4"); set .new_time,.current_time - 13000; if (.new_time < empbrk_record || empbrk_record == 0) { areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area; set empbrk_record,.new_time; } if (.new_time < $empbrk_record || $empbrk_record == 0) { announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all; set $empbrk_record,.new_time; set $empbrk_master$,strcharinfo(0); } set .m,.new_time / 60000; set .s,.new_time / 1000; set .ms,.new_time / 10000; if(.m < 0){ set .m,0; } if(.s < 0){ set .s,0; } areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area; warpchar "prontera",155,180,$@empbrk_charid[3]; set $@empr_occupied[3],0; end;OnInit: set .x1,128; set .y1,94; set .x2,139; set .y2,105; set .xe,134; set .ye,99; end;}pvp_n_4-5,125,100,0 script EmpBrk#4_touch -1,1,3,{OnTouch: mes "[Emperium Breaker]"; mes "You cannot exit your square!"; close2; warp "pvp_n_4-5",130,99; end;}pvp_n_4-5 mapflag nowarp 20pvp_n_4-5 mapflag nowarpto 20pvp_n_4-5 mapflag notrade 20pvp_n_4-5 mapflag nochat 20pvp_n_4-5 mapflag nocommand 20pvp_n_4-5 mapflag novending 20pvp_n_4-5 mapflag gvg_castle 20pvp_n_4-5 mapflag nobranch 20pvp_n_4-5 mapflag noicewall 20pvp_n_4-5 mapflag noloot 20pvp_n_4-5 mapflag nomemo 20pvp_n_4-5 mapflag nosave 20pvp_n_4-5 mapflag noreturn 20pvp_n_4-5 mapflag pvp off 20pvp_n_4-5 mapflag gvg 20
hello..
i need help to change this script from map pvp to maintown only..
it will tell result when emperium break.
no need to warp to any map just at maintown can kill.
Share this post
Link to post
Share on other sites