Paste #68353: Untitled Paste

Date: 2020/04/30 16:41:25 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21


- if !<player.has_permission[storexp.enabled]||<context.server>>:
            - narrate "<red>Sorry, <player.name>, you must be a donator to use this command!"
            - stop
        - else:
            - if !<context.raw_args.first.is_integer>:
                - narrate "<red>Usage: /xpbottle <&lb>Experience Points<&rb>"
                - stop
            - else:
                - if <context.raw_args.as_decimal.round_down> > <player.xp_total>:
                    - narrate "<red>The xp amount must be less than your total experience!"
                    - stop
                - else:
                    - if <player.xp> < 7:
                        - narrate "<red>Sorry, <player.name>, you must have at least one level to store your xp!"
                        - stop
                    - else:
                        - flag player xpBottleValue:<context.raw_args.as_decimal.round>
                        - take xp quantity:<player.flag[xpBottleValue]>
                        - narrate "<gold>Experience Stored!"
                        - give storedxpbottle
                        - flag player xpBottleValue:!