forked from rpherbig/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gmoney.lic
36 lines (26 loc) · 866 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
35
36
=begin
Documentation: https://elanthipedia.play.net/Lich_script_repository#gmoney
=end
custom_require.call(%w[common common-money drinfomon])
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)
return unless DRRoom.pcs.any? { |room_pc| room_pc =~ /#{person}/i }
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 bput("give #{person} 10 plat", 'You give', 'while you are in debt') == 'while you are in debt'
end
end
end
GiveMoney.new