forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gmoney.lic
34 lines (25 loc) · 783 Bytes
/
gmoney.lic
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
=begin
Documentation: https://elanthipedia.play.net/Lich_script_repository#gmoney
=end
custom_require.call(%w(common common-money))
class GiveMoney
include DRC
include DRCM
def initialize
arg_definitions = [
[
{ name: 'player', regex: /\w+/i, variable: true, description: 'Name of the player to give money to' }
]
]
args = parse_args(arg_definitions)
give_money(args.player)
end
def give_money(person)
loop do
bput('deposit all', 'You hand', 'The clerk slides', 'You don\'t have any', 'reached the maximum balance')
break unless withdraw_exact_amount?('10 plat', nil)
break if 'while you are in debt' == bput("give #{person} 10 plat", 'You give', 'while you are in debt')
end
end
end
GiveMoney.new