FrostedWeFall

Refer

Oct 13th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.68 KB | None | 0 0
  1. #
  2. # RedirectAFriend Skript v1.7
  3. # By DinPro
  4. #
  5.  
  6. options:
  7. prefix: &b&lRedirect-A-Friend
  8. sound: note.harp
  9.  
  10. command /redirectafriend <text>:
  11. aliases: /raf
  12. trigger:
  13. if arg 1 is "help":
  14. message "&a---------------&3Redirect&a---------------"
  15. message "&a/redirect send <player> &7- &6Send a redirect request"
  16. message "&a/redirect accept <player> &7- &6Accepts a redirect request"
  17. message "&a/redirect deny <player> &7- &6Deny a redirect request"
  18. message "&a/redirectafriend admin &7- &6Admin Help - Admins ONLY"
  19. message "&a/redirectafriend help &7- &6Show this help menu"
  20. exit
  21. if arg 1 is "admin":
  22. if player has permission "redirect.admin":
  23. message "&a---------------&3Redirect&a---------------"
  24. message "&a/redirectafriend &7- &6Reload the Skript"
  25. message "&a/redirectafriend reload &7- &6Reloads the skript"
  26. message "&a/redirectafriend version &7- &6Shows the current version"
  27. message "&a/redirectafriend author &7- &6Shows the Author of the plugin"
  28. exit
  29. else:
  30. message "{@prefix} &cYou don't have the permission &6redirect.admin&c!"
  31. if arg 1 is "reload":
  32. if player has permission "redirect.reload":
  33. make console execute command "/sk reload RedirectAFriend"
  34. message "{@prefix} &bSuccessfully reloaded &aRedirect A Friend"
  35. exit
  36. else:
  37. message "{@prefix} &cYou don't have the permission &6redirect.reload&c!"
  38. if arg 1 is "version":
  39. if player has permission "redirect.version":
  40. message "{@prefix} &aYou are currently running &6Redirect A Friend &aon the version &81.7"
  41. exit
  42. else:
  43. message "{@prefix} &cYou don't have the permission &6redirect.version&c!"
  44. if arg 1 is "author":
  45. if player has permission "redirect.author":
  46. message "{@prefix} &aThe Author of this Skript Is &6DinPro&a!"
  47. exit
  48. else:
  49. message "{@prefix} &cYou don't have the permission &6redirect.author&c!"
  50. else:
  51. Make the player execute command "/raf help"
  52. command /redirect <text> <player>:
  53. trigger:
  54. if arg 1 is "send":
  55. if arg 2 is a player:
  56. if arg 2 is online:
  57. player isn't arg-2
  58. if {redirect.%player%.send.%arg-2%} isn't set:
  59. set {redirect.%player%.send.%arg-2%} to true
  60. message "{@prefix} &eSuccessfully sent the request to %arg 2%"
  61. send "{@prefix} &e%player% &asent you a redirect request." to arg 2
  62. send "{@prefix} &aAccept by typing &b/redirect accept %player%" to arg 2
  63. exit
  64. else:
  65. send "{@prefix} &cYou already sent &6%arg-2% &ca redirect"
  66. else:
  67. message "{@prefix} &6%arg-2% &cis not online!"
  68. if arg 1 is "accept":
  69. if arg 2 is a player:
  70. if arg 2 is online:
  71. player isn't arg-2
  72. if {redirect.%arg-2%.send.%player%} is set:
  73. message "{@prefix} &eSuccessfully accepted the request to %arg 2%"
  74. make the console execute "eco give %player% 50" #the command you want (rewards)
  75. make the console execute "eco give %arg-2% 50" #the command you want (rewards)
  76. execute console command "/playsound @a {@sound}" #the sound you want to be played when someone redirects
  77. broadcast "{@prefix} &b%player% &aand &b%arg-2% &ahave REDIRECTED! Redirect a friend and earn rewards! &b/redirect"
  78. exit
  79. else:
  80. send "{@prefix} &6%arg-2% &chasn't redirected you."
  81. else:
  82. message "{@prefix} &6%arg-2% &cis not online!"
  83. if arg 1 is "deny":
  84. if arg 2 is a player:
  85. if arg 2 is online:
  86. if {redirect.%arg-2%.send.%player%} is set:
  87. message "{@prefix} &eSuccessfully denied the request to %arg 2%"
  88. message "{@prefix} &cSuccessfully denied the request from &6%arg 2%"
  89. send "{@prefix} &6%player% &cDenied your request." to arg 2
  90. exit
  91. else:
  92. message "&6%arg-2% &cis not online!"
  93. else:
Advertisement
Add Comment
Please, Sign In to add comment