Research Expert - Loose Target

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Message
Author
Buh
Posts: 45
Joined: Thu Dec 10, 2015 12:39 am

Research Expert - Loose Target

#1 Post by Buh » Fri Mar 04, 2016 4:14 am

HEy some ppl here..

Someone know, if and how i can change it, that i dont loose the NPC target, while making this Dailyquest?

Also there must be an macro for harvesting as an ingame function......... i saw that at other players -.-

Greetings

me

User avatar
Bot_romka
Posts: 96
Joined: Tue Apr 05, 2011 2:59 am
Location: Russia

Re: Research Expert - Loose Target

#2 Post by Bot_romka » Sat Mar 05, 2016 4:24 am

Buh wrote:HEy some ppl here..

Someone know, if and how i can change it, that i dont loose the NPC target, while making this Dailyquest?

Also there must be an macro for harvesting as an ingame function......... i saw that at other players -.-

Greetings

me

Code: Select all

function Player_Target_NPC(_npcname)
	-- number to string conversations
	local tonumbernpcname = tonumber(_npcname)
	if( type(tonumbernpcname) == "number" ) then
		_npcname = TEXT(string.format('Sys%s_name', tonumbernpcname));
		--CHAT_msg(_npcname);
	end
	-- find NPS
	for i = 1, 40 do
		local BBFrame = _G["OBloodBar"..i];
		local BBID = BBFrame:GetID();
		local BBname = _G[BBFrame:GetName().."Title"]:GetText();
		if( (BBname == _npcname or string.find(BBname,_npcname)) and BBID ~= 0 ) then
			--CHAT_msg(_npcname..", "..BBID);
			-- target NPC
			OBB_ChangeTraget(BBID);
			return true
		end
	end
	return false
end;

Code: Select all

/run Player_Target_NPC(120577)	-- NPC Id
or use NPC name.

wiedzmin97
Posts: 44
Joined: Wed Jul 03, 2013 1:37 pm

Re: Research Expert - Loose Target

#3 Post by wiedzmin97 » Sun Mar 06, 2016 7:59 am

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
function fastTarget(_objid, waittime)
      obj = player:findNearestNameOrId(_objid)
      player:target(obj.Address)
      yrest(100)
      Attack()
      yrest(waittime)
   end

function Player_Target_NPC(_npcname)
   -- number to string conversations
   local tonumbernpcname = tonumber(_npcname)
   if( type(tonumbernpcname) == "number" ) then
      _npcname = TEXT(string.format('Sys%s_name', tonumbernpcname));
      --CHAT_msg(_npcname);
   end
   -- find NPS
   for i = 1, 40 do
      local BBFrame = _G["OBloodBar"..i];
      local BBID = BBFrame:GetID();
      local BBname = _G[BBFrame:GetName().."Title"]:GetText();
      if( (BBname == _npcname or string.find(BBname,_npcname)) and BBID ~= 0 ) then
         --CHAT_msg(_npcname..", "..BBID);
         -- target NPC
         OBB_ChangeTraget(BBID);
         return true
      end
   end
   return false
end;

</onLoad>	

<!-- #  1 --><waypoint x="15381" z="35837" y="688">	
Player_Target_NPC(123561);
         yrest(200)

         fastTarget(123369,200);
         fastTarget(123368,200);
         fastTarget(123508,200);
         yrest(200)
Player_Target_NPC(123561); 
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
      if 10 == dailyQuestCount then
   if inventory:itemTotalCount(202434) > 0 then
                 inventory:useItem(202434)
   end
end
</waypoint>
</waypoints>
Have i something wrong here? Because im getting error:

Code: Select all

2016-03-06 13:52:53 - [string "..."]:14: attempt to call global 'TEXT' (a nil value)

Buh
Posts: 45
Joined: Thu Dec 10, 2015 12:39 am

Re: Research Expert - Loose Target

#4 Post by Buh » Thu Mar 10, 2016 1:26 pm

Hey

Sorry for this late answer but i thank you very much and i will try this in a few hours and give you feedback.

Thanks!!

Greetings

Me

Buh
Posts: 45
Joined: Thu Dec 10, 2015 12:39 am

Re: Research Expert - Loose Target

#5 Post by Buh » Thu Mar 10, 2016 3:52 pm

Hey

I tried it out and it dont works. Noo much nil-Value methods.

Once there is this "TEXT" idk for what it is. And after that BBFrame makes issues.

Greetings

Me

User avatar
Bot_romka
Posts: 96
Joined: Tue Apr 05, 2011 2:59 am
Location: Russia

Re: Research Expert - Loose Target

#6 Post by Bot_romka » Mon Mar 14, 2016 8:09 am

This code for game client addon, not for Bot. Create addon and use

Code: Select all

RoMCode("Player_Target_NPC(123561);")

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 8 guests