make xan feel bad #6
13
coin.rb
13
coin.rb
@ -7,6 +7,7 @@ MAX_COINS_PER_DAY = 999
|
|||||||
COIN_TIMEOUT = 15
|
COIN_TIMEOUT = 15
|
||||||
SCOREBOARD = './scoreboard.yml'
|
SCOREBOARD = './scoreboard.yml'
|
||||||
PASTA='You know what? Im done, i am leaving, we were friendly talking about the subject. This crossed the line of "ok killer of joy" to "no fun allowed"'
|
PASTA='You know what? Im done, i am leaving, we were friendly talking about the subject. This crossed the line of "ok killer of joy" to "no fun allowed"'
|
||||||
|
ITEMS = ["manga", "ramen", "pizza", "a cum jar"]
|
||||||
COIN_EMOJI = '🪙'
|
COIN_EMOJI = '🪙'
|
||||||
BAG_EMOJI = '💰'
|
BAG_EMOJI = '💰'
|
||||||
|
|
||||||
@ -81,12 +82,22 @@ def get_coin(event, amt = 1)
|
|||||||
$coin_state_active = COIN_STATE_IDLE
|
$coin_state_active = COIN_STATE_IDLE
|
||||||
if(rand(100) == 47)
|
if(rand(100) == 47)
|
||||||
hyper_coin_amount = rand(100)
|
hyper_coin_amount = rand(100)
|
||||||
|
begin
|
||||||
coins = increment_coin(event.author.id, hyper_coin_amount)
|
coins = increment_coin(event.author.id, hyper_coin_amount)
|
||||||
event.respond "What astounding luck!!! #{clean_name author.display_name}, you've just activated HYPER COIN EVENT and have received #{hyper_coin_amount} coins for a grand total of #{coins} coins!"
|
rescue TypeError
|
||||||
|
event.respond "An error occured. Your data was most likely tampered with. SUCH A SHAME that you missed out on the HYPER COIN EVENT!1!! You could've had #{hyper_coin_amount} coins at once."
|
||||||
else
|
else
|
||||||
|
event.respond "What astounding luck!!! #{clean_name author.display_name}, you've just activated HYPER COIN EVENT and have received #{hyper_coin_amount} coins for a grand total of #{coins} coins!"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
coins = increment_coin(author.id, amt)
|
coins = increment_coin(author.id, amt)
|
||||||
|
rescue TypeError
|
||||||
|
event.respond "An error occurred. Your data was most likely tampered with. I'm going to buy #{ITEMS.sample} with this money now!"
|
||||||
|
else
|
||||||
event.respond "Nice catch, #{clean_name author.display_name}! You have #{plural('coin', coins)} now!"
|
event.respond "Nice catch, #{clean_name author.display_name}! You have #{plural('coin', coins)} now!"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
event.respond "No coins for you, #{clean_name author.display_name}!"
|
event.respond "No coins for you, #{clean_name author.display_name}!"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user