Jump to content

celeron0134

Members
  • Content Count

    114
  • Avg. Content Per Day

    0
  • Joined

  • Last visited

Community Reputation

0 Neutral

About celeron0134

  • Rank
    Poporing

Profile Information

  • Gender
    Male
  • Location
    Philippines

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello @Patskie thank you for your reply.. i will try it now
  2. new_1-3,85,167,4 script asdfg 1162,{ if (!isequipped(5009)) { mes "Please use Safety Helmet[0] Before Talk."; close; } if( gettimetick(2) < wait_time ) { mes "You can only receive rewards once every 4hours."; close; } progressbar "ffff00",10; getitem 7179, 1; set wait_time, gettimetick(2) + ( 3600 * 4 ); mes "Here are your Rewards"; mes "Come Back Again After 4 hours"; close; } } the problem is i can just character select and pick another character and get the rewards id like to have this once per account for every 4hours thankyou
  3. bump ~~ tried using @AnnieRuru bg_round.txt by setting the minplayerstart to 1( for 1v1) but id still love to have it as a queue where you'll just type @1v1 to join queue and youl randomly select a enemy to 1v1 with..
  4. bindatcmd - @watch = warp quiz_01 140 274 bindatcmd - @1v1 = you will be on a queue, it will do a 30sec waiting time for picking a random enemy that's on the queue Buffer = quiz_01 125 285 and quiz_01 155 285 ( Agi,Bless only) Walls @ quiz_01 138 287 - 138 286 - 138 285 - 138 284 - 138 283 142 287 - 142 286 - 142 285 - 142 284 - 142 283 when the script picked a player from a queue you two will be warped on quiz_01 149 285 or quiz_01 130 285 but never warp on the same coordinates as your enemy Announce: Player1 Vs Player2 will begin in 30secs use @watch to see them in action After 25 secs Announce: Player1 Vs Player2 will begin in 5 Announce: Player1 Vs Player2 will begin in 4 Announce: Player1 Vs Player2 will begin in 3 Announce: Player1 Vs Player2 will begin in 2 Announce: Player1 Vs Player2 will begin in 1 Announce: Player1 Vs Player2 FIGHT!! Disable Buffer, And wall killing a player will get 1v1Points + 1 when a player kills a player, warp the dead player on quiz_01 140 272 After 5 secs warp the winning player on quiz_01 140 272 then do a 30sec count for the next players on the queue to be warped and fight again and a 1v1 Shop for this using 1v1Points
  5. Good day rathena .. why is that some players are having FPS drops.. or they are lagging specially on WOE where there are atleast 3 guilds.. you can't even walk.. some says its the client.. i have a 2018 client .. should i downgrade to 2015 client for this issue?
  6. Hello some of my players are having errors on meteor storm,quagmire,storm gust LOV dispel effects homunculus errors But other players don't have this error.. they are using the same installers I don't have the ss of the errors.. can you still help me?
  7. here is my script ///statue //- script CharacterStatues -1,{ OnInit: // -------- C O N F I G U R A T I O N --------- // If you put 5 Entries, it will spawn the top 5 in order setarray .info$[0], // <map name>,<map x>,<map y>; "prontera,147,190", // top 1 statue coordinates "prontera,151,190", // top 2 statue coordinates "prontera,155,190", "prontera,159,190", "prontera,163,190"; // --------------------------------------------- OnSpawn: .size = getarraysize(.info$); if($terces_PVP_names$[0] == "") { debugmes "PvP Ladder not found! Stopping script!"; debugmes strnpcinfo(0); end; } [email protected]_size = getarraysize($terces_PVP_names$); if([email protected]_size < .size) .size = [email protected]_size; .terces_PVP_names$ = ""; for( [email protected] = 0; [email protected] < .size; [email protected]++ ) { .terces_PVP_names$ += $terces_PVP_names$[[email protected]]+":"; explode([email protected]$,.info$[[email protected]],","); [email protected]$ = [email protected]$[0]; [email protected] = atoi([email protected]$[1]); [email protected] = atoi([email protected]$[2]); [email protected] = query_sql( " SELECT `char_id`, `name`, `class`, `option`, `hair`, `hair_color`, `clothes_color`, `weapon`, `shield`, `head_top`, `head_mid`, `head_bottom`, `sex` FROM `char` WHERE `name` = '"+$terces_PVP_names$[[email protected]]+"'", [email protected]_id, [email protected]$, [email protected], [email protected], [email protected], [email protected]_color, [email protected]_color, [email protected], [email protected], [email protected]_top, [email protected]_mid, [email protected]_bottom, [email protected]$ ); if([email protected]) { debugmes "Character Name "[email protected]$+" was not found! Statue was skipped and not deployed."; continue; } monster [email protected]$ ,[email protected],[email protected],"[Top "+([email protected]+1)+"] "[email protected]$,1627,1,strnpcinfo(0)+"::OnStatue"; .mobGID = [email protected][0]; setunitdata .mobGID, UMOB_CLASS, [email protected]; if([email protected]) setunitdata .mobGID, UMOB_SCOPTION, [email protected]; if([email protected]) setunitdata .mobGID, UMOB_HAIRSTYLE, [email protected]; if([email protected]_color) setunitdata .mobGID, UMOB_HAIRCOLOR, [email protected]_color; if([email protected]_color) setunitdata .mobGID, UMOB_CLOTHCOLOR, [email protected]_color; if([email protected]) setunitdata .mobGID, UMOB_WEAPON, [email protected]; if([email protected]) setunitdata .mobGID, UMOB_SHIELD, [email protected]; if([email protected]_top) setunitdata .mobGID, UMOB_HEADTOP, [email protected]_top; if([email protected]_mid) setunitdata .mobGID, UMOB_HEADMIDDLE, [email protected]_mid; if([email protected]_bottom) setunitdata .mobGID, UMOB_HEADBOTTOM, [email protected]_bottom; setunitdata .mobGID, UMOB_SEX, (([email protected]$ == "M")?1:0); setunitdata .mobGID, UMOB_SIZE, 1; setunitdata .mobGID, UMOB_MODE, 0; setunitdata .mobGID, UMOB_LOOKDIR, 4; setunitdata .mobGID, UMOB_DMGIMMUNE, 1; } initnpctimer; end; OnTimer60000: // Every 1 min checks if statues are still there then sort them out based from PvP Ladder stopnpctimer; for( [email protected] = 0; [email protected] < .size; [email protected]++ ) { explode([email protected]$,.info$[[email protected]],","); if(!compare([email protected]$,[email protected]$[0])) { [email protected] += mobcount([email protected]$[0],strnpcinfo(0)+"::OnStatue"); [email protected]$ += [email protected]$[0]+" "; } explode([email protected]$,.terces_PVP_names$,":"); if( $terces_PVP_names$[[email protected]] != [email protected]$[[email protected]] || ([email protected] == .size-1 && [email protected] < .size)) { for( [email protected] = 0; [email protected] < .size; [email protected]++ ) { explode([email protected]$,.info$[[email protected]],","); killmonster [email protected]$[0],strnpcinfo(0)+"::OnStatue"; cleanarea [email protected]$[0],atoi([email protected]$[1])-1,atoi([email protected]$[2])-1,atoi([email protected]$[1])+1,atoi([email protected]$[2])+1; } donpcevent strnpcinfo(0)+"::OnSpawn"; end; } } initnpctimer; end; } i got errors like cannot find sprite.. sprite errors everytime
  8. is there a way to see characters on the same map with the same ip? use: for detecting bots on the map.. where i can see names lang farm1,farm2,farm3,farm4,farm5 all rogues with same ip.. so i could make fun on them and warp them on dif places or just ban them
  9. - script KoE -1,{ OnInit: disablenpc "The King#KoE"; disablenpc "Exit#KoE"; bindatcmd "koe", strnpcinfo(0)+"::Oncommand", 99,99; end; Oncommand: if ( compare( [email protected]_parameters$, "on" ) ) goto L_start; else if ( compare( [email protected]_parameters$, "off" ) ) goto L_end; else { dispbottom "type - '@koe on' to start the event"; dispbottom "type - '@koe off' to end the event"; } end; L_start: gvgon "guild_vs1"; announce "The King of Emperium Hill has begun!", bc_all; .start = 1; enablenpc "The King#KoE"; disablenpc "Exit#KoE"; $koegid = 0; donpcevent "::OnRevKoE"; maprespawnguildid "guild_vs1", $koegid, 7; monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead"; end; L_end: gvgoff "guild_vs1"; announce "The King of Emperium Hill is over!", bc_all; .start = 0; enablenpc "Exit#KoE"; disablenpc "The King#KoE"; killmonsterall "guild_vs1"; // maprespawnguildid "guild_vs1", $koegid, 6; end; OnEmpDead: $koegid = getcharid(2); announce "The current King of Emperium Hill is the ["+ strcharinfo(2) +"] guild.", bc_all; donpcevent "::OnRevKoE"; maprespawnguildid "guild_vs1", $koegid, 6; sleep 500; if ( .start ) monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead"; end; } // KoE Entrance prontera,155,191,4 script The King#KoE 58,{ mes "[The King]"; if ( !getcharid(2) ) { mes "You must have a guild to participate in the ^FF0000King of Emperium Hill Tournament^000000."; close; } mes "Hello."; mes "Would you like to participate in the ^FF0000King of Emperium Hill Tournament^000000?"; if ( select ( "Yes", "No" ) == 2 ) close; switch( rand(1,4) ){ case 1: warp "guild_vs1", 50, 88; end; case 2: warp "guild_vs1", 88, 50; end; case 3: warp "guild_vs1", 50, 11; end; case 4: warp "guild_vs1", 11, 50; end; } } // KoE Exit guild_vs1,49,56,5 script Exit#KoE 51,{ mes "[Exit]"; mes "See ya."; if ( getcharid(2) == $koegid ) getitem 501, 1; // configure prize here close2; warp "Save",0,0; end; } // Flags guild_vs1,49,38,4 script King of Emperium Hill#1::koe_flag 722,{ if ( !$koegid ) end; mes "[King of Emperium Hill]"; mes "The Current King of Emperium Hill is the ["+ getguildname($koegid) +"] guild."; close; OnRevKoE: flagemblem $koegid; end; } guild_vs1,61,49,6 duplicate(koe_flag) King of Emperium Hill#2 722 guild_vs1,38,49,2 duplicate(koe_flag) King of Emperium Hill#3 722 guild_vs1,49,61,0 duplicate(koe_flag) King of Emperium Hill#4 722 guild_vs1 mapflag nobranch guild_vs1 mapflag nomemo guild_vs1 mapflag nopenalty guild_vs1 mapflag noreturn guild_vs1 mapflag nosave SavePoint guild_vs1 mapflag noteleport guild_vs1 mapflag gvg_noparty guild_vs1 mapflag nowarp guild_vs1 mapflag nowarpto guild_vs1 mapflag guildlock guild_vs1 mapflag nogo Just want to add when a player breaks the emp he/she will be rewarded by TCG(7227) and - announce the name of the breaker.. ( King of Emperium Hill has Been conquered by ( the breaker ) of the (guild) [Solved] By UsingSearchEngine
  10. Woe points + 1 for every 5mins inside the active castle Woe points + 5 for the owner of the guild and all guild member that's inside the active castle every 5 mins Woe points + 10 for breaking emp of the active castle Woe shop - woe points
  11. @BeWan tried your free script.. but it does not create tables on the sql idk why.. i tried talking to the NPC.. and killing my dummy account.. but it doesnt show on the ranks
  12. @BeWan tried the reset menu.. it resets on the NPC.. but when you kill a player it will show the old ranks and on the ranking can you make it Kills[10] Deaths[9] something like that
  13. //===== rAthena Script ======================================= //= Dynamic Battleground Arena //===== By =================================================== //= llchrisll //===== Version ============================================== //= 1.0 - Initial Version //===== Tested With ========================================== //= rAthena 06/29/2019 Revision //= GIT Hash: c1975d7ea3729c1f5deec2e0dcf04841c4b96969 //===== Description ========================================== //= This battleground arena can be configured however you like. // You could compare it with an Call of Duty game. // Which consists of Domination, Capture the Flag and so on //= The config is per Game Mode dynamically changeable. //= Using extra Maps so it won't collide with other Battlegrounds // Copied the bat_a01 and bat_b01 map //===== Comments ============================================= //= You need the following file: Battleground_Arena.rar // Inside the GRF you find instructions how to install the maps: // dbg_readme.txt //===== ToDO ================================================= //= Capture the Flag: Change effect for Flag Holder to a better one! //============================================================ - script DBGArena_Core -1,{ OnInit: // BG Modes setarray [email protected]_Mode$[1],"Team Deathmatch","Search & Destroy","Domination","Rush","Capture the Flag"; // BG Maps for each Mode // Note: [0] = is to prevent errors when [email protected]_Status is reseted by Arena Ending mid-way like by a player leaving setarray [email protected]_Map$[0],"dbg_arena","dbg_arena","dbg_arena","dbg_dom","dbg_arena","dbg_arena"; // BG Announce Colors per Mode setarray [email protected]_Anno$[1],"0x8CFFFB","0xA4CC2D","0xEAC2EB","0xB97A56","0xEB1E33"; // BG Announce Type // How will the Announces be displayed to the players: // Recommended Values: // - bc_all: Global // - bc_woe: Displayed as WoE Information, which can be turned off set [email protected]_Anno_T,bc_woe; // BG Team Spawn Coordinates per Mode setarray .team1_x[1],87,87,349,87,87; setarray .team1_y[1],75,75,311,75,75; setarray .team2_x[1],312,312,350,312,312; setarray .team2_y[1],225,225,91,225,225; // Min Players to start an match per Mode setarray .DBG_PlayersMin[1],2,2,2,2,2; // Max Players per Team per Mode setarray .DBG_PlayersMax[1],10,10,20,10,10; // Time Limit until match ends per Mode in minutes setarray .DBG_TLimit[1],10,10,10,10,10; // Max Points to end the match per Mode // Note: Client can only display up to 100 points setarray .DBG_MPTS[1],75,2,100,2,3; // Battleground Join Timer in minutes set .BG_JoinTime,3; // WoE Restriction // 0 = Ignore WoE Status // 1 = When WoE is active, no BG set .DBG_WoE,1; // Battleground Happy Hour // For the actual Happy Hour time look for "OnClock" // 0 = Disable // 1 = Enable set .DBG_HH,1; // Don't touch this value below, to adjust the rate itself go to "OnClock2000:" set .DBG_HH_Rate,1; // Custom Commands bindatcmd "joinbgarena",strnpcinfo(0)+"::OnBGJoin"; bindatcmd "leavebgarena",strnpcinfo(0)+"::OnBGLeave"; bindatcmd "bgarenainfo",strnpcinfo(0)+"::OnBGInfo"; // Custom GM Commands to start or end the BG Arena manually bindatcmd "startbgarena",strnpcinfo(0)+"::OnBGArenaInit",99,99; bindatcmd "endbgarena",strnpcinfo(0)+"::OnBGArenaEnd",99,99; // Load Reward Function function DBG_Reward; end; // Happy Hour Starting Time OnClock2000: if(!.DBG_HH || .DBG_WoE && (agitcheck() || agitcheck2() || agitcheck3())) end; set .DBG_HH_Rate,2; // Happy Hour Rate announce "Battleground Arena: Battleground Happy Hour has started. Rewards will be x"+.DBG_HH_Rate+" for the next hour!",bc_all; end; // Happy Hour Ending Time OnClock2100: if(!.DBG_HH) end; announce "Battleground Arena: Battleground Happy Hour has ended!",bc_all; set .DBG_HH_Rate,1; // Reset to normal reward end; // Starting Battleground Arena OnBGArenaInit: // Check if players are still on the map if(getmapusers("dbg_arena") > 0) mapwarp "dbg_arena","prontera",156,191; if(getmapusers("dbg_dom") > 0) mapwarp "dbg_dom","prontera",156,191; OnBGArenaPrepare: if(.DBG_Match) { donpcevent "DBGArena_Vote::OnBGVoteInit"; set .DBG_Match,0; end; } set [email protected]_T1Score,0; set [email protected]_T2Score,0; donpcevent strnpcinfo(0)+"::OnBGArenaScore"; set .DBG_Prepare,1; set .t,0; // Checking for exisiting battle groups if([email protected]_T1) { set [email protected]_t1,bg_get_data([email protected]_T1,1); // Saving Player Amount of Team 1 copyarray .Team1[0],[email protected][0],[email protected]_t1; // and copy the Game IDs into the "join" array .Team1 bg_destroy [email protected]_T1; set [email protected]_T1,0; for ( set [email protected],0; [email protected] < getarraysize(.Team1); set [email protected],[email protected] + 1) if(attachrid(.Team1[[email protected]]) == 1) // Attach the current Game ID for getcharid() setarray .Team1[[email protected]],getcharid(3); // Overwrite the Game ID with the Account ID } if([email protected]_T2) { set [email protected]_t2,bg_get_data([email protected]_T2,1); // Saving Player Amount of Team 2 copyarray .Team2[0],[email protected][0],[email protected]_t2; // and copy the Game IDs into the "join" array .Team2 bg_destroy [email protected]_T2; set [email protected]_T2,0; for ( set [email protected],0; [email protected] < getarraysize(.Team2); set [email protected],[email protected] + 1) if(attachrid(.Team2[[email protected]]) == 1) // Attach the current Game ID for getcharid() setarray .Team2[[email protected]],getcharid(3); // Overwrite the Game ID with the Account ID } if([email protected]_Status) { donpcevent "DBGArena_Vote::OnBGVoteInit"; end; } // Creating BG Group ID's set [email protected]_T1,bg_create([email protected]_Map$[[email protected]_Status],.team1_x[[email protected]_Status],.team1_y[[email protected]_Status],strnpcinfo(0)+"::OnBGLeave",strnpcinfo(0)+"::OnBGArenaDeath"); set [email protected]_T2,bg_create([email protected]_Map$[[email protected]_Status],.team2_x[[email protected]_Status],.team2_y[[email protected]_Status],strnpcinfo(0)+"::OnBGLeave",strnpcinfo(0)+"::OnBGArenaDeath"); sleep 2000; announce "Battleground Arena: You have "+.BG_JoinTime+" Minute"+( (.BG_JoinTime > 1)?"s":"")+" to join by using \"@joinbgarena\" - Mode: "[email protected]_Mode$[[email protected]_Status],[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; // Check if there are existing players in the queue if(getarraysize(.Team1) > 0 || getarraysize(.Team2) > 0) announce "Battleground Arena: "[email protected]_Mode$[[email protected]_Status]+" - Team 1: "+getarraysize(.Team1)+"/"+.DBG_PlayersMax[[email protected]_Status]+" : Team 2: "+getarraysize(.Team2)+"/"+.DBG_PlayersMax[[email protected]_Status],[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; set .BGJoin,1; sleep (.BG_JoinTime*60*1000); set .BGJoin,0; if( (getarraysize(.Team1) + getarraysize(.Team2) ) < .DBG_PlayersMin[[email protected]_Status]) { announce "Battleground Arena: Time is over! But there are not enough participants to start/continue the match!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; donpcevent strnpcinfo(0)+"::OnBGArenaEnd"; // End the whole Battleground end; } for ( set [email protected],0; [email protected] < getarraysize(.Team1); set [email protected],[email protected] + 1) if(isloggedin(.Team1[[email protected]])) { if(attachrid(.Team1[[email protected]]) == 0) continue; bg_join([email protected]_T1); detachrid; } for ( set [email protected],0; [email protected] < getarraysize(.Team2); set [email protected],[email protected] + 1) if(isloggedin(.Team2[[email protected]])) { if(attachrid(.Team2[[email protected]]) == 0) continue; bg_join([email protected]_T2); detachrid; } deletearray .Team1[0],getarraysize(.Team1); deletearray .Team2[0],getarraysize(.Team2); set .DBG_Prepare,0; OnBGArenaReset: // Next Round, mostly for S&D and CTF // Warp BG Groups on the field if(.DBG_Reset) { stopnpctimer; bg_warp [email protected]_T1,[email protected]_Map$[[email protected]_Status],.team1_x[[email protected]_Status],.team1_y[[email protected]_Status]; bg_warp [email protected]_T2,[email protected]_Map$[[email protected]_Status],.team2_x[[email protected]_Status],.team2_y[[email protected]_Status]; set .DBG_Reset,0; set .t,0; } set [email protected]_pl,bg_get_data([email protected]_T1,1); for ( set [email protected],0; [email protected] < [email protected]_pl; set [email protected],[email protected] + 1) { pcblockmove [email protected][[email protected]],1; // Disable Movement pcblockskill [email protected][[email protected]],1; // Disable Skills } set [email protected]_pl,bg_get_data([email protected]_T2,1); for ( set [email protected],0; [email protected] < [email protected]_pl; set [email protected],[email protected] + 1) { pcblockmove [email protected][[email protected]],1; // Disable Movement pcblockskill [email protected][[email protected]],1; // Disable Skills } donpcevent "DBG_Init::OnBGPrepare"; end; // Battleground Arena - Match Duration OnBGArenaTimer: set .DBG_Match,1; initnpctimer; end; OnTimer60000: // Every Minute stopnpctimer; set .t,.t + 1; // Increase Minute Counter if(.DBG_Match && .t < .DBG_TLimit[[email protected]_Status]) { mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+" - Time Limit: "+(.DBG_TLimit[[email protected]_Status] - .t)+" Minute"+ ( ((.DBG_TLimit[[email protected]_Status] - .t) > 1)?"s":"") +" left!",bc_all,[email protected]_Anno$[[email protected]_Status]; initnpctimer; // If an Match is active and timer has been reached } else if(.DBG_Match && .t == .DBG_TLimit[[email protected]_Status]) { mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": The Match is over! Time Limit has been reached!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; if([email protected]_Status != 1 || [email protected]_Status != 3) { // S&D + Rush + CTF has round based matches if([email protected]_Status == 2) // S&D: Declare Team 2 as winner set getvariableofnpc(.SAD_Win,"DBG_Init"),2; else if([email protected]_Status == 4) // Rush: Declare Team 2 as winner set getvariableofnpc(.Rush_Win,"DBG_Init"),2; donpcevent "DBG_Init::OnRoundReset"; } else donpcevent strnpcinfo(0)+"::OnBGMatchEnd"; } else if([email protected]_Status && !.DBG_Prepare) if(getmapusers([email protected]_Map$[[email protected]_Status]) < .DBG_PlayersMin[[email protected]_Status]) donpcevent strnpcinfo(0)+"::OnBGArenaEnd"; end; // Battleground Arena - Death Event OnBGArenaDeath: mapannounce [email protected]_Map$[[email protected]_Status],"["+rid2name(killerrid)+"] has killed ["+strcharinfo(0)+"]!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; switch([email protected]_Status) { default: break; case 1: // TDM if(@DBG_Team == 1) // Killed player is in Team 1, increase Team 2's Score set [email protected]_T2Score,[email protected]_T2Score + 1; else if(@DBG_Team == 2) // Killed player is in Team 2, increase Team 1's Score set [email protected]_T1Score,[email protected]_T1Score + 1; break; case 2: // Search & Destroy if([email protected]_Bomb) end; getmapxy([email protected]$,[email protected]_x,[email protected]_y,BL_NPC); movenpc "Bomb#SAD",[email protected]_x,[email protected]_y; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": The bomb has been dropped!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; set @Has_Bomb,0; enablenpc "Bomb#SAD"; set [email protected]_pl,bg_get_data([email protected]_T1,1); copyarray [email protected]_ids[getarraysize(.[email protected]_ids)],[email protected][0],[email protected]_pl; set [email protected]_pl,bg_get_data([email protected]_T2,1); copyarray [email protected]_ids[getarraysize([email protected]_ids)],[email protected][0],[email protected]_pl; for ( set [email protected],0; [email protected] < getarraysize([email protected]_ids); set [email protected],[email protected] + 1) if(attachrid([email protected]_ids[[email protected]])) viewpoint 0,[email protected]_x,[email protected]_y,3,0xFF0000; end; case 4: // Rush if(@DBG_Team == 1) // Player of Team 1 has been killed, decrease Team 1's Life Pool set .Rush_Life,.Rush_Life - 1; else if(@DBG_Team == 2) end; if(!.Rush_Life) { // Team 1's Lifes are 0, Team 2 wins the round mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Team 1 has lost all of their lifes! Team 2 wins this round!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; set getvariableofnpc(.Rush_Win,"DBG_Init"),2; donpcevent "DBG_Init::OnRoundReset"; end; } mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Team 2 has "+.Rush_Life+" lifes left!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; break; case 5: // Capture the Flag if([email protected]_Flag) end; getmapxy([email protected]$,[email protected]_x,[email protected]_y,BL_NPC); set [email protected]$,"Team "[email protected]_Flag+" Flag#"[email protected]_Flag; movenpc [email protected]$,[email protected]_x,[email protected]_y; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": The Flag of Team "[email protected]_Team+" has been dropped!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; set @Has_Flag,0; enablenpc [email protected]$; set [email protected]_pl,bg_get_data([email protected]_T1,1); copyarray [email protected]_ids[getarraysize([email protected]_ids)],[email protected][0],[email protected]_pl; set [email protected]_pl,bg_get_data([email protected]_T2,1); copyarray [email protected]_ids[getarraysize([email protected]_ids)],[email protected][0],[email protected]_pl; for ( set [email protected],0; [email protected] < getarraysize([email protected]_ids); set [email protected],[email protected] + 1) if(attachrid([email protected]_ids[[email protected]])) viewpoint 0,[email protected]_x,[email protected]_y,3,0xFF0000; end; } donpcevent strnpcinfo(0)+"::OnBGArenaScore"; end; OnBGArenaScore: bg_updatescore [email protected]_Map$[[email protected]_Status],[email protected]_T1Score,[email protected]_T2Score; if([email protected]_T1Score >= .DBG_MPTS[[email protected]_Status] || [email protected]_T2Score >= .DBG_MPTS[[email protected]_Status] || .DBG_End) donpcevent strnpcinfo(0)+"::OnBGMatchEnd"; end; // Match ended = Give rewards OnBGMatchEnd: // [email protected]_xxx[X]: Rewards of Winner/Loser // [0] = BGArenaPts // [1] = War Badges // [2] = Valor Badges // [3] = Bravery Badges // Note: If you add more rewards, you have to edit the DBG_Reward function too > [email protected]_item[] stopnpctimer; set .t,0; switch([email protected]_Status) { case 0: debugmes "OnBGMatchEnd - [email protected]_Status = 0 > Error"; break; // Shouldn't happen case 1: // TDM setarray [email protected]_win[0],10,5,5,5; setarray [email protected]_lose[0],5,2,2,2; break; case 2: // Search & Destroy setarray [email protected]_win[0],15,8,8,8; setarray [email protected]_lose[0],7,4,4,4; break; case 3: // Domination setarray [email protected]_win[0],20,10,10,10; setarray [email protected]_lose[0],10,8,8,8; break; case 4: // Rush setarray [email protected]_win[0],15,8,8,8; setarray [email protected]_lose[0],7,4,4,4; break; case 5: // Capture the Flag setarray [email protected]_win[0],15,8,8,8; setarray [email protected]_lose[0],7,4,4,4; break; } donpcevent "DBG_Init::OnBGDisable"; // Disable NPC's // Decide Winners and reset score if([email protected]_T1Score < [email protected]_T2Score) { DBG_Reward([email protected]_T2,.DBG_HH_Rate,[email protected]_win[0],[email protected]_win[1],[email protected]_win[2],[email protected]_win[3]); DBG_Reward([email protected]_T1,.DBG_HH_Rate,[email protected]_lose[0],[email protected]_lose[1],[email protected]_lose[2],[email protected]_lose[3]); announce "Battleground Arena: Team 2 has won this match!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; } else if([email protected]_T2Score < [email protected]_T1Score) { DBG_Reward([email protected]_T1,.DBG_HH_Rate,[email protected]_win[0],[email protected]_win[1],[email protected]_win[2],[email protected]_win[3]); DBG_Reward([email protected]_T2,.DBG_HH_Rate,[email protected]_lose[0],[email protected]_lose[1],[email protected]_lose[2],[email protected]_lose[3]); announce "Battleground Arena: Team 1 has won this match!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; } else { DBG_Reward([email protected]_T1,.DBG_HH_Rate,[email protected]_lose[0],[email protected]_lose[1],[email protected]_lose[2],[email protected]_lose[3]); DBG_Reward([email protected]_T2,.DBG_HH_Rate,[email protected]_lose[0],[email protected]_lose[1],[email protected]_lose[2],[email protected]_lose[3]); announce "Battleground Arena: It's an draw ! Nobody has won this match!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; } mapwarp [email protected]_Map$[[email protected]_Status],"prontera",156,191; sleep 2500; // Let the players finish warping if(.DBG_End) donpcevent strnpcinfo(0)+"::OnBGArenaEnd"; else donpcevent strnpcinfo(0)+"::OnBGArenaPrepare"; end; // Battleground Arena - Arena ended OnBGArenaEnd: if([email protected]_Status || !.DBG_Match) end; donpcevent "DBG_Init::OnBGDisable"; mapwarp [email protected]_Map$[[email protected]_Status],"prontera",156,191; deletearray .Team1[0],getarraysize(.Team1); deletearray .Team2[0],getarraysize(.Team2); if([email protected]_T1) { set [email protected]_t,bg_get_data([email protected]_T1,1); // Saving Player Amount of Team 1 bg_destroy [email protected]_T1; set [email protected]_T1,0; for ( set [email protected],0; [email protected] < [email protected]_t; set [email protected],[email protected] + 1) if(isloggedin([email protected][[email protected]]) == 1 && attachrid([email protected][[email protected]]) == 1) { bg_leave; set @DBG_Team,0; pcblockmove getcharid(3),0; pcblockskill getcharid(3),0; detachrid; } } if([email protected]_T2) { set [email protected]_t,bg_get_data([email protected]_T2,1); // Saving Player Amount of Team 2 bg_destroy [email protected]_T2; set [email protected]_T2,0; for ( set [email protected],0; [email protected] < [email protected]_t; set [email protected],[email protected] + 1) if(isloggedin([email protected][[email protected]]) == 1 && attachrid([email protected][[email protected]]) == 1) { bg_leave; set @DBG_Team,0; pcblockmove getcharid(3),0; pcblockskill getcharid(3),0; detachrid; } } set [email protected]_Status,0; set .DBG_Match,0; set .DBG_Prepare,0; set .DBG_Reset,0; set .DBG_End,0; set .BGJoin,0; announce "[Server]: Battleground Arena has ended! Good luck next time!",[email protected]_Anno_T; end; // Battleground Arena - @joinbgarena command OnBGJoin: if(!.BGJoin) { message strcharinfo(0),"Battleground Arena: Joining the Arena is currently not possible."; end; } if(@DBG_Team) { message strcharinfo(0),"Battleground Arena: You are already registered for the Arena."; end; } if(getarraysize(.Team1) <= getarraysize(.Team2) && getarraysize(.Team1) < .DBG_PlayersMax[[email protected]_Status]) { setarray .Team1[getarraysize(.Team1)],getcharid(3); set @DBG_Team,1; } else if(getarraysize(.Team2) <= getarraysize(.Team1) && getarraysize(.Team2) < .DBG_PlayersMax[[email protected]_Status]) { setarray .Team2[getarraysize(.Team2)],getcharid(3); set @DBG_Team,2; } else { message strcharinfo(0),"Battleground Arena: I'm sorry, but every Team is full already. Please try again later."; end; } announce "Battleground Arena: "[email protected]_Mode$[[email protected]_Status]+" - Team 1: "+getarraysize(.Team1)+"/"+.DBG_PlayersMax[[email protected]_Status]+" : Team 2: "+getarraysize(.Team2)+"/"+.DBG_PlayersMax[[email protected]_Status],[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; end; // Battleground Arena - @leavebgarena command & Quit Event OnBGLeave: if([email protected]_Status || [email protected]_Team) { message strcharinfo(0),"Battleground Arena: From what are you running away? You didn't register yet!"; end; } if(.BGJoin) { if(@DBG_Team == 1) for ( set [email protected],0; [email protected] < getarraysize(.Team1); set [email protected],[email protected] + 1) if(getcharid(3) == .Team1[[email protected]]) deletearray .Team1[[email protected]],1; else if(@DBG_Team == 2) for ( set [email protected],0; [email protected] < getarraysize(.Team1); set [email protected],[email protected] + 1) if(getcharid(3) == .Team1[[email protected]]) deletearray .Team1[[email protected]],1; } else if(.DBG_Match) { bg_leave; warp "prontera",156,191; pcblockmove getcharid(3),0; pcblockskill getcharid(3),0; if(getmapusers([email protected]_Map$[[email protected]_Status]) < .DBG_PlayersMin[[email protected]_Status]) { announce "Battleground Arena: There are not enough participants to continue the match.",[email protected]_Anno_T; set .DBG_End,1; donpcevent strnpcinfo(0)+"::OnBGArenaScore"; } } set @DBG_Team,0; announce "Battleground Arena: ["+strcharinfo(0)+"] has left the battlefield!",[email protected]_Anno_T; end; // Battleground Arena - @bgarenainfo command OnBGInfo: if([email protected]_Status) message strcharinfo(0),"Battleground Arena: Inactive"; else { message strcharinfo(0),"Battleground Arena: "[email protected]_Mode$[[email protected]_Status]+" - "[email protected]_T1Score+" : "[email protected]_T2Score; if(.DBG_Match) message strcharinfo(0),"Battleground Arena: Time Limit - "+(.DBG_TLimit[[email protected]_Status] - .t)+" Minute"+ ( ((.DBG_TLimit[[email protected]_Status] - .t) > 1)?"s":"")+" until the Match ends."; else if(.BGJoin) message strcharinfo(0),"Battleground Arena: It's currently possible to join the battlefield!"; } end; // Battleground Arena - Unblock players and put markers on minimap OnBGPlayerBlock: set [email protected]_pl,bg_get_data([email protected]_T1,1); copyarray [email protected]g_ids[getarraysize([email protected]_ids)],[email protected][0],[email protected]_pl; set [email protected]_pl,bg_get_data([email protected]_T2,1); copyarray [email protected]_ids[getarraysize([email protected]_ids)],[email protected][0],[email protected]_pl; for ( set [email protected],0; [email protected] < getarraysize([email protected]_ids); set [email protected],[email protected] + 1) if(attachrid([email protected]_ids[[email protected]])) { pcblockmove getcharid(3),0; // Enable Movement pcblockskill getcharid(3),0; // Enable Skills if([email protected]_Status == 2) { // S&D getmapxy([email protected]_a$,[email protected]_x,[email protected]_y,BL_NPC,"Target A#1"); getmapxy([email protected]_b$,[email protected]_x,[email protected]_y,BL_NPC,"Target B#2"); viewpoint 1,[email protected]_x,[email protected]_y,1,0xFF0000; viewpoint 1,[email protected]_x,[email protected]_y,2,0x00FF00; } else if([email protected]_Status == 3) { // Domination getmapxy([email protected]_a$,[email protected]_x,[email protected]_y,BL_NPC,"Flag A#1"); getmapxy([email protected]_b$,[email protected]_x,[email protected]_y,BL_NPC,"Flag B#2"); getmapxy([email protected]_c$,[email protected]_x,[email protected]_y,BL_NPC,"Flag C#3"); viewpoint 1,[email protected]_x,[email protected]_y,1,0xFF0000; viewpoint 1,[email protected]_x,[email protected]_y,2,0x00FF00; viewpoint 1,[email protected]_x,[email protected]_y,3,0x0000FF; } else if([email protected]_Status == 4) { // Rush getmapxy([email protected]$,[email protected]_x,[email protected]_y,BL_NPC,"Defend Crystal"); viewpoint 1,[email protected]_x,[email protected]_y,1,0xFF0000; } } end; // Battleground Arena - Reward Function function DBG_Reward { // getarg(0) = Group ID // getarg(1) = Happy Hour Rate // getarg(2) = BGArenaPts // getarg(3) = War Badges (7773) // getarg(4) = Valor Badges (7829) // getarg(5) = Bravery Badges (7828) // Item ID of Rewards: // Change this values to adjust the reward ids! setarray [email protected]_item[0],7773,7829,7828; set [email protected]_count,bg_get_data(getarg(0),1); // Loop through the players and give them the reward for ( set [email protected],0; [email protected] < [email protected]_count; set [email protected],[email protected] + 1) { attachrid([email protected][[email protected]]); set BGArenaPts,BGArenaPts + (getarg(2)*getarg(1)); dispbottom "Battleground Arena: You have recieved "+(getarg(2)*getarg(1))+"x Battleground Arena Points."; for ( set [email protected],0; [email protected] < getarraysize([email protected]_item); set [email protected],[email protected] + 1) getitem [email protected]_item[[email protected]],getarg([email protected]+3)*getarg(1); detachrid; } return; } } // Battleground Arena - Vote NPC - script DBGArena_Vote -1,{ OnInit: // Time to vote in minutes set .VoteTime,3; bindatcmd "@votebgarena",strnpcinfo(0)+"::OnBGVote"; end; // Battleground Arena - Starting Vote OnBGVoteInit: set .vt,0; set .bg_v1_ct,0; set .bg_v2_ct,0; set .bg_v3_ct,0; set .bg_v1,rand(1,(getarraysize([email protected]_Mode$) - 1)); if([email protected]_Status) // Save previous Game Mode as 2nd Vote Option set .bg_v2,[email protected]_Status; else set .bg_v2,rand(1,(getarraysize([email protected]_Mode$) - 1)); set .bg_v3,rand(1,(getarraysize([email protected]_Mode$) - 1)); // Checking of duplicate Vote Entries while(1) { set [email protected],0; set [email protected],0; if(.bg_v1 == .bg_v2 || .bg_v1 == .bg_v3) set [email protected],1; if(.bg_v3 == .bg_v2 || .bg_v3 == .bg_v1) set [email protected],1; if([email protected]) set .bg_v1,rand(1,(getarraysize([email protected]_Mode$) - 1)); if([email protected]) set .bg_v3,rand(1,(getarraysize([email protected]_Mode$) - 1)); if([email protected] && [email protected]) break; sleep 100; // Preventing infinite loop } announce "Battleground Arena: Game Mode Voting is now possible. Use \"@votebgarena\" to vote for an Game Mode.",[email protected]_Anno_T; sleep 2000; announce "Battleground Arena: You have "+.VoteTime+" Minute"+ ( (.VoteTime > 1)?"s":"")+" to vote, if there are no votes until then, the Arena will be stopped.",[email protected]_Anno_T; set .Vote,1; initnpctimer; end; // Battleground Arena - Vote Time Limit OnTimer60000: // Every Minute stopnpctimer; set .vt,.vt + 1; if(.vt == .VoteTime) { // Check if Time Limit has been reached set .Vote,0; set .vt,0; announce "Battleground Arena: Vote Result - "[email protected]_Mode$[.bg_v1]+" = "+.bg_v1_ct+" | "[email protected]_Mode$[.bg_v2]+" = "+.bg_v2_ct+" | "[email protected]_Mode$[.bg_v3]+" = "+.bg_v3_ct,[email protected]_Anno_T; // End the Battleground if there are no votes placed if(!.bg_v1_ct && !.bg_v2_ct && !.bg_v3_ct) { donpcevent "DBGArena_Core::OnBGArenaEnd"; end; // Comparing if any vote is the same as one other but still higher than a different one } else if(.bg_v1_ct == .bg_v2_ct && .bg_v1_ct > .bg_v3_ct) set [email protected],1; else if(.bg_v2_ct == .bg_v3_ct && .bg_v2_ct > .bg_v1_ct) set [email protected],2; else if(.bg_v3_ct == .bg_v1_ct && .bg_v3_ct > .bg_v2_ct) set [email protected],3; // Compare if any vote is higher than the others else if(.bg_v1_ct > .bg_v2_ct && .bg_v1_ct > .bg_v3_ct) set [email protected],1; else if(.bg_v2_ct > .bg_v1_ct && .bg_v2_ct > .bg_v3_ct) set [email protected],2; else if(.bg_v3_ct > .bg_v1_ct && .bg_v3_ct > .bg_v2_ct) set [email protected],3; set [email protected]_Status,getd(".bg_v"[email protected]); donpcevent "DBGArena_Core::OnBGArenaPrepare"; end; } initnpctimer; end; OnBGVote: if(!.Vote) { message strcharinfo(0),"Battleground Arena: There is currently no voting running."; end; } if([email protected]_parameters$[0] == "") { message strcharinfo(0),"Battleground Arena: Current Votings: "+.bg_v1_ct+" : "[email protected]_Mode$[.bg_v1]+" (1) | "+.bg_v2_ct+" : "[email protected]_Mode$[.bg_v2]+" (2) | "+.bg_v3_ct+" : "[email protected]_Mode$[.bg_v3]+" (3)"; sleep2 1000; message strcharinfo(0),"Battleground Arena: You can vote with \"@votebgarena 1|2|3\" for the prefered Game Mode."; } else { set [email protected],atoi([email protected]_parameters$[0]); setd(".bg_v"[email protected]+"_ct"),getd(".bg_v"[email protected]+"_ct") + 1; message strcharinfo(0),"Battleground Arena: Vote has been confirmed. You have voted for \""[email protected]_Mode$[getd(".bg_v"[email protected])]+"\"."; } end; } // Battleground Arena - Healer NPC's - script #DBG_Heal -1,{ if(@DBG_Team != atoi(charat(strnpcinfo(2),2)) ) { npctalk "You don't belong to Team "+charat(strnpcinfo(2),2)+"!",strnpcinfo(0),bc_self; } else { if(@Heal_Delay > gettimetick(2)) { npctalk "You can't be healed yet, please wait a few seconds.",strnpcinfo(0),bc_self; end; } npctalk "You have been fully healed! Good luck!",strnpcinfo(0),bc_self; specialeffect 911; percentheal 100,100; set @Heal_Delay,gettimetick(2) + .HDelay; } end; OnInit: // Delay until you can get healed again in seconds set .HDelay,10; disablenpc strnpcinfo(0); end; OnEnable: enablenpc strnpcinfo(0); if([email protected]_Map$[[email protected]_Status] == "dbg_arena") { enablenpc "Healer#1-1"; enablenpc "Healer#1-2"; } else if([email protected]_Map$[[email protected]_Status] == "dbg_dom") { enablenpc "Healer#2-1"; enablenpc "Healer#2-2"; } end; OnDisable: if([email protected]_Map$[[email protected]_Status] == "dbg_arena") { disablenpc "Healer#1-1"; disablenpc "Healer#1-2"; } else if([email protected]_Map$[[email protected]_Status] == "dbg_dom") { disablenpc "Healer#2-1"; disablenpc "Healer#2-2"; } disablenpc strnpcinfo(0); end; } dbg_arena,88,82,4 duplicate(#DBG_Heal) Healer#1-1 4_F_NURSE dbg_arena,311,232,4 duplicate(#DBG_Heal) Healer#1-2 4_F_NURSE dbg_dom,354,317,4 duplicate(#DBG_Heal) Healer#2-1 4_F_NURSE dbg_dom,349,100,4 duplicate(#DBG_Heal) Healer#2-2 4_F_NURSE // Battleground Arena - Player warped on the battlefield and prepare final stuff for the match - script DBG_Init -1,{ OnBGPrepare: sleep 2500; // Let the players be warped to the map before starting mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": The Match will start shortly.",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Until 10 seconds before the start of the match, you won't be able to move or use skills.",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Think about a good strategy to win and play fair.",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; switch([email protected]_Status) { default: break; case 2: // Search & Destroy enablenpc "DBG_Target"; enablenpc "Target A#1"; enablenpc "Target B#2"; enablenpc "Bomb#SAD"; set .Planting_1,0; set .Planting_2,0; set .Bomb_Active_T1,0; set .Bomb_Active_T2,0; if(!.NoAnno) { mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Team 1 has to destroy one of the targets by using the bomb, which can be picked up!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Team 2 has to defend both targets and defuse the bomb, if it was planted.",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; } break; case 3: // Domination enablenpc "DBG_DOM_Flag"; enablenpc "Flag A#1"; enablenpc "Flag B#2"; enablenpc "Flag C#3"; // Reseting Display ID to Neutral Flag setnpcdisplay "Flag A#1",1911; setnpcdisplay "Flag B#2",1911; setnpcdisplay "Flag C#3",1911; // Create Chat Room (Display Box) donpcevent "Flag A#1::OnDisplayBox"; donpcevent "Flag B#2::OnDisplayBox"; donpcevent "Flag C#3::OnDisplayBox"; if(!.NoAnno) { mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": There are 3 Flags to take, if one team has more members at a flag than the other, then the first team will get the flag!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Holding Flags gives Points every 5 seconds. The more flags your team holds the more points you will get!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; } break; case 4: // Rush // How many Lifes does the Attacker Team has in Rush? set getvariableofnpc(.Rush_Life,"DBGArena_Core"),45; if(!.NoAnno) { mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Team 1 has to attack the other Team's Crystal to win, while they have to defend until the time limit has been reached!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Team 1 has "+getvariableofnpc(.Rush_Life,"DBGArena_Core")+" Lifes. If they hit \"0\" Team 2 wins!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; } break; case 5: // Capture the Flag enablenpc "DBG_CTF_Flag"; enablenpc "Team 1 Flag#1"; enablenpc "Team 2 Flag#2"; movenpc "Team 1 Flag#1",.CTF1_x,.CTF1_y; movenpc "Team 2 Flag#2",.CTF2_x,.CTF2_y; set getvariableofnpc(.Flag1_Base,"Team 1 Flag#1"),1; set getvariableofnpc(.Flag2_Base,"Team 2 Flag#2"),1; // Effect for Flag Holder set .f_effect,409; // Meteor Assault set .f_effect_t,1500; // Timer in milliseconds, when the effect will shown again if(!.NoAnno) { mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Each Team has a flag to protect while stealing the enemies flag!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": The first team to bring the enemies flag to their own wins the round!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; } break; } set .NoAnno,0; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": The Match will start in 1 Minute!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 50000; // 50 sec mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": 10 Seconds left, you can now move and buff your members!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; donpcevent "DBGArena_Core::OnBGPlayerBlock"; donpcevent "#DBG_Heal::OnEnable"; sleep 10000; // 10 sec mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": The Match starts now! Good luck to both Teams!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; donpcevent "DBGArena_Core::OnBGArenaTimer"; // Start the Timer in DBGArena_Core for Time Limit if([email protected]_Status == 3) // Start flag timer for Domination initnpctimer; else if([email protected]_Status == 4) // Spawn Crystal for Rush bg_monster [email protected]_T2,[email protected]_Map$[[email protected]_Status],.mob[0],.mob[1],"Defend Crystal",1914,strnpcinfo(0)+"::OnRushMobDeath"; end; // Round Reset - Basically only for S&D / Rush / CTF OnRoundReset: if([email protected]_Status == 2 && .SAD_Win > 0) { set [email protected]$,"SAD"; setd(".T"+.SAD_Win+"_Score"),getd(".T"+.SAD_Win+"_Score") + 1; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": [Team "+.SAD_Win+"] has scored 1 Point!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; set .SAD_Win,0; } else if([email protected]_Status == 4 && .Rush_Win > 0) { set [email protected]$,"Rush"; setd(".T"+.Rush_Win+"_Score"),getd(".T"+.Rush_Win+"_Score") + 1; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": [Team "+.Rush_Win+"] has scored 1 Point!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; set .Rush_Win,0; } else if([email protected]_Status == 5 && .CTF_Win > 0) { set [email protected]$,"CTF"; setd(".T"+.CTF_Win+"_Score"),getd(".T"+.CTF_Win+"_Score") + 1; mapannounce [email protected]_Map$[[email protected]G_Status],[email protected]_Mode$[[email protected]_Status]+": [Team "+.CTF_Win+"] has scored 1 Point!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; set .CTF_Win,0; } sleep 2000; donpcevent strnpcinfo(0)+"::OnBGDisable"; donpcevent strnpcinfo(0)+"::OnBGRoundScore"; set .rounds,.rounds + 1; mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Round "+.rounds+" has finished!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 2000; if(.rounds < getd("."[email protected]$+"_RoundSwap")) { mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": Starting Round "+(.rounds+1)+" in a few seconds!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; set getvariableofnpc(.DBG_Reset,"DBGArena_Core"),1; set .NoAnno,1; // To prevent repeating the Announcements in the next round donpcevent "DBGArena_Core::OnBGArenaReset"; } else { if(.T1_Score > .T2_Score) set [email protected]_T1Score,[email protected]_T1Score + 1; else if(.T2_Score > .T1_Score) set [email protected]_T2Score,[email protected]_T2Score + 1; set .T1_Score,0; set .T2_Score,0; if(.Team_Swapped) { donpcevent strnpcinfo(0)+"::OnBGRoundScore"; donpcevent "DBGArena_Core::OnBGArenaScore"; set .Team_Swapped,0; end; } mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": End of the match! Switching Teams....",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 2000; set .rounds,0; // Swapping Teams set [email protected],[email protected]_T2; set [email protected],[email protected]_T1; set [email protected]_T1,[email protected]; set [email protected]_T2,[email protected]; set .Team_Swapped,1; // Reseting Round set getvariableofnpc(.DBG_Reset,"DBGArena_Core"),1; donpcevent "DBGArena_Core::OnBGArenaReset"; } end; // Battleground Arena - Update Score OnBGRoundScore: bg_updatescore [email protected]_Map$[[email protected]_Status],.T1_Score,.T2_Score; end; // Domination - Flag Timer OnTimer5000: // Every 5th second stopnpctimer; if(([email protected]_T1Score + .flags_pts[[email protected]_Flag_CT1]) < 100) set [email protected]_T1Score,[email protected]_T1Score + .flags_pts[[email protected]_Flag_CT1]; else set [email protected]_T1Score,100; if(([email protected]_T2Score + .flags_pts[[email protected]_Flag_CT2]) < 100) set [email protected]_T2Score,[email protected]_T2Score + .flags_pts[[email protected]_Flag_CT2]; else set [email protected]_T2Score,100; donpcevent "DBGArena_Core::OnBGArenaScore"; initnpctimer; end; // Rush - Crystal Death Event OnRushMobDeath: mapannounce [email protected]_Map$[[email protected]_Status],[email protected]_Mode$[[email protected]_Status]+": [Team 1] has destroyed the Crystal!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; set .Rush_Win,1; donpcevent strnpcinfo(0)+"::OnRoundReset"; end; OnFlagMark: deltimer strnpcinfo(0)+"::OnFlagMark"; if([email protected]_Flag) end; specialeffect2 .f_effect; addtimer .f_effect_t,strnpcinfo(0)+"::OnFlagMark"; end; OnBGDisable: switch([email protected]_Status) { default: break; case 2: // Search and Destroy stopnpctimer "DBG_Target"; stopnpctimer "Target A#1"; stopnpctimer "Target B#2"; movenpc "Bomb#SAD",.SAD_x,.SAD_y; disablenpc "DBG_Target"; disablenpc "Target A#1"; disablenpc "Target B#2"; disablenpc "Bomb#SAD"; break; case 3: // Domination stopnpctimer; disablenpc "DBG_DOM_Flag"; disablenpc "Flag A#1"; disablenpc "Flag B#2"; disablenpc "Flag C#3"; break; case 5: // Capture the Flag movenpc "Team 1 Flag#1",.CTF1_x,.CTF1_y; movenpc "Team 2 Flag#2",.CTF2_x,.CTF2_y; disablenpc "DBG_CTF_Flag"; disablenpc "Team 1 Flag#1"; disablenpc "Team 2 Flag#2"; break; } donpcevent "#DBG_Heal::OnDisable"; killmonsterall [email protected]_Map$[[email protected]_Status]; end; OnInit: // ======= Search and Destroy ===== // Saving original coordiantes of the bomb getmapxy([email protected]$,.SAD_x,.SAD_y,BL_NPC,"Bomb#SAD"); // How many rounds until the teams are swapped? // Note: First round has the value 0 set .SAD_RoundSwap,2; // ======= Domination ===== // Flag Settings - Points // Default: [ ] = Flag Count // [0] = 0 Flags > 0 Pts (Obviously) // [1] = 1 Flag > 1 Pt // [2] = 2 Flags > 3 Pts // [3] = 3 Flags > 5 Pts setarray .flags_pts[0],0,1,3,5; // ======= Rush ===== // How many rounds until the teams are swapped? // Note: First round has the value 0 set .Rush_RoundSwap,2; // Mob Coordinates of Defender Team (Team 2) setarray .mob[0],328,150; // ======= Rush ===== // Saving original coordiantes of the flags getmapxy([email protected]$,.CTF1_x,.CTF1_y,BL_NPC,"Team 1 Flag#1"); getmapxy(.[email protected]$,.CTF2_x,.CTF2_y,BL_NPC,"Team 2 Flag#2"); // How many rounds until the teams are swapped? // Note: First round has the value 0 set .CTF_RoundSwap,2; end; } // Search and Destroy - Target NPC's - script DBG_Target -1,{ if(getd(".Bomb_Active_T"+strnpcinfo(2)) && @DBG_Team == 2) { progressbar "",.defuse; if(!playerattached()) end; // Check if the player is still attached, like got killed stopnpctimer strnpcinfo(0); mapannounce strnpcinfo(4),"Search & Destroy: Team 2 has succesfully defused the bomb at "+strnpcinfo(1)+".",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; setd(".Bomb_Active_T"+strnpcinfo(2)),0; setd(".b_T"+strnpcinfo(2)),0; set getvariableofnpc(.SAD_Win,"DBG_Init"),2; donpcevent "DBG_Init::OnRoundReset"; } else if(!getd(".Bomb_Active_T"+strnpcinfo(2)) && @DBG_Team == 1) { // Check if Attacker if([email protected]_Bomb) message strcharinfo(0),"You need to the bomb to destroy this target."; else if(getd(".Planting_"+strnpcinfo(2)) == 0) { addtimer 1000,strnpcinfo(0)+"::OnBombPlant"; getmapxy([email protected]$,@x,@y,BL_PC); setd(".Planting_"+strnpcinfo(2)),1; } } end; OnBombPlant: deltimer strnpcinfo(0)+"::OnBombPlant"; getmapxy([email protected]$,[email protected],[email protected],BL_PC); if([email protected] != @x && [email protected] != @y) { message strcharinfo(0),"Search & Destroy: You are not allowed to move!"; set .plant_t,0; setd(".Planting_"+strnpcinfo(2)),0; set @x,0; set @y,0; end; } if(.plant_t < .plant) { addtimer 1000,strnpcinfo(0)+"::OnBombPlant"; npctalk "Planting complete in "+(.plant-.plant_t)+" seconds.",strnpcinfo(0); set .plant_t,.plant_t + 1; end; } set @x,0; set @y,0; mapannounce strnpcinfo(4),"Search & Destroy: Team 1 has planted the Bomb at "+strnpcinfo(1)+". "+.bomb+" seconds unil it explodes!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; setd(".Bomb_Active_T"+strnpcinfo(2)),1; set @Has_Bomb,0; set .plant_t,0; setd(".Planting_"+strnpcinfo(2)),0; initnpctimer strnpcinfo(0); end; OnTimer1000: stopnpctimer strnpcinfo(0); setd(".b_T"+strnpcinfo(2)),getd(".b_T"+strnpcinfo(2)) + 1; npctalk "Time left until explosion: "+(.bomb-getd(".b_T"+strnpcinfo(2)))+" seconds",strnpcinfo(0); misceffect 54; initnpctimer strnpcinfo(0); if(getd(".b_T"+strnpcinfo(2)) < .bomb || getd(".Bomb_Active_T"+strnpcinfo(2)) == 0) end; stopnpctimer strnpcinfo(0); setd(".Bomb_Active_T"+strnpcinfo(2)),0; specialeffect .explode; set getvariableofnpc(.SAD_Win,"DBG_Init"),1; donpcevent "DBG_Init::OnRoundReset"; end; OnInit: set .bomb,20; // Time until bomb explodes in seconds set .plant,5; // Required time to plant the bomb in seconds set .defuse,8; // Time to defuse the bomb set .explode,730; // Effect ID for explosion disablenpc strnpcinfo(0); end; } dbg_arena,199,191,4 duplicate(DBG_Target) Target A#1 1914 dbg_arena,199,106,4 duplicate(DBG_Target) Target B#2 1915 // Search & Destroy - Bomb dbg_arena,97,78,4 script Bomb#SAD 1904,{ if(@DBG_Team != 1) end; set @Has_Bomb,1; npctalk "["+strcharinfo(0)+"] has picked up the Bomb.",strnpcinfo(0),bc_area; sleep 500; disablenpc strnpcinfo(0); end; OnInit: set .npc$,strnpcinfo(0); disablenpc .npc$; end; } // Domination - Flag Template - script DBG_DOM_Flag -1,{ end; OnTouch: if(getd(".Flag"+strnpcinfo(2)+"_Group") == @DBG_Team) end; // Team x owns this Flag, end if(getd(".TakeOver_F"+strnpcinfo(2))) end; // TakeOver is in progress setd(".TakeOver_F"+strnpcinfo(2)),1; mapannounce strnpcinfo(4),"Domination: ["+strnpcinfo(1)+"] is being taken....",bc_area,[email protected]_Anno$[[email protected]_Status]; while( [email protected] < .flag_timer) { misceffect ([email protected]); set [email protected],[email protected] + 1; sleep 1000; } setd(".TakeOver_F"+strnpcinfo(2)),0; getmapxy([email protected]$,[email protected]_x,[email protected]_y,BL_NPC); set [email protected]_T1,bg_getareausers([email protected]_T1,strnpcinfo(4),([email protected]_x-3),([email protected]_y-3),([email protected]_x+3),([email protected]_y+3)); set [email protected]_T2,bg_getareausers([email protected]_T2,strnpcinfo(4),([email protected]_x-3),([email protected]_y-3),([email protected]_x+3),([email protected]_y+3)); if(!getd(".Flag"+strnpcinfo(2)+"_Group")) { // Neutral Flag if([email protected]_T1 > [email protected]_T2) { set [email protected]_Flag_CT1,[email protected]_Flag_CT1 + 1; setd(".Flag"+strnpcinfo(2)+"_Group"),1; } else if([email protected]_T2 > [email protected]_T1) { set [email protected]_Flag_CT2,[email protected]_Flag_CT2 + 1; setd(".Flag"+strnpcinfo(2)+"_Group"),2; } else { npctalk strnpcinfo(1)+": There are equal amount of players, therefore no one can take the flag!"; end; } } else if(getd(".Flag"+strnpcinfo(2)+"_Group") == 1) { // Team 1 has flag if([email protected]_T1 < [email protected]_T2) { set [email protected]_Flag_CT1,[email protected]_Flag_CT1 - 1; set [email protected]_Flag_CT2,[email protected]_Flag_CT2 + 1; setd(".Flag"+strnpcinfo(2)+"_Group"),2; } else { npctalk strnpcinfo(1)+": There are equal amount or Team 1 has more players, therefore Team 1 keeps the flag!"; end; } } else if(getd(".Flag"+strnpcinfo(2)+"_Group") == 2) { // Team 2 has flag if([email protected]_T2 < [email protected]_T1) { set [email protected]_Flag_CT1,[email protected]_Flag_CT1 + 1; set [email protected]_Flag_CT2,[email protected]_Flag_CT2 - 1; setd(".Flag"+strnpcinfo(2)+"_Group"),1; } else { npctalk strnpcinfo(1)+": There are equal amount or Team 2 has more players, therefore Team 2 keeps the flag!"; end; } } setnpcdisplay(strnpcinfo(0),strnpcinfo(0),getd(".T"+getd(".Flag"+strnpcinfo(2)+"_Group")+"_FlagID")); mapannounce strnpcinfo(4),"Domination: ["+strnpcinfo(1)+"] has been taken by Team "+getd(".Flag"+strnpcinfo(2)+"_Group")+"!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; delwaitingroom; OnDisplayBox: waitingroom strnpcinfo(1)+" - "+( (getd(".Flag"+strnpcinfo(2)+"_Group") == 0)?"[Neutral]":"[Team "+getd(".Flag"+strnpcinfo(2)+"_Group")+"]"),0; end; OnInit: set .T1_FlagID,1912; // ID to display when Team 1 has taken the Flag set .T2_FlagID,1913; // ID to display when Team 2 has taken the Flag set .flag_timer,10; // Timer to take an flag in seconds disablenpc strnpcinfo(0); end; } // Flags duplicates to be taken dbg_dom,209,291,4 duplicate(DBG_DOM_Flag) Flag A#1 1911,3,3 dbg_dom,274,204,4 duplicate(DBG_DOM_Flag) Flag B#2 1911,3,3 dbg_dom,267,131,4 duplicate(DBG_DOM_Flag) Flag C#3 1911,3,3 // Capture the Flag - Flag NPC's - script DBG_CTF_Flag -1,{ if(getd(".Flag"+strnpcinfo(2)+"_Base")) { // Is the flag at base? if(@DBG_Team == atoi(strnpcinfo(2)) && (@Has_Flag > 0 && @Has_Flag != @DBG_Team) ) { mapannounce strnpcinfo(4),"Capture the Flag: Team "[email protected]_Team+" has succesfully conquered the enemies Flag!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; set getvariableofnpc(.CTF_Win,"DBG_Init"),@DBG_Team; set @Has_Flag,0; donpcevent "DBG_Init::OnRoundReset"; } else if(@DBG_Team != atoi(strnpcinfo(2))) { disablenpc strnpcinfo(0); setd(".Flag"+strnpcinfo(2)+"_Base"),0; set @Has_Flag,atoi(strnpcinfo(2)); mapannounce strnpcinfo(4),"Capture the Flag: The Flag of Team "+strnpcinfo(2)+" has been taken by ["+strcharinfo(0)+"]!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; addtimer 5000,"DBG_Init::OnFlagMark"; } } else if(!getd(".Flag"+strnpcinfo(2)+"_Base")) { // Has the flag been dropped? if(@DBG_Team == atoi(strnpcinfo(2))) { // Is the player in the same team as the Flag belongs to? movenpc strnpcinfo(0),getd(".CTF"+strnpcinfo(2)+"_x"),getd(".CTF"+strnpcinfo(2)+"_y"); setd(".Flag"+strnpcinfo(2)+"_Base"),1; mapannounce strnpcinfo(4),"Capture the Flag: The Flag of Team "[email protected]_Team+" has been saved by ["+strcharinfo(0)+"]!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; } else { disablenpc strnpcinfo(0); set @Has_Flag,atoi(strnpcinfo(2)); specialeffect2 getvariableofnpc(.f_effect,"DBG_Init"); addtimer getvariableofnpc(.f_effect_t,"DBG_Init"),"DBG_Init::OnFlagMark"; mapannounce strnpcinfo(4),"Capture the Flag: The Flag of Team "+strnpcinfo(2)+" has been taken by ["+strcharinfo(0)+"]!",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; } } end; OnInit: // Saving original coordiantes and Names of the flags if(strnpcinfo(2) != "") { getmapxy([email protected]$,getd(".CTF"+strnpcinfo(2)+"_x"),getd(".CTF"+strnpcinfo(2)+"_y"),BL_NPC); setd(".npc_F"+strnpcinfo(2)+"$"),strnpcinfo(0); } disablenpc strnpcinfo(0); end; } dbg_arena,62,150,4 duplicate(DBG_CTF_Flag) Team 1 Flag#1 1912 dbg_arena,328,150,4 duplicate(DBG_CTF_Flag) Team 2 Flag#2 1913 prontera,147,175,4 script Battleground Arena 100,{ mes .n$; mes "Welcome, "+strcharinfo(0)+"!"; mes "How can I help you?"; next; switch(select("- Start Arena:- Information:- Shop:- Leave")) { case 1: mes .n$; if([email protected]_Status) { mes "The Battleground Arena is currently active."; mes "Use \"@joinbgarena\" to join."; close; } if(.DBG_WoE && (agitcheck() || agitcheck2() || agitcheck3())) { mes "Currently the War of Emperium is active, therefore I can't start the Arena!"; close; } mes "Which Game Mode do you want to play?"; next; for ( set [email protected],1; [email protected] < getarraysize([email protected]_Mode$); set [email protected],[email protected] + 1) set [email protected]_menu$,[email protected]_menu$ + "- "[email protected]_Mode$[[email protected]]+ ( ([email protected]_Mode$[[email protected]+1] != "")?":":""); set [email protected],select([email protected]_menu$); mes .n$; mes [email protected]_Mode$[[email protected]]+", it is?"; if(select("- Yes:- No") - 1) close; next; mes .n$; mes "Okay, here we go."; set [email protected]_Status,[email protected]; close2; announce "An warrior is calling out for others to participate in the Battleground Arena.",[email protected]_Anno_T,[email protected]_Anno$[[email protected]_Status]; sleep 3000; donpcevent "DBGArena_Core::OnBGArenaInit"; end; case 2: mes .n$; mes "About what do you want to learn more?"; next; switch(select("- Join Arena:- Game Modes:- Happy Hour:- Custom Commands:- Rewards:- Nevermind")) { case 1: // Join Arena mes .n$; mes "Every Warrior can start the Battleground Arena by selecting the Game Mode,"; mes (getvariableofnpc(.DBG_WoE,"DBGArena_Core") == 0?"even":"but not")+" when WoE is active."; mes "As soon it starts you will see the announcement."; break; // Games Modes case 2: mes .n$; mes "There are a total of "+(getarraysize([email protected]_Mode$) - 1)+" Game Modes."; mes "About which Game Mode do you want to know more?"; next; switch(select("- Team Deathmatch:- Search & Destroy:- Domination:- Rush:- Capture the Flag")) { case 1: // TDM mes .n$; mes "Team Deathmatch consists only of battling the other Team."; mes "The goal is to defeat more enemies than the other team until either the time limit or the required points have been reached."; break; case 2: // S&D mes .n$; mes "Search & Destroy consists of destroying 1 of 2 Targets."; mes "Team 1 has access to the bomb while Team 2 has to defend the targets."; break; case 3: // Domination mes .n$; mes "Domination consists of taking flags. There are a total of 3 flags to take."; mes "Each flag gives points every 5 seconds, the more flags are taken by an team the more points they will recieve."; break; case 4: // Rush mes .n$; mes "Rush consists of destroying an Crystal."; mes "Team 1 are the attackers and have limited lifes, while Team 2 has to defend the crystal until either the Time Limit or the attackers are out of lifes."; break; case 5: // CTF mes .n$; mes "Capture the Flag consists of taking the enemies flag and bring it to the own flag."; mes "If the own flag was taken, you have to take it back to score."; break; } next; mes .n$; switch(@menu) { default: mes "Time Limit per Match is: "+getvariableofnpc(.DBG_TLimit[@menu],"DBGArena_Core")+" "+ ( (getvariableofnpc(.DBG_TLimit[@menu],"DBGArena_Core") > 1)?"Minutes":"Minute"); mes "The required Points to win is: "+getvariableofnpc(.DBG_MPTS[@menu],"DBGArena_Core"); break; case 2: case 4: case 5: mes "There are multiply rounds per match and the Time Limit per round is:"; mes getvariableofnpc(.DBG_TLimit[@menu],"DBGArena_Core")+" "+ ( (getvariableofnpc(.DBG_TLimit[@menu],"DBGArena_Core") > 1)?"Minutes":"Minute"); mes "After each round, the match will restart until a certain amount of rounds have passed, then the teams will be swapped and the team which scores the most in these rounds, scores 1 total point."; mes "The required Points to win is: "+getvariableofnpc(.DBG_MPTS[@menu],"DBGArena_Core"); break; } break; // Happy Hour case 3: mes .n$; mes "During the day it can happen that \"Happy Hour\" will start."; mes "This means that the reward will be increased for this very hour."; break; // Custom Commands case 4: mes .n$; mes "There are following commands for the Battleground Arena:"; mes " > @bgarenainfo = Display the Score and Time left"; mes " > @joinbgarena = Joins the Battleground Arena"; mes " > @leavebgarena = Leaves the Battleground Arena"; if(getgroupid()) { mes " "; mes " For GM's exists:"; mes " > @startbgarena = Start the Battleground Arena"; mes " > @endbgarena = Ends the Battleground Arena"; } break; // Rewards case 5: mes .n$; mes "There are 4 different rewards awaiting you after each match."; mes "The reward amount itself depends on the Game Mode tho."; mes " "; mes " > Arena Points (for the Arena Shop)"; mes " > Valor Badges"; mes " > War Badges"; mes " > Bravery Badges"; break; // Nevermind case 6: break; } break; case 3: mes .n$; mes "I will now open the Battleground Arena Shop!"; mes "You have currently "+BGArenaPts+" Arena Points!"; mes "Note: The Discount Skill won't work on me!"; close2; callshop "DBG_Shop",1; npcshopattach "DBG_Shop"; end; case 4: break; } close; OnBuyItem: for ( set [email protected],0; [email protected] < getarraysize(@bought_nameid); set [email protected],[email protected] + 1) for ( set [email protected],0; [email protected] < getarraysize(.bg_shop); set [email protected],[email protected] + 2) if(@bought_nameid[[email protected]] == .bg_shop[[email protected]]) { if(checkweight(@bought_nameid[[email protected]],@bought_nameid[[email protected]]) == 0) { npctalk "Battleground Shop: You can't buy this many items, you would be overweight!!",strnpcinfo(0),bc_self; end; } set [email protected],[email protected] + (.bg_shop[[email protected]+1]*@bought_quantity[[email protected]]); } if([email protected] > BGArenaPts) { npctalk "Battleground Shop: I'm sorry, but you don't have the required Arena Points. You are missing "+([email protected])+" Points.",strnpcinfo(0),bc_self;; end; } for ( set [email protected],0; [email protected] < getarraysize(@bought_nameid); set [email protected],[email protected] + 1) getitem @bought_nameid[[email protected]],@bought_quantity[[email protected]]; set BGArenaPts,BGArenaPts - [email protected]; dispbottom "Battleground Shop: You have paied "[email protected]+" Arena Points."; end; OnInit: set .n$,"["+strnpcinfo(0)+"]"; // Item ID,Price setarray .bg_shop[0],12020,2, // [0] == Cursed Water 12028,2, // [1] == Box of Thunder 12029,2, // [2] == Box of Gloom 12030,2, // [3] == Box of Resentment 12031,2, // [4] == Box of Drowsiness 12032,2, // [5] == Box of Stroms 12033,2, // [6] == Box of Sunlight 12034,2, // [7] == Box of Panting 12108,5, // [8] == Scroll Package 12215,5, // [9] == LV 10 Blessing Scroll 12216,5, // [10] == LV 10 Agi Scroll 12217,5, // [11] == LV 5 Aspersio Scroll 12218,5, // [12] == LV 5 Assumptio Scroll 12219,5, // [13] == LV 10 Wind Walker Scroll 12075,10, // [14] == Steamed Tongue 12080,10, // [15] == Dragon Breath Cocktail 12085,10, // [16] == Immortal Stew 12090,10, // [17] == Steamed Desert Scorpions 12095,10, // [18] == Hwergelmir's Tonic 12100,10, // [19] == Cooked Nice Tail's Tails 12114,4, // [20] == Elemental Converter[Fire] 12115,4, // [21] == Elemental Converter[Water] 12116,4, // [22] == Elemental Converter[Earth] 12117,4, // [23] == Elemental Converter[Wind] 12118,3, // [24] == Fireproof Potion 12119,3, // [25] == Coldproof Potion 12120,3, // [26] == Earthproof Potion 12121,3, // [27] == Thunderproof Potion 13543,10, // [28] == Chemical Protection Helm Scroll Box 13544,10, // [29] == Chemical Protection Shield Scroll Box 13545,10, // [30] == Chemical Protection Armor Scroll Box 13546,10, // [31] == Chemical Protection Weapon Scroll Box 7139,1, // [32] == Glistening Coat 13547,10, // [33] == Repair Weapon Scroll Box 14593,5; // [34] == Mystical Amplification Scroll npcshopdelitem "DBG_Shop",501; for ( set [email protected],0; [email protected] < getarraysize(.bg_shop); set [email protected],[email protected] + 2) npcshopadditem "DBG_Shop",.bg_shop[[email protected]],.bg_shop[[email protected]+1]; end; } - pointshop DBG_Shop -1,BGArenaPts,501:-1 // Base Flags - Only to display the Team's Flag // Template for saving lines only - script DBG_BaseFlag -1,{ end; } // Team 1 Base Flags on dbg_arena dbg_arena,80,81,4 duplicate(DBG_BaseFlag) Team 1 Base#arena1 1912 dbg_arena,95,81,4 duplicate(DBG_BaseFlag) Team 1 Base#arena2 1912 dbg_arena,95,68,4 duplicate(DBG_BaseFlag) Team 1 Base#arena3 1912 dbg_arena,80,68,4 duplicate(DBG_BaseFlag) Team 1 Base#arena4 1912 // Team 2 Base Flags on dbg_arena dbg_arena,304,230,4 duplicate(DBG_BaseFlag) Team 2 Base#arena1 1913 dbg_arena,318,230,4 duplicate(DBG_BaseFlag) Team 2 Base#arena2 1913 dbg_arena,318,218,4 duplicate(DBG_BaseFlag) Team 2 Base#arena3 1913 dbg_arena,304,218,4 duplicate(DBG_BaseFlag) Team 2 Base#arena4 1913 // Mapflags // Battleground Arena dbg_arena mapflag nosave dbg_arena mapflag noteleport dbg_arena mapflag nomemo dbg_arena mapflag nowarp dbg_arena mapflag nowarpto dbg_arena mapflag noreturn dbg_arena mapflag nogo dbg_arena mapflag nodrop dbg_arena mapflag nobranch dbg_arena mapflag nopenalty dbg_arena mapflag nozenypenalty dbg_arena mapflag novending dbg_arena mapflag nochat dbg_arena mapflag nightenabled dbg_arena mapflag battleground 2 // Battleground Arena - Domination dbg_dom mapflag nosave dbg_dom mapflag noteleport dbg_dom mapflag nomemo dbg_dom mapflag nowarp dbg_dom mapflag nowarpto dbg_dom mapflag noreturn dbg_dom mapflag nogo dbg_dom mapflag nodrop dbg_dom mapflag nobranch dbg_dom mapflag nopenalty dbg_dom mapflag nozenypenalty dbg_dom mapflag novending dbg_dom mapflag nochat dbg_dom mapflag nightenabled dbg_dom mapflag battleground 2 how to fix this error thanks
  14. - script bg_pvp_round#control -1,{ OnInit: .minplayer2start = 1; // minimum player to start .winningscore = 2; // how many rounds to win .eventlasting = 20*60; // event last 20 minutes or the system abort itself setarray .rewarditem, 501, 5, // reward to the winning team 501, 1; // reward to the losing team end; OnStart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) { announce "[ Battle Ground DeathMatch System ] Blue Team : "+ getwaitingroomstate( 0, .bluenpcname$ ) + "/" + .minplayer2start + ". Red Team : "+ getwaitingroomstate( 0, .rednpcname$ ) + "/" + .minplayer2start,bc_all,0x00CED1; end; } announce "[ Battle Ground DeathMatch System ] Battleground has started", bc_all, 0x00CED1; .red = waitingroom2bg( "bat_b01", 61,150, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ ); copyarray .team1aid, [email protected], [email protected]; .team1count = .minplayer2start; .blue = waitingroom2bg( "bat_b01", 327,150, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ ); copyarray .team2aid, [email protected], [email protected]; .team2count = .minplayer2start; .life[1] = .life[2] = .minplayer2start; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; disablenpc .rednpcname$; disablenpc .bluenpcname$; callsub L_setwall; bg_updatescore "bat_b01", 0, 0; bg_warp .red, "bat_b01", 61,150; bg_warp .blue, "bat_b01", 327,150; sleep 4000 * !.skip; mapannounce "bat_b01", "Kill all opponent team to gain 1 point, score "+ .winningscore +" points to win !", 0; sleep 2000 * !.skip; while (1) { for ( [email protected] = 5; [email protected] > 0; [email protected] ) { mapannounce "bat_b01", "["+ [email protected] +"]", 0; sleep 1000 * !.skip; } if ( .score[1] == .winningscore -1 && .score[2] == .winningscore -1 ) mapannounce "bat_b01", "Final Round start!", 0; else mapannounce "bat_b01", "Round "+ .round++ +" start!", 0; callsub L_delwall; .life[1] = .team1count; .life[2] = .team2count; sleep .eventlasting * 1000 * !.skip; bg_updatescore "bat_b01", .score[1], .score[2]; if ( .score[1] == .winningscore || .score[2] == .winningscore || !.winside ) break; sleep 5000 * !.skip; callsub L_make_player_move; bg_warp .red, "bat_b01", 61,150; bg_warp .blue, "bat_b01", 327,150; callsub L_setwall; sleep 1000 * !.skip; .winside = 0; } if ( .winside ) { mapannounce "bat_b01", " "+ ( ( .winside == 1 )? "Red" : "Blue" ) +" side wins !", 0; callsub L_reward, .winside, 0; callsub L_reward, ( .winside == 1 )? 2:1, 2; } else mapannounce "bat_b01", "Time Out. Aborting the match.", 0; sleep 5000; callsub L_make_player_move; bg_warp .red, "prontera", 155,182; bg_warp .blue, "prontera", 158,182; bg_destroy .red; bg_destroy .blue; callsub L_delwall; deletearray .team1aid; deletearray .team2aid; .round = .winside = .skip = .score[1] = .score[2] = .team1count = .team2count = .life[1] = .life[2] = 0; enablenpc .rednpcname$; enablenpc .bluenpcname$; donpcevent .rednpcname$ +"::OnStart"; donpcevent .bluenpcname$ +"::OnStart"; end; L_reward: [email protected] = getarraysize( getd(".team"+ getarg(0) +"aid") ); for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ [email protected] +"]" ); return; L_setwall: setwall "bat_b01", 58,153, 6, 6, 0, "bg_pvp_round_red_1"; setwall "bat_b01", 64,153, 6, 4, 0, "bg_pvp_round_red_2"; setwall "bat_b01", 64,147, 6, 2, 0, "bg_pvp_round_red_3"; setwall "bat_b01", 58,147, 6, 0, 0, "bg_pvp_round_red_4"; setwall "bat_b01", 324,153, 6, 6, 0, "bg_pvp_round_blue_1"; setwall "bat_b01", 330,153, 6, 4, 0, "bg_pvp_round_blue_2"; setwall "bat_b01", 330,147, 6, 2, 0, "bg_pvp_round_blue_3"; setwall "bat_b01", 324,147, 6, 0, 0, "bg_pvp_round_blue_4"; return; L_delwall: delwall "bg_pvp_round_red_1"; delwall "bg_pvp_round_red_2"; delwall "bg_pvp_round_red_3"; delwall "bg_pvp_round_red_4"; delwall "bg_pvp_round_blue_1"; delwall "bg_pvp_round_blue_2"; delwall "bg_pvp_round_blue_3"; delwall "bg_pvp_round_blue_4"; return; L_make_player_move: for ( [email protected] = 1; [email protected] <= 2; [email protected]++ ) { for ( [email protected] = 0; [email protected] < getd(".team"+ [email protected] +"count"); [email protected]++ ) { attachrid getd(".team"+ [email protected] +"aid["+ [email protected] +"]" ); setoption 0x40, 0; pcblockmove getcharid(3), 0; } } return; OnRedQuit: callsub L_quit, 1, "Red", 2, "Blue"; OnBlueQuit: callsub L_quit, 2, "Blue", 1, "Red"; L_quit: percentheal 100, 100; setoption 0x40, 0; pcblockmove getcharid(3), 0; while ( getd( ".team"+ getarg(0) +"aid["+ [email protected] +"]" ) != getcharid(3) && [email protected] < getd(".team"+ getarg(0) +"count") ) [email protected]++; deletearray getd( ".team"+ getarg(0) +"aid["+ [email protected] +"]" ), 1; setd ".team"+ getarg(0) +"count", getd(".team"+ getarg(0) +"count") -1; .life[ getarg(0) ]--; if ( !getd(".team"+ getarg(0) +"count") ) { mapannounce "bat_b01", "All "+ getarg(1) +" team members has Quit !", 0, 0xff3333; // purposely use different color .score[ getarg(2) ] = .winningscore; .winside = getarg(2); .skip = 1; awake strnpcinfo(0); } else if ( !.life[ getarg(0) ] ) { .winside = getarg(2); mapannounce "bat_b01", " "+ getarg(3) +" team has defeated the opponent team, "+ getarg(3) +" team score a point !", 0; .score[ getarg(2) ]++; awake strnpcinfo(0); } end; OnRedDead: callsub L_dead, 1, 2, "Blue"; OnBlueDead: callsub L_dead, 2, 1, "Red"; L_dead: .life[ getarg(0) ]--; if ( !.life[ getarg(0) ] ) { .winside = getarg(1); mapannounce "bat_b01", " "+ getarg(2) +" team has defeated the opponent team, "+ getarg(2) +" team score a point !", 0; .score[ getarg(1) ]++; awake strnpcinfo(0); } sleep2 1250; percentheal 100,100; setoption 0x40, 1; pcblockmove getcharid(3), 1; end; } prontera,155,177,5 script Red side#bg_pvp_r 100,{ end; OnInit: sleep 1; set getvariableofnpc( .rednpcname$, "bg_pvp_round#control" ), strnpcinfo(0); OnStart: waitingroom "Red side", getvariableofnpc( .minplayer2start, "bg_pvp_round#control" ) +1, "bg_pvp_round#control::OnStart", 1; end; } prontera,158,177,5 script Blue side#bg_pvp_r 100,{ end; OnInit: sleep 1; set getvariableofnpc( .bluenpcname$, "bg_pvp_round#control" ), strnpcinfo(0); OnStart: waitingroom "Blue side", getvariableofnpc( .minplayer2start, "bg_pvp_round#control" ) +1, "bg_pvp_round#control::OnStart", 1; end; } bat_b01 mapflag battleground 2 bat_b01 mapflag nosave SavePoint bat_b01 mapflag nowarp bat_b01 mapflag nowarpto bat_b01 mapflag noteleport bat_b01 mapflag nomemo bat_b01 mapflag nopenalty bat_b01 mapflag nobranch bat_b01 mapflag noicewall Hello Good day rathena.. How can i change this BG script to .winningpoints = 100; where 1 point = 1 enemy kill and to respawn??
  15. did it.. copied the whole txt and removed what you said.. and saved it as .sql then opened phpmyadmin, clicked ragnarok then import then chosed the file.. then pressed go.. it says executed 4 queries.. but when i clicked pvp_ranking and woe_ranking this is the result
×
×
  • Create New...

Important Information

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