Date: 2024/05/09 09:40:17 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
money_system_euro:
type: economy
debug: false
priority: normal
name single: Euro
name plural: Euros
digits: 2
format: <[amount]>€
balance: <player.flag[money]>
has: <player.flag[money].is[or_more].than[<[amount]>]>
withdraw:
- flag <player> money:-:<[amount]>
deposit:
- flag <player> money:+:<[amount]>
money_command:
type: command
debug: false
name: money
description: Money command
permission: command.money
usage: /money
aliases:
- pay
script:
- choose <context.alias>:
- case pay:
- if <context.args.is_empty>:
- narrate "<&c>Nutze /pay [Name] [amount]"
- stop
- if <context.args.size> == 1:
- narrate "<&c>Nutze /pay [Name] [amount]"
- stop
- if <context.args.size> > 1:
- define inputName <context.args.first>
- define target <server.match_player[<[inputName]>].if_null[null]>
- if <[target]> == null:
- narrate "<&c>Spieler mit den Namen <&e><[inputName]><&c> nicht gefunden!"
- stop
- if <[target]> == <player>:
- narrate "<&c>Du kannst dir nichts selbst senden!"
- stop
- define amount <context.args.get[2]>
- if !<[amount].is_decimal>:
- narrate "<&c>Keine gültige Geld angabe!"
- stop
- if !<[amount]> > 0:
- narrate "<&c>Keine gültige Geld angabe!"
- stop
- if !<player.money.is[or_more].than[<[amount]>]>:
- narrate "<&c>Du hast nicht genug Geld!"
- stop
- money take players:<player> quantity:<[amount].round_to[2]>
- money give players:<[target]> quantity:<[amount].round_to[2]>
- narrate "<&a>Du hast <[target].name> erfolgreich <[amount]>€ gesendet!"
- narrate "<&a>Du hast <[amount]>€ von <player.name> erhalten!" targets:<[target]>