Advertisement
akbare

random PVP Point scirpt

Feb 25th, 2024
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. - script Func_PVP -1,{
  2. OnPCKillEvent:
  3. if(!getmapflag(strcharinfo(3),mf_pvp)) end;
  4. if (getcharid(3) == killedrid) end;
  5. #PVPPOINTS += .p[0];
  6. .@chance = rand(100);
  7. set #PVPPOINTS,#PVPPOINTS+1;
  8.  
  9. // Super Rare Item 1%
  10. if (.@chance == 0) {
  11. #PVPPOINTS += 1;
  12. dispbottom "["+strcharinfo(0)+"] won a [1 #PVPPOINTS].",0;
  13. dispbottom "You currently have " + #PVPPOINTS + " pvp points.";
  14. }
  15. else if (.chance <= 10) { // 10%
  16. #PVPPOINTS += 2;
  17. dispbottom "You won pvp points is " + #PVPPOINTS;
  18. dispbottom "["+strcharinfo(0)+"] won a [2 #PVPPOINTS].",0;
  19. dispbottom "You currently have " + #PVPPOINTS + " pvp points.";
  20. }
  21. else if (.chance <= 15) { // 5%
  22. #PVPPOINTS += 3;
  23. dispbottom "You won pvp points is " + #PVPPOINTS;
  24. dispbottom "["+strcharinfo(0)+"] won a [3 #PVPPOINTS].",0;
  25. dispbottom "You currently have " + #PVPPOINTS + " pvp points.";
  26. }
  27. else if (.chance <= 22) { // 7%
  28. #PVPPOINTS += 4;
  29. dispbottom "["+strcharinfo(0)+"] won a [4 #PVPPOINTS].",0;
  30. dispbottom "You currently have " + #PVPPOINTS + " pvp points.";
  31. }
  32. else if (.chance <= 50) { // 28%
  33. #PVPPOINTS += 5;
  34. dispbottom "["+strcharinfo(0)+"] won a [5 #PVPPOINTS].",0;
  35. dispbottom "You currently have " + #PVPPOINTS + " pvp points.";
  36. }
  37.  
  38. // Common Items // 50%
  39. else {
  40. #PVPPOINTS += 2;
  41. }
  42. end;
  43.  
  44.  
  45.  
  46.  
  47. end;
  48.  
  49. OnCheckPoint:
  50. dispbottom "You currently have " + #PVPPOINTS + " pvp points.";
  51. end;
  52. OnInit:
  53. bindatcmd "checkpoints", strnpcinfo(0) + "::OnCheckPoint";
  54. end;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement