Zeldaboy111

Skript #157

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