PvP Ladder - Discount point at die

this is the 4th script that I saw someone using txt style pvp ladder

1st terces, 2nd goddameit, 3rd mine, 4th masao

the problem with txt style ladder is it uses an algorithm to move the array index

so its quite hard to alter the calculation that already has a fixed formula with it

like you request that wants to add die ranking, to move the index, that would be impossible (if you are already using it)

its better to use SQL ladder script, where it can still perform fast with million of rows if the specific key is indexed well

 
Last edited by a moderator:
@AnnieRuru Thank you for the explanation.

Really I needed a ladder in which trigger a announce "player's now rank XX" or something when player take a rank between 1 to 10.

So, I searched a lot of scripts and this has that function of trigger something when player rank up ~

 
Last edited by a moderator:
@@Easycore Hello bro. I'm using annie script.

//===== eAthena Script =======================================================
//= PVP ladder script with dota announcement ( SQL only )
//===== By: ==================================================================
//= ~AnnieRuru~
//===== Current Version: =====================================================
//= 2.9
//===== Compatible With: =====================================================
//= eAthena SQL 14279, with MySQL 5.1
//===== Description: =========================================================
//= PVP ladder store in SQL table
//= plus anti-sit-killer feature
//===== Topic ================================================================
//= http://www.eathena.ws/board/index.php?showtopic=177918
//===== Additional Comments: =================================================
//= still don't have modify value option, will be done ... in next year ...
//============================================================================
 
Last edited by a moderator:
I'm quite sure SQL also can do it

OnPCLoginEvent:

query_sql "select charid from ladder order by kill limit "+ .ranksize, .@charid;

for ( .@i = 0; .@i < .ranksize; .@i++ )

if ( getcharid(0) == .@charid[.@i] )

@pvprank = .@i +1;

end;

OnPCKillEvent:

....

query_sql "select charid from ladder order by kill limit "+ .ranksize, .@charid;

for ( .@i = 0; .@i < .ranksize; .@i++ )

if ( getcharid(0) == .@charid[.@i] )

.@tmprank = .@i +1;

if ( .@tmprank > .@pvprank )

announce strcharinfo(0) +" has gain to rank no."+ .@tmprank, bc_all;

edit : paleface ... members are very good in digging out my old scripts ...

 
Last edited by a moderator:
@@AnnieRuru Because your script will become legacy. eathena to hercules. wew. 3 generation ro, but all still using your script .Muahahaha 
default_cool.png


 
@@AnnieRuru Hi again, I tried add this:

query_sql "select char_id from pvpladder order by kills limit "+ .showtotal, .@charid; for ( .@i = 0; .@i < .showtotal; .@i++ ) if ( getcharid(0) == .@charid[.@i] ) .@tmprank = .@i +1; if ( .@tmprank > .@pvprank ) announce strcharinfo(0) +" has gain to rank no."+ .@tmprank, bc_all;
In your PvP Ladder script, but the player with most kills is always "Rank 2", and player with less kills is always "Rank 1".

Sorry but I am very ignorant in this area.

 
Back
Top