Zeldaboy111

Skript #155

May 1st, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.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}%} = {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. add 1 to {_count}
  58. delete {mb::messages::%{_p}%::%{_t}%::%{_count}%}
  59. delete {mb::messages::%{_t}%::%{_p}%::%{_count}%}
  60.  
  61. set {mb::messages::%{_p}%::%{_t}%::%{_count}%} to {_m}
  62. set {mb::messages::%{_t}%::%{_p}%::%{_count}%} to {_m}
  63. set {mb::messages::sender::%{_p}%::%{_t}%} to {_p}
  64. set {mb::messages::sender::%{_t}%::%{_p}%} to {_p}
  65. add 1 to {messages::%{_p}%::%{_t}%}
  66. add 1 to {messages::%{_t}%::%{_p}%}
  67.  
  68. function whatsapp(p: Player, s: String):
  69. #Jezelf in contacten
  70. if {_s} is "Main":
  71. open chest with 1 rows named "&2Contacten - Whatsapp" to {_p}
  72. make gui slot 0 of {_p} with a book named "&6%{_p}%" to close then run function whatsapp({_p}, "Read.%{_p}%")
  73. stop
  74.  
  75. if {_s} contains "Read.":
  76.  
  77. replace all "Read." in {_s} with ""
  78. set {_sendTo} to {_s}
  79.  
  80. open chest with 6 rows named "&2%{_sendTo}% - Whatsapp" to {_p}
  81. set {_count} to 0
  82. loop {messages::%{_p}%::%{_sendTo}%} times:
  83. add 1 to {_count}
  84. make gui slot {_count} of {_p} with a paper named "%{mb::messages::%{_p}%::%{_sendTo}%::%{_count}%}%" with lore "&7Sender: %{mb::messages::sender::%{_p}%::%{_c}%}%" to close
  85.  
  86. #createWAMessage({_p}, {_sendTo}, {_count})
  87.  
  88. #make gui slot {messages::%{_p}%::%{_c}%} of {_p} with a paper named "%{mb::messages::%{_p}%::%{_sendTo}%::%{_c}%}%" with lore "&7Sender: %{mb::messages::sender::%{_p}%::%{_c}%}%" to close
  89. #send "%{mb::messages::%{_p}%::%{_sendTo}%::%{c}%}%" to {_p}
  90. #send "%{mb::messages::%{_sendTo}%::%{_p}%::%{c}%}%" to {_p}
  91. #if {mb::messages::%{_p}%::%{_sendTo}%::%{c}%} is set:
  92. # make gui slot {_slot} of {_p} with a paper named "&f%{mb::messages::%{_p}%::%{_sendTo}%::%{_c}%}%" with lore "&7Sender: %{_p}%" to close
  93. # add 1 to {_slot}
  94.  
  95. #if {mb::messages::%{_sendTo}%::%{_p}%::%{c}%} is set:
  96. # make gui slot {_slot} of {_p} with a paper named "%{mb::messages::%{_sendTo}%::%{_p}%::%{_c}%}%" with lore "&7Sender: %{_sendTo}%" to close
  97. # add 1 to {_slot}
  98.  
  99. function createWAMessage(p: Player, s: String, slot: String):
  100. send "d" to {_p}
  101. send "%{_slot}%" to {_p}
  102. make gui slot {_slot} of {_p} with a paper to close
  103.  
  104. #function bank(p: Player, s: String):
  105. #Accounts (persoonlijk - gold block)
  106.  
  107. #Geld (waardes; iron = 10, gold = 50 & diamond = 100)
Advertisement
Add Comment
Please, Sign In to add comment