All pastes #162629 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-09-06 18:29 UTC
rendered paste body
    if @stock[name].deliverybeat != nil
m.reply("01")
delivery( name )
m.reply("5")
      # check whether the reordered good is available - if not, tell the user it's in progress and how long to go
      if available != true
        order = "tells #{nick} that we are out of #{name} but a new delivery is already in progress (#{togo.to_s} minutes)."
        @bot.action m.replyto, order; return
      end





  def delivery( name )
m.reply("02")
    beat_cur     = Time.new.strftime '%Y%j%H%M%S'
    deliverybeat = @stock[name].deliverybeat
m.reply("1")

        if beat_cur.to_f >= deliverybeat.to_f
m.reply("2")
          @stock[name].amount       = @stock[name].max
          @stock[name].deliverybeat = nil
          @registry[:stock]         = @stock
          available                 = true
        # if it's not available, set value according
m.reply("3")
        else
m.reply("11")
          togo = (deliverybeat.to_f - beat_cur.to_f) / 100
          available = false
m.reply("12")
        end
m.reply("4")
  end