Jump to content

Recommended Posts

Posted

Woe Ranking List ( GvG, Emp Break, Guild Rank ) with Points and Shop


 

In response to this post : 

https://rathena.org/board/topic/122667-woe-ranking-script/

https://rathena.org/board/topic/121631-woe-rankings-script/#comment-373249

https://rathena.org/board/topic/96397-woe-ranking/

https://rathena.org/board/topic/109488-ranking-woe/
 

Quote

Contact:

Discord: BeWan#8988

Website: https://www.foxhosting.xyz/store/

By downloading this file, you agree with my Terms of Service:

• You are not allowed remove my signature from any of the included files.
• You are not allowed claim my work as yours.

 

If you like it, give me a ?


 

  • Upvote 1
  • Love 8
  • Like 1
Posted

 

hi @BeWan First of all, thanks for the script, but I think it should be modified a little more. and add other functions if you can.
well, first when I test the scrip, all tops give the same information, murders, dead and emp. I think that part should be separated.
and I also noticed that the murders and deaths take it for the same data,
and already taking advantage, it will be possible to add the prize function per month, for example, the first places, receive a prize every 30 days.
Upon receiving your prize they are announced by the entire server, if it is not too much to ask.

pdt if something is not understood is why I am using the google translator

Posted
6 hours ago, JinYuichi said:

 

hi @BeWan First of all, thanks for the script, but I think it should be modified a little more. and add other functions if you can.
well, first when I test the scrip, all tops give the same information, murders, dead and emp. I think that part should be separated.
and I also noticed that the murders and deaths take it for the same data,
and already taking advantage, it will be possible to add the prize function per month, for example, the first places, receive a prize every 30 days.
Upon receiving your prize they are announced by the entire server, if it is not too much to ask.

pdt if something is not understood is why I am using the google translator

yes same information but different rank list when you choose on the 3 option(kills, deaths, emp break).

  • 2 weeks later...
Posted (edited)

No emperium breaker statistics on Woe SE. How can i Fix it?

Also bug with nicknames. 2180 - another char on account of KeeperSura, but I killed KeeperSura, nickname is true.

image.png.850de771284dd8da388da2349458c1bf.png

Edited by 3TAJIOH
Posted
16 hours ago, 3TAJIOH said:

No emperium breaker statistics on Woe SE. How can i Fix it?

Go to: npc / guild2 / agit_main_se.txt

find:

OnStartArena:
	set .@GID,getcharid(2);

replace with this:

OnStartArena:
	set .@breaker$, strcharinfo(0);
	query_sql( "SELECT * FROM woe_ranking WHERE `PlayerName` = '"+strcharinfo(0)+"'", .@CharID, .@Name$, .@Kills, .@Deaths, .@EmpBreak);
	set .WoeBreakPoints, 1;
	set ToTalB , .@EmpBreak + .WoeBreakPoints;
	set .@GID,getcharid(2);
	
	if(.@Name$ == strcharinfo(0)){
	query_sql("UPDATE `woe_ranking` SET `EmpBreak` = '"+ToTalB+"' WHERE `PlayerName` = '"+strcharinfo(0)+"'");
	}else{
	query_sql("INSERT INTO `woe_ranking` (`Char_ID`,`PlayerName`,`Kills`,`Deaths`,`EmpBreak`) VALUES ('"+getcharid(0)+"', '"+strcharinfo(0)+"', '"+.@Kills+"', '"+.@Deaths+"', '"+ToTalB+"')"); 
	}

untested.

 

15 hours ago, 3TAJIOH said:

Also bug with nicknames. 2180 - another char on account of KeeperSura, but I killed KeeperSura, nickname is true.

image.png.850de771284dd8da388da2349458c1bf.png

npc script get or save the name of the character not the nickname.

Posted
2 hours ago, 3TAJIOH said:

Yes, but the ID and name of character are not correct.

im using this script too working fine. try not to use nickname.

Posted (edited)

First killed SuperNovice by GM, then killed GM by SuperNovice. ID 8 is another character on Supernovice's account.

image.png.acb8152f40ced061d290483d418eca1d.png

Didn't change ur code.

}else if(strcharinfo(3) == "pvp_n_1-5"){ // This is PVP MAP restriction
	if(getcharid(3)==killedrid) end;
		set PvPpoints, PvPpoints+.PvP_Point;
		query_sql( "SELECT * FROM pvp_ranking WHERE `Char_ID` = '"+getcharid(0)+"'", .@CharID, .@Name$, .@Kills, .@Deaths);
		set ToTalPvPoints , .@Kills + .PvP_Point;
		
	if(getcharid(0) == .@CharID){
		query_sql("UPDATE `pvp_ranking` SET `Kills` = '"+ToTalPvPoints+"' WHERE `Char_ID` = '"+getcharid(0)+"'");
	}else{	
		query_sql("INSERT INTO `pvp_ranking` (`Char_ID`,`PlayerName`,`Kills`,`Deaths`) VALUES ('"+getcharid(0)+"', '"+strcharinfo(0)+"', '"+.PvP_Point+"', '"+.@Deaths+"')"); 
	}
		
		//This is the point system on the player, you can disable this anytime by adding comment " // "
		dispbottom "Вы убили "+rid2name(killedrid)+" и получили "+.PvP_Point+" очка.";
		attachrid(killedrid);
		set PvPpoints, PvPpoints-.PvP_Deductpoint;
		dispbottom "Вас убил "+rid2name(killerrid)+", Вы потеряли "+.PvP_Deductpoint+" очка.";
		
		////////query for the deaths
		query_sql( "SELECT `char_id`, `account_id` FROM `char` WHERE `account_id` =  '"+getcharid(3)+"' ", .@Cchar_id, .@Aid);
		query_sql( "SELECT * FROM pvp_ranking WHERE `Char_ID` = '"+.@Cchar_id+"'", .@CharID, .@Name$, .@Kills, .@Deaths);
		set ToTalDeathPvPoints , .@Deaths + .PvP_Deductpoint;
		
	if(.@CharID != .@Cchar_id){
		query_sql("INSERT INTO `pvp_ranking` (`Char_ID`,`PlayerName`,`Kills`,`Deaths`) VALUES ('"+.@Cchar_id+"', '"+strcharinfo(0)+"', '0', '"+ToTalDeathPvPoints+"')");
	}else{
		query_sql("UPDATE pvp_ranking SET Deaths = '"+ToTalDeathPvPoints+"' WHERE `Char_ID` = '"+.@Cchar_id+"'");
	}
		end;
	}
    }
	end;

 

After few kills image.png.028e7f11fb9f029a2ac2788e5bfba173.pngimage.png.9d9b2fce718ae0d0254cde465765307a.png

 

So after WOE image.png.c3b8fbe0fa2e6cc4bdcc38d2d9e75f0c.png

Edited by 3TAJIOH
  • 1 month later...
  • 1 year later...
Posted
7 hours ago, merot19 said:

Guild Rank is not working guild rank now showing on the the top list

if i got free time. i will update this script.

  • Love 1
  • Like 1
  • 9 months later...
Posted
22 hours ago, qtdan said:

Kill and Deaths counts same every time on latest git.

Hi.

Find this line:

query_sql( "SELECT `char_id`, `account_id` FROM `char` WHERE `account_id` =  '"+getcharid(3)+"' ", .@Cchar_id, .@Aid);

Replace with:

.@Cchar_id = getcharid(0, rid2name(killedrid));

 

Find this line:

query_sql("INSERT INTO `woe_ranking` (`Char_ID`,`PlayerName`,`Kills`,`Deaths`,`EmpBreak`) VALUES ('"+.@Cchar_id+"', '"+strcharinfo(0)+"', '0', '"+TotalD+"', '"+.@EmpBreak+"')");

Replace with:

query_sql("INSERT INTO `woe_ranking` (`Char_ID`,`PlayerName`,`Kills`,`Deaths`,`EmpBreak`) VALUES ('"+.@Cchar_id+"', '" + rid2name(killedrid) + "', '0', '"+TotalD+"', '"+.@EmpBreak+"')");

 

  • 1 month later...
Posted
12 hours ago, makuexile said:

how to disable giving points for spamming kills on same player only at castle?

 

i will add this kind of security in version 5.

  • 1 year later...
Posted

hello i try the script and the guild ranking is not working
 

Quote

//===== rAthena Script =======================================
//= WoE Ranking
//===== By: ==================================================
//= BeWan
//https://rathena.org/board/profile/62232-bewan/
//===== Current Version: =====================================
//= 5.0
//===== Description: =========================================
//= WoE Ranking with top kills, deaths and emp breaker
//= Guild Ranking Supported
//===== Change/Update Logs: ==================================
//=3.0 Update:
//=WoE Announcer when you kill someone.
//=Config settings added 1 = on and 0 = off.
//=Fixed some bugs in points.
//=Points update to account based.
//=Update kill and death script and sql
//=Update Ladder data
//===========================================
//=4.0 Update:
//=points config update.
//===========================================
//5.0 Update:
//=update sql query for ranking data.
//===========================================
//6.0 Update:
//=SOON
//============================================================

/*
DROP TABLE IF EXISTS `woe_ranking`;

CREATE TABLE IF NOT EXISTS `woe_ranking` (
`Char_ID` int(11) unsigned NOT NULL DEFAULT '0',
`PlayerName` varchar(255) NULL DEFAULT '',
`Kills` varchar(255) NULL DEFAULT '',
`Deaths` varchar(255) NULL DEFAULT '',
`EmpBreak` varchar(255) NULL DEFAULT '',
PRIMARY KEY (`Char_ID`)
) ENGINE=MyISAM;
*/

prontera,153,190,4    script    BeWan The Ranker    417,{

    set .@menu$, "~ Top "+.top+" Kills:~ Top "+.top+" Deaths:~ Top "+.top+" Breaker:~ Guild Rank:~ WoE Shop:";
    if (getgmlevel() == 99) { set .@menu$, .@menu$ + "~ Reset Data"; }
    switch(select(.@menu$)) {
    case 1:
    query_sql( "DELETE FROM `woe_ranking` WHERE `PlayerName` NOT IN ( SELECT `name` FROM `char` )" ); 
    set .@size, query_sql( "SELECT * FROM `woe_ranking` WHERE `Kills` > '0' ORDER BY CAST(`Kills` AS UNSIGNED) DESC limit "+ .top, .@CharID, .@name$, .@Kills, .@Deaths, .@EmpBreak);
    
    mes "[^FF0000WoE ^0000FFRank ^996600Top ^FF0000" + .top +"^000000]";
    for (set .@c, 0; .@c < .@size; set .@c, .@c + 1)
        mes "Top ^FF0000" +(.@c + 1) +"^000000: ^0000FF" + .@name$[.@c] +"^000000 with ^FF0000" + .@Kills[.@c] +"^000000 Kills";
    close;
    break;
    
    case 2:
    query_sql( "DELETE FROM `woe_ranking` WHERE `PlayerName` NOT IN ( SELECT `name` FROM `char` )" ); 
    set .@size, query_sql( "SELECT * FROM `woe_ranking` WHERE `Deaths` > '0' ORDER BY CAST(`Deaths` AS UNSIGNED) DESC limit "+ .top, .@CharID, .@name$, .@Kills, .@Deaths, .@EmpBreak);
    
    mes "[^FF0000WoE ^0000FFRank ^996600Top ^FF0000" + .top +"^000000]";
    for (set .@c, 0; .@c < .@size; set .@c, .@c + 1)
        mes "Top ^FF0000" +(.@c + 1) +"^000000: ^0000FF" + .@name$[.@c] +"^000000 with ^FF0000" + .@Deaths[.@c] +"^000000 Deaths";
    close;
    break;
    
    case 3:
    query_sql( "DELETE FROM `woe_ranking` WHERE `PlayerName` NOT IN ( SELECT `name` FROM `char` )" ); 
    set .@size, query_sql( "SELECT * FROM `woe_ranking` WHERE `EmpBreak` > '0' ORDER BY CAST(`EmpBreak` AS UNSIGNED) DESC limit "+ .top, .@CharID, .@name$, .@Kills, .@Deaths, .@EmpBreak);
    
    mes "[^FF0000WoE ^0000FFRank ^996600Top ^FF0000" + .top +"^000000]";
    for (set .@c, 0; .@c < .@size; set .@c, .@c + 1)
        mes "Top ^FF0000" +(.@c + 1) +"^000000: ^0000FF" + .@name$[.@c] +"^000000 with ^FF0000" + .@EmpBreak[.@c] +"^000000 Emperium Break";
    close;
    break;
    
    case 4:
    for (set .@x,0; .@x < .top; set .@x,.@x + 1) {
        if (.@x) mes "- - - - - - - - - - - - - - -";
        mes "# ^ff0000" + (.@x + 1) + "^000000: ^0000ff" + ( (.GuildName$[.@x])? .GuildName$[.@x]:"None" ) + "^000000";
        mes " - Guild Master: ^0000ff" + ( (.GuildMaster$[.@x])? .GuildMaster$[.@x]:"None" ) + "^000000";
        mes " - Territories: ^ff0000" + .NumCastles[.@x] + "^000000";
        mes " - Members: ^ff0000" + .NumMembers[.@x] + "^000000";
    }
    end;
    
    case 5:
    mes "[Master BeWan]";
    mes "Hi, "+strcharinfo(0)+"";
    mes "Want to go shopping?";
    next;
    menu "GvG Shop",GvGShop,"Emperium Break Shop",BreakShop,"Nope",ShopNope;
    
    GvGShop:
    callshop "GvG_Points_Shop",1;
    end;
    
    BreakShop:
    callshop "EmpBreak_Points_Shop",1;
    end;
    
    ShopNope:
    mes "[Master BeWan]";
    mes "Well Okay";
    close;

    case 6:
        mes "Good Day! Master.";
        next;
        menu "Are you sure?",yess,"Nope",noo;
        yess:
        query_sql("TRUNCATE TABLE `ragnarok`.`woe_ranking`;");
        mes "Woe Rank Reset Success";
        close;

        noo:
        mes "Well Okay";
        close;
    break;
    }

OnInit: // Script Configuration
    query_sql "CREATE TABLE IF NOT EXISTS `woe_ranking` ( `Char_ID` int(11) unsigned NOT NULL DEFAULT '0', `PlayerName` varchar(255) NULL DEFAULT '', `Kills` varchar(255) NULL DEFAULT '', `Deaths` varchar(255) NULL DEFAULT '', `EmpBreak` varchar(255) NULL DEFAULT '', PRIMARY KEY (`Char_ID`) ) ENGINE=MyISAM";
    set .top, 10;
    set .WoePoints, 1;      //points to add in database/player when kill
    set .WoeDeduct, 2;      //points to deduct in player when died
    
    set .PointConfig, 1;     //enable by default
    set .DeductConfig, 1;    //enable by default
    set .Announcer, 1;        //enable by default
OnTimer0050:
        showscript "WOE Ranking", getnpcid(0);
        initnpctimer;
        end;

OnPCKillEvent:
if ((agitcheck() || agitcheck2()) && getmapflag(strcharinfo(3),MF_GVG)){
    query_sql( "SELECT * FROM woe_ranking WHERE `Char_ID` = '"+getcharid(0)+"'", .@CharID, .@Name$, .@Kills, .@Deaths, .@EmpBreak);
    query_sql "INSERT INTO `woe_ranking` VALUE ( "+getcharid(0)+", '"+escape_sql(strcharinfo(0))+"', '"+.WoePoints+"', '"+.@Deaths+"', '"+.@EmpBreak+"') ON DUPLICATE KEY UPDATE `Kills` = `Kills` + '"+.WoePoints+"' ";
        
    if(.PointConfig == 1){
        set #WOEPOINTS, #WOEPOINTS + .WoePoints;
        dispbottom "You got "+.WoePoints+" WoE Point(s). You now have "+#WOEPOINTS+" total WoE Point(s).";
    }
}
end;

OnPCDieEvent:
if ((agitcheck() || agitcheck2()) && getmapflag(strcharinfo(3),MF_GVG)){
    query_sql( "SELECT * FROM `woe_ranking` WHERE `Char_ID` = '"+getcharid(0)+"'", .@CharID, .@Name$, .@Kills, .@Deaths, .@EmpBreak);
    query_sql "INSERT INTO `woe_ranking` VALUE ( "+getcharid(0)+", '"+escape_sql(strcharinfo(0))+"', '"+.@Kills+"', '1', '"+.@EmpBreak+"') ON DUPLICATE KEY UPDATE `Deaths` = `Deaths` + 1";
    
    if(.DeductConfig == 1){
        set #WOEPOINTS, #WOEPOINTS - .WoeDeduct;
        dispbottom "You lost "+.WoeDeduct+" WoE Point(s) and You now have "+#WOEPOINTS+" WoE Point(s).";    
    }
    if(.Announcer == 1){
        query_sql( "SELECT `guild_id` FROM `char` WHERE `name` = '"+rid2name(killerrid)+"' ", .GuildID );
        announce "[ Woe Announcer ]: "+strcharinfo(0)+" of ["+getguildname(getcharid(2))+"] has been killed by "+rid2name(killerrid)+" of ["+getguildname(.GuildID)+"]", bc_all,0x00FFFF;
    }
}
end;

}

//Shop
-    pointshop    GvG_Points_Shop    -1,#WOEPOINTS,1202:5;
-    pointshop    EmpBreak_Points_Shop    -1,#BREAKPOINTS,2311:10

 

Join the conversation

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

Guest
Reply to this topic...

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...