Date: 2016/02/27 05:36:18 UTC-08: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
CoinFlip:
type: command
name: Coinflip
usage: /coinflip [player] [amount]
description: Flip a coin and bet your money on the outcome!
tab complete:
- determine <server.list_players.parse[name].filter[starts_with[<context.args.last||>]]>
script:
- define CoinFlipMoney <context.args.get[2]>
- define CoinFlipEnemy <context.args.get[1]>
- if <player.money> < <def[CoinFlipMoney]> {
- if <def[CoinFlipEnemy]> < <def[CoinFlipMoney]> {
- narrate "<&c>You dont have enough money to flip the coin!"
- queue clear
}
}
- narrate "<&6>Sent Coinflip request to <&f><def[CoinFlipEnemy]> <&6>for $<def[CoinFlipMoney]>!"
- narrate "<&a>They have 15 seconds to accept the coin flip by doing /coinflip accept"
- narrate "<&6>Player <player.name> wants to flip-a-coin with you for $<def[CoinFlipMoney]>" targets:<def[CoinFlipEnemy]>
- narrate "<&7>Type /coinflip accept to accept the coinflip!" targets:<def[CoinFlipEnemy]>
- flag <player> CoinFlip duration:15s
- flag <def[CoinFlipEnemy]> CoinFlip duration:15s
CoinFlipAccept:
type: command
name: CoinflipAccept
usage: /coinflip accept
description: Accept the coin flip request
script:
- if <player.has_flag[CoinFlip]> {
- narrate "<&6>Coin flip accepted! Flipping the coin in..."
- wait 1s
- narrate "<&7>3..."
- wait 1s
- narrate "<&7>2..."
- wait 1s
- narrate "<&7>1..."
- wait 1s
}
# WHAT
# The
# FUCK
# AM
# I
# DOING
# LOL?