Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /c <text> [<integer>] [<text>] [<integer>]:
- permission: calculator.use
- description: Use a calculator
- usage: &c/c [c/u] (number) (+/x/-) (number)
- trigger:
- if argument 1 is not "c":
- if argument 1 is not "u":
- message "&c/c [c/u] (number) (+/-) (number)"
- stop
- if argument 1 is "c":
- message "<light green>Calculator cleared"
- set {Calculator.%player%} to 0
- stop
- if argument 3 is not "+":
- if argument 3 is not "x":
- if argument 3 is not "-":
- message "&c/c [c/u] (number) (+/x/-) (number)"
- stop
- if argument 2 is not set:
- message "&c/c [c/u] (number) (+/x/-) (number)"
- stop
- if argument 3 is not set:
- message "&c/c [c/u] (number) (+/x/-) (number)"
- stop
- if argument 4 is not set:
- message "&c/c [c/u] (number) (+/x/-) (number)"
- stop
- if argument 1 is "u":
- if argument 3 is "+":
- add argument 2 to {Calculator.%player%}
- add argument 4 to {Calculator.%player%}
- message "<Light green>%{Calculator.%player%}%"
- stop
- if argument 3 is "-":
- add argument 2 to {Calculator.%player%}
- remove argument 4 from {Calculator.%player%}
- if argument 4 is greater than argument 2:
- message "<light red>Number 1 must be bigger than number 2"
- stop
- message "<Light green>%{Calculator.%player%}%"
- stop
- if argument 3 is "x":
- loop argument 4 times:
- add argument 2 to {calculator.%player%}
- add 1 to {Calculator.%player%.x}
- if {Calculator.%player%.x} is argument 4:
- set {Calculator.%player%.x} to 0
- message "<light green>%{Calculator.%player%}%"
- stop
Add Comment
Please, Sign In to add comment