From c53dd27c3ea353049e3f5f5b9ae5765a59b51631 Mon Sep 17 00:00:00 2001 From: Ackis Date: Mon, 20 Oct 2008 17:06:12 +0000 Subject: [PATCH] Dataminer update --- ARLDataminer.rb | 60 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/ARLDataminer.rb b/ARLDataminer.rb index 7b737e9..2da9167 100644 --- a/ARLDataminer.rb +++ b/ARLDataminer.rb @@ -258,27 +258,27 @@ EOF unless npc[:id] == 0 acquire << { "type" => 1, "id" => npc[:id] } + $trainers[npc[:id]] = {:name => npc[:name]} unless npc[:react].nil? react_a = npc[:react][0].nil? ? 0 : npc[:react][0] react_h = npc[:react][1].nil? ? 0 : npc[:react][1] - else + if react_a < 3 + flags << 1 + end - flags << 1 << 2 + if react_h < 3 + flags << 2 + end - end + $trainers[npc[:id]][:faction] = react_h < 3 && react_a < 3 ? 0 : react_h == 3 && react_a < 3 ? 1 : react_a == 3 && react_h < 3 ? 2 : 4 - $trainers[npc[:id]] = {:name => npc[:name]} - $trainers[npc[:id]][:faction] = react_h < 3 && react_a < 3 ? 0 : react_h == 3 && react_a < 3 ? 1 : react_a == 3 && react_h < 3 ? 2 : 4 + else - if react_a < 3 - flags << 1 - end + flags << 1 << 2 - if react_h < 3 - flags << 2 end end @@ -313,20 +313,24 @@ EOF react_a = npc[:react][0].nil? ? 0 : npc[:react][0] react_h = npc[:react][1].nil? ? 0 : npc[:react][1] - else + if react_a < 3 - flags << 1 << 2 + flags << 1 - end + end - $vendors[npc[:id]][:faction] = react_h < 3 && react_a < 3 ? 0 : react_h == 3 && react_a < 3 ? 1 : react_a == 3 && react_h < 3 ? 2 : 4 + if react_h < 3 - if react_a < 3 - flags << 1 - end + flags << 2 + + end + + $vendors[npc[:id]][:faction] = react_h < 3 && react_a < 3 ? 0 : react_h == 3 && react_a < 3 ? 1 : react_a == 3 && react_h < 3 ? 2 : 4 + + else + + flags << 1 << 2 - if react_h < 3 - flags << 2 end if npc[:locs] @@ -374,23 +378,23 @@ EOF react_a = npc[:react][0].nil? ? 0 : npc[:react][0] react_h = npc[:react][1].nil? ? 0 : npc[:react][1] - else + if react_a < 3 - flags << 1 << 2 + flags << 1 - end + end - $vendors[npc[:id]][:faction] = react_h < 3 && react_a < 3 ? 0 : react_h == 3 && react_a < 3 ? 1 : react_a == 3 && react_h < 3 ? 2 : 4 + if react_h < 3 - if react_a < 3 + flags << 2 - flags << 1 + end - end + $vendors[npc[:id]][:faction] = react_h < 3 && react_a < 3 ? 0 : react_h == 3 && react_a < 3 ? 1 : react_a == 3 && react_h < 3 ? 2 : 4 - if react_h < 3 + else - flags << 2 + flags << 1 << 2 end -- 1.7.9.5