Hi I'm using @Poring King's MVP Ranking, and using a quick resetter by ,I think, Emistry.
just wanting to seek help if I could also reset player's @mvptotal (thinking this is the one that adds personal point to from every mvp kill).
currently the resetter works fine for the ranking ladder. However, it doesn't reset the players mvp point, so whenever they kill another MVP, they end up adding from their previous total points.
//================================================Name======================================================
// MVP Rank (Official Release Name)
//===============================================Version====================================================
// 1.0
//===============================================Author=====================================================
// ____ _____ ______ __ __ __ _______ __ _____ __ __ _______
// | __ \ _ \| __ \| | \ | |/ ___ \ | | / / | \ | |/ ___ \
// | |__| | \ \ |__| | | \| | | _\_/ | |/ /| | \| | | _\_/
// | __/ | | /| | | | |_ \ | | | | | | | |_ \
// | |\ \_/ / |\ \| | |\ | \_/ | | |\ \| | |\ | \_/ |
// |__| \_____/|__| \__\__|__| \__|\______/ |__| \__\__|__| \__|\______/
//----------------------------------------Script Last Update 2020-------------------------------------------
//==============================================Changelog===================================================
// 1.0 *
// - Initial Release
//==========================================================================================================
- script Rank MvP -1,{
OnInit: // Script Configuration
setarray .mobid[0],1511,1647,1785,1630,1399,1039,1874,2068,1272,1719,1046,1389,1112,1115,1957,1418,1871,1252,1768,1086,1688,1646,
1373,1147,1059,1150,1956,2022,1087,1190,1038,1157,1159,1502,1623,1650,1583,1708,1312,1751,1685,1648,1917,1658; // MvP Ids
set .a, 0; // Broadcast who killed the MvP and wich MvP and wick Map [0 Off - 1 On]
set [email protected], 10; // Max. Top Rank (Hihgly recommended between 5~10, more maybe bug the server (limited variables)
end;
OnNPCKillEvent: // Script execution
for (set [email protected], 0; [email protected] < getarraysize(.mobid); set [email protected], [email protected] + 1)
if (killedrid == .mobid[[email protected]])
set [email protected], 1; // If a MvP
if ([email protected]) end;
if (.a) // If announce On
announce "The user [" +strcharinfo(0) +"] has killed a [" +getmonsterinfo(killedrid,0) +"] in the map [" +strcharinfo(3) +"]",bc_blue|bc_all;
set MvP, MvP + 1;
callfunc ("MvPRank",MvP,strcharinfo(0));
end;
} // End Script
//-------------------------------------------------------------------------------------------------------------------------------------------------
prontera,123,69,4 script MVP Ranking 416,{
mes "[^0000FFMvP ^FF0000Rank ^0000FFTop ^FF0000" [email protected] +"^000000]";
for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1)
mes "Top ^FF0000" +([email protected] + 1) +"^000000 ^0000FF" +getd("$topmvp" [email protected] +"$") +"^000000 with ^FF0000" +getd("$topmvp" [email protected]) +"^000000 MvP killed.";
close;
OnInit:
waitingroom "MVP Top 10",0;
end;
}
function script MvPRank {
set @mvptotal, getarg(0);
set @nomb$, getarg(1);
for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1) {
if (@mvptotal >= getd("$topmvp" [email protected])) {
if (strcharinfo(0) == getd("$topmvp" [email protected] +"$")) {
setd "$topmvp" [email protected], @mvptotal;
setd "$topmvp" [email protected] +"$", @nomb$;
return;
} else {
if (getd("$topmvp" +([email protected] + 1) +"$") == "") {
setd "$topmvp" [email protected], @mvptotal;
setd "$topmvp" [email protected] +"$", @nomb$;
return;
} else {
setd "$topmvp" +([email protected] + 1), getd("$topmvp" [email protected]);
setd "$topmvp" +([email protected] + 1) +"$", getd("$topmvp$" [email protected]);
setd "$topmvp" [email protected], @mvptotal;
setd "$topmvp" [email protected] +"$", @nomb$;
return;
} // End if
} // End if
} // End if
} // End loop
return;
} // End function
prontera,123,66,4 script MVP Resetter 757,{
mes "[MVP Rank Resetter]";
mes "Are you sure you want to reset the MVP Ranks for this month?";
next;
switch(select("Yes:No:")){
case 1: goto yesMVPcheck;
case 2: goto noMVPrank;
}
yesMVPcheck:
for(set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected]+1) {
setd "$topmvp" + [email protected], 0;
setd "$topmvp" + [email protected] + "$", "";
}
dispbottom "MVP Ranking has been Reset.";
end;
noMVPrank:
mes "[MVP Rank Resetter]";
mes "Come back again.";
close;
OnInit:
waitingroom "MVP Rank Resetter",0;
end;
}
}
Hi I'm using @Poring King's MVP Ranking, and using a quick resetter by ,I think, Emistry.
just wanting to seek help if I could also reset player's @mvptotal (thinking this is the one that adds personal point to from every mvp kill).
currently the resetter works fine for the ranking ladder. However, it doesn't reset the players mvp point, so whenever they kill another MVP, they end up adding from their previous total points.
//================================================Name====================================================== // MVP Rank (Official Release Name) //===============================================Version==================================================== // 1.0 //===============================================Author===================================================== // ____ _____ ______ __ __ __ _______ __ _____ __ __ _______ // | __ \ _ \| __ \| | \ | |/ ___ \ | | / / | \ | |/ ___ \ // | |__| | \ \ |__| | | \| | | _\_/ | |/ /| | \| | | _\_/ // | __/ | | /| | | | |_ \ | | | | | | | |_ \ // | |\ \_/ / |\ \| | |\ | \_/ | | |\ \| | |\ | \_/ | // |__| \_____/|__| \__\__|__| \__|\______/ |__| \__\__|__| \__|\______/ //----------------------------------------Script Last Update 2020------------------------------------------- //==============================================Changelog=================================================== // 1.0 * // - Initial Release //========================================================================================================== - script Rank MvP -1,{ OnInit: // Script Configuration setarray .mobid[0],1511,1647,1785,1630,1399,1039,1874,2068,1272,1719,1046,1389,1112,1115,1957,1418,1871,1252,1768,1086,1688,1646, 1373,1147,1059,1150,1956,2022,1087,1190,1038,1157,1159,1502,1623,1650,1583,1708,1312,1751,1685,1648,1917,1658; // MvP Ids set .a, 0; // Broadcast who killed the MvP and wich MvP and wick Map [0 Off - 1 On] set [email protected], 10; // Max. Top Rank (Hihgly recommended between 5~10, more maybe bug the server (limited variables) end; OnNPCKillEvent: // Script execution for (set [email protected], 0; [email protected] < getarraysize(.mobid); set [email protected], [email protected] + 1) if (killedrid == .mobid[[email protected]]) set [email protected], 1; // If a MvP if ([email protected]) end; if (.a) // If announce On announce "The user [" +strcharinfo(0) +"] has killed a [" +getmonsterinfo(killedrid,0) +"] in the map [" +strcharinfo(3) +"]",bc_blue|bc_all; set MvP, MvP + 1; callfunc ("MvPRank",MvP,strcharinfo(0)); end; } // End Script //------------------------------------------------------------------------------------------------------------------------------------------------- prontera,123,69,4 script MVP Ranking 416,{ mes "[^0000FFMvP ^FF0000Rank ^0000FFTop ^FF0000" [email protected] +"^000000]"; for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1) mes "Top ^FF0000" +([email protected] + 1) +"^000000 ^0000FF" +getd("$topmvp" [email protected] +"$") +"^000000 with ^FF0000" +getd("$topmvp" [email protected]) +"^000000 MvP killed."; close; OnInit: waitingroom "MVP Top 10",0; end; } function script MvPRank { set @mvptotal, getarg(0); set @nomb$, getarg(1); for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1) { if (@mvptotal >= getd("$topmvp" [email protected])) { if (strcharinfo(0) == getd("$topmvp" [email protected] +"$")) { setd "$topmvp" [email protected], @mvptotal; setd "$topmvp" [email protected] +"$", @nomb$; return; } else { if (getd("$topmvp" +([email protected] + 1) +"$") == "") { setd "$topmvp" [email protected], @mvptotal; setd "$topmvp" [email protected] +"$", @nomb$; return; } else { setd "$topmvp" +([email protected] + 1), getd("$topmvp" [email protected]); setd "$topmvp" +([email protected] + 1) +"$", getd("$topmvp$" [email protected]); setd "$topmvp" [email protected], @mvptotal; setd "$topmvp" [email protected] +"$", @nomb$; return; } // End if } // End if } // End if } // End loop return; } // End function prontera,123,66,4 script MVP Resetter 757,{ mes "[MVP Rank Resetter]"; mes "Are you sure you want to reset the MVP Ranks for this month?"; next; switch(select("Yes:No:")){ case 1: goto yesMVPcheck; case 2: goto noMVPrank; } yesMVPcheck: for(set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected]+1) { setd "$topmvp" + [email protected], 0; setd "$topmvp" + [email protected] + "$", ""; } dispbottom "MVP Ranking has been Reset."; end; noMVPrank: mes "[MVP Rank Resetter]"; mes "Come back again."; close; OnInit: waitingroom "MVP Rank Resetter",0; end; } }
Edited by Almond Snickerchanged title
Link to comment
Share on other sites