Compare commits
2 Commits
c6fc4cdf0e
...
56f54bed6a
Author | SHA1 | Date | |
---|---|---|---|
56f54bed6a | |||
8014f90e2c |
7
coin.rb
7
coin.rb
@ -68,8 +68,11 @@ bot.message(content: 'GET COIN' ) do |event|
|
|||||||
next if event.author.role? 'robot friend'
|
next if event.author.role? 'robot friend'
|
||||||
# update score
|
# update score
|
||||||
if coin_state_active
|
if coin_state_active
|
||||||
|
if event.author.bot_account?
|
||||||
|
event.respond "Bots don't get coins!"
|
||||||
|
end
|
||||||
coin_state_active = false
|
coin_state_active = false
|
||||||
if(rand(100) == 47)
|
if(rand(100) == 47)
|
||||||
hyper_coin_amount = rand(100)
|
hyper_coin_amount = rand(100)
|
||||||
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 event.author.display_name}, you've just activated HYPER COIN EVENT and have received #{hyper_coin_amount} coins for a grand total of #{coins} coins!"
|
event.respond "What astounding luck!!! #{clean_name event.author.display_name}, you've just activated HYPER COIN EVENT and have received #{hyper_coin_amount} coins for a grand total of #{coins} coins!"
|
||||||
@ -89,7 +92,7 @@ end
|
|||||||
|
|
||||||
bot.run(true)
|
bot.run(true)
|
||||||
|
|
||||||
loop do
|
loop do
|
||||||
# sleep random amount of time between 1 and 4 hours
|
# sleep random amount of time between 1 and 4 hours
|
||||||
sleep(get_random_hours(1, 4))
|
sleep(get_random_hours(1, 4))
|
||||||
# activate coin state
|
# activate coin state
|
||||||
|
Loading…
Reference in New Issue
Block a user