Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2021
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. options:
  2. taliscolor: <##e483f2>
  3. talistitle: <##e483f2>Talisman &8|
  4.  
  5. on swap hand items:
  6. if "%player's offtool%" contains "{@taliscolor}Talisman":
  7. remTalis(lore of player's offtool, player)
  8. send action bar "{@talistitle} &7Switched to %name of player's offtool%" to player
  9. wait 1 tick
  10. if "%player's offtool%" contains "{@taliscolor}Talisman":
  11. addTalis(lore of player's offtool, player)
  12. send action bar "{@talistitle} &7Switched to %name of player's offtool%" to player
  13.  
  14. on inventory click:
  15. index of event-slot = -1:
  16. if "%event-slot%" contains "{@taliscolor}Talisman":
  17. remTalis(lore of event-slot, player)
  18. send action bar "{@talistitle} &7Switched to %name of event-slot%" to player
  19. wait 1 tick
  20. if "%event-slot%" contains "{@taliscolor}Talisman":
  21. addTalis(lore of event-slot, player)
  22. send action bar "{@talistitle} &7Switched to %name of event-slot%" to player
  23.  
  24. function addTalis(l: texts, p: player):
  25. loop {_l::*}:
  26. loop-value contains "{@taliscolor}✧":
  27. set {_eff::*} to uncolored loop-value split at " "
  28. if size of {_eff::*} = 4:
  29. set {_eff::2} to "%{_eff::2}% %{_eff::3}%"
  30. set {_eff::3} to {_eff::4}
  31. set {_eff::2} to {_eff::2} parsed as potion effect type
  32. set {_x} to arabic number of {_eff::3}
  33. set {_x} to {_x} parsed as integer
  34. apply potion of {_eff::2} of tier {_x} to {_p} for 999 minutes
  35.  
  36. function remTalis(l: texts, p: player):
  37. loop {_l::*}:
  38. loop-value contains "{@taliscolor}✧":
  39. set {_eff::*} to uncolored loop-value split at " "
  40. if size of {_eff::*} = 4:
  41. set {_eff::2} to "%{_eff::2}% %{_eff::3}%"
  42. set {_eff::2} to {_eff::2} parsed as potion effect type
  43. remove {_eff::2} from {_p}
  44.  
  45. command /settalis [<integer>]:
  46. trigger:
  47. if arg 1 is 1:
  48. set player's tool to player's tool named "{@taliscolor}Talisman &7of Health &8(&7III&8)" with lore "", "{@taliscolor}✧ &7Regeneration III" and "{@taliscolor}✧ &7Strength III"
  49. else:
  50. set player's tool to player's tool named "{@taliscolor}Talisman &7of Speed &8(&7II&8)" with lore "", "{@taliscolor}✧ &7Speed III" and "{@taliscolor}✧ &7Jump Boost II"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement