Advertisement
intangibles

Untitled

Jun 4th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.23 KB | None | 0 0
  1. [sbounty: name: Rift - Plane 3]
  2. [sbounty: data: {:enable_bounty_only=>false, :enable_hunting_rotation=>true, :enable_search_only=>false, :location=>"Rift", :skins=>["gizzard"], :targets=>["aivren(c)"], :room=>"12093", :boundaries=>["99999999"]}]
  3. [sbounty: Rift]
  4. [sbounty: String]
  5. [sbounty: test: aivren(c)]
  6. [sbounty: cleaning targets: ["aivren(c)"]]
  7. [sbounty: location inside locations.find: rift]
  8. [sbounty: location outside locations.find: ]
  9. --- Lich: sbounty has exited.
  10.  
  11.  
  12. if bounty? =~ /#{bounty_patterns['task_skin']}/
  13.         # remember: don't swap the order or the global $ vars are lost!
  14.         target   = $3.strip.downcase
  15.         skin     = clean_skin.call($2)
  16.         location = locations.find { |name, data| GSC.SBOUNTY_CLEAN_TARGETS(data[:targets]).find { |t| target =~ /#{t}/i } and data[:skins].find { |s| skin =~ /#{s.strip.downcase}/i }}
  17.     else
  18.         echo "inside if-else of get_bounty_location- if bounty?" if $sbounty_debug
  19.         bounty_patterns.each { |key,value|
  20.             echo "key: #{key}" if $sbounty_debug
  21.             echo "value: #{value}" if $sbounty_debug
  22.             echo bounty? if $sbounty_debug
  23.             if bounty? =~ /#{value}/i
  24.                 target   = $1
  25.                 location = $2
  26.  
  27.                 break
  28.             end
  29.         }
  30.         echo "location inside if statement: #{location}" if $sbounty_debug
  31.         location = location.downcase.strip
  32.         echo "location after downcase #{location}" if $sbounty_debug
  33.         location = locations.find { |name, data|
  34.             echo "name: #{name}" if $sbounty_debug
  35.             echo "data: #{data}" if $sbounty_debug
  36.             echo data[:location].strip if $sbounty_debug
  37.             echo data[:location].class if $sbounty_debug
  38.             echo data[:targets] if $sbounty_debug
  39.             location =~ /#{data[:location].strip}/i and GSC.SBOUNTY_CLEAN_TARGETS(data[:targets]).find {|t| target =~ /#{t}/i}
  40.             echo "cleaning targets: #{GSC.SBOUNTY_CLEAN_TARGETS(data[:targets])}" if $sbounty_debug
  41.             echo "location inside locations.find: #{location}" if $sbounty_debug
  42.         }
  43.         echo "location outside locations.find: #{location}" if $sbounty_debug
  44.     end
  45.  
  46.     echo "location: #{location}" if $sbounty_debug
  47.     exit
  48.     if location
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement