Jump to content
  • 0

WoE Rank Script


Relzz

Question


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

This is a WoE Player Kills Rank.. but idk why it doens't works.. maybe im doing something bad with arrays.. or idk, it simply doens't turn on the OnPCKillEvent: tag x_x

(i put something like)

OnPCKillEvent:

set Asesinatos,Asesinatos+1;

end;

and it doens't work.. even without the arrays.. i checked the ragnarok DB in global_reg_value and.. there's no.. char value called "Asesinatos" ..

   -    script    PvPWoEAnnounce    -1,{
end;

OnInit:
setarray .mapaswoe$[0], "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05","arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05","gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05","payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05","prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05","schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
end;

OnPCKillEvent:
//if (agitcheck() == 0 || agitcheck2() == 0)end;
   for(set .@,0; .@i < getarraysize(.mapaswoe$); set .@i,.@i+1) {
       if(strcharinfo(3) == .mapaswoe$[.@i]) {
       set Asesinatos, Asesinatos+1;
       callfunc ("WoEPvPRank",Asesinatos,strcharinfo(0));
       }end;
   }
end;
}

payg_cas03,228,32,3    script    WoE Rank#PvP::PvPWoE    837,{
mes "[^FF0000Rank WoE^000000]";
mes "Top 1: ^0000FF" +$topwoe1pvp$ +"^000000 muertes: ^FF0000" +$topwoe1pvp +"^000000.";
mes "Top 2: ^0000FF" +$topwoe2pvp$ +"^000000 muertes: ^FF0000" +$topwoe2pvp +"^000000.";
mes "Top 3: ^0000FF" +$topwoe3pvp$ +"^000000 muertes: ^FF0000" +$topwoe3pvp +"^000000.";
mes "Top 4: ^0000FF" +$topwoe4pvp$ +"^000000 muertes: ^FF0000" +$topwoe4pvp +"^000000.";
mes "Top 5: ^0000FF" +$topwoe5pvp$ +"^000000 muertes: ^FF0000" +$topwoe5pvp +"^000000.";
close;    

}


function    script    WoEPvPRank    {
set @mvptotalwoe, getarg(0);
set @nombwoe$, getarg(1);

if (@mvptotalwoe > $topwoe1pvp) {
   if ($topwoe1pvp$ == strcharinfo(0)) { // Si estamos en top 1
       // Simplemente seguimos contando
       set $topwoe1pvp, @mvptotalwoe;
       set $topwoe1pvp$, @nombwoe$;
   } else { // Si alcanzamos el top 1
       // Almacenamos el antiguo top 1
       set @auxwoe, $topwoe1pvp;
       set @auxwoe$, $topwoe1pvp$;
       // Nos asignamos al top 1
       set $topwoe1pvp, @mvptotalwoe;
       set $topwoe1pvp$, @nombwoe$;
       // El viejo top 1 ahora es top 2
       set $topwoe2pvp, @auxwoe;
       set $topwoe2pvp$, @auxwoe$;
   } // End if
} else if (@mvptotalwoe > $topwoe2pvp) {
   if ($topwoe2pvp$ == strcharinfo(0)) { // Si estamos en top 2
       // Seguimos contando las muertes del top 2
       set $topwoe2pvp, @mvptotalwoe;
       set $nombwoe2, @nombwoe$;
   } else { // Si alcanzamos el top 2
       // Almacenamos el antiguo top 2
       set @auxwoe, $topwoe2pvp;
       set @auxwoe$, $topwoe2pvp$;
       // Nos asignamos al top 2
       set $topwoe2pvp, @mvptotalwoe;
       set $topwoe2pvp$, @nombwoe$;
       // El viejo top 2 ahora es top 3
       set $topwoe3pvp, @auxwoe;
       set $topwoe3pvp$, @auxwoe$;
   } // End if
} else if (@mvptotalwoe > $topwoe3pvp) {
   if ($topwoe3pvp$ == strcharinfo(0)) { // Si estamos en top 3
       // Seguimos contando el top 3
       set $topwoe3pvp, @mvptotalwoe;
       set $topwoe3pvp$, @nombwoe$;
   } else { // Si alcanzamos el top 3
       // Almacenamos el antiguo top 3
       set @auxwoe, $topwoe3pvp;
       set @auxwoe$, $topwoe3pvp$;
       // Nos asignamos al top 3
       set $topwoe3pvp, @mvptotalwoe;
       set $topwoe3pvp$, @nombwoe$;
       // El viejo top 3 ahora es top 4
       set $topwoe4pvp, @auxwoe;
       set $topwoe4pvp$, @auxwoe$;
   } // End if
} else if (@mvptotalwoe > $topwoe4pvp) {
   if ($topwoe4pvp$ == strcharinfo(0)) { // Si estamos en top 4
       // Seguimos contando el top 4
       set $topwoe4pvp, @mvptotalwoe;
       set $topwoe4pvp$, @nombwoe$;
   } else { // Si alcanzamos el top 4
       // Almacenamos el antiguo top 4
       set @auxwoe, $topwoe4pvp;
       set @auxwoe$, $topwoe4pvp$;
       // Nos asignamos al top 4
       set $topwoe4pvp, @mvptotalwoe;
       set $topwoe4pvp$, @nombwoe$;
       // El viejo top 4 es ahora top 5
       set $topwoe5pvp, @auxwoe;
       set $topwoe5pvp$, @auxwoe$;
   } // End if
} else if (@mvptotalwoe > $topwoe5pvp) {
   if ($topwoe5pvp$ == strcharinfo(0)) { // Si estamos en top 5
       // Seguimos contando el top5
       set $topwoe5pvp, @mvptotalwoe;
       set $nombwoe5, @nombwoe$;
   } else { // Si alcanzamos el top 5
       // Directamente nos sobreescribimos en el top 5
       set $topwoe5pvp, @mvptotalwoe;
       set $topwoe5pvp$, @nombwoe$;
   } // End if
} // End if
return;
} // End function

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

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  08/23/17
  • Last Seen:  

How to reset the rank?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

*-* okay, thanks!

+1 rep 4 you

tyvm xD

mf_gvg_castle means a castle? or it toggles on every GvG map?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

×
×
  • Create New...