Jump to content
  • 0

woe points counter


rqueen

Question


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   1
  • Joined:  04/30/13
  • Last Seen:  

Hi all, I'm using this script by AnnieRuru from here:

http://rathena.org/board/topic/78057-woe-point-system/?p=176770

prontera,155,181,5    script    Woe Points    100,{
    .@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points );
    for ( .@i = 0; .@i < .@nb; .@i++ ) {
        if ( !.@points[.@i] ) break;
        mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i];
    }
    close;
OnClock1930:
OnClock2000:
OnClock2030:
OnClock2100:
    for ( .@i = 0; .@i < 30; .@i++ ) {
        .@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 );
        if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id )
            query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ .@castle_guild_id;
    }
    end;
OnBreakEmp: // put doevent under OnAgitBreak ...
    query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2);
    end;
}  

 

 

1) I can't get it to run correctly or at all in eAthena, I'm guessing some new scripting features are unavailable? If so, please help me revise it.

2) If it's nuch to ask, please include an option to view the top 5 or top 10 guilds with the highest points

3) A reset points to 0 option for GMs.

4) I'd like it to only add points after WoE, for whichever guilds get to keep the castles. In other words, please disable point accumulation on emperium breaks.

 

Thank you in advance! Please help me in your earliest convenience.


Anyone? :(

Edited by rqueen
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

 

I tested out the script you gave, when I select the "Rank" option, nothing happens.

nothing happen when the ladder is empty

 

 

When I select "Reset", nothing happens and my GM char gets stuck,

indeed I made a mistake. For eathena it should be a close instead of end

			query_sql "update guild set woe_points = 0";
			end;

 

I also noticed points don't get added to the woe_points column when the OnClock line is suppose to run.

 

this script use the variable of euphy's woe controller..

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


prontera,155,181,5 script Woe Points 100,{

if ( getgmlevel() > 80 ) {

if ( select( "Rank", "Reset" ) == 2 ) {

query_sql "update guild set woe_points = 0";

end;

}

}

set .@nb, query_sql( "select name, woe_points from guild order by woe_points desc limit 10", .@guild_name$, .@points );

for ( set .@i, 0; .@i < .@nb; set .@i, .@i +1 ) {

if ( !.@points[.@i] ) break;

mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i];

}

close;

OnClock1930:

OnClock2000:

OnClock2030:

OnClock2100:

for ( set .@i, 0; .@i < 30; set .@i, .@i +1 ) {

set .@castle_guild_id, getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 );

if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id )

query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ .@castle_guild_id;

}

end;

}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   1
  • Joined:  04/30/13
  • Last Seen:  

Thank you for replying, Capuche! You always seem to be the person to help me every time I post here! XD

I tested out the script you gave, when I select the "Rank" option, nothing happens. When I select "Reset", nothing happens and my GM char gets stuck, unable to move. I have to relog or @warp somewhere to regain motion.

 

I also noticed points don't get added to the woe_points column when the OnClock line is suppose to run.

 

I'm not sure if it matters, but I'm using Toasty's WoE Controller.

 

Also, can you please make it so even normal players can view the WoE point ranks? Thank you so much!

Edited by rqueen
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   1
  • Joined:  04/30/13
  • Last Seen:  

Anyone? The console doesn't show any errors for Capuche's script so I really don't know what's wrong.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   1
  • Joined:  04/30/13
  • Last Seen:  

Thanks, Capuche! I'll be switching to Euphy's eA release of his WoE controller now.

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