Saisho Posted March 10, 2013 Group: Members Topic Count: 52 Topics Per Day: 0.01 Content Count: 185 Reputation: 20 Joined: 01/06/13 Last Seen: November 11, 2018 Share Posted March 10, 2013 i was playing w/ this script when i noticed it acts like pvp nightmare but i cant find what do that. can someone point or fix it as normal pvp plz? :3 //===== Mysterious Script ==================================== //= Juggernaut Event //===== Template By: ========================================= //= Ace //===== Script Overhaul By: ================================== //= Mysterious //===== Current Version: ===================================== //= 1.6 //===== Compatible With: ===================================== //= Hercules, rAthena //===== Description: ========================================= //= A player will be selected to be the "Juggernaut" while the //= rest of the players have to all team together to take that //= Juggernaut down and be awarded. //===== TODO: ================================================ // - Revise whole script //===== Additional Comments: ================================= //= v1.0 - First release [Ace] //= v1.1 - Fixed Credits [Mysterious] //= v1.2 - Fixed some sentences [Mysterious] //= v1.3 - Removed unnecessary things [Mysterious] //= v1.4 - Fixed Duplicates [Mysterious] //= v1.5 - Moved Mapflags [Mysterious] //= v1.6 - Cleaning [Mysterious] //============================================================ prontera,181,216,4 script Juggernaut 810,{ // === Staff Menu if (getgmlevel() == 99) { // Change '99' to your desired level mes "[ Juggernaut ]"; mes "You can choose to enable/disable and/or warp out players. Status:"; if (.offline) { mes "^E00000OFFLINE^000000"; } else { mes "^00A000ONLINE^000000"; } menu "Continue",-,"Enable/Disable",-,"Warp Out",-,"Both",-; set @sel, @menu-1; if(@sel&1) set .offline, .offline^1; if(@sel&2) { getmapxy(@mapname$, @mapx, @mapy, 0, strcharinfo(0)); mapwarp "pvp_n_1-3", @mapname$, @mapx, @mapy; } } // Player view if (.offline) { mes "[ The Juggernaut ]"; mes "Sorry, but I'm disabled at the moment."; close; } //-------------------------------------------------------------------------- End set @jugguser, getmapusers ("pvp_n_1-3"); set @jugkill, 0; getmapxy(#originmap$,#originx,#originy,0,strcharinfo(0)); if (@jugguser == 0) { set _juggernaut$, "-"; set $@juggtaken, 0; movenpc "The Juggernaut",99,101; } if ($@juggend == 1) { mes "[ The Juggernaut ]"; mes "Welcome to the Juggernaut."; mes ""; mes "A game just ended please try again in 5 seconds."; close; end; } mes "[The Juggernaut]"; mes "Welcome to the Juggernaut."; mes ""; mes "There are "+@jugguser+" players currently in the game."; mes ""; mes "Would you like to join?"; menu "- Yes",M_Yes,"- No",-; next; mes "[ The Juggernaut ]"; mes "Please come back when you like."; close; M_Yes: set @ijugg, getarraysize($@juggernaut); setarray $@juggernaut[@ijugg], getcharid(3); set $@spawn, $@spawn + 1; if ($@spawn == 1) { warp "pvp_n_1-3",99,58; save "pvp_n_1-3",99,58; } if ($@spawn == 2) { warp "pvp_n_1-3",60,100; save "pvp_n_1-3",60,100; } if ($@spawn == 3) { warp "pvp_n_1-3",100,138; save "pvp_n_1-3",100,138; } if ($@spawn == 4) { warp "pvp_n_1-3",140,99; save "pvp_n_1-3",140,99; } if ($@spawn == 5) { warp "pvp_n_1-3",111,110; save "pvp_n_1-3",111,110; } if ($@spawn == 6) { warp "pvp_n_1-3",112,88; save "pvp_n_1-3",112,88; } if ($@spawn == 7) { warp "pvp_n_1-3",87,88; save "pvp_n_1-3",87,88; } if ($@spawn == 8) { warp "pvp_n_1-3",87,113; save "pvp_n_1-3",87,113; set $@spawn, 0; } percentheal 100,100; end; OnPCDieEvent: getmapxy(@checkmap$,@checkx,@checky,0); if (@checkmap$ == "pvp_n_1-3") { set $@pd, playerattached(); set @heal, 0; if (_juggernaut$ == strcharinfo(0)) { set _juggernaut$, "-"; set #juggdeath, #juggdeath + 1; mapannounce "pvp_n_1-3", "The Juggernaut has fallen!",0; } set #nonjuggdeath, nonjuggdeath + 1; sleep2 1000; set @newsave, rand(1,5); if (@newsave == 1) { set @savex, rand(53,96); set @savey, rand(97,102); warp "pvp_n_1-3", (@savex), (@savey); } if (@newsave == 2) { set @savex, rand(97,102); set @savey, rand(101,144); warp "pvp_n_1-3", (@savex), (@savey); } if (@newsave == 3) { set @savex, rand(102,152); set @savey, rand(97,102); warp "pvp_n_1-3", (@savex), (@savey); } if (@newsave == 4) { set @savex, rand(97,102); set @savey, rand(55,95); warp "pvp_n_1-3", (@savex), (@savey); } if (@newsave == 5) { set @savex, rand(83,112); set @savey, rand(83,89); warp "pvp_n_1-3", (@savex), (@savey); } if ($@juggend == 1) { warp #originmap$, (#originx), (#originy); end; } atcommand "@alive"; sleep2 500; percentheal 100,100; } end; OnPCLogoutEvent: getmapxy(@checkmap$,@checkx,@checky,0); if (@checkmap$ == "pvp_n_1-3") { save #originmap$, (#originx), (#originy); if (_juggernaut$ == strcharinfo(0)) { set _juggernaut$, "-"; set $@juggtaken, 0; mapannounce "pvp_n_1-3", "The Juggernaut has left the game.",0; } warp #originmap$, (#originx), (#originy); set @jmapuser, getmapusers ("pvp_n_1-3"); if (@jmapuser == 1) { set _juggernaut$, "-"; set $@juggtaken, 0; movenpc "The Juggernaut",99,101; } for (set @i, 0; @i < getarraysize($@juggernaut); set @i, @i+1) { if ($@juggernaut[@i] == getcharid(3)) { setarray $@juggernaut[@i],0; break; } } for (; @i < getarraysize($@juggernaut); set @i, @i+1) { setarray $@juggernaut[@i], $@juggernaut[@i+1]; } end; } end; OnEventGameOverJugg: set .@ijugg, getarraysize($@juggernaut); set .@jugg, 0; juggend: if (.@jugg < .@ijugg) { attachrid $@juggernaut[.@jugg]; getmapxy(@checkmap$,@checkx,@checky,0); if (@checkmap$ == "pvp_n_1-3") { save #originmap$, (#originx), (#originy); warp #originmap$, (#originx), (#originy); } detachrid; set .@jugg, .@jugg + 1; goto juggend; } for (set .@j, 0; .@j < getarraysize($@juggernaut); set .@j, .@j+1) { setarray $@juggernaut[.@j], 0; } sleep2 5000; set $@juggend, 0; set $@juggtaken, 0; movenpc "The Juggernaut",99,101; end; } pvp_n_1-3,99,101,4 script The Juggernaut 1198,{ npcspeed 100; if ($@juggtaken == 0) { OnJuggChangeEvent: set $@changejugg, 0; set $@juggtaken, 1; set $@juggbuff, 9; set @jugglink, 0; set _juggernaut$, strcharinfo(0); announce ""+_juggernaut$+" is the Juggernaut!#@?%@?",bc_map; set $@ltarget, getCharID(3); if(Class == Job_Alchem || Class == Job_Creator) { set $@job, 1; unitskilluseid $@ltarget,445,5; } if(Class == Job_Monk || Class == Job_Champion) { set $@job, 2; unitskilluseid $@ltarget,447,5; } if(Class == Job_Sage || Class == Job_Professor) { set $@job, 3; unitskilluseid $@ltarget,449,5; } if(Class == Job_Crusader || Class == Job_Paladin) { set $@job, 4; unitskilluseid $@ltarget,450,5; } if(Class == Job_SuperNovice) { set $@job, 5; unitskilluseid $@ltarget,451,5; } if(Class == Job_Knight || Class == Job_Lord_Knight) { set $@job, 6; unitskilluseid $@ltarget,452,5; } if(Class == Job_Wizard || Class == Job_High_Wizard) { set $@job, 7; unitskilluseid getcharid(3),453,5; } if(Class == Job_Priest || Class == Job_High_Priest) { set $@job, 8; unitskilluseid $@ltarget,454,5; } if(Class == Job_Bard || Class == Job_Clown || Class == Job_Dancer || Class == Job_Gypsy) { set $@job, 9; unitskilluseid $@ltarget,455,5; } if(Class == Job_Rogue || Class == Job_Stalker) { set $@job, 10; unitskilluseid $@ltarget,456,5; } if(Class == Job_Assassin || Class == Job_Assassin_Cross) { set $@job, 11; unitskilluseid $@ltarget,457,5; } if(Class == Job_Blacksmith || Class == Job_Whitesmith) { set $@job, 12; unitskilluseid $@ltarget,458,5; } if(Class == Job_Hunter || Class == Job_Sniper) { set $@job, 13; unitskilluseid $@ltarget,460,5; } if(Class == Job_Soul_Linker) { set $@job, 14; unitskilluseid $@ltarget,461,5; } if(Class == Job_Taekwon || Class == Job_Star_Gladiator || Class == Job_Star_Gladiator2) { set $@job, 15; unitskilluseid $@ltarget,448,5; } set @juggbuff, 9; goto juggfollow; } if (@novalue == 503) { juggfollow: if (strcharinfo(0) == _juggernaut$) { getmapxy(@mapname$,@juggernautx,@juggernauty,0,_juggernaut$); npcwalkto (@juggernautx + 2), (@juggernauty + 2); if (strcharinfo(0) == _juggernaut$) { set @juggbuff, @juggbuff + 1; set $@jugglink, $@jugglink + 1; percentheal 2,3; if (@juggbuff == 10) { if ($@job == 1) { sc_start SC_BLESSING,11000,30; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,10; skilleffect 29,0; } if ($@job == 2) { sc_start SC_BLESSING,11000,40; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,10; skilleffect 29,0; } if ($@job == 3) { sc_start SC_BLESSING,11000,50; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,20; skilleffect 29,0; } if ($@job == 4) { sc_start SC_BLESSING,11000,50; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,10; skilleffect 29,0; } if ($@job == 5) { sc_start SC_BLESSING,11000,50; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,30; skilleffect 29,0; } if ($@job == 6) { sc_start SC_BLESSING,11000,40; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,40; skilleffect 29,0; } if ($@job == 7) { sc_start SC_BLESSING,11000,50; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,10; skilleffect 29,0; } if ($@job == 8) { sc_start SC_BLESSING,11000,50; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,10; skilleffect 29,0; } if ($@job == 9) { sc_start SC_BLESSING,11000,40; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,20; skilleffect 29,0; } if ($@job == 10) { sc_start SC_BLESSING,11000,44; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,20; skilleffect 29,0; } if ($@job == 11) { sc_start SC_BLESSING,11000,40; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,10; skilleffect 29,0; } if ($@job == 12) { sc_start SC_BLESSING,11000,40; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,40; skilleffect 29,0; } if ($@job == 13) { sc_start SC_BLESSING,11000,40; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,40; skilleffect 29,0; } if ($@job == 14) { sc_start SC_BLESSING,11000,100; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,10; skilleffect 29,0; } if ($@job == 15) { sc_start SC_BLESSING,11000,40; skilleffect 34,0; sc_start SC_INCREASEAGI,11000,20; skilleffect 29,0; } sc_start SC_IMPOSITIO,11000,10; skilleffect 66,0; sc_start SC_SUFFRAGIUM,11000,10; skilleffect 67,0; sc_start SC_ADRENALINE2,11000,5; sc_start SC_WEAPONPERFECTION,11000,5; sc_start SC_OVERTHRUST,11000,5; sc_start SC_MAXIMIZEPOWER,11000,5; sc_start SC_ASSUMPTIO,11000,5; skilleffect 361,0; set @juggbuff, 0; } if ($@jugglink == 20) { if(Class == Job_Alchem || Class == Job_Creator) { unitskilluseid $@ltarget,445,5; } if(Class == Job_Monk || Class == Job_Champion) { unitskilluseid $@ltarget,447,5; } if(Class == Job_Sage || Class == Job_Professor) { unitskilluseid $@ltarget,449,5; } if(Class == Job_Crusader || Class == Job_Paladin) { unitskilluseid $@ltarget,450,5; } if(Class == Job_SuperNovice) { unitskilluseid $@ltarget,451,5; } if(Class == Job_Knight || Class == Job_Lord_Knight) { unitskilluseid $@ltarget,452,5; } if(Class == Job_Wizard || Class == Job_High_Wizard) { unitskilluseid getcharid(3),453,5; } if(Class == Job_Priest || Class == Job_High_Priest) { unitskilluseid $@ltarget,454,5; } if(Class == Job_Bard || Class == Job_Clown || Class == Job_Dancer || Class == Job_Gypsy) { unitskilluseid $@ltarget,455,5; } if(Class == Job_Rogue || Class == Job_Stalker) { unitskilluseid $@ltarget,456,5; } if(Class == Job_Assassin || Class == Job_Assassin_Cross) { unitskilluseid $@ltarget,457,5; } if(Class == Job_Blacksmith || Class == Job_Whitesmith) { unitskilluseid $@ltarget,458,5; } if(Class == Job_Hunter || Class == Job_Sniper) { unitskilluseid $@ltarget,460,5; } if(Class == Job_Soul_Linker) { unitskilluseid $@ltarget,461,5; } if(Class == Job_Taekwon || Class == Job_Star_Gladiator || Class == Job_Star_Gladiator2) { unitskilluseid $@ltarget,448,5; } set $@jugglink, 0; } if (strcharinfo(0) != _juggernaut$) { end; } } sleep2 1000; goto juggfollow; } } end; OnPCKillEvent: getmapxy(@checkmap$,@checkx,@checky,0); if (@checkmap$ == "pvp_n_1-3") { set $@pk, playerattached(); if (_juggernaut$ == strcharinfo(0)) { set @jugkill, @jugkill + 1; set #jugkill, #jugkill +1; set @towin, 20 - @jugkill; if (@towin == 0) { set $@juggend, 1; set $@juggtaken, 0; set @jugkill, 0; mapannounce "pvp_n_1-3", "Juggernaut: "+_juggernaut$+" has won the game!",0; set _juggernaut$, "-"; donpcevent "Juggernaut::OnEventGameOverJugg"; //mapwarp "pvp_n_1-3", #originmap$, (#originx), (#originy); end; } mapannounce "pvp_n_1-3", "The Juggernaut, "+_juggernaut$+" needs "+@towin+" kills to win.",0; } if (_juggernaut$ != strcharinfo(0)) { set #nonjuggkill, #nonjuggkill + 1; } if ($@pd == $@ltarget) { goto OnJuggChangeEvent; } } end; } - script healer::jugg_healer 829,{ if (@heal == 0) { percentheal 100,100; set @heal, 1; } if(Class == Job_Priest || Class == Job_High_Priest) { unitskilluseid getCharID(3),454,5; } } - script leave_jugg::escape_jugg 780,{ mes "[ The Juggernaut ]"; mes "Would you like to leave the Juggernaut event?"; menu "No",M_No,"Yes",M_Yes; M_Yes: save #originmap$, (#originx), (#originy); if (_juggernaut$ == strcharinfo(0)) { set _juggernaut$, "-"; set $@juggtaken, 0; mapannounce "pvp_n_1-3", "The Juggernaut has left the game.",0; atcommand "@die"; sleep2 500; atcommand "@alive"; percentheal 100,100; } set @jmapuser, getmapusers ("pvp_n_1-3"); if (@jmapuser == 1) { set _juggernaut$, "-"; set $@juggtaken, 0; movenpc "The Juggernaut",99,101; } for (set @i, 0; @i < getarraysize($@juggernaut); set @i, @i+1) { if ($@juggernaut[@i] == getcharid(3)) { setarray $@juggernaut[@i],0; break; } } for (; @i < getarraysize($@juggernaut); set @i, @i+1) { setarray $@juggernaut[@i], $@juggernaut[@i+1]; } warp #originmap$, (#originx), (#originy); end; M_No: mes "[ The Juggernaut ]"; mes "Ok, carry on."; close; } - script Juggernaut_client 810,{ //Alba's disabler -------------------------------------------------------------- // GM level 99 menu. if (getgmlevel() == 99) { mes "[Juggernaut GM Setup]"; mes "You can choose to enable/disable and/or warp out players. Status:"; if (.offline) { mes "^E00000OFFLINE^000000"; } else { mes "^00A000ONLINE^000000"; } menu "Continue",-,"Enable/Disable",-,"Warp Out",-,"Both",-; set @sel, @menu-1; if(@sel&1) set .offline, .offline^1; if(@sel&2) { getmapxy(@mapname$, @mapx, @mapy, 0, strcharinfo(0)); mapwarp "pvp_n_1-3", @mapname$, @mapx, @mapy; } } // If the NPC is offline, close. if (.offline) { mes "[The Juggernaut]"; mes "Sorry, but I'm disabled at the moment."; close; } //-------------------------------------------------------------------------- End set @jugguser, getmapusers ("pvp_n_1-3"); set @jugkill, 0; getmapxy(#originmap$,#originx,#originy,0,strcharinfo(0)); if (@jugguser == 0) { set _juggernaut$, "-"; set $@juggtaken, 0; movenpc "The Juggernaut",99,101; } if ($@juggend == 1) { mes "[The Juggernaut]"; mes "Welcome to the Juggernaut."; mes ""; mes "A game just ended please try again in 5 seconds."; close; end; } mes "[The Juggernaut]"; mes "Welcome to the Juggernaut."; mes ""; mes "There are "+@jugguser+" players currently in the game."; mes ""; mes "Would you like to join?"; menu "Yes",yes,"No",-; mes " "; mes "Come back when you get some balls!"; close; yes: set @ijugg, getarraysize($@juggernaut); setarray $@juggernaut[@ijugg], getcharid(3); set $@spawn, $@spawn + 1; if ($@spawn == 1) { warp "pvp_n_1-3",99,58; save "pvp_n_1-3",99,58; } if ($@spawn == 2) { warp "pvp_n_1-3",60,100; save "pvp_n_1-3",60,100; } if ($@spawn == 3) { warp "pvp_n_1-3",100,138; save "pvp_n_1-3",100,138; } if ($@spawn == 4) { warp "pvp_n_1-3",140,99; save "pvp_n_1-3",140,99; } if ($@spawn == 5) { warp "pvp_n_1-3",111,110; save "pvp_n_1-3",111,110; } if ($@spawn == 6) { warp "pvp_n_1-3",112,88; save "pvp_n_1-3",112,88; } if ($@spawn == 7) { warp "pvp_n_1-3",87,88; save "pvp_n_1-3",87,88; } if ($@spawn == 8) { warp "pvp_n_1-3",87,113; save "pvp_n_1-3",87,113; set $@spawn, 0; } percentheal 100,100; end; } // ====== Mapflags pvp_n_1-3 mapflag nomemo pvp_n_1-3 mapflag noreturn pvp_n_1-3 mapflag restricted 6 // ====== Duplicates //pvp_n_1-3,116,83,5 duplicate(jugg_healer) Healer#1 829 //pvp_n_1-3,115,116,5 duplicate(jugg_healer) Healer#2 829 //pvp_n_1-3,138,108,5 duplicate(jugg_healer) Healer#3 829 //pvp_n_1-3,100,146,5 duplicate(jugg_healer) Healer#4 829 //pvp_n_1-3,83,116,5 duplicate(jugg_healer) Healer#5 829 //pvp_n_1-3,60,106,5 duplicate(jugg_healer) Healer#6 829 //pvp_n_1-3,83,83,5 duplicate(jugg_healer) Healer#7 829 //pvp_n_1-3,100,52,5 duplicate(jugg_healer) Healer#8 829 pvp_n_1-3,103,52,5 duplicate(escape_jugg) Leave Game#1 780 pvp_n_1-3,140,92,5 duplicate(escape_jugg) Leave Game#2 780 pvp_n_1-3,96,140,5 duplicate(escape_jugg) Leave Game#3 780 pvp_n_1-3,59,92,5 duplicate(escape_jugg) Leave Game#4 780 //pvp_n_1-3,53,98,4 duplicate(Grendal) Repair NPC#1 813 //pvp_n_1-3,93,59,4 duplicate(Grendal) Repair NPC#2 813 //pvp_n_1-3,147,99,4 duplicate(Grendal) Repair NPC#3 813 //pvp_n_1-3,107,138,4 duplicate(Grendal) Repair NPC #4 813 // Main Warper morocc,164,97,4 duplicate(Juggernaut_client) Juggernaut#1 810 geffen,128,62,4 duplicate(Juggernaut_client) Juggernaut#2 810 payon,192,111,4 duplicate(Juggernaut_client) Juggernaut#3 810 alberta,129,53,4 duplicate(Juggernaut_client) Juggernaut#4 810 izlude,131,120,4 duplicate(Juggernaut_client) Juggernaut#5 810 Quote Link to comment Share on other sites More sharing options...
Capuche Posted March 10, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted March 10, 2013 It's not the script. Check your mapflag nightmare conf/mapflag/nightmare.txt pvp_n_1-3 mapflag pvp_nightmaredrop random,equip,300 1 Quote Link to comment Share on other sites More sharing options...
Saisho Posted March 13, 2013 Group: Members Topic Count: 52 Topics Per Day: 0.01 Content Count: 185 Reputation: 20 Joined: 01/06/13 Last Seen: November 11, 2018 Author Share Posted March 13, 2013 i completely forgot about that >< thx Capuche another thing im having problems idk if its the script or not, when the game ends the last person to leave the map get dced and stuck for some reason and cant log back in. after check the char was saved in the sql w/ 0 hp left and is only able to relog after change the amount of hp to a positive value. any idea why this happen? there was some other crashes but i think wasnt related to to this and the relog had no problems Quote Link to comment Share on other sites More sharing options...
hyuna Posted April 5, 2013 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 144 Reputation: 4 Joined: 10/28/12 Last Seen: November 29, 2014 Share Posted April 5, 2013 (edited) @Saisho...yep ur right...tested it with 2 players and after the players have been teleported...the loser/last one to get tele out of the map cant be healed by healer/cant relog and must need to be edited n the char table(sql 0->1 or any value) can't find why Edited April 5, 2013 by hyuna Quote Link to comment Share on other sites More sharing options...
Capuche Posted April 19, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted April 19, 2013 I didn't find why too... but I cleaned this version and it seems the bug disappeared - script Juggernaut -1,{ // GM Menu // ------- if ( getgmlevel() >= 99 ) { mes .npc_name$; mes "You can choose to:"; mes "- enable/disable the enter,"; mes "- warp out players."; mes " "; mes "Enter Status: "+ ( .offline ? "^E00000OFFLINE^000000" : "^00A000ONLINE^000000" ); next; set .@sel, select( "^ff0000Player menu", "^777777~ "+ ( .offline ? "Enable" : "Disable" ), "~ Warp Out", "~ "+ ( .offline ? "Enable" : "Disable" ) +" + Warp Out^000000" ) -1; if( .@sel != 0 ) { if( .@sel&1 ) set .offline, .offline^1; if( .@sel&2 ) { getmapxy .@map$, .@x, .@y, 0; mapwarp "pvp_n_1-3", .@map$, .@x, .@y; } mes .npc_name$; mes "Done."; close; } } // Player menu // ----------- if ( .offline ) { mes .npc_name$; mes "Sorry, but I'm disabled at the moment."; close; } set .@jugg_user, getmapusers( "pvp_n_1-3" ); if ( .@jugg_user == 0 ) { set $@_juggernaut$, ""; movenpc "The Juggernaut",99,101; deletearray $@juggernaut; } if ( getvariableofnpc( .jugg_end, "The Juggernaut" ) == 1 ) { mes .npc_name$; mes "Welcome to the Juggernaut."; mes ""; mes "A game just ended please try again in 5 seconds."; close; } mes .npc_name$; mes "Welcome to the Juggernaut."; mes ""; mes "There are ^ff0000"+ .@jugg_user +"^000000 player(s) currently in the game."; mes ""; mes "Would you like to join?"; next; if( select( "- Yes", "- No" ) -1 ) { mes .npc_name$; mes "Come back when you want!"; close; } set @jugkill, 0; set @heal, 0; getmapxy #originmap$, #originx, #originy,0; set .@size_jug, getarraysize( $@juggernaut ); setarray $@juggernaut[ .@size_jug ], getcharid(3); warp "pvp_n_1-3", .coord_x[ .spawn ], .coord_y[ .spawn ]; save "pvp_n_1-3", .coord_x[ .spawn ], .coord_y[ .spawn ]; set .spawn, .spawn +1; if ( .spawn == 8 ) set .spawn, 0; percentheal 100,100; end; OnInit: set .npc_name$, "[ Juggernaut ]"; setarray .coord_x, 99, 60, 100, 140, 111, 112, 87, 87; setarray .coord_y, 58, 100, 138, 99, 110, 88, 88, 113; end; } pvp_n_1-3,99,101,4 script The Juggernaut 1198,{ if ( strcharinfo(0) != $@_juggernaut$ && $@_juggernaut$ != "" ) end; npcspeed 100; if ( $@_juggernaut$ == "" ) { OnJuggChangeEvent: set $@_juggernaut$, strcharinfo(0); announce "[ "+ $@_juggernaut$ +" ] is the Juggernaut!#@?%@?",bc_map; set .@acc_id, getcharid(3); set .@eac, eaclass(); while ( .@i < .size_job_type && .@eac&EAJ_UPPERMASK != .job_type[.@i] ) set .@i, .@i +1; unitskilluseid .@acc_id, .skill_id[.@i +1], 5; set .@job, .@i +1; set .@juggbuff, 9; } while ( strcharinfo(0) == $@_juggernaut$ && strcharinfo(3) == "pvp_n_1-3" ) { getmapxy .@map$, .@x, .@y, 0; getmapxy .@map_npc$, .@x_npc, .@y_npc, 1; if( distance( .@x, .@y, .@x_npc, .@y_npc ) > 15 ) movenpc "The Juggernaut", .@x, .@y; npcwalkto ( .@x +2 ), ( .@y +2 ); set .@juggbuff, .@juggbuff + 1; set .@jugglink, .@jugglink + 1; percentheal 2,3; if ( .@juggbuff == 10 ) { sc_start SC_BLESSING,11000, .bless_lvl[ .@job ]; skilleffect 34,0; sc_start SC_INCREASEAGI,11000, .agi_lvl[ .@job ]; skilleffect 29,0; sc_start SC_IMPOSITIO,11000,10; skilleffect 66,0; sc_start SC_SUFFRAGIUM,11000,10; skilleffect 67,0; sc_start SC_ADRENALINE2,11000,5; sc_start SC_WEAPONPERFECTION,11000,5; sc_start SC_OVERTHRUST,11000,5; sc_start SC_MAXIMIZEPOWER,11000,5; sc_start SC_ASSUMPTIO,11000,5; skilleffect 361,0; set .@juggbuff, 0; } if ( .@jugglink == 20 ) { unitskilluseid .@acc_id, .skill_id[ .@job ], 5; set .@jugglink, 0; } sleep2 1000; } end; L_EndEvent: set .@size_jug, getarraysize( $@juggernaut ); for ( set .@j, 0; .@j < .@size_jug; set .@j, .@j +1 ) { attachrid $@juggernaut[ .@j ]; sleep2 1; callsub L_Quit; } deletearray $@juggernaut, .@size_jug; sleep2 5000; set .jugg_end, 0; movenpc "The Juggernaut",99,101; end; OnPCKillEvent: if ( strcharinfo(3) != "pvp_n_1-3" ) end; if ( $@_juggernaut$ == rid2name( killedrid ) && $@_juggernaut$ != strcharinfo(0) ) { mapannounce "pvp_n_1-3", "The Juggernaut has fallen!",0; doevent "The Juggernaut::OnJuggChangeEvent"; } else if ( $@_juggernaut$ == strcharinfo(0) ) { set @jugkill, @jugkill + 1; set @towin, 20 - @jugkill; if ( @towin == 0 ) { set .jugg_end, 1; set @jugkill, 0; mapannounce "pvp_n_1-3", "Juggernaut: [ "+ $@_juggernaut$ +" ] has won the game!",0; set $@_juggernaut$, ""; goto L_EndEvent; } else mapannounce "pvp_n_1-3", "The Juggernaut, [ "+ $@_juggernaut$ +" ] needs "+ @towin +" kills to win.",0; } attachrid( killedrid ); set @heal, 0; if ( .jugg_end == 1 ) end; sleep2 1000; set .@newsave, rand( 1,5 ); if ( .@newsave == 1 ) warp "pvp_n_1-3", rand(53,96), rand(97,102); else if ( .@newsave == 2 ) warp "pvp_n_1-3", rand(97,102), rand(101,144); else if ( .@newsave == 3 ) warp "pvp_n_1-3", rand(102,152), rand(97,102); else if ( .@newsave == 4 ) warp "pvp_n_1-3", rand(97,102), rand(55,95); else if ( .@newsave == 5 ) warp "pvp_n_1-3", rand(83,112), rand(83,89); sleep2 500; percentheal 100,100; end; OnPCLogoutEvent: if ( strcharinfo(3) != "pvp_n_1-3" ) end; if ( $@_juggernaut$ == strcharinfo(0) ) { set $@_juggernaut$, ""; mapannounce "pvp_n_1-3", "The Juggernaut has left the game.",0; } if ( getmapusers( "pvp_n_1-3" ) == 1 ) { set $@_juggernaut$, ""; movenpc "The Juggernaut",99,101; } while ( getarraysize( $@juggernaut ) && .@i < getarraysize( $@juggernaut ) && $@juggernaut[@i] != getcharid(3) ) set .@i, .@i +1; if( .@i != getarraysize( $@juggernaut ) ) deletearray $@juggernaut[ .@i ], 1; callsub L_Quit, 1; L_Quit: for ( set .@j, 0; .@j < .size_sc_name; set .@j, .@j +1 ) sc_end .sc_name[ .@j ]; if ( #originmap$ == "" ) set #originmap$, "prontera"; save #originmap$, #originx, #originy; warp #originmap$, #originx, #originy; percentheal 100,100; set #originmap$, ""; set #originx, 0; set #originy, 0; set @heal, 0; if( getarg( 0,0 ) ) end; return; OnInit: setarray .job_type, EAJ_ALCHEMIST, EAJ_MONK, EAJ_SAGE, EAJ_CRUSADER, EAJ_SUPER_NOVICE, EAJ_KNIGHT, EAJ_WIZARD, EAJ_PRIEST, EAJ_BARDDANCER, EAJ_ROGUE, EAJ_ASSASSIN, EAJ_BLACKSMITH, EAJ_HUNTER, EAJ_SOUL_LINKER, EAJ_STAR_GLADIATOR, EAJ_TAEKWON; set .size_job_type, getarraysize( .job_type ); setarray .skill_id, 445, 447, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 460, 461, 448; setarray .bless_lvl, 30, 40, 50, 50, 50, 40, 50, 50, 40, 44, 40, 40, 40, 100, 40; setarray .agi_lvl, 10, 10, 20, 10, 30, 40, 10, 10, 20, 20, 10, 40, 40, 10, 20; setarray .sc_name, SC_BLESSING, SC_INCREASEAGI, SC_ASSUMPTIO, SC_OVERTHRUST, SC_WEAPONPERFECTION, SC_MAXIMIZEPOWER, SC_ADRENALINE2, SC_IMPOSITIO, SC_SUFFRAGIUM; set .size_sc_name, getarraysize( .sc_name ); // Reloadscript case // ----------------- set .@size, query_sql( "SELECT `account_id` FROM `char` WHERE `online` = 1 LIMIT 128", .@account_id ); for ( set .@j, 0; .@j < .@size; set .@j, .@j +1 ) { getmapxy .@map$, .@x, .@y, 0, rid2name( .@account_id[ .@j ] ); if( .@map$ == "pvp_n_1-3" ) { attachrid .@account_id[ .@j ]; callsub L_Quit; } } end; } // Healer // ------ - script healer::jugg_healer 829,{ if ( @heal == 0 ) { percentheal 100,100; set @heal, 1; } if ( eaclass()&EAJ_UPPERMASK == EAJ_PRIEST ) unitskilluseid getcharid(3),454,5; end; } // NPC leave // --------- - script leave_jugg::escape_jugg 780,{ mes .npc_name$; mes "Would you like to leave the Juggernaut event ?"; next; if ( select( "^777777~ No", "~ Yes^000000" ) == 1 ) { mes .npc_name$; mes "Ok, carry on."; close; } doevent "The Juggernaut::OnPCLogoutEvent"; end; OnInit: set .npc_name$, "[ Juggernaut ]"; end; } // ====== Mapflags pvp_n_1-3 mapflag nomemo pvp_n_1-3 mapflag noreturn pvp_n_1-3 mapflag restricted 6 // ====== Duplicates //pvp_n_1-3,116,83,5 duplicate(jugg_healer) Healer#1 829 //pvp_n_1-3,115,116,5 duplicate(jugg_healer) Healer#2 829 //pvp_n_1-3,138,108,5 duplicate(jugg_healer) Healer#3 829 //pvp_n_1-3,100,146,5 duplicate(jugg_healer) Healer#4 829 //pvp_n_1-3,83,116,5 duplicate(jugg_healer) Healer#5 829 //pvp_n_1-3,60,106,5 duplicate(jugg_healer) Healer#6 829 //pvp_n_1-3,83,83,5 duplicate(jugg_healer) Healer#7 829 //pvp_n_1-3,100,52,5 duplicate(jugg_healer) Healer#8 829 pvp_n_1-3,103,52,5 duplicate(escape_jugg) Leave Game#1 780 pvp_n_1-3,140,92,5 duplicate(escape_jugg) Leave Game#2 780 pvp_n_1-3,96,140,5 duplicate(escape_jugg) Leave Game#3 780 pvp_n_1-3,59,92,5 duplicate(escape_jugg) Leave Game#4 780 // pvp_n_1-3,53,98,4 duplicate(Grendal) Repair NPC#1 813 // pvp_n_1-3,93,59,4 duplicate(Grendal) Repair NPC#2 813 // pvp_n_1-3,147,99,4 duplicate(Grendal) Repair NPC#3 813 // pvp_n_1-3,107,138,4 duplicate(Grendal) Repair NPC #4 813 // Main Warper prontera,163,195,4 duplicate(Juggernaut) Juggernaut#0 810 morocc,164,97,4 duplicate(Juggernaut) Juggernaut#1 810 geffen,128,62,4 duplicate(Juggernaut) Juggernaut#2 810 payon,175,107,4 duplicate(Juggernaut) Juggernaut#3 810 alberta,122,58,4 duplicate(Juggernaut) Juggernaut#4 810 izlude,131,120,4 duplicate(Juggernaut) Juggernaut#5 810 Quote Link to comment Share on other sites More sharing options...
Pinoy Fury Posted July 10, 2013 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 37 Reputation: 2 Joined: 11/20/11 Last Seen: April 10, 2020 Share Posted July 10, 2013 It is because the player is dead and was warped. The player must be resurrected first before warping it back. Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 10, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 10, 2013 It is because the player is dead and was warped. The player must be resurrected first before warping it back. nope a player warped is automatically rez, it was a bug with attachrid http://rathena.org/board/tracker/issue-7607-the-walking-dead/?gopid=19634#entry19634 Quote Link to comment Share on other sites More sharing options...
Question
Saisho
i was playing w/ this script when i noticed it acts like pvp nightmare but i cant find what do that. can someone point or fix it as normal pvp plz? :3
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.