Zeldaboy111

Skript #156

May 2nd, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1. options:
  2. {mb::messages::%{_p}%::%{_t}%::%{messages::%{_p}%::%{_t}%}%} = {mb::messages::%{_p}%::%{_sendTo}%::%{_count}%}
  3. {mb::messages::%{_t}%::%{_p}%::%{messages::%{_p}%::%{_t}%}%} = {mb::messages::%{_p}%::%{_sendTo}%::%{messages::%{_p}%::%{_t}%}%}
  4.  
  5. {mb::messages::sender::%{_p}%::%{_c}%} = {mb::messages::sender::%{_t}%::%{_p}%}
  6.  
  7. {messages::%{_p}%::%{_t}%} = {messages::%{_p}%::%{_sendTo}%}
  8. {messages::%{_t}%::%{_p}%} = {messages::%{_sendTo}%::%{_p}%}
  9.  
  10.  
  11. on enable:
  12. set {mb::prefix} to "&3[&dMobile&3] &f>> &8"
  13.  
  14. on join:
  15. if {mb::whatsapp::%player%::contacten::*} is not set:
  16. add player to {mb::whatsapp::%player%::contacten::*}
  17.  
  18.  
  19. command /mobile [<text>] [<text>] [<text>] [<text>]:
  20. aliases: /mb
  21. trigger:
  22. if arg 1 is "get":
  23. give player a book named "&8Mobile" with lore "&7Mobieltje"
  24. stop
  25.  
  26. if arg 1 is "whatsapp" OR "app":
  27. if arg 2 is "read":
  28. whatsapp(player, "Main")
  29. stop
  30. if arg 2 is "send":
  31. if arg 3 is set:
  32. if {mb::whatsapp::%player%::contacten::*} contains "%arg 3%":
  33. if arg 4 is set:
  34. sendWA(player, "%arg 3%", "%arg 4%")
  35. stop
  36.  
  37. else:
  38. send "%{mb::prefix}% &4Je moet nog een &cbericht &4opgeven."
  39. stop
  40.  
  41. else:
  42. send "%{mb::prefix}% &4De persoon &c%arg 3% &4staat niet tussen je contacten."
  43. stop
  44. else:
  45. send "%{mb::prefix}% &4Je moet nog een &ccontact &4en &cbericht &4opgeven."
  46. stop
  47.  
  48.  
  49. on rightclick:
  50. player is holding a book named "&8Mobile" with lore "&7Mobieltje":
  51. open chest with 1 rows named "&8Mobile" to player
  52. make gui slot 0 of player with a green dye named "&2Whatsapp" to run function whatsapp(player, "Main")
  53. make gui slot 1 of player with a gold block named "&6Bank" to run function bank(player, "menu")
  54.  
  55.  
  56. function sendWA(p: Player, t: String, m: String):
  57. if {messages::%{_p}%::%{_t}%} is more than 99:
  58. set {messages::%{_p}%::%{_t}%} to 0
  59.  
  60. set {_count} to {messages::%{_p}%::%{_t}%}
  61. send "%{_count}%" to {_p}
  62. delete {mb::messages::%{_p}%::%{_t}%::%{_count}%}
  63. delete {mb::messages::%{_t}%::%{_p}%::%{_count}%}
  64.  
  65. set {mb::messages::%{_p}%::%{_t}%::%{_count}%} to {_m}
  66. set {mb::messages::%{_t}%::%{_p}%::%{_count}%} to {_m}
  67. set {mb::messages::sender::%{_p}%::%{_t}%} to {_p}
  68. set {mb::messages::sender::%{_t}%::%{_p}%} to {_p}
  69. add 1 to {messages::%{_p}%::%{_t}%}
  70.  
  71. function whatsapp(p: Player, s: String):
  72. #Jezelf in contacten
  73. if {_s} is "Main":
  74. open chest with 1 rows named "&2Contacten - Whatsapp" to {_p}
  75. make gui slot 0 of {_p} with a book named "&6%{_p}%" to close then run function whatsapp({_p}, "Read.%{_p}%")
  76. stop
  77.  
  78. if {_s} contains "Read.":
  79.  
  80. replace all "Read." in {_s} with ""
  81. set {_sendTo} to {_s}
  82.  
  83. open chest with 6 rows named "&2%{_sendTo}% - Whatsapp" to {_p}
  84. set {_count} to 0
  85. loop {messages::%{_p}%::%{_sendTo}%}-1 times:
  86. set {_count} to loop-value
  87. make gui slot {_count}-1 of {_p} with a paper named "%{mb::messages::%{_p}%::%{_sendTo}%::%{_count}%}%" with lore "&7Sender: %{mb::messages::sender::%{_p}%::%{_c}%}%" to close
  88.  
  89. #createWAMessage({_p}, {_sendTo}, {_count})
  90.  
  91. function createWAMessage(p: Player, s: String, slot: String):
  92. send "d" to {_p}
  93. send "%{_slot}%" to {_p}
  94. make gui slot {_slot} of {_p} with a paper to close
  95.  
  96. #function bank(p: Player, s: String):
  97. #Accounts (persoonlijk - gold block)
  98.  
  99. #Geld (waardes; iron = 10, gold = 50 & diamond = 100)
Advertisement
Add Comment
Please, Sign In to add comment