Jump to content
  • 0

PK PvP Statistics Near Finishing *help needed*


tonelli

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  08/27/14
  • Last Seen:  

PvP, PK, WoE Statistician with 5 Ladder Systems
Full PvP PK WoE Statistician complete with:

personal pvp/pk stats

personal woe stats

pvp/pk kill record

pvp/pk death record

pvp/pk kdr

pvp killing spree counter (resets on pvp/pk death and logout/login)

after spree is over logs your highest pvp/pk spree count

woe kill record

woe death record

woe kdr

woe killing spree counter (resets on woe death and logout/login)

after spree is over logs your highest woe spree count

emperium break record

Top 25 pvp/pk kills ladder ranking

Top 25 pvp/pk kdr ladder ranking

Top 25 woe kills ladder ranking

Top 25 woe kdr ladder ranking

Top 25 emperium breaker ladder ranking

overall kdr (pvp/pk and woe)

@pvpstats (displays in chat: kills, deaths, kdr, rank)

@woestats (displays in chat: kills, deaths, kdr, rank, emperiums broken)

admin individual or full ladder reset in NPC as well as

@adminstats (administrator only individual or full ladder reset of everything listed above and reloadscript attached with server-wide courtesy warning)

prevents GMs from ranking and being recorded

 

announcments:

on deaths: "killer" just killed "victim"

on Emperium destroyed: "Breaker" has broken the Emperium!

on kill messages self : You just killed "player"

 

In the Works:

personal rank display for pvp kdr ladder and woe kdr ladder

announces when player takes new PvP/WoE KDR Rank or Emperium Breaker Position

 

my script is FREE for anyone to use.

editing variable and npc names and adding on allowed as long as original function and author are not deleted.. i just dont know how to post it or share it

keeps saying file failed to upload T_T

 

**Edit** ~ Thank you Emistry for the info

Heres my FREE Script

 

View:

http://rathena.org/board/pastebin/1604a1nej4x5r/

Pastebin Download:

http://rathena.org/board/pastebin/1604a1nej4x5r/dl/

Official Download: (Pending Approval)

http://rathena.org/board/files/file/3291-pvp-pk-woe-statistician/

 

implemented fixes:
v1.1: is 100% functional with no errors on my personal server
v1.2: fixed spelling errors and possible duplicate name clashing with other pvp scripts
but still **NEEDS FIELD TESTING** i do not have any players on my server to test it

Edited by tonelli
Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

BUMP.

 

Any SQL table for this please?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

you can upload to any paste site ....

ex. Pastebin / uPaste 

 

rAthena even have own pastebin

http://rathena.org/board/pastebin/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  08/27/14
  • Last Seen:  

Ah! thank you emistry! that will be more useful

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  04/03/12
  • Last Seen:  

not working on my server
if anyone should be in setting aside this script?
what if you want to activate in pvp_y_2-2

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  10/02/14
  • Last Seen:  

I guess u need replace here the maps u want to use for pvp stats, i'm no 100% sure, but maybe tonelli can correct me if i'm wrong ;)

//==== On PvP Player Kill End ================================
- script pvppckilldie -1,{
OnInit:
set .MaxPlayers,25;
set .Options,4; // .Option,4; Bugged? - Implemented Fix [Needs Test]
setarray .@maps$[0],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05";
setarray .@maps$[5],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05";
setarray .@maps$[10],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05";
setarray .@maps$[15],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05";
end;


OnPCKillEvent:
if(getgmlevel()<1) && (agitcheck() || agitcheck2()) {
if(.@maps$[0-20] == strcharinfo(3)){ end; }
else if(getgmlevel()<1) {
set pvpkillcount, pvpkillcount+1;
set pvpkillspree, pvpkillspree+1;
if(pvpkillcount>0) && (pvpdeathcount>0) { dispbottom "PvP Kill Count: "+pvpkillcount+", PvP Death Count: "+pvpdeathcount+", PvP KDR: "+callfunc("KDR_Calc", pvpkillcount, pvpdeathcount)+":1"; }
else if(pvpkillcount>0) && (pvpdeathcount==0) { dispbottom "PvP Kill Count: "+pvpkillcount+", PvP Death Count: "+pvpdeathcount+", PvP KDR: "+pvpkillcount+":1"; }
else if(pvpkillcount==0) && (pvpdeathcount>0) { dispbottom "PvP Kill Count: "+pvpkillcount+", PvP Death Count: "+pvpdeathcount+", PvP KDR: 0:"+pvpdeathcount+""; }
else { dispbottom "PvP Kill Count: "+pvpkillcount+", PvP Death Count: "+pvpdeathcount+", PvP KDR: 0:0"; }
for(set $pvppos,0; $pvppos < .MaxPlayers; set $pvppos,$pvppos+1){
if(pvpkillcount>$pvpxrank[$pvppos]){
if($pvpxrank$[$pvppos] != strcharinfo(0)){
setarray $pvpxrank$[$pvppos+1],$pvpxrank$[$pvppos];
setarray $pvpxrank[$pvppos+1],$pvpxrank[$pvppos];
}
setarray $pvpxrank$[$pvppos],strcharinfo(0);
setarray $pvpxrank[$pvppos],pvpkillcount;
if($pvppos<=1){ $pvppos = 1; sleep 1; end; }
else if(.Options&4) { announce ""+strcharinfo(0)+" Now Holds Rank "+$pvppos+" on the PvP Ladder",bc_all; }
}
} sleep 1; }}
end;


} //=== On PvP Player Kill End ===============================






//==== On PvP Player Death ===================================
- script pvppcdiekilled -1,{
OnInit:
setarray .@maps$[0],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05";
setarray .@maps$[5],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05";
setarray .@maps$[10],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05";
setarray .@maps$[15],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05";
end;


OnPCDieEvent:
if(getgmlevel()<1) && (agitcheck() || agitcheck2()) {
if(.@maps$[0-20] == strcharinfo(3)){ end; }
else if ( killerrid < 100000000 ) && (getgmlevel()<1) {
announce rid2name(killerrid) + " just killed " + strcharinfo(0) + "!",bc_all;
message rid2name(killerrid),"You just killed " + strcharinfo(0) +"!";
set pvpdeathcount, pvpdeathcount+1;
if(pvpkillspree>xpvpspree) set xpvpspree, xpvpspree = pvpkillspree;
pvpkillspree = 0;
dispbottom "PvP Death Count is now "+pvpdeathcount+", and PvP Killing Spree Reset.";
end;
}}
} //=== On PvP Player Death End ==============================
Edited by hannah
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  04/03/12
  • Last Seen:  

[Warning]: npc_parsename: Duplicate unique name in file 'npc/re/custom2/ivent/PK PvP Statistics.txt', line'468'. Renaming 'adminstatcmd' to '18_-1_0_0'.
[Debug]: this npc:
   display name 'adminstatcmd'
   unique name 'adminstatcmd'
   map=(not on a map), x=0, y=0
[Debug]: other npc in 'npc/re/custom2/ivent/party vs party.txt' :
   display name 'adminstatcmd'
   unique name 'adminstatcmd'
   map=(not on a map), x=0, y=0
[Warning]: npc_parsename: Duplicate unique name in file 'npc/re/custom2/ivent/PK PvP Statistics.txt', line'591'. Renaming 'woeempbreak' to '19_-1_0_0'.
[Debug]: this npc:
   display name 'woeempbreak'
   unique name 'woeempbreak'
   map=(not on a map), x=0, y=0
[Debug]: other npc in 'npc/re/custom2/ivent/party vs party.txt' :
   display name 'woeempbreak'
   unique name 'woeempbreak'
   map=(not on a map), x=0, y=0

error.. rank not show..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  08/27/14
  • Last Seen:  

octavianus:

i fixed the duplicate name errors and posted the fixed file, but my PvP counter is always active and should count ANY player vs player activity in ALL MAPS server has as long as WoE is not active

you also seem to have another script with the same script names as my files. to make it easier for you ill change my scripts names

p.s. ranks will not show if you are gm level 1 or higher

 

hannah:

the pvp kill/death scripts sections you posted only turns off PvP counters for the WoE maps so it doesnt count each kill as PvP AND WoE

as well as in the WoE section, set maps only activates WoE counter for the set maps

 

P.S. thank you for trying out my script, i havent been able to move forward because i dont have any players to test it out lol

Edited by tonelli
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  04/03/12
  • Last Seen:  

[Warning]: npc_event: player's event queue is full, can't add event 'woepcdiekilled::OnPCDieEvent' !
[Warning]: npc_event: player's event queue is full, can't add event 'pvppcdiekilled::OnPCDieEvent' !
[Warning]: script:query_sql: Only 128/387 rows have been stored.

Thanks for the help, but I still undergo some error

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  08/27/14
  • Last Seen:  

your event limit has been reached, you can increase the limit in the

 

src/map/map/h

#define MAX_EVENTQUEUE 2 <-- increase this number

 

*still working on rank announce fix*

Edited by tonelli
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  224
  • Reputation:   4
  • Joined:  02/09/12
  • Last Seen:  

 

[Debug]: at c:\users\admin\desktop\rathena\src\map\script.c:15615 - SELECT `char

_reg_num_db`.`value`,`char`.`name` FROM `char` INNER JOIN `char_reg_num_db` ON `

char_reg_num_db`.`char_id`=`char`.`char_id` WHERE `char_reg_num_db`.`key`='woeki

llspree' ORDER BY `char_reg_num_db`.`value` DESC LIMIT 1

[Debug]: Source (NPC): PvP Statistician at prontera (171,223)

Edited by simplexjay2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  08/27/14
  • Last Seen:  

Im not sure why your getting that debug, i havent gotten that. are your sql tables the same names as the ones i used?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   1
  • Joined:  06/14/12
  • Last Seen:  

Same Error, any help?

 

Debug & SQL Error DB ERROR

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  07/24/13
  • Last Seen:  

Please upload the database sql file. We dont have the SQL files

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   0
  • Joined:  11/25/12
  • Last Seen:  

Hey tonelli, thanks for the script. How can I make PvP count only on selected maps?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  103
  • Topics Per Day:  0.03
  • Content Count:  323
  • Reputation:   4
  • Joined:  12/09/13
  • Last Seen:  

uhmm is there any sql table for this?

Link to comment
Share on other sites

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