Bagcleanerseller, a temporary solution to TABLE ID bug?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
hagenleu
Posts: 28
Joined: Sun Jan 02, 2011 11:20 am

Bagcleanerseller, a temporary solution to TABLE ID bug?

#1 Post by hagenleu » Fri Jun 03, 2011 11:14 am

There is this addon: Bagcleanerseller.

Similar to micromaco autosell option but simpler: you set start and end bagslot, and, with shop open, appear a button, if pressed all the sellable item are selled (of course without the many options and controls of micromacro).

Now for me, and for all that farm only for money this is just enought, and waiting for the solution of the TABLE ID bug, Rock (or Lisa or someone skilled) can you give a look to this addon and see if there is the possibility to connect micromacro to it? (in the same way as micromacro is connected with Fusion addon).

In attached there is the addond and an immage of the button.

Tnx again for all your work

Hagenleu
Attachments
bagcleanseller.jpg
BagCleanerSeller.rar
(84.51 KiB) Downloaded 226 times

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#2 Post by rock5 » Fri Jun 03, 2011 11:31 am

Looks a bit too complex to just figure out but basically you need to find the name of that button in the xml files then find what the "onclick" function is. Then you can just execute that function from the bot.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

hagenleu
Posts: 28
Joined: Sun Jan 02, 2011 11:20 am

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#3 Post by hagenleu » Fri Jun 03, 2011 12:43 pm

Ok, i find in BCS.xml the following:

Code: Select all

<OnClick>
	BCS.Fn.Seller.Sell_to_Vendor(this, key);
</OnClick>
and in bagseller.lua:

Code: Select all

----------------------------------------------------------
--														--
--				Sell-to-Vendor-Button					--
--														--
----------------------------------------------------------

	Sell_to_Vendor							= function()
-->
	----->>>>>><<<<<----- bagid uses slot# 61 to 240 ----->>>>>><<<<<-----
	-- sell all items within specified range according
	-- to the configurated rules in settings
	
	--hook PlaySoundByPath does not work, seems to be an interface call
	BCS.Hooked.InterfaceFXVolume = SYS_AudioSettings_InterfaceSFXVolumeSlider:GetValue();
	-- mute the interface
	InterfaceSFXVolumeSlider_SetValue(0);
	
	-- first remove GarbageItems back into bagpack  
	BCS.Fn.Bag.Remove_from_Garbagebag();
	
	BCS.Seller.BagPages = { [1]=true, [2]=true, [3]=false, [4]=false, [5]=false, [6]=false, };
	
	BCS.Seller.CurrentGained = 0;
	
	-- check whether rented BagPages are involved
	if BCS.BagSlots.BagSlotEnd > 60 then
		for i = 3, 6 do
			local isLet, letTime = GetBagPageLetTime(i);
			if letTime > -1 then -- rented
				BCS.Seller.BagPages[i] = true;
			end;
		end;
	end;
	
	--set StartSlot
	BCS.Seller.CurrentSlot = BCS.BagSlots.BagSlotStart;
	
	-- now set flag for update-event to sell one item per update
	BCS.Timer.SellInProgress = true;
	BCS.Timer.SellMsgSuppress = true;

--><--
	end, -- Sell_to_Vendor
	
	};
--[[	
BCS.Fn.Seller.Sell_to_Vendor()
--]]
--> end of BCS.Fn.Seller	<--	
The function to call is BCS.Fn.Seller.Sell_to_Vendor(this, key), so i can call it in the waypoint with a simple SendMacro or it is more complex? (but differently by the fusion, we don't have to calculate nothing, only call the function-press the button).

According to you, how can i go on?

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#4 Post by lisa » Fri Jun 03, 2011 12:59 pm

Code: Select all

sendMacro("BCS.Fn.Seller.Sell_to_Vendor(this, key);")
once you have the addon configured using that code from the bot will make it sell.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#5 Post by rock5 » Fri Jun 03, 2011 1:02 pm

The function doesn't seem to accept any arguments so try this.

Code: Select all

RoMScipt("BCS.Fn.Seller.Sell_to_Vendor()")
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#6 Post by lisa » Fri Jun 03, 2011 1:11 pm

hmm code I posted works perfectly for me
Use MACRO: Executing RoMScript "BCS.Fn.Seller.Sell_to_Vendor(this, key);".
Current gold: 1290381
Profit: 2856
Elapsed time: 0.23450000000001 minutes.
Profit per hour: 730746.26865668
Clearing target.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

hagenleu
Posts: 28
Joined: Sun Jan 02, 2011 11:20 am

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#7 Post by hagenleu » Fri Jun 03, 2011 1:24 pm

Lol, unbelivable! it's work the first try!

That is the function and very simple to call :P

I use sendMacro("BCS.Fn.Seller.Sell_to_Vendor()") and work like a charm :P

Rock tnx anyway to give me the direction in witch search the right things!

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#8 Post by kanta » Fri Jun 03, 2011 5:42 pm

lisa wrote:hmm code I posted works perfectly for me
Profit per hour: 730746.26865668
:shock: What are you farming to get so much profit???


If only this addon had a quality filter.....

P.S.
It should also be said that people will need to replace

Code: Select all

		player:merchant("Pancer")
with

Code: Select all

		player:target_NPC("Pancer")
		sendMacro("ChoiceOption(1);");
Took me a few moments to figure out why it wouldn't work.
Scout/Knight/Rogue 70/66/66

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#9 Post by rock5 » Fri Jun 03, 2011 10:22 pm

lisa wrote:hmm code I posted works perfectly for me
Yes it would. "this" and "key" in that context would equal nil but it doesn't matter because they are not used in the function.
kanta wrote:P.S.
It should also be said that people will need to replace

Code: Select all

      player:merchant("Pancer")
with

Code: Select all

      player:target_NPC("Pancer")
      sendMacro("ChoiceOption(1);");
Took me a few moments to figure out why it wouldn't work.
So this is the code you were having trouble with? Try this instead to make sure you only sell if the store successfully opens.

Code: Select all

if player:openStore("Pancer") then
    -- your command to sell
end
Of course if it fails to open the store then it will return to farming with, usually for this script, a full inventory. So maybe you might to make sure sell like this.

Code: Select all

repeat
until player:openStore("Pancer")
-- your command to sell
Hope that helps.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#10 Post by kanta » Fri Jun 03, 2011 11:43 pm

I'd never get through this coding without you and Lisa :oops:

Thanks again :)
Scout/Knight/Rogue 70/66/66

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#11 Post by lisa » Sat Jun 04, 2011 7:56 am

kanta wrote:
lisa wrote:hmm code I posted works perfectly for me
Profit per hour: 730746.26865668
:shock: What are you farming to get so much profit???
try this 1 then

Code: Select all

Profit per hour: 9119087.7881317
Clearing target.
Yes it is an exact copy paste from MM window =)

Trick is the bot had only been running a minute or less, lol

Ohh yeah I use this as code for selling

Code: Select all

	yrest(100);
	player:target_NPC("Pancer")
	yrest(1000);
    sendMacro("ChoiceOption(1);");
	yrest(1000)
	sendMacro("BCS.Fn.Seller.Sell_to_Vendor(this, key);")
	player:rest(7)
	yrest(100); 
Generally 3 full bags so it can take the 7 seconds to sell it all. If you use less bags can just reduce the player:rest. I think though those few extra seconds makes sure your bags are empty for the next run.
This won't repair your items though.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#12 Post by kanta » Sat Jun 04, 2011 11:48 am

lisa wrote: Ohh yeah I use this as code for selling

Code: Select all

	yrest(100);
	player:target_NPC("Pancer")
	yrest(1000);
    sendMacro("ChoiceOption(1);");
	yrest(1000)
	sendMacro("BCS.Fn.Seller.Sell_to_Vendor(this, key);")
	player:rest(7)
	yrest(100); 
Generally 3 full bags so it can take the 7 seconds to sell it all. If you use less bags can just reduce the player:rest. I think though those few extra seconds makes sure your bags are empty for the next run.
This won't repair your items though.
I've been using yrest(18000). My connection sometimes gets laggy so I give it some extra time. It's still faster than the previous way. As for repairs, one of my addons takes care of that :) I've also started using the repeat code that Rock5 posted to make sure the shop opens and the junk gets sold, seems to be working very well.
Scout/Knight/Rogue 70/66/66

Tynos
Posts: 4
Joined: Sat Jun 11, 2011 11:33 am

Re: Bagcleanerseller, a temporary solution to TABLE ID bug?

#13 Post by Tynos » Sat Jun 11, 2011 9:48 pm

Really nice addon!!!! It works perfect :D

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 25 guests