Jump to content
  • 0

Reset my Rank PVP, keep the leader


Question

Posted

Hi, i need to reset rank in every day 30, and send 1 rop for leader, it is posible?

 

my rank:

prontera,140,180,4    script    Ranking    857,{

		mes "rank PvP [TOP 10]";
		next;
		query_sql "SELECT name, kills, deaths FROM pvp ORDER BY kills DESC LIMIT 10",@name$,@kills,@deaths;
		dispbottom "Ranking PvP [TOP 10]";
		dispbottom " ";
		dispbottom "Position  < x >  Name  < x > kills  < x >  deaths";
		dispbottom " ";
		for(set @i,0;@i<=9;set @i,@i+1) {
			dispbottom "["+(@i+1)+"]  < x >  "+@name$[@i]+"  < x >  "+@kills[@i]+"  < x >  "+@deaths[@i]+"";
		}
		close;
}

 

4 answers to this question

Recommended Posts

Posted

Add this on your script : 

OnDay0130:
OnDay0228:
OnDay0330:
OnDay0430:
OnDay0530:
OnDay0630:
OnDay0730:
OnDay0830:
OnDay0930:
OnDay1030:
OnDay1130:
OnDay1230:
        set .prize, 7227;
        set .amount, 5;
        query_sql "SELECT `name` FROM `pvp` ORDER BY `kills` DESC LIMIT 1",@name$;
        if (!isloggedin(getcharid(3, @name$))) {
            query_sql "INSERT INTO `inventory` ( `char_id`, `nameid`, `amount`, `equip`, `identify` ) VALUES ( '" +getcharid(0, @name$)+ "', '" +.prize+ "', '" +.amount+ "', 0, 1)";
        } else getitem .prize, .amount, getcharid(3, @name$);
        query_sql "TRUNCATE TABLE `pvp`";
        end;

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.

  • Recently Browsing   0 members

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