Jump to content
  • 0

Ghost PVP Ladder GM Reset.


Unholy Touch

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   2
  • Joined:  10/27/12
  • Last Seen:  

Hi guys can you help me make a GM Reset menu of this ladder? I want a gm level 99 can globally reset all the records. i try it using the sql query, deleting all the fields in the table but the problem is when the players kills again, it continues the last records he got. i also tried deleting the fields and restart the server, but still the same. Thank you in advance.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  05/03/13
  • Last Seen:  

On 2/16/2013 at 6:48 PM, Unholy Touch said:

Actually Empty the pvp_rank table wont solve the issue, because Ghost uses a variable global variable, which can be reset by assigning another value which in my case set it to 0. I just made a script in which when the player login his/her statistics in ladder will be reset to 0.


 


-    script    Playerresetladder_Login    -1,{
OnPCLoginEvent:
if(chkifresetladder >= 1) goto chk_kungtaposna;
query_sql "DELETE FROM `pvp_rank` WHERE `pvp_rank`.`char_id` = "+getcharid(0)+"";
callsub OnPvPReset;
set chkifresetladder,1;
end;
OnPvPReset:
set Kill, 0;
set Death, 0;
set KillingStreak, 0; 
set MultiKill, 0;
set KillingSpree, 0;
set Dominating, 0;
set MegaKill, 0;
set Unstoppable, 0;
set WickedSick, 0;
set MonsterKill, 0;
set Godlike, 0;
set BeyondGodlike, 0;
set DoubleKill, 0;
set TripleKill, 0;
set UltraKill, 0;
set Rampage, 0;
set Ownage, 0;
set NemesisKill, 0;
set FeedCount, 0;
return;
chk_kungtaposna:
end;
}

 


im not really good at scripting so in my case i need to use another variable for "chkifresetladder" every month. thank you.

is it possible to make a npc where gm can click and it reset this table, i try manually but this sql require char id i want reset for all, plus i have use for first time. So it wont reset again for the 2nd time

Link to comment
Share on other sites


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

you are asking others to create a new ladder script for you ? or modify your current ladder script ?

if you are requesting a new ladder...then make it in details..

else...show your scripts...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  353
  • Reputation:   70
  • Joined:  07/14/12
  • Last Seen:  

create a gm menu

create an option for you to reset the ladder

TRUNCATE TABLE `pvp_rank`

since ghost's pvp system uses `pvp_rank` table in your database you just only need to empty the table

Edited by icabit
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   2
  • Joined:  10/27/12
  • Last Seen:  

Actually Empty the pvp_rank table wont solve the issue, because Ghost uses a variable global variable, which can be reset by assigning another value which in my case set it to 0. I just made a script in which when the player login his/her statistics in ladder will be reset to 0.


 

-    script    Playerresetladder_Login    -1,{
OnPCLoginEvent:
if(chkifresetladder >= 1) goto chk_kungtaposna;
query_sql "DELETE FROM `pvp_rank` WHERE `pvp_rank`.`char_id` = "+getcharid(0)+"";
callsub OnPvPReset;
set chkifresetladder,1;
end;
OnPvPReset:
set Kill, 0;
set Death, 0;
set KillingStreak, 0; 
set MultiKill, 0;
set KillingSpree, 0;
set Dominating, 0;
set MegaKill, 0;
set Unstoppable, 0;
set WickedSick, 0;
set MonsterKill, 0;
set Godlike, 0;
set BeyondGodlike, 0;
set DoubleKill, 0;
set TripleKill, 0;
set UltraKill, 0;
set Rampage, 0;
set Ownage, 0;
set NemesisKill, 0;
set FeedCount, 0;
return;
chk_kungtaposna:
end;
}

 


im not really good at scripting so in my case i need to use another variable for "chkifresetladder" every month. thank you.
Edited by Capuche
Insert the script in Code
  • Like 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  491
  • Reputation:   19
  • Joined:  11/19/11
  • Last Seen:  

use icabit modification  /no1

Edited by Akbare
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...