Jump to content
  • 0

Reset my Rank PVP, keep the leader


brunoshp

Question


  • Group:  Members
  • Topic Count:  64
  • Topics Per Day:  0.02
  • Content Count:  180
  • Reputation:   7
  • Joined:  12/19/12
  • Last Seen:  

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;
}

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  64
  • Topics Per Day:  0.02
  • Content Count:  180
  • Reputation:   7
  • Joined:  12/19/12
  • Last Seen:  

thz.!!!!

Link to comment
Share on other sites


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

i think should be

 } else getitem .prize, .amount,getcharid(3, @name$);
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Thanks for the reminder @Emistry /no1. Edited my last post

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