Jump to content
  • 0
Sign in to follow this  
Easycore

PvP Ladder - Discount point at die

Question

6 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites
  • 0

@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 ~

Edited by Easycore

Share this post


Link to post
Share on other sites
  • 0

@@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 ================================================================
//===== Additional Comments: =================================================
//= still don't have modify value option, will be done ... in next year ...
//============================================================================
Edited by mrlongshen

Share this post


Link to post
Share on other sites
  • 0

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 ...

 

 

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

@@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.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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