Advertisement
Guest User

Untitled

a guest
Apr 30th, 2012
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. //= ---
  2. //= MvP Rank Improved v1.0
  3. //= ---
  4. //= This Rank will count every MvP you kill,
  5. //= to be more clear, will count every mob
  6. //= defined inside the array ".mobid[0]",
  7. //= so, if you add the poring ID will count in the rank
  8. //= you can modify and ad miniBoss because this array
  9. //= only have all MvPs, that's the idea, only MvPs...
  10. //= ---
  11. - script Rank MvP -1,{
  12. OnInit: // Script Configuration
  13. 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,
  14. 1373,1147,1059,1150,1956,2022,1087,1190,1038,1157,1159,1502,1623,1650,1583,1708,1312,1751,1685,1648,1917,1658; // MvP Ids
  15. set .a, 0; // Broadcast who killed the MvP and wich MvP and wick Map [0 Off - 1 On]
  16. set $@top, 10; // Max. Top Rank (Hihgly recommended between 5~10, more maybe bug the server (limited variables)
  17. end;
  18.  
  19. OnNPCKillEvent: // Script execution
  20. for (set .@c, 0; .@c < getarraysize(.mobid); set .@c, .@c + 1)
  21. if (killedrid == .mobid[.@c])
  22. set .@s, 1; // If a MvP
  23. if (!.@s) end;
  24. if (.a) // If announce On
  25. announce "The user [" +strcharinfo(0) +"] has killed a [" +getmonsterinfo(killedrid,0) +"] in the map [" +strcharinfo(3) +"]",bc_blue|bc_all;
  26. set MvP, MvP + 1;
  27. callfunc ("MvPRank",MvP,strcharinfo(0));
  28. end;
  29. } // End Script
  30.  
  31. prontera,164,166,4 script MvP Rank 997,{ // NPC que mostrarรก el Rank
  32. mes "[ ^FF0000MvP ^0000FFRank ^00FF00Top ^FF0000" +$@top +"^000000 ]";
  33. for (set .@c, 0; .@c < $@top; set .@c, .@c + 1)
  34. mes "Top ^FF0000" +(.@c + 1) +"^000000 ^0000FF" +getd("$topmvp" +.@c +"$") +"^000000 with ^FF0000" +getd("$topmvp" +.@c) +"^000000 MvP killed.";
  35. close;
  36. } // End if
  37.  
  38. function script MvPRank {
  39. set @mvptotal, getarg(0);
  40. set @nomb$, getarg(1);
  41. for (set .@c, 0; .@c < $@top; set .@c, .@c + 1) {
  42. if (@mvptotal >= getd("$topmvp" +.@c)) {
  43. if (strcharinfo(0) == getd("$topmvp" +.@c +"$")) {
  44. setd "$topmvp" +.@c, @mvptotal;
  45. setd "$topmvp" +.@c +"$", @nomb$;
  46. return;
  47. } else {
  48. if (getd("$topmvp" +(.@c + 1) +"$") == "") {
  49. setd "$topmvp" +.@c, @mvptotal;
  50. setd "$topmvp" +.@c +"$", @nomb$;
  51. return;
  52. } else {
  53. setd "$topmvp" +(.@c + 1), getd("$topmvp" +.@c);
  54. setd "$topmvp" +(.@c + 1) +"$", getd("$topmvp$" +.@c);
  55. setd "$topmvp" +.@c, @mvptotal;
  56. setd "$topmvp" +.@c +"$", @nomb$;
  57. return;
  58. } // End if
  59. } // End if
  60. } // End if
  61. } // End loop
  62. return;
  63. } // End function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement