Jump to content

Scofield

Members
  • Posts

    265
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Scofield

  1. I have this 1x1 duel script, I wanted to leave it 7x7 // ============================================================================== // BattleGround System - KvM 1~59 // ============================================================================== // Registration NPC's // ********************************************************************* prontera,138,223,5 script Time Guillaume::KvM04R_Guillaume 418,{ // KvM Guillaume mes "[^0000FFGuillaume^000000]"; mes "^0000FFEntre no Chat^000000 para duelar contra outro jogador."; close; OnInit: waitingroom "Duelo! [1x1]",1,"KvM04_BG::OnGuillaumeJoin",1; end; OnEnterBG: set $@KvM04BG_id1, waitingroom2bg("bat_c01",53,128,0,"KvM04_BG::OnGuillaumeQuit","KvM04_BG::OnGuillaumeDie"); end; } prontera,140,225,5 script Time Croix::KvM04R_Croix 414,{ // KvM Croix mes "[^FF0000Croix^000000]"; mes "^FF0000Entre no Chat^000000 para duelar contra outro jogador."; close; OnInit: waitingroom "Duelo! [1x1]",1,"KvM04_BG::OnCroixJoin",1; end; OnEnterBG: set $@KvM04BG_id2, waitingroom2bg("bat_c01",146,55,1,"KvM04_BG::OnCroixQuit","KvM04_BG::OnCroixDie"); end; } // Light Effects // ********************************************************************* bat_c01,54,123,0 script #bat_c01a 111,{ end; OnKvM04LightA: misceffect 54; end; OnKvM04LightB: misceffect 55; end; OnKvM04LightC: misceffect 56; end; } bat_c01,56,125,0 duplicate(#bat_c01a) #bat_c01b 111 bat_c01,58,127,0 duplicate(#bat_c01a) #bat_c01c 111 bat_c01,141,56,0 duplicate(#bat_c01a) #bat_c01d 111 bat_c01,143,58,0 duplicate(#bat_c01a) #bat_c01e 111 bat_c01,145,60,0 duplicate(#bat_c01a) #bat_c01f 111 // Battleground Engine // ********************************************************************* - script KvM04_BG -1,{ end; OnInit: setwall "bat_c01",54,122,6,7,0,"batc04wall_a"; setwall "bat_c01",55,122,5,7,0,"batc04wall_b"; setwall "bat_c01",140,56,6,7,0,"batc04wall_c"; setwall "bat_c01",140,57,5,7,0,"batc04wall_d"; disablenpc "TherapistKvM04a"; disablenpc "TherapistKvM04b"; disablenpc "VintenarKvM04a"; disablenpc "VintenarKvM04b"; end; OnGuillaumeJoin: OnCroixJoin: donpcevent "KvM04_BG::OnReadyCheck"; end; OnGuillaumeQuit: OnGuillaumeDie: if( $@KvM04BG == 2 ) { getmapxy .@m$, .@x, .@y, 0; if( .@m$ != "bat_c01" || (.@x >= 50 && .@x <= 58 && .@y >= 123 && .@y <= 131) ) end; // Killed/Logout on Cementery or outside the map? set .Guillaume_Count, .Guillaume_Count - 1; set .Croix_Score, .Croix_Score + 1; bg_updatescore "bat_c01",.Guillaume_Score,.Croix_Score; if( .Guillaume_Count < 1 ) donpcevent "KvM04_BG::OnCroixWin"; } end; OnCroixQuit: OnCroixDie: if( $@KvM04BG == 2 ) { getmapxy .@m$, .@x, .@y, 0; if( .@m$ != "bat_c01" || (.@x >= 141 && .@x <= 149 && .@y >= 52 && .@y <= 60) ) end; // Killed/Logout on Cementery or outside the map? set .Croix_Count, .Croix_Count - 1; set .Guillaume_Score, .Guillaume_Score + 1; bg_updatescore "bat_c01",.Guillaume_Score,.Croix_Score; if( .Croix_Count < 1 ) donpcevent "KvM04_BG::OnGuillaumeWin"; } end; OnReadyCheck: if( $@KvM04BG ) end; // if( gettime(3) < 16 || gettime(3) > 22 ) // end; // 4 to 11 p.m. if( set(.@Guillaume, getwaitingroomstate(6,"KvM04R_Guillaume")) > 0 ) set $@KvM04_GU$, $@waitingroommembers$[0]; if( set(.@Croix, getwaitingroomstate(6,"KvM04R_Croix")) > 0 ) set $@KvM04_CU$, $@waitingroommembers$[0]; if( .@Guillaume < 1 || .@Croix < 1 ) { // Not enough players to start set .@Announce$, "Duelo! [1x1] - "; if( .@Guillaume ) set .@Announce$, .@Announce$ + "<" + $@KvM04_GU$ + "> VS < >"; else if( .@Croix ) set .@Announce$, .@Announce$ + "< > VS <" + $@KvM04_CU$ + ">"; else set .@Announce$, .@Announce$ + "A Arena está liberada."; if( !agitcheck() && $@KvM_Flood < gettimetick(2) ) { announce .@Announce$,0,0xffff00; set $@KvM_Flood, gettimetick(2) + 15; } else mapannounce .@Announce$,1,0xffff00; end; } set $@KvM04BG, 1; // Starting donpcevent "KvM04R_Croix::OnEnterBG"; donpcevent "KvM04R_Guillaume::OnEnterBG"; donpcevent "KvM04_BG::OnStart"; end; OnStart: announce "Duelo! [1x1] <" + $@KvM04_GU$ + "> VS <" + $@KvM04_CU$ + "> começou!",0,0xffff00; enablenpc "TherapistKvM04a"; enablenpc "TherapistKvM04b"; disablenpc "VintenarKvM04a"; disablenpc "VintenarKvM04b"; set $@KvM04BG_Victory, 0; sleep 2000; // Warp Teams bg_warp $@KvM04BG_id1,"bat_c01",53,128; bg_warp $@KvM04BG_id2,"bat_c01",146,55; // ScoreBoard set .Guillaume_Score, 0; set .Croix_Score, 0; initnpctimer; end; OnTimer5000: areapercentheal "bat_c01",50,123,58,131,100,100; areapercentheal "bat_c01",141,52,149,60,100,100; mapannounce "bat_c01","Duelo! [1x1] - A Batalha começará em 25 segundos!",1,0xffff00; end; OnTimer26000: mapannounce "bat_c01","Duelo! [1x1] - A Batalha começará em 4 segundos!",1,0xffff00; end; OnTimer27000: donpcevent "::OnKvM04LightA"; end; OnTimer28000: donpcevent "::OnKvM04LightB"; end; OnTimer29000: donpcevent "::OnKvM04LightC"; end; OnTimer30000: // Team Members set .Guillaume_Count, bg_get_data($@KvM04BG_id1, 0); set .Croix_Count, bg_get_data($@KvM04BG_id2, 0); if( .Guillaume_Count < 1 || .Croix_Count < 1 ) { set $@KvM04BG_Victory, 3; set $@KvM04BG, 3; set .@Announce$, "Duelo! [1x1] - "; if( .Guillaume_Count < 1 && .Croix_Count < 1 ) set .@Announce$, "<" + $@KvM04_GU$ + "> VS <" + $@KvM04_CU$ + "> cancelado."; else if( .Guillaume_Count < 1 ) set .@Announce$, "<" + $@KvM04_CU$ + "> está com medo de <" + $@KvM04_GU$ + ">..."; else if( .Croix_Count < 1 ) set .@Announce$, "<" + $@KvM04_GU$ + "> está com medo de <" + $@KvM04_CU$ + ">..."; announce .@Announce$,0,0xffff00; stopnpctimer; sleep 2000; donpcevent "KvM04_BG::OnStop"; end; } set $@KvM04BG, 2; // Playing areapercentheal "bat_c01",50,123,58,131,100,100; bg_warp $@KvM04BG_id1,"bat_c01",62,119; areapercentheal "bat_c01",141,52,149,60,100,100; bg_warp $@KvM04BG_id2,"bat_c01",137,64; end; OnTimer32000: mapannounce "bat_c01","Duelo! [1x1] começou!!",1,0xffff00; end; OnTimer300000: mapannounce "bat_c01","Duelo! [1x1] - A Batalha acabará em 30 segundos.",1,0xffff00; end; OnTimer330000: if( .Croix_Count > .Guillaume_Count ) donpcevent "KvM04_BG::OnCroixWin"; else if( .Croix_Count < .Guillaume_Count ) donpcevent "KvM04_BG::OnGuillaumeWin"; else { // Draw Game set $@KvM04BG, 3; set $@KvM04BG_Victory, 3; stopnpctimer; sleep 2000; announce "Duelo! [1x1] - <" + $@KvM04_GU$ + "> VS <" + $@KvM04_CU$ + "> terminou em EMPATE.",0,0xffff00; donpcevent "KvM04_BG::OnStop"; } end; OnGuillaumeWin: set $@KvM04BG, 3; set $@KvM04BG_Victory, 1; stopnpctimer; sleep 2000; announce "Duelo! [1x1] - <" + $@KvM04_GU$ + "> foi o VENCEDOR! <" + $@KvM04_CU$ + "> perdeu.",0,0xffff00; donpcevent "KvM04_BG::OnStop"; end; OnCroixWin: set $@KvM04BG, 3; set $@KvM04BG_Victory, 2; stopnpctimer; sleep 2000; announce "Duelo! [1x1] - <" + $@KvM04_CU$ + "> foi o VENCEDOR! <" + $@KvM04_GU$ + "> perdeu.",0,0xffff00; donpcevent "KvM04_BG::OnStop"; end; OnStop: disablenpc "TherapistKvM04a"; disablenpc "TherapistKvM04b"; enablenpc "VintenarKvM04a"; enablenpc "VintenarKvM04b"; // Warp Teams bg_warp $@KvM04BG_id1,"bat_c01",53,128; bg_warp $@KvM04BG_id2,"bat_c01",146,55; donpcevent "KvM04_BG_Out::OnBegin"; end; OnReset: stopnpctimer; stopnpctimer "KvM04_BG_Out"; set .Croix_Count, 0; set .Guillaume_Count, 0; set .Croix_Score, 0; set .Guillaume_Score, 0; set $@KvM04_GU$, ""; set $@KvM04_CU$, ""; set $@KvM04BG_Victory, 0; if( $@KvM04BG_id1 ) { bg_destroy $@KvM04BG_id1; set $@KvM04BG_id1, 0; } if( $@KvM04BG_id2 ) { bg_destroy $@KvM04BG_id2; set $@KvM04BG_id2, 0; } disablenpc "TherapistKvM04a"; disablenpc "TherapistKvM04b"; disablenpc "VintenarKvM04a"; disablenpc "VintenarKvM04b"; sleep 1000; mapwarp "bat_c01","prontera",155,181; sleep 2000; maprespawnguildid "bat_c01",0,3; // Just in case someone else bg_updatescore "bat_c01",0,0; sleep 2000; set $@KvM04BG, 0; donpcevent "KvM04_BG::OnReadyCheck"; // Maybe a game is ready to start end; } - script KvM04_BG_Out -1,{ end; OnBegin: initnpctimer; end; OnTimer3000: mapannounce "bat_c01","Duelo! [1x1] fechará em 2 minutos!",1,0xffff00; end; OnTimer90000: mapannounce "bat_c01","Duelo! [1x1] fechará em 30 segundos!",1,0xffff00; end; OnTimer110000: mapannounce "bat_c01","Duelo! [1x1] fechará em 10 segundos!",1,0xffff00; end; OnTimer120000: OnClock1600: donpcevent "KvM04_BG::OnReset"; end; } // Battleground Therapist // ********************************************************************* bat_c01,51,130,5 script Treinador::TherapistKvM04a 95,{ mes "[Treinador]"; mes "Apenas respire fundo e lute. Você conseguirá vencer!"; specialeffect2 312; close; } bat_c01,148,53,1 script Treinador::TherapistKvM04b 95,{ mes "[Treinador]"; mes "Apenas respire fundo e lute. Você conseguirá vencer!"; specialeffect2 312; close; } // Battleground rewards // ********************************************************************* bat_c01,51,130,5 script Guillaume Vintenar::VintenarKvM04a 419,{ if( $@KvM04BG_Victory ) { if( $@KvM04BG_Victory == 3 ) { bg_leave; warp "prontera",134,120; end; } else if( $@KvM04BG_Victory == Bat_Team ) { // Victory bg_leave; warp "prontera",155,181; end; } else { // bg_leave; warp "prontera",155,181; end; } bg_leave; warp "prontera",155,181; end; } end; } bat_c01,148,53,1 script Croix Vintenar::VintenarKvM04b 415,{ if( $@KvM04BG_Victory ) { if( $@KvM04BG_Victory == 3 ) { bg_leave; warp "prontera",155,181; end; } else if( $@KvM04BG_Victory == Bat_Team ) { // Victory bg_leave; warp "prontera",155,181; end; } else { // bg_leave; warp "prontera",155,181; end; } bg_leave; warp "prontera",155,181; end; } end; } // MapFlags // ********************************************************************* bat_c01 mapflag battleground 2 bat_c01 mapflag nomemo bat_c01 mapflag nosave SavePoint bat_c01 mapflag noteleport bat_c01 mapflag nowarp bat_c01 mapflag nowarpto bat_c01 mapflag noreturn bat_c01 mapflag nobranch bat_c01 mapflag nopenalty
  2. Hello, I have a question, I am a few hours checking these lines of code trying to understand what it is, ud-> canmove_tick + = 3 * speed / 5; // is this part the speed of animation? skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); if(unit_walktoxy(src, dx, dy, 2) && ud) { //Increase can't walk delay to not alter your walk path ud->canmove_tick = tick; speed = status_get_speed(src); for (i = 0; i < ud->walkpath.path_len; i ++) { if(ud->walkpath.path[i]&1) ud->canmove_tick+=3*speed/5; else ud->canmove_tick+=speed; } } } break;
  3. I want you not to be allowed to create an account with the same use <?php error_reporting(0); include('connect.php'); $usuario = $_POST['user']; $senha = $_POST['pass']; $senha2 = $_POST['conf']; $gen = $_POST['genero']; $email = $_POST['mail']; if (isset($senha)){ //Verifica se já existe um email no banco de dados $cons = "SELECT email FROM login WHERE email='".$email."'"; $sql = mysql_query($cons); $res = mysql_fetch_array($sql); $verifica = $res['email']; if($veririca != ""){ // condição. se existir um email ja cadastrado, não pode proceguir echo "<script>alert('Desculpe mais me parece que este e-mail ja esta em uso!')</script>"; }else{ if($senha != $senha2){ // Confirmação de senha (validação) echo "<script>alert('Desculpe mais me parece que suas senhas estao incorretas!')</script>"; }else{ //Procedimento de cadastro $cad = "INSERT INTO login (userid,user_pass,sex,email) VALUES ('".$usuario."','".$senha."','".$gen."','".$email."')"; $c_cad = mysql_query($cad); if ($cad) { echo "<script>alert('Cadastro efetuado com sucesso!')</script>"; #echo "<meta http-equiv=\"refresh\" content=\"1; url:index.php\" />"; } } } }else{ #echo "<p style=\"color: #E40D6B; font-size: 12px; font-family: verdana,arial; font-weight: bold; text-align: center;\";>Preencha seus dados!</p>"; } ?>
  4. Hello, I would like to know if there is any npc that shows the ranking of the top damage of each class. example: Name: John Class: monk: damage: 7890000
  5. Hello, I wanted to change use an old emulator, Freya, but when I go to build the hundreds this error .. ./configure Checking for platform... Linux Checking whether build environment is sane... Checking whether make sets $(MAKE) ... yes Checking for gcc... ./configure: line 323: which: command not found ./configure: line 323: which: command not found ./configure: line 323: which: command not found ./configure: line 323: which: command not found ./configure: line 323: which: command not found ./configure: line 323: which: command not found not found -bash-3.2# line 323: fi if [ x$CC != x ]; then CCLIST="$CC $CCLIST" fi CC="" for foo in $CCLIST; do XCC=`which $foo` if [ x$XCC = x ]; then : else CC="$XCC" echo $CC break 2 fi done if [ x$CC = x ]; then if anyone can help me I will be very grateful gethub: https://github.com/flaviojs/freya
  6. Just solve. map/status.c // Parse equipment. for(i=0;i<EQI_MAX;i++) { to change // Parse equipment. for(i=0;i<EQI_MAX_BONUS;i++) {
  7. The problem is that the costumeitem items should not give attributes when they were appointed, but in my costomes the emulator are giving when they are transformed into costumeitem written excuse is that I am Brazilian and I'm using google translator
  8. Items that are being transformed into visual this taking the stataus and effects, I wonder how to solve it
  9. [Error]: script_rid2sd: fatal error ! player not attached! [Debug]: Function: set (2 parameters): [Debug]: Data: variable name='@premio_sortudo' index=0 [Debug]: Data: number value=2 [Debug]: Source (NPC): Tesouro (invisible/not on a map) [Error]: script:set: no player attached for player variable '@premio_sortudo' [Error]: script_rid2sd: fatal error ! player not attached! [Debug]: Function: set (2 parameters): [Debug]: Data: variable name='@premio_sortudo' index=0 [Debug]: Data: number value=1 [Debug]: Source (NPC): Tesouro (invisible/not on a map) [Error]: script:set: no player attached for player variable '@premio_sortudo' [Error]: script_rid2sd: fatal error ! player not attached! [Debug]: Function: set (2 parameters): [Debug]: Data: variable name='@premio_sortudo' index=0 [Debug]: Data: number value=2 [Debug]: Source (NPC): Tesouro (invisible/not on a map) [Error]: script:set: no player attached for player variable '@premio_sortudo' [Error]: script_rid2sd: fatal error ! player not attached! [Debug]: Function: set (2 parameters): [Debug]: Data: variable name='@premio_sortudo' index=0 [Debug]: Data: number value=2 [Debug]: Source (NPC): Tesouro (invisible/not on a map) [Error]: script:set: no player attached for player variable '@premio_sortudo' Script prontera,144,227,5 script Sortudo 106,{ set .n$, "[ Sortudo ]"; if (getgmlevel() > 9 && getgmlevel() < 99) { mes .n$; mes "Você não pode participar !"; close; } mes "Olá "+ strcharinfo(0) +"!"; mes "Bem-Vindo ao Evento Sortudo."; next; mes "Deseja entrar?"; switch(select("- Sim, entrar no evento.", "- Não, talvez depois.")) { case 1: if($portao_sortudo == FALSE){ next; mes .n$; mes "O Evento está fechado !"; close; } mes .n$; mes "Boa sorte durante o evento !"; close2; set @rand_sortudo, rand(1,4); if(@rand_sortudo == 1){warp "quiz_02",37,52; end;} if(@rand_sortudo == 2){warp "quiz_02",49,52; end;} if(@rand_sortudo == 3){warp "quiz_02",60,52; end;} if(@rand_sortudo == 4){warp "quiz_02",73,52; end;} dispbottom "Você está dentro do Evento Sortudo! Boa Sorte!"; end; case 2: close; end; } OnClock0600: set $portao_sortudo,1; announce "O Evento 'Sortudo' irá começar, vocês só tem 3 minutos !",bc_yellow; end; OnClock0603: set $portao_sortudo,0; announce "Os portões para o evento foram fechados, PvP ativado, o sobrevivente será o vencedor !",bc_yellow; end; OnClock0800: set $portao_sortudo,1; announce "O Evento 'Sortudo' irá começar, vocês só tem 3 minutos !",bc_yellow; end; OnClock0803: set $portao_sortudo,0; announce "Os portões para o evento foram fechados, PvP ativado, o sobrevivente será o vencedor !",bc_yellow; end; OnClock1600: set $portao_sortudo,1; announce "O Evento 'Sortudo' irá começar, vocês só tem 3 minutos !",bc_yellow; end; OnClock1603: set $portao_sortudo,0; announce "Os portões para o evento foram fechados, PvP ativado, o sobrevivente será o vencedor !",bc_yellow; end; OnClock2000: set $portao_sortudo,1; announce "O Evento 'Sortudo' irá começar, vocês só tem 3 minutos !",bc_yellow; end; OnClock2003: set $portao_sortudo,0; announce "Os portões para o evento foram fechados, PvP ativado, o sobrevivente será o vencedor !",bc_yellow; end; OnClock2200: set $portao_sortudo,1; announce "O Evento 'Sortudo' irá começar, vocês só tem 3 minutos !",bc_yellow; end; OnClock2203: set $portao_sortudo,0; announce "Os portões para o evento foram fechados, PvP ativado, o sobrevivente será o vencedor !",bc_yellow; end; OnClock0000: set $portao_sortudo,1; announce "O Evento 'Sortudo' irá começar, vocês só tem 3 minutos !",bc_yellow; end; OnClock0003: set $portao_sortudo,0; announce "Os portões para o evento foram fechados, PvP ativado, o sobrevivente será o vencedor !",bc_yellow; end; OnClock0200: set $portao_sortudo,1; announce "O Evento 'Sortudo' irá começar, vocês só tem 3 minutos !",bc_yellow; end; OnClock0203: set $portao_sortudo,0; announce "Os portões para o evento foram fechados, PvP ativado, o sobrevivente será o vencedor !",bc_yellow; end; } quiz_02,0,0,0 script Core_Sortudo -1,{ OnClock0607: atcommand "@killmonster2"; end; OnClock0807: atcommand "@killmonster2"; end; OnClock1607: atcommand "@killmonster2"; end; OnClock2007: atcommand "@killmonster2"; end; OnClock2207: atcommand "@killmonster2"; end; OnClock0007: atcommand "@killmonster2"; end; OnClock0207: atcommand "@killmonster2"; end; //OnClock0603: atcommand "@pvpon"; end; //OnClock0803: atcommand "@pvpon"; end; //OnClock1603: atcommand "@pvpon"; end; //OnClock2003: atcommand "@pvpon"; end; //OnClock2203: atcommand "@pvpon"; end; OnClock0603: pvpon "quiz_02"; atcommand "@skillon"; end; OnClock0803: pvpon "quiz_02"; atcommand "@skillon"; end; OnClock1603: pvpon "quiz_02"; atcommand "@skillon"; end; OnClock2003: pvpon "quiz_02"; atcommand "@skillon"; end; OnClock2203: pvpon "quiz_02"; atcommand "@skillon"; end; OnClock0003: pvpon "quiz_02"; atcommand "@skillon"; end; OnClock0203: pvpon "quiz_02"; atcommand "@skillon"; end; OnClock0606: callsub Tesouro_Sortudo; OnClock0806: callsub Tesouro_Sortudo; OnClock1606: callsub Tesouro_Sortudo; OnClock2006: callsub Tesouro_Sortudo; OnClock2206: callsub Tesouro_Sortudo; OnClock0006: callsub Tesouro_Sortudo; OnClock0206: callsub Tesouro_Sortudo; Tesouro_Sortudo: //atcommand "@pvpoff"; pvpoff "quiz_02"; monster "quiz_02",33,73, "Tesouro",1732,1,"Tesouro::OnTreasureDie"; monster "quiz_02",49,73, "Tesouro",1732,1,"Tesouro::OnTreasureDie"; monster "quiz_02",61,73, "Tesouro",1732,1,"Tesouro::OnTreasureDie"; monster "quiz_02",73,73, "Tesouro",1732,1,"Tesouro::OnTreasureDie"; end; } - script Tesouro -1,{ OnTreasureDie: set @premio_sortudo, rand(1,2); if(@premio_sortudo == 1){ atcommand "@die"; warp "payon",156,226; announce strcharinfo(0)+" abriu um Baú. Não ganhou nada e ainda morreu!",bc_yellow; end; } if(@premio_sortudo == 2){ //getitem 675,1; //moeda de prata getitem 6125, 2; warp "payon",156,226; announce strcharinfo(0)+" abriu um Baú. Prêmio: "+getitemname(675)+"!",bc_yellow; end; } end; } quiz_02 mapflag nomemo quiz_02 mapflag nowarp quiz_02 mapflag nowarpto quiz_02 mapflag noicewall quiz_02 mapflag nosave quiz_02 mapflag noreturn quiz_02 mapflag noteleport quiz_02 mapflag pvp_noguild quiz_02 mapflag pvp_noparty quiz_02 mapflag restricted 3
  10. Hello, I used this npc in a slightly older emulator dai went for a slightly more current emulator sounds when he kills people in pvp does not come ... the .wav file are in my normal data.grf prontera,164,171,4 script [PvP] Arena 403,{ goto InicioPVP; OnInit: setarray $@arena$[0],"guild_vs3","guild_vs2","guild_vs1","prt_are01", "pvp_n_1-5","pvp_n_2-5","pvp_n_3-5","pvp_n_4-5","guild_vs2-1","pvp_n_5-5","pvp_n_8-5"; set $@pvpm_name$, "[ ^FF0000 [PvP] Arena ^000000 ]"; set $@PK_Mode, getbattleflag("pk_mode"); set $@dmpvp$, "izlude"; end; InicioPVP: query_sql "select name from pvpm_data where leader=1 and type=0 limit 1",$@Player_Lider$; query_sql "select name from pvpm_data where leader=1 and type=6 limit 1",$@Player_LiderAleatorio$; mes $@pvpm_name$; mes "^008B8B-> PvP Lider: ^FFA500"+$@Player_Lider$+"^008B8B ."; mes "^008B8B-> PvP DeathMatch: ^FFA500"+$@Player_LiderAleatorio$+"^008B8B ."; switch(select( //"- Player vs Player ^0000FF["+(getmapusers($@arena$[0])+getmapusers($@arena$[1]))+"]^000000", "- Player vs Player ^0000FF["+getmapusers($@arena$[0])+"]^000000", "- PvP DeathMatch ^0000FF["+getmapusers($@dmpvp$)+"]^000000", //"- Player vs Player Custons^0000FF["+getmapusers($@arena$[8])+"]^000000", "- Guild vs Guild ^0000FF["+getmapusers($@arena$[2])+"]^000000", //"- Baby vs Baby ^0000FF["+getmapusers($@arena$[4])+"]^000000", "- Player vs Player x1 ^0000FF["+(getmapusers($@arena$[5])+getmapusers($@arena$[6])+getmapusers($@arena$[7])+getmapusers($@arena$[9])+getmapusers($@arena$[10]))+"]^000000", //"- Player vs Player Sem Ygg ^0000FF["+getmapusers($@arena$[8])+"]^000000", "- Sair")) { case 1: end; case 2: warp $@dmpvp$,0,0; //callfunc("GlobalEntradaPvP", 6); end; case 3: if (!getcharid(2)) { mes $@pvpm_name$; mes "Desculpe, mas você precisa está em uma Guild para entrar nesta Arena."; close; } warp $@arena$[2],0,0; end; case 4: switch(select("- Arena 1 ^0000FF["+getmapusers($@arena$[5])+"]^000000:- Arena 2 ^0000FF["+getmapusers($@arena$[6])+"]^000000:- Arena 3 ^0000FF["+getmapusers($@arena$[7])+"]^000000:- Arena 4 ^0000FF["+getmapusers($@arena$[9])+"]^000000:- Arena 5 ^0000FF["+getmapusers($@arena$[10])+"]")) { case 1: if(getmapusers($@arena$[5]) <= 1) { warp $@arena$[5],0,0; callfunc("GlobalEntradaPvP", 3); } else { mes "A Arena já está ocupada! Aguardem o fim do duelo."; close; } end; case 2: if(getmapusers($@arena$[6]) <= 1) { warp $@arena$[6],0,0; callfunc("GlobalEntradaPvP", 3); } else { mes "A Arena já está ocupada! Aguardem o fim do duelo."; close; } end; case 3: if(getmapusers($@arena$[7]) <= 1) { warp $@arena$[7],0,0; callfunc("GlobalEntradaPvP", 3); } else { mes "A Arena já está ocupada! Aguardem o fim do duelo."; close; } end; case 4: if(getmapusers($@arena$[9]) <= 1) { warp $@arena$[9],0,0; callfunc("GlobalEntradaPvP", 3); } else { mes "A Arena já está ocupada! Aguardem o fim do duelo."; close; } end; case 5: if(getmapusers($@arena$[10]) <= 1) { warp $@arena$[10],0,0; callfunc("GlobalEntradaPvP", 3); } else { mes "A Arena já está ocupada! Aguardem o fim do duelo."; close; } end; } end; case 5: close; end; } end; } // Criar Entrada na Tabela do PVP // Args: 0 - tipo, 1 - tipo de arena (0 = pvp, 2 = gvg, 3 = x1) function script CriarEntrada { set @nome$, ""; query_sql "SELECT name FROM pvpm_data WHERE id="+getcharid(getarg(0))+" AND type="+getarg(1)+" LIMIT 1",@nome$; if (@nome$ == "") query_sql "INSERT INTO pvpm_data (id, leader, type, kills, dies, name) VALUES ("+getcharid(getarg(0))+", 0, "+getarg(1)+", 0, 0, '"+strcharinfo(getarg(0))+"')"; return; } // Atualizar Dados na Tabela do PVP // Argumentos: 0 - campo, 1 - tipo, 2 - tipo de arena (0 = pvp, 2 = gvg, 3 = x1) function script AtualizaDados { set @matou, 0; set @morreu, 0; set @total, 0; callfunc("CriarEntrada", getarg(1), getarg(2)); query_sql "UPDATE pvpm_data SET "+getarg(0)+"="+getarg(0)+"+1 WHERE id="+getcharid(getarg(1))+" AND type="+getarg(2); query_sql "SELECT kills, dies FROM pvpm_data WHERE id="+getcharid(getarg(1))+" AND type="+getarg(2)+" limit 1",@matou,@morreu; set @total, (@matou - @morreu); if (@total < 0) set @total, 0; dispbottom "Seu Score: " + @total; return; } // Verificar e atualizar lider // Argumentos: 0 - tipo, 1 - tipo de arena (0 = pvp, 2 = gvg, 3 = x1) function script AtualizaLider { set @liderID, 0; set @liderPontos, 0; set @meusPontos, 0; set @meuNome, 0; // minhas vitorias query_sql "SELECT name, kills FROM pvpm_data WHERE id="+getcharid(getarg(0))+" AND type="+getarg(1)+" limit 1",@meuNome,@meusPontos; if (@meusPontos > 0) { // pegar quem matou mais query_sql "SELECT id, kills FROM pvpm_data WHERE type="+getarg(1)+" AND leader=1 order by kills desc limit 1",@liderID,@liderMatou; if (@meusPontos > @liderMatou && @liderID != getcharid(getarg(0))) { // atualizar zerando o lider e me declarando o lider query_sql "UPDATE pvpm_data SET leader=0 WHERE type="+getarg(1); query_sql "UPDATE pvpm_data SET leader=1 WHERE id="+getcharid(getarg(0))+" and type="+getarg(1); // faço anuncio if (getarg(1) == 0) Announce strcharinfo(getarg(0))+" é o Novo Lider da Arena PVP!", bc_all, 0xFF7F50; else if (getarg(1) == 3) Announce strcharinfo(getarg(0))+" é o Novo Lider da Arena PVP x1!", bc_all, 0xFF7F50; else if (getarg(1) == 4) Announce strcharinfo(getarg(0))+" é o Novo Lider da Arena PVP Sem Donation!", bc_all, 0xFF7F50; else if (getarg(1) == 5) Announce strcharinfo(getarg(0))+" é o Novo Lider do Ranking WoE!", bc_all, 0xFF7F50; else if (getarg(1) == 6) Announce strcharinfo(getarg(0))+" é o Novo Lider da Arena PVP DeathMatch!", bc_all, 0xFF7F50; else Announce "O Clã " + strcharinfo(getarg(0))+" é o Novo Lider da Arena GVG!", bc_all, 0xFF7F50; } } return; } // Faz anuncio global de quem entra nas arenas pvp function script GlobalEntradaPvP { if (getarg(0) == 3) Announce "O jogador [ " + strcharinfo(0)+" ] acabou de entrar na Arena PVP x1!", bc_all, 0xCC00CC; return; } // Faz anuncio de morte e quem matou quem // Argumentos: 0 - tipo de arena (0 = pvp, 2 = gvg, 3 = x1) function script AtualizaAnuncio { query_sql "SELECT kills, dies FROM pvpm_data WHERE id="+getcharid(0)+" AND type="+getarg(0)+" limit 1",@matou,@morreu; Announce "O jogador [ " + strcharinfo(0)+" ] derrotou o jogador [ " + rid2name(killedrid) + " ] e agora tem " + @matou + " vitórias!", bc_map, 0xFF7F50; } // Tocar sons // Argumento: 0 - numero kills function script TocaSons { set @matouNum, getarg(0); getmapxy @map$, @x, @y, 0; if (@matouNum == 3) set @sound$, 3; if (@matouNum == 4) set @sound$, 4; if (@matouNum == 5) set @sound$, 5; if (@matouNum == 6) set @sound$, 6; if (@matouNum == 7) set @sound$, 7; if (@matouNum == 8) set @sound$, 8; if (@matouNum == 9) set @sound$, 9; if (@matouNum == 10) set @sound$, 10; if (@matouNum == 12) set @sound$, 12; if (@matouNum == 14) set @sound$, 14; if (@matouNum > 14) set @sound$, 16; if (@matouNum >= 3) soundeffect @sound$ + ".wav", 0; return; } - script event#pvpm -1,{ OnPCLoadMapEvent: // arenas x1 getmapxy @map$, @x, @y, 0; if(@map$ == $@arena$[5] || @map$ == $@arena$[6] || @map$ == $@arena$[7] || @map$ == $@arena$[9] || @map$ == $@arena$[10]) { if(getmapusers(@map$) > 2) { warp "prontera", 156, 179; } } end; OnPCKillEvent: set @numKill, @numKill + 1; getmapxy @map$, @x, @y, 0; // arenas pvp if(@map$ == $@arena$[0]) { callfunc("TocaSons", @numKill); callfunc("AtualizaDados", "kills", 0, 0); callfunc("AtualizaLider", 0, 0); callfunc("AtualizaAnuncio", 0); } // arenas pvp sem donation if(@map$ == $@arena$[8]) { callfunc("TocaSons", @numKill); callfunc("AtualizaDados", "kills", 0, 4); callfunc("AtualizaLider", 0, 4); callfunc("AtualizaAnuncio", 4); } // x1 if(@map$ == $@arena$[5] || @map$ == $@arena$[6] || @map$ == $@arena$[7] || @map$ == $@arena$[9] || @map$ == $@arena$[10]) { callfunc("TocaSons", @numKill); callfunc("AtualizaDados", "kills", 0, 3); callfunc("AtualizaLider", 0, 3); } // go5 if(@map$ == "new_1-1") { callfunc("TocaSons", @numKill); } // woe if(AgitCheck() || AgitCheck2()) { //if(@map$ == "prtg_cas01") { callfunc("AtualizaDados", "kills", 0, 5); callfunc("AtualizaLider", 0, 5); //} } // deathmatch if(@map$ == $@dmpvp$) { callfunc("TocaSons", @numKill); callfunc("AtualizaDados", "kills", 0, 6); callfunc("AtualizaLider", 0, 6); callfunc("AtualizaAnuncio", 6); } end; OnPCDieEvent: set @numKill, 0; getmapxy @map$, @x, @y, 0; // arenas pvp if(@map$ == $@arena$[0]) { callfunc("AtualizaDados", "dies", 0, 0); soundeffect "dead.wav", 0; } // arenas pvp sem donation if(@map$ == $@arena$[8]) { callfunc("AtualizaDados", "dies", 0, 4); soundeffect "dead.wav", 0; } // x1 if(@map$ == $@arena$[5] || @map$ == $@arena$[6] || @map$ == $@arena$[7] || @map$ == $@arena$[9] || @map$ == $@arena$[10]) { callfunc("AtualizaDados", "dies", 0, 3); soundeffectall "dead.wav", 0, @map$; } // woe if(AgitCheck() || AgitCheck2()) { setarray .castelos$[0], "payg_cas05", "payg_cas01", "gefg_cas01", "gefg_cas02", "prtg_cas03", "prtg_cas01", "prtg_cas04", "schg_cas04", "arug_cas03"; for(set .@i, 0; .@i < getarraysize(.castelos$); set .@i, .@i + 1) { if(strcharinfo(3) == .castelos$[.@i]) { callfunc("AtualizaDados", "dies", 0, 5); end; } } } // deathmatch if(@map$ == $@dmpvp$) { sleep2 4000; if(killerrid != getcharid(3)) { soundeffect "dead.wav", 0; warp strcharinfo(3), 0, 0; atcommand "@alive"; atcommand "@repairall"; set .@tempo, 216000 * 20; sc_start SC_STRFood, .@tempo, 10; sc_start SC_AGIFood, .@tempo, 10; sc_start SC_VITFood, .@tempo, 10; sc_start SC_INTFood, .@tempo, 10; sc_start SC_DEXFood, .@tempo, 10; sc_start SC_LUKFood, .@tempo, 10; skilleffect 34, 0; sc_start SC_BLESSING, .@tempo, 10; skilleffect 29, 0; sc_start SC_INCREASEAGI, .@tempo, 10; percentheal 100, 100; callfunc("AtualizaDados", "dies", 0, 6); } else warp "prontera", 156, 179; } end; } //============== MAP FLAG =============== // Player //pvp_y_3-2 mapflag nosave //pvp_y_3-2 mapflag noteleport //pvp_y_3-2 mapflag nowarpto //pvp_y_3-2 mapflag nowarp //pvp_y_3-2 mapflag nomemo //pvp_y_3-2 mapflag gvg off //pvp_y_3-2 mapflag pvp //pvp_y_3-2 mapflag nopenalty //pvp_y_3-2 mapflag nobranch //guild_vs3 mapflag nosave //guild_vs3 mapflag noteleport //guild_vs3 mapflag nowarpto //guild_vs3 mapflag nowarp //guild_vs3 mapflag nomemo //guild_vs3 mapflag gvg off //guild_vs3 mapflag pvp //guild_vs3 mapflag nopenalty //guild_vs3 mapflag nobranch //guild_vs3 mapflag pvp_noguild //5@tower mapflag nosave //5@tower mapflag noteleport //5@tower mapflag nowarpto //5@tower mapflag nowarp //5@tower mapflag nomemo //5@tower mapflag gvg off //5@tower mapflag pvp //5@tower mapflag nopenalty //5@tower mapflag nobranch //5@tower mapflag pvp_noguild // arena pvp atual //pvp_n_1-5 mapflag nosave //pvp_n_1-5 mapflag noteleport //pvp_n_1-5 mapflag nowarpto //pvp_n_1-5 mapflag nowarp //pvp_n_1-5 mapflag nomemo //pvp_n_1-5 mapflag gvg off //pvp_n_1-5 mapflag pvp //pvp_n_1-5 mapflag nopenalty //pvp_n_1-5 mapflag nobranch //pvp_n_1-5 mapflag pvp_noguild guild_vs3 mapflag nosave guild_vs3 mapflag noteleport guild_vs3 mapflag nowarpto guild_vs3 mapflag nowarp guild_vs3 mapflag nomemo guild_vs3 mapflag gvg off guild_vs3 mapflag pvp guild_vs3 mapflag nopenalty guild_vs3 mapflag nobranch guild_vs3 mapflag pvp_noguild // Death izlude mapflag nosave izlude mapflag noteleport izlude mapflag nowarpto izlude mapflag nowarp izlude mapflag nomemo izlude mapflag gvg off izlude mapflag pvp izlude mapflag nopenalty izlude mapflag nobranch izlude mapflag noreturn izlude mapflag nosave SavePoint izlude mapflag pvp_noguild izlude mapflag pvp_noparty // Guild guild_vs1 mapflag nosave guild_vs1 mapflag noteleport guild_vs1 mapflag nowarpto guild_vs1 mapflag nowarp guild_vs1 mapflag nomemo guild_vs1 mapflag gvg on guild_vs1 mapflag nopenalty guild_vs1 mapflag nobranch guild_vs1 mapflag pvp_noparty //prt_are01 mapflag nosave //prt_are01 mapflag noteleport //prt_are01 mapflag nowarpto //prt_are01 mapflag nowarp //prt_are01 mapflag nomemo //prt_are01 mapflag gvg on //prt_are01 mapflag nopenalty //prt_are01 mapflag nobranch //prt_are01 mapflag pvp_noparty //guild_vs2 mapflag nosave //guild_vs2 mapflag noteleport guild_vs2 mapflag nowarpto guild_vs2 mapflag nowarp //guild_vs2 mapflag nomemo //guild_vs2 mapflag gvg off //guild_vs2 mapflag pvp //guild_vs2 mapflag nopenalty //guild_vs2 mapflag nobranch //guild_vs2 mapflag pvp_noparty //guild_vs2 mapflag pvp_noguild // Player x1 pvp_n_2-5 mapflag nosave pvp_n_2-5 mapflag noteleport pvp_n_2-5 mapflag nowarpto pvp_n_2-5 mapflag nowarp pvp_n_2-5 mapflag nomemo pvp_n_2-5 mapflag gvg off pvp_n_2-5 mapflag pvp pvp_n_2-5 mapflag nopenalty pvp_n_2-5 mapflag nobranch //pvp_n_2-5 mapflag pvp_noparty pvp_n_2-5 mapflag loadevent pvp_n_3-5 mapflag nosave pvp_n_3-5 mapflag noteleport pvp_n_3-5 mapflag nowarpto pvp_n_3-5 mapflag nowarp pvp_n_3-5 mapflag nomemo pvp_n_3-5 mapflag gvg off pvp_n_3-5 mapflag pvp pvp_n_3-5 mapflag nopenalty pvp_n_3-5 mapflag nobranch //pvp_n_3-5 mapflag pvp_noparty pvp_n_3-5 mapflag loadevent pvp_n_4-5 mapflag nosave pvp_n_4-5 mapflag noteleport pvp_n_4-5 mapflag nowarpto pvp_n_4-5 mapflag nowarp pvp_n_4-5 mapflag nomemo pvp_n_4-5 mapflag gvg off pvp_n_4-5 mapflag pvp pvp_n_4-5 mapflag nopenalty pvp_n_4-5 mapflag nobranch //pvp_n_4-5 mapflag pvp_noparty pvp_n_4-5 mapflag loadevent pvp_n_5-5 mapflag nosave pvp_n_5-5 mapflag noteleport pvp_n_5-5 mapflag nowarpto pvp_n_5-5 mapflag nowarp pvp_n_5-5 mapflag nomemo pvp_n_5-5 mapflag gvg off pvp_n_5-5 mapflag pvp pvp_n_5-5 mapflag nopenalty pvp_n_5-5 mapflag nobranch //pvp_n_5-5 mapflag pvp_noparty pvp_n_5-5 mapflag loadevent pvp_n_8-5 mapflag nosave pvp_n_8-5 mapflag noteleport pvp_n_8-5 mapflag nowarpto pvp_n_8-5 mapflag nowarp pvp_n_8-5 mapflag nomemo pvp_n_8-5 mapflag gvg off pvp_n_8-5 mapflag pvp pvp_n_8-5 mapflag nopenalty pvp_n_8-5 mapflag nobranch //pvp_n_8-5 mapflag pvp_noparty pvp_n_8-5 mapflag loadevent // baby //pvp_n_1-5 mapflag nosave //pvp_n_1-5 mapflag noteleport //pvp_n_1-5 mapflag nowarpto //pvp_n_1-5 mapflag nowarp //pvp_n_1-5 mapflag nomemo //pvp_n_1-5 mapflag gvg off //pvp_n_1-5 mapflag pvp //pvp_n_1-5 mapflag nopenalty //pvp_n_1-5 mapflag nobranch //pvp_n_1-5 mapflag pvp_noparty //pvp_n_1-5 mapflag loadevent //evento 06guild_01 mapflag nosave 06guild_01 mapflag noteleport 06guild_01 mapflag nowarpto 06guild_01 mapflag nowarp 06guild_01 mapflag nomemo 06guild_01 mapflag gvg off 06guild_01 mapflag nopenalty 06guild_01 mapflag nobranch //06guild_01 mapflag pvp_noparty 06guild_01 mapflag loadevent 06guild_02 mapflag nosave 06guild_02 mapflag noteleport 06guild_02 mapflag nowarpto 06guild_02 mapflag nowarp 06guild_02 mapflag nomemo 06guild_02 mapflag gvg off 06guild_02 mapflag nopenalty 06guild_02 mapflag nobranch //06guild_02 mapflag pvp_noparty 06guild_02 mapflag loadevent 06guild_03 mapflag nosave 06guild_03 mapflag noteleport 06guild_03 mapflag nowarpto 06guild_03 mapflag nowarp 06guild_03 mapflag nomemo 06guild_03 mapflag gvg off 06guild_03 mapflag nopenalty 06guild_03 mapflag nobranch //06guild_03 mapflag pvp_noparty 06guild_03 mapflag loadevent 06guild_04 mapflag nosave 06guild_04 mapflag noteleport 06guild_04 mapflag nowarpto 06guild_04 mapflag nowarp 06guild_04 mapflag nomemo 06guild_04 mapflag gvg off 06guild_04 mapflag nopenalty 06guild_04 mapflag nobranch //06guild_04 mapflag pvp_noparty 06guild_04 mapflag loadevent 06guild_05 mapflag nosave 06guild_05 mapflag noteleport 06guild_05 mapflag nowarpto 06guild_05 mapflag nowarp 06guild_05 mapflag nomemo 06guild_05 mapflag gvg off 06guild_05 mapflag nopenalty 06guild_05 mapflag nobranch //06guild_05 mapflag pvp_noparty 06guild_05 mapflag loadevent 06guild_06 mapflag nosave 06guild_06 mapflag noteleport 06guild_06 mapflag nowarpto 06guild_06 mapflag nowarp 06guild_06 mapflag nomemo 06guild_06 mapflag gvg off 06guild_06 mapflag nopenalty 06guild_06 mapflag nobranch //06guild_06 mapflag pvp_noparty 06guild_06 mapflag loadevent 06guild_07 mapflag nosave 06guild_07 mapflag noteleport 06guild_07 mapflag nowarpto 06guild_07 mapflag nowarp 06guild_07 mapflag nomemo 06guild_07 mapflag gvg off 06guild_07 mapflag nopenalty 06guild_07 mapflag nobranch //06guild_07 mapflag pvp_noparty 06guild_07 mapflag loadevent 06guild_08 mapflag nosave 06guild_08 mapflag noteleport 06guild_08 mapflag nowarpto 06guild_08 mapflag nowarp 06guild_08 mapflag nomemo 06guild_08 mapflag gvg off 06guild_08 mapflag nopenalty 06guild_08 mapflag nobranch //06guild_08 mapflag pvp_noparty 06guild_08 mapflag loadevent // PvP Sem Ygg //guild_vs2-1 mapflag nosave //guild_vs2-1 mapflag noteleport //guild_vs2-1 mapflag nowarpto //guild_vs2-1 mapflag nowarp //guild_vs2-1 mapflag nomemo //guild_vs2-1 mapflag gvg off //guild_vs2-1 mapflag nopenalty //guild_vs2-1 mapflag nobranch //guild_vs2-1 mapflag pvp_noparty //guild_vs2-1 mapflag loadevent // PvP sem donations e armas campais guild_vs2-1 mapflag nosave guild_vs2-1 mapflag noteleport guild_vs2-1 mapflag nowarpto guild_vs2-1 mapflag nowarp guild_vs2-1 mapflag nomemo guild_vs2-1 mapflag gvg off guild_vs2-1 mapflag pvp guild_vs2-1 mapflag nopenalty guild_vs2-1 mapflag nobranch guild_vs2-1 mapflag noreturn guild_vs2-1 mapflag nosave SavePoint guild_vs2-1 mapflag pvp_noguild guild_vs2-1 mapflag pvp_noparty //============== MAP FLAG =============== morocc,152,97,4 duplicate([PvP] Arena) [PvP] Arena#2 403 geffen,127,65,4 duplicate([PvP] Arena) [PvP] Arena#3 403 fixed...
  11. Scofield

    BOT v.3

    someone would have the version for eAthena? Index: db/const.txt =================================================================== --- db/const.txt (revision 14530) +++ db/const.txt (working copy) @@ -1258,6 +1258,7 @@ SC__CHAOS 577 SC__FEINTBOMB_MASTER 578 SC_FALLENEMPIRE 579 +SC_BOT 581 e_gasp 0 e_what 1 Index: db/sc_config.txt =================================================================== --- db/sc_config.txt (revision 14530) +++ db/sc_config.txt (working copy) @@ -14,6 +14,7 @@ //Example: //SC_ENDURE, 21 //SC_ENDURE: cannot be removed by death and dispell and cosidered as buff. (16 + 4 + 1 = 21) +SC_BOT, 6 SC_PROVOKE, 32 SC_ENDURE, 21 SC_CLOAKING, 2 Index: npc/bot.txt =================================================================== --- npc/bot.txt (revision 0) +++ npc/bot.txt (working copy) @@ -0,0 +1,51 @@ +// +// +// Author Goddameit +// Version 2015/12/20 +// Web http://goo.gl/0vY9GV +// +// +- script bot_at -1,{ + function __onoff ; +OnInit: + bindatcmd "boton",strnpcinfo(3)+"::OnDo"; + bindatcmd "botoff",strnpcinfo(3)+"::OnDo2"; + bindatcmd "botend",strnpcinfo(3)+"::OnDo2"; + end; +OnDo: + sc_end SC_BOT; + .@SP_BOT_NA = 1; + while(1) + { + .@C = select("[Finish]","[Cancel]","Normal Attack "+__onoff(.@SP_BOT_NA))k; + if( .@C == 1 ) + break; + else if( .@C == 2 ) + close; + else + switch(.@C) + { + case 3: + .@SP_BOT_NA = !.@SP_BOT_NA; + break; + } + } + message strcharinfo(0),"RUN"; + if( .@C == 1 || .@C > 2 ) + { + mes "OK"; + close2; + } + sc_start4 SC_BOT,600000,.@SP_BOT_NA,0,0,0; + end; +OnDo2: + sc_end SC_BOT; + message strcharinfo(0),"END"; + end; + function __onoff { + if(getarg(0) == 0) + return "^BEBEBE[OFF]^000000"; + else + return "^000088[ON]^000000"; + } +} \ No newline at end of file Index: src/map/status.c =================================================================== --- src/map/status.c (revision 14530) +++ src/map/status.c (working copy) @@ -8982,6 +8982,10 @@ if(val2 == MH_MD_FIGHTING) val2 = MH_MD_GRAPPLING; else val2 = MH_MD_FIGHTING; break; + case SC_BOT: + tick_time = 100; + val4 = tick / tick_time; + break; case SC_FULL_THROTTLE: status_percent_heal(bl,100,0); val2 = 7 - val1; @@ -9701,6 +9705,15 @@ } } } + + if (type == SC_BOT) + { + if (sc->data[type]->val4 > 0) + { + //Record how many time you left + pc->setreg(sd, script->add_str("@SP_BOT_LTICK"), sc->data[type]->val4 * 100); + } + } (sc->count)--; @@ -10464,6 +10477,145 @@ } while(0) switch(type) { + case SC_BOT: + if (--(sce->val4) > 0) { + { + int i_ = 0; + struct mmo_charstatus *sta = &sd->status; + unsigned short inf_ = 0; + int64 last_tick = (int64)time(NULL); + unsigned short idle_ = cap_value(DIFF_TICK32(last_tick, sd->idletime), 0, USHRT_MAX); + unsigned short tele_ = cap_value(DIFF_TICK32(last_tick, pc->readreg(sd, script->add_str("@SP_BOT_TELE"))), 0, USHRT_MAX); + unsigned int starget_id_ = bot_check_target_alive(bl, pc->readreg(sd, script->add_str("@SP_BOT_TGID"))); + {//Heal + unsigned short item_id_ = sta->hotkeys[9].id; + if ((sd->battle_status.hp * 100 / 80) < sd->battle_status.max_hp && item_id_ > 0) + { + i_ = pc->search_inventory(sd, item_id_); + if (i_ >= 0) + pc->useitem(sd, i_); + } + item_id_ = sta->hotkeys[10].id; + if ((sd->battle_status.sp * 100 / 80) < sd->battle_status.max_sp && item_id_ > 0) + { + i_ = pc->search_inventory(sd, item_id_); + if (i_ >= 0) + pc->useitem(sd, i_); + } + } + {//Buff + for (i_ = 2; i_ <= 6; i_++) + { + if ((inf_ = bot_chec_khotkeys_is_skill(sd, i_)) > 0) + { + unsigned short id_ = sta->hotkeys[i_].id; + if (inf_ == 4 || inf_ == 16) + { + if (!sc->data[status->skill2sc(id_)]) + unit->skilluse_id(bl, bl->id, id_, sta->hotkeys[i_].lv); + } + } + } + } + if (idle_ % 7 != 0)//Attack + { + { + unsigned short inf_ = 0; + starget_id_ = bot_check_target_alive(bl, pc->readreg(sd, script->add_str("@SP_BOT_TGID"))); + if (starget_id_ > 0) { + if (sce->val1 > 0) + { + switch (rand() % 10) + { + case 0: + case 1: + case 2: + inf_ = bot_chec_khotkeys_is_skill(sd, 7); + if (inf_ == 1) + { + unit->stop_attack(bl); + unit->skilluse_id(bl, starget_id_, sta->hotkeys[7].id, sta->hotkeys[7].lv); + } + break; + case 5: + case 6: + inf_ = bot_chec_khotkeys_is_skill(sd, 8); + if (inf_ == 1) + { + unit->stop_attack(bl); + unit->skilluse_id(bl, starget_id_, sta->hotkeys[8].id, sta->hotkeys[8].lv); + } + break; + default: + unit->attack(bl, starget_id_, 1); + break; + } + } + else + { + switch (rand() % 7) + { + case 0: + case 1: + case 2: + case 3: + case 4: + inf_ = bot_chec_khotkeys_is_skill(sd, 7); + if (inf_ == 1) + { + unit->skilluse_id(bl, starget_id_, sta->hotkeys[7].id, sta->hotkeys[7].lv); + } + break; + case 5: + case 6: + inf_ = bot_chec_khotkeys_is_skill(sd, 8); + if (inf_ == 1) + { + unit->skilluse_id(bl, starget_id_, sta->hotkeys[8].id, sta->hotkeys[8].lv); + } + break; + } + } + } + } + } + else + {//Move + bool flywing_ = false; + if (bot_check_target(bl, starget_id_) == false) + { + if (tele_ > 7) + { + if (sta->hotkeys[0].type == 0 && sta->hotkeys[0].id == 601 && sta->hotkeys[0].lv == 0) + { + i_ = pc->search_inventory(sd, 601); + if (i_ >= 0) + { + pc->useitem(sd, i_); + flywing_ = true; + } + } + if ((st->sp > 20) && (flywing_ == false) && (sta->hotkeys[1].type == 1 && sta->hotkeys[1].id == AL_TELEPORT && sta->hotkeys[1].lv > 0)) + { + if (pc->checkskill(sd, AL_TELEPORT) > 0) + { + pc->randomwarp(sd, CLR_TELEPORT); + status->heal(&sd->bl, 0, -(skill->get_sp(AL_TELEPORT, 1)), 1); + flywing_ = true; + } + } + if (flywing_ == true) + pc->setreg(sd, script->add_str("@SP_BOT_TELE"), last_tick); + } + } + if ((idle_ % 9 == 0 && idle_ > 0) || starget_id_ == 0) + unit->walktoxy(&sd->bl, sd->bl.x + (rand() % 2 == 0 ? -1 : 1)*(rand() % 10), sd->bl.y + (rand() % 2 == 0 ? -1 : 1)*(rand() % 10), 0); + } + } + sc_timer_next(100 + tick, status->change_timer, bl->id, data); + return 0; + } + break; case SC_MAXIMIZEPOWER: case SC_CLOAKING: if(!status->charge(bl, 0, 1)) @@ -12237,3 +12389,73 @@ status->readdb_refine = status_readdb_refine; status->readdb_scconfig = status_readdb_scconfig; } + +bool bot_check_target(struct block_list *src, unsigned int id) +{ + struct block_list *bl = map->id2bl(id); + if (bl) + { + if (path->search(NULL, src->m, src->x, src->y, bl->x, bl->y, 1, CELL_CHKNOREACH) && distance_xy(src->x, src->y, bl->x, bl->y) < 11) + { + TBL_MOB *md = BL_CAST(BL_MOB, bl); + if (md) + { + if (md->status.hp > 0) + { + return true; + } + } + } + } + return false; +} + +int buildin_autoattack_sub(struct block_list *bl, va_list ap) +{ + int *target_id = va_arg(ap, int *); + int src_id = va_arg(ap, int); + struct block_list *src = map->id2bl(src_id); + if (!src || !bl) + return 1; + if (bot_check_target(src, bl->id) == true) + *target_id = bl->id; + else + *target_id = 0; + return 1; +} + +short bot_chec_khotkeys_is_skill(struct map_session_data *sd, unsigned short idx) +{ + if (sd) + { + struct mmo_charstatus *sta = &sd->status; + if (sta) + { + if (sta->hotkeys[idx].type == 1 && pc->checkskill(sd, sta->hotkeys[idx].id) > 0 && sta->hotkeys[idx].lv > 0) + return skill->get_inf(sta->hotkeys[idx].id); + } + } + return -1; +} + +unsigned int bot_check_target_alive(struct block_list *src, unsigned int id) +{ + if (bot_check_target(src, id) == true) + return id; + { + int i_, target_id_; + for (i_ = 0; i_ < 15; i_++) + { + target_id_ = 0; + map->foreachinarea(buildin_autoattack_sub, src->m, src->x - i_, src->y - i_, src->x + i_, src->y + i_, BL_MOB, &target_id_, src->id); + if (target_id_) + { + pc->setreg(map->id2sd(src->id), script->add_str("@SP_BOT_TGID"), target_id_); + break; + } + } + if (target_id_) + return target_id_; + } + return 0; +} \ No newline at end of file Index: src/map/status.h =================================================================== --- src/map/status.h (revision 14530) +++ src/map/status.h (working copy) @@ -715,6 +715,7 @@ SC_FALLENEMPIRE, SC_FLASHCOMBO, + SC_BOT, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; @@ -2089,4 +2090,8 @@ void status_defaults(void); +bool bot_check_target(struct block_list *src, unsigned int id); +int buildin_autoattack_sub(struct block_list *bl, va_list ap); +short bot_chec_khotkeys_is_skill(struct map_session_data *sd, unsigned short idx); +unsigned int bot_check_target_alive(struct block_list *src, unsigned int id); #endif /* MAP_STATUS_H */
  12. I am with this error and then take desconect [Warning]: clif_parse: Received unsupported packet (packet 0x0000, 14 bytes received), disconnecting session #6. resolved
  13. Hello, I saw in a low rate server where the person could use @farm command and the character was on the map playing alone like a evilclone more attacking only bixo, after 2 hours it took DC ... I wonder if it already exists here or is it an exclusive thing.
  14. I want to do with either mind break and provoker may be using members of own guild
  15. I wish people could attack each other in the same guild during WoE. the reason is an event that I am developing
  16. How do I increase the limit of people in the party?
  17. I have this npc BG, I wanted to use thejoinbg command appears and 2 options 1 to go to the blue side and one for the red side, and so already getting on the waiting. // (c) 2008 - 2012 eAmod Project; Andres Garbanzo / Zephyrus // // - [email protected] // - MSN [email protected] // - Skype: Zephyrus_cr // - Site: http://dev.terra-gaming.com // // This file is NOT public - you are not allowed to distribute it. // Authorized Server List : http://dev.terra-gaming.com/index.php?/topic/72-authorized-eamod-servers/ // eAmod is a non Free, extended version of eAthena Ragnarok Private Server. // ============================================================================== // BattleGround System - Common NPCs // ============================================================================== // MapFlags // ********************************************************************* bat_room mapflag nomemo bat_room mapflag nowarpto bat_room mapflag nobranch bat_room mapflag nopenalty bat_room mapflag noteleport bat_room mapflag nosave SavePoint bat_room mapflag allow_bg_items // Mapflag Town is required to Join BG Queues bat_room mapflag town // Battleground Queue Admin // ********************************************************************* - script BG_Queue_Join -1,{ end; OnInit: // Configuration // ***************************************************** // Battleground Rotation - Main NPC name setarray .BG_Arenas$[0], "Conquest"; // Battleground Arena Name - for announcements setarray .BG_Names$[0], "Conquest"; // Minimum Players to start the BG setarray .BG_Min[0], 5; // Maximum Players per Team setarray .BG_Max[0], 30; // BG Message Colors setarray .BG_Color$[0], "0x4169E1"; // Team Building Mode : 0 = Lineal | 1 = Random | 2 = Class Priority | 3 = Faction Mode | 4 = Team Color ( by script set Bat_Team,N; ) set .TeamMode, 4; // Main Code // ***************************************************** set .BG_Count, getarraysize(.BG_Arenas$); set .BG_Queue, bg_queue_create("Battleground Arena","BG_Queue_Join::OnJoinEvent",80); set .VS_Queue, bg_queue_create("Free For All Arena","BG_Queue_Join::OnVersusJoin",80); // Move to Next Arena if( $BG_Index >= .BG_Count ) set $BG_Index,1; // Restart Rotation set .BG_Arena$,.BG_Arenas$[$BG_Index]; set .Ready, 1; donpcevent "BG_Queue_Join::OnDoHappyHour"; initnpctimer; // Rotation if BG don't start... Comment if you don't want to use this method // Comment the next two lines if you don't want to allow @joinbg and @leavebg commands. bindatcmd "joinbg","BG_Queue_Join::OnDoJoin",0,200; bindatcmd "leavebg","BG_Queue_Join::OnDoLeave",0,200; end; OnDoJoin: // @joinbg if( checkquest(8506,PLAYTIME) == 2 ) erasequest 8506; if( checkquest(8506,PLAYTIME) != -1 ) { dispbottom "[Você é um desertor. Você não pode participar até que o indicador se apague]"; end; } bg_queue_join .BG_Queue; end; OnDoLeave: // @leavebg bg_queue_leave .BG_Queue; end; OnRotate: OnTimer740000: // Rotation if BG don't start... Comment if you don't want to use this method. 120 = 2 Minutes set $@BG_Status, 0; // Warps Teams bg_warp $@BG_Team1,"bat_room",155,150; bg_warp $@BG_Team2,"bat_room",155,150; bg_warp $@BG_Team3,"bat_room",155,150; // Destroy Teams bg_destroy $@BG_Team1; set $@BG_Team1, 0; bg_destroy $@BG_Team2; set $@BG_Team2, 0; bg_destroy $@BG_Team3; set $@BG_Team3, 0; // Move to Next Arena if( set($BG_Index,$BG_Index + 1) >= .BG_Count ) set $BG_Index,0; // Restart Rotation set .BG_Arena$,.BG_Arenas$[$BG_Index]; initnpctimer; // Rotation if BG don't start... Comment if you don't want to use this method // Trigger the Event - Maybe people is waiting... OnJoinEvent: if( $@BG_Status == 2 ) end; // BG Ending... Must wait until OnRotate is called set .@Queue_Count, bg_queue_data(.BG_Queue,0); switch( $@BG_Status ) { case 0: // Idle - Ready to Start if( .BG_Arena$ == "Tierra_TI" ) set .@Req, .BG_Min[$BG_Index] * 3; else set .@Req, .BG_Min[$BG_Index] * 2; if( bg_queue_checkstart(.BG_Queue,.TeamMode,( (.BG_Arena$ == "Tierra_TI") ? 3 : 2 ),.BG_Min[$BG_Index]) ) { donpcevent .BG_Arena$ + "::OnBuildTeams"; // Fill Teams with Queue Members if( .BG_Arenas$[$BG_Index] == "Tierra_TI" ) bg_queue2teams .BG_Queue,.BG_Min[$BG_Index],.BG_Max[$BG_Index],.TeamMode,$@BG_Team1,$@BG_Team2,$@BG_Team3; else bg_queue2teams .BG_Queue,.BG_Min[$BG_Index],.BG_Max[$BG_Index],.TeamMode,$@BG_Team1,$@BG_Team2; stopnpctimer; // Rotation if BG don't start... Comment if you don't want to use this method set $@BG_Status,1; set .@msg$, "Batalha Campal -- " + .BG_Names$[$BG_Index] + " -- Começando"; announce .@msg$,.BG_Color$[$BG_Index]; donpcevent .BG_Arena$ + "::OnReady"; } else { set .@msg$, "Batalha Campal -- " + .BG_Names$[$BG_Index] + " -- " + (.@Req - .@Queue_Count) + " Jogadores Para Começar, Use @joinbg Para Participar."; announce .@msg$,0,.BG_Color$[$BG_Index]; } break; case 1: // Running - Others can join if( .@Queue_Count > 0 ) { if( .BG_Arena$ == "Tierra_TI" ) { bg_balance_teams .BG_Queue,.BG_Max[$BG_Index],.TeamMode,$@BG_Team1,$@BG_Team2,$@BG_Team3; set .@BG_Count1, bg_get_data($@BG_Team1,0); set .@BG_Count2, bg_get_data($@BG_Team2,0); set .@BG_Count3, bg_get_data($@BG_Team3,0); set .@msg$, "Batalha Campal -- " + .BG_Names$[$BG_Index] + " -- B: " + .@BG_Count1 + "/" + .BG_Max[$BG_Index] + ", R: " + .@BG_Count2 + "/" + .BG_Max[$BG_Index] + ", G: " + .@BG_Count3 + "/" + .BG_Max[$BG_Index] + " (Em andamento) Use @joinbg Para Participar."; } else { bg_balance_teams .BG_Queue,.BG_Max[$BG_Index],.TeamMode,$@BG_Team1,$@BG_Team2; set .@BG_Count1, bg_get_data($@BG_Team1,0); set .@BG_Count2, bg_get_data($@BG_Team2,0); set .@msg$, "Batalha Campal -- " + .BG_Names$[$BG_Index] + " -- B: " + .@BG_Count1 + "/" + .BG_Max[$BG_Index] + ", R: " + .@BG_Count2 + "/" + .BG_Max[$BG_Index] + " (Em andamento) Use @joinbg Para Participar."; } announce .@msg$,.BG_Color$[$BG_Index]; } break; } end; OnVersusJoin: if( $@VS_Status != 0 ) end; set .@Queue_Count, bg_queue_data(.VS_Queue,0); if( .@Queue_Count >= 10 ) { donpcevent "FFA_Arena::OnBuildTeams"; bg_queue2teams .VS_Queue,1,1,0,$@VS_Team[0],$@VS_Team[1],$@VS_Team[2],$@VS_Team[3],$@VS_Team[4],$@VS_Team[5],$@VS_Team[6],$@VS_Team[7],$@VS_Team[8],$@VS_Team[9]; set $@VS_Status,1; announce "Batalha Campal -- Free For All -- Começando",0,0x483D8B; donpcevent "FFA_Arena::OnReady"; } else announce "Batalha Campal -- Free For All -- " + (10 - .@Queue_Count) + " Jogadores Para Começar, Use @joinbg Para Participar.",0,0x483D8B; end; OnFri0600: // Friday, 6 a.m. rankreset 1; // Ranking Reset end; // BattleGround Happy Hour OnDoHappyHour: OnClock1600: OnClock1800: OnClock2000: OnClock2200: switch( gettime(4) ) { case 1: case 3: case 5: if( gettime(3) >= 20 && gettime(3) < 22 ) { announce "-- Battleground Happy Hour has begun | Ranked Arena Mode --",0,0x00FF00; setbattleflag "bg_reward_rates",120; // +20% Reward Rates setbattleflag "bg_ranked_mode",1; end; } if( gettime(3) == 22 ) { announce "-- Battleground Happy Hour is over | Regular Arena Mode --",0,0x00BFFF; setbattleflag "bg_reward_rates",100; // Normal Rates setbattleflag "bg_ranked_mode",0; end; } break; case 2: case 4: case 6: if( gettime(3) >= 16 && gettime(3) < 18 ) { announce "-- Battleground Happy Hour has begun | Ranked Arena Mode --",0,0x00FF00; setbattleflag "bg_reward_rates",120; // +20% Reward Rates setbattleflag "bg_ranked_mode",1; end; } if( gettime(3) == 18 ) { announce "-- Battleground Happy Hour is over | Regular Arena Mode --",0,0x00BFFF; setbattleflag "bg_reward_rates",100; // Normal Rates setbattleflag "bg_ranked_mode",0; end; } break; } end; } // Registration NPC // ********************************************************************* - script BG_Register -1,{ if( getvariableofnpc(.Ready,"BG_Queue_Join") == 0 ) donpcevent "BG_Queue_Join::OnInit"; mes "[^FFA500Battle Recruiter^000000]"; mes "Bem Vindo ao novo sistema de Batalha Campal! Aqui você pode registrar-se ou registrar seu Grupo no sistema. O sistema seleciona os Times e Arena radomicamente e segue alternando as Arenas de forma consecutiva. Conquest -->Rush -->Conquest --> Conquest e por ai vai."; mes "O que você quer fazer?"; next; switch( select("^FFA500Batalha Campal Arenas^000000:^0000FFFree For All Arena^000000:Ir as lojas da Batalha Campal") ) { case 1: mes "[^FFA500Recrutadora de Batalha^000000]"; mes "Batalha Campal, diferentes tipos de jogos onde as equipes lutam pela vitória."; mes "Oque você quer fazer?"; next; switch( select("Registrar:Registrar Grupo:Cancelar Registro:Battleground Help") ) { case 1: if( BaseLevel < 80 ) { mes "[^FFA500Recrutadora Batalha Campal^000000]"; mes "Nível necessário para participar de um campo de batalha é de 80."; close; } if( checkquest(8506,PLAYTIME) == 2 ) erasequest 8506; if( checkquest(8506,PLAYTIME) != -1 ) { mes "[^FFA500Recrutadora Batalha Campal^000000]"; mes "Você é um desertor. Você não pode participar até que o indicador se apaga"; close; } mes "[^FFA500Recrutadora Batalha Campal^000000]"; mes "Vamos prosseguir com o registro..."; mes "Você pode esperar em qualquer cidade até BG começa."; mes "Feche esta janela para continuar..."; close2; bg_queue_join getvariableofnpc(.BG_Queue,"BG_Queue_Join"); end; case 2: if( getcharid(1) == 0 ) { mes "[^FFA500Battle Recruiter^000000]"; mes "Você não estar em um grupo."; close; } mes "[^FFA500Battle Recruiter^000000]"; mes "Vamos prosseguir com o registro..."; mes "Você pode esperar em qualquer cidade até BG começa."; mes "Feche esta janela para continuar..."; close2; bg_queue_partyjoin getcharid(1),getvariableofnpc(.BG_Queue,"BG_Queue_Join"); end; case 3: mes "[^FFA500Battle Recruiter^000000]"; mes "Se você estiver registrado, você será removido."; mes "Você tem certeza?"; next; if( select("Sim, sair da fila:Não, eu vou ficar") == 2 ) { mes "[^FFA500Battle Recruiter^000000]"; mes "Ok, nada para mudar."; close; } mes "[^FFA500Battle Recruiter^000000]"; mes "Feche esta janela para continuar ..."; close2; bg_queue_leave getvariableofnpc(.BG_Queue,"BG_Queue_Join"); end; case 4: mes "[^FFA500Battle Recruiter^000000]"; mes "Tell me... what battleground you don't understand?"; next; switch( select("Capture the Flag:Team DeathMatch:Stone Control:Eye of Storm:Bossnia:Domination:Triple Inferno:Conquest:Rush") ) { case 1: mes "[^FFA500Battle Recruiter^000000]"; mes "The objective of the Flavius Battle CTF is to score 3 points before your enemy, by capture their Flag."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "To capture a Flag you need to take the enemy flag, and bring it to your base flag."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "If your base flag is captured too, you need to kill the flag carrier and take the flag back to your base."; break; case 2: mes "[^FFA500Battle Recruiter^000000]"; mes "Kill all the enemy players to let their Team without points."; mes "Protect our army."; break; case 3: mes "[^FFA500Battle Recruiter^000000]"; mes "Take the Stones in the middle of the battlefield and put in on your base, in the Stone Points."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "Each Stone will give points to your team. First team reach 99 points wins the game."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "Protect your stones from to be captured by the enemy."; break; case 4: mes "[^FFA500Battle Recruiter^000000]"; mes "There are two bases, North and South which teams can capture by holding position on the Base more than the other team."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "Each base will give you points each 5 seconds of Domination. If your Team control both bases the amount of points increases."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "To get aditional points, in the middle there is a Flag spawn, capture it and put it on any of your team Bases."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "The first Team reach 99 points wins the match."; break; case 5: mes "[^FFA500Battle Recruiter^000000]"; mes "Attack the enemy base and destroy each MVP Guardian. To do damage to the guardian your team must capture the Balance Flag in the middle base."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "Each team have 5 guardian to be protected or killed."; break; case 6: mes "[^FFA500Battle Recruiter^000000]"; mes "There are three bases, North, Center and South which teams can capture by holding position on the Base more than the other team."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "Each base will give you points each 5 seconds of Domination."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "The first Team reach 99 points wins the match."; break; case 7: mes "[^FFA500Battle Recruiter^000000]"; mes "There are 3 teams in the battlefield, your team and other 2 enemies."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "Kill the enemy players, collect the skulls and bring then to the Sacrifice Totem to win points."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "You can collect your own team skulls and bring then to your Sacrifice Totem to avoid other teams to score."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "If you get killed all your skulls will be drop to the floor, including your own skull. First Team to get 80 points wins the battle."; break; case 8: mes "[^FFA500Battle Recruiter^000000]"; mes "If you are Attacking, destroy the enemy defenses and it's Flag."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "If you are Defending, protect your castle defenses and the Flag."; break; case 9: mes "[^FFA500Battle Recruiter^000000]"; mes "Fight to capture the Castle and organize your team to defend it."; next; mes "[^FFA500Battle Recruiter^000000]"; mes "If you fail on the first capture, kill the defender and take it for your team."; break; } break; } close; case 2: mes "[^FFA500Battle Recruiter^000000]"; mes "Free For All Arena is a Duel between 10 players with No Teams."; mes "The target is to kill 25 players."; mes "What do you want to do?"; next; switch( select("Register:Leave Queue") ) { case 1: if( BaseLevel < 80 ) { mes "[^FFA500Battle Recruiter^000000]"; mes "Min required level to join a battleground is 80."; close; } if( checkquest(8506,PLAYTIME) == 2 ) erasequest 8506; if( checkquest(8506,PLAYTIME) != -1 ) { mes "[^FFA500Battle Recruiter^000000]"; mes "You are a Deserter. You can't participate until the indicator goes off"; close; } mes "[^FFA500Battle Recruiter^000000]"; mes "Let's proceed with the registration..."; mes "You must wait on any City until BG starts."; mes "Close this window to continue..."; close2; bg_queue_join getvariableofnpc(.VS_Queue,"BG_Queue_Join"); end; case 2: mes "[^FFA500Battle Recruiter^000000]"; mes "If you are registered, you will be removed."; mes "Are you sure?"; next; if( select("Yes, leave queue:No, I will stay") == 2 ) { mes "[^FFA500Battle Recruiter^000000]"; mes "Ok, nothing to change."; close; } mes "[^FFA500Battle Recruiter^000000]"; mes "Close this window to continue..."; close2; bg_queue_leave getvariableofnpc(.VS_Queue,"BG_Queue_Join"); end; } break; case 3: mes "[^FFA500Battle Recruiter^000000]"; mes "May the War God bless you."; close2; warp "bat_room",155,150; end; OnInit: waitingroom "Batalha Campal",0; } end; } bat_room,156,150,3 duplicate(BG_Register) Battle Recruiter#bat 728 prontera,162,191,4 duplicate(BG_Register) Battle Recruiter#prt 728 // General Guillaume // ********************************************************************* bat_room,160,159,3 script General Guillaume 420,{ cutin "bat_kiyom2",2; mes "[General Guillaume]"; mes "Hot-blooded adventurer, we need your ability to win this battle."; next; cutin "bat_kiyom1",2; mes "[General Guillaume]"; mes "Our great king, Marcel Marollo VII, is very sick lately. His Majesty has declared that he chosen either me or Prince Croix as the next king amongst his 9 sons."; next; mes "[General Guillaume]"; mes "Two kings can't share a nation!"; mes "Only the one victorious from His Majesty's appointed battle will be enthroned."; next; mes "[General Guillaume]"; mes "This is however, not just a battle between us. This battle will determine the future of this country. I pledge on my honor to prove that I'm the one who can protect this Maroll from outside threats."; next; switch( select("Join the Blue Team","Join the Green Team","End Conversation") ) { case 1: cutin "bat_kiyom2",2; mes "[General Guillaume]"; mes "Welcome to my army, comrade."; mes "Your eyes tell me that you're a soldier that I can trust."; set Bat_Team,1; next; mes "[General Guillaume]"; mes "Now, go upstairs and apply for battle with your comrades. I'm sure they'll welcome you whole-heartedly!"; break; case 2: cutin "bat_kiyom2",2; mes "[General Guillaume]"; mes "So you will take this fight as your own..."; mes "Then you are my enemy."; set Bat_Team,0; next; mes "[General Guillaume]"; mes "Go now, We will meet again in the Battlefield."; break; case 3: mes "[General Guillaume]"; mes "I'll be the one who will capture the flag!"; break; } close2; cutin "",255; end; } // General Croix // ********************************************************************* bat_room,160,140,3 script Prince Croix 416,{ cutin "bat_crua1",2; mes "[Prince Croix]"; mes "Wise adventurer, why don't you lend us your power for victory?"; next; cutin "bat_crua2",2; mes "[Prince Croix]"; mes "I do not wish to shed blood, but I have no choice but to fight for the possibility of peace and for the sake of my people."; next; mes "[Prince Croix]"; mes "General Guillaume may have an advantage in this battle as he is the great general of Maroll, but that doesn't automatically mean he'll win. I want to win this battle so that I can grant a better future for my people."; next; switch( select("Join the Red Team","Join the Green Team","End Conversation") ) { case 1: mes "[Prince Croix]"; mes "Thank you so much. I feel like I can win with the help of adventurers like you. Now, please go downstairs and join your comrades in sharpening their skills to fight the enemy!"; set Bat_Team,2; break; case 2: mes "[Prince Croix]"; mes "So you will take this fight as your own..."; mes "Then you are my enemy."; set Bat_Team,0; next; mes "[Prince Croix]"; mes "Go now, We will meet again in the Battlefield."; break; case 3: mes "[Prince Croix]"; mes "For Maroll!"; break; } close2; cutin "",255; end; } // Guard Dummy // ********************************************************************* bat_room,161,141,3 script Prince Croix's Aid::bat_aid 415,{ end; } bat_room,161,139,3 duplicate(bat_aid) Prince Croix's Aid::bat_aid2 415 bat_room,161,160,3 duplicate(bat_aid) General Guillaume's Aid::bat_aid3 419 bat_room,161,158,3 duplicate(bat_aid) General Guillaume's Aid::bat_aid4 419 // Flags // ********************************************************************* - script Base Flag#bg -1,{ end; } // BattleGround Warper - Exit // ********************************************************************* bat_room,148,150,4 script Teleporter#bat 124,{ mes "[Teleporter]"; mes "Do you wish to leave the battlefield? Use my service to return to town."; next; if( select("Leave:Don't Leave") == 2 ) { mes "[Teleporter]"; mes "I'll be here whenever you're in need of my service."; close; } switch( @ArenaPVP_out ) { // Rune Midgard Republic case 1: warp "prontera",138,86; break; case 2: warp "payon",165,98; break; case 3: warp "morocc",153,94; break; case 4: warp "umbala",121,143; break; case 5: warp "comodo",196,140; break; case 6: warp "niflheim",214,193; break; case 7: warp "aldebaran",143,111; break; case 8: warp "geffen",107,53; break; // Schwarzard Republic case 9: warp "yuno",151,177; break; case 10: warp "hugel",99,143; break; case 11: warp "lighthalzen",167,93; break; case 12: warp "einbroch",70,194; break; case 13: warp "einbech",168,130; break; // Arunafelz Republic case 14: warp "rachel",118,114; break; case 15: warp "veins",207,122; break; // Islands case 16: warp "nameless_n",161,179; break; case 17: warp "louyang",213,106; break; case 18: warp "gonryun",154,111; break; case 19: warp "ayothaya",148,109; break; case 20: warp "moscovia",229,195; break; case 21: warp "xmas",151,127; break; case 22: warp "amatsu",203,107; break; case 23: warp "izlude",126,114; break; case 24: warp "brasilis",195,211; break; case 25: warp "manuk",279,214; break; case 26: warp "splendide",200,174; break; // Anyplace else default: set .@spoint$, getsavepoint(0); set .@x, getsavepoint(1); set .@y, getsavepoint(2); mes "[Teleporter]"; mes "You will be sent back to " + .@spoint$ + "."; close2; warp .@spoint$, .@x, .@y; break; } set @ArenaPVP_out, 0; end; } // Kafra // ********************************************************************* bat_room,148,147,4 script Kafra Staff::kaf_bat 861,{ cutin "kafra_09",2; callfunc "F_Kafra",0,2,1,150,0; } // Badges Exchange // *********************************************************************
  18. eu uso um emulador eathena e o item visual para de funcionar quando eu relogo...dai tenho que desequipar e equipar denovo para ele voltar ao normal. o suporte do eathena é inativo então resolvi pedir ajuda aqui ^^
  19. I have a eAthena emulator that has the following error .. when played reloga visual item does not work, then it has to equip and unequip again, wanted to know where in the concert that I src
  20. yes how do I show the buff Bragi in the side? as I leave the status buffs like that?
×
×
  • Create New...