how would i?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
Golbez
Posts: 66
Joined: Sat Aug 02, 2008 8:27 pm

how would i?

#1 Post by Golbez »

how would i check and see if bags 1-3 are full. then when i get the bot to the npc. how would i make it sell everything in bags 1-3?
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: how would i?

#2 Post by lisa »

Golbez wrote:how would i make it sell everything in bags 1-3?
you need to change profile options
set autosell to true and
change the fromslot and toslot according.

Code: Select all

		<!-- Auto selling options when used with player:merchant -->
		<option name="INV_AUTOSELL_ENABLE"	value="false" />		<!-- true | false -->
		<option name="INV_AUTOSELL_FROMSLOT" value="1" /> 			<!-- 1 = bag 1 slot 1 -->
		<option name="INV_AUTOSELL_TOSLOT"	value="60" /> 			<!-- 30 = last slot bag 1 -->

Golbez wrote:how would i check and see if bags 1-3 are full

Code: Select all

if inventory:itemTotalCount(0) == 0 then
this code checks if all slots are full within the range of the autosell fromslot and toslot.
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
Golbez
Posts: 66
Joined: Sat Aug 02, 2008 8:27 pm

Re: how would i?

#3 Post by Golbez »

lisa wrote:
Golbez wrote:how would i make it sell everything in bags 1-3?
you need to change profile options
set autosell to true and
change the fromslot and toslot according.

Code: Select all

		<!-- Auto selling options when used with player:merchant -->
		<option name="INV_AUTOSELL_ENABLE"	value="false" />		<!-- true | false -->
		<option name="INV_AUTOSELL_FROMSLOT" value="1" /> 			<!-- 1 = bag 1 slot 1 -->
		<option name="INV_AUTOSELL_TOSLOT"	value="60" /> 			<!-- 30 = last slot bag 1 -->

Golbez wrote:how would i check and see if bags 1-3 are full

Code: Select all

if inventory:itemTotalCount(0) == 0 then
this code checks if all slots are full within the range of the autosell fromslot and toslot.
then i just make it interact with the npc and it will sell everything?
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: how would i?

#4 Post by rock5 »

Once you have all the settings correct in profile you use

Code: Select all

player:merchant("npc_name")
It will then buy, sell and repair according to your profile settings.
  • 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
Golbez
Posts: 66
Joined: Sat Aug 02, 2008 8:27 pm

Re: how would i?

#5 Post by Golbez »

ty :)

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<onLoad>
		changeProfileOption("INV_AUTOSELL_ENABLE", true)
		changeProfileOption("INV_AUTOSELL_FROMSLOT", 1) -- bag 1
		changeProfileOption("INV_AUTOSELL_TOSLOT", 90) -- bag 3
	</onLoad>
	<!-- #  1 --><waypoint x="-3947" z="4177" y="1">	</waypoint>
	<!-- #  2 --><waypoint x="-4095" z="3967" y="-4">	</waypoint>
	<!-- #  3 --><waypoint x="-4152" z="3701" y="-2">	</waypoint>
	<!-- #  4 --><waypoint x="-4509" z="3601" y="12">	</waypoint>
	<!-- #  5 --><waypoint x="-4732" z="3590" y="11">	</waypoint>
	yrest(99);
		if inventory:itemTotalCount(0) >= 90 then
			printf("Move To Npc to empty bags")
			<!-- #  1 --><waypoint x="-4947" z="3455" y="0">	</waypoint>
			<!-- #  2 --><waypoint x="-5036" z="3399" y="-4">	</waypoint>
			<!-- #  3 --><waypoint x="-5126" z="3337" y="-110">	</waypoint>
			<!-- #  4 --><waypoint x="-5100" z="3276" y="-108">	</waypoint>
				yrest(99); player:merchant("Kenen Maift"); yrest(99);
			<!-- #  5 --><waypoint x="-5119" z="3312" y="-110">	</waypoint>
			<!-- #  6 --><waypoint x="-5127" z="3362" y="-112">	</waypoint>
			<!-- #  7 --><waypoint x="-5362" z="3394" y="-114">	</waypoint>
			<!-- #  8 --><waypoint x="-5361" z="3597" y="-107">	</waypoint>
			<!-- #  9 --><waypoint x="-5359" z="3742" y="-65">	</waypoint>
			<!-- #  10 --><waypoint x="-5347" z="3842" y="-43">	</waypoint>
			<!-- #  11 --><waypoint x="-5316" z="3974" y="-28">	</waypoint>
			<!-- #  12 --><waypoint x="-5248" z="4099" y="-19">	</waypoint>
			<!-- #  13 --><waypoint x="-5121" z="4073" y="0">	</waypoint>
		else
			printf("Bags do not need to be emptied yet")
		end
	<!-- #  6 --><waypoint x="-4850" z="3710" y="7">	</waypoint>
	<!-- #  7 --><waypoint x="-4952" z="3808" y="5">	</waypoint>
	<!-- #  8 --><waypoint x="-4973" z="3994" y="1">	</waypoint>
	<!-- #  9 --><waypoint x="-4823" z="4077" y="-1">	</waypoint>
	<!-- # 10 --><waypoint x="-4609" z="4049" y="4">	</waypoint>
	<!-- # 11 --><waypoint x="-4513" z="4272" y="1">	</waypoint>
	<!-- # 12 --><waypoint x="-4466" z="4495" y="-6">	</waypoint>
	<!-- # 13 --><waypoint x="-4449" z="4723" y="4">	</waypoint>
	<!-- # 14 --><waypoint x="-4074" z="4629" y="-8">	</waypoint>
	<!-- # 15 --><waypoint x="-4103" z="4385" y="-8">	</waypoint>
</waypoints>
sooo this should work right?

Edit: for some reason the bot runs to down to merchant everytime it gets to where it should check my inventory. doesnt even talk to it. just runs the waypoints...
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: how would i?

#6 Post by rock5 »

Lua code such as 'if' statements can only exist between tags in an xml file. So only between <waypoint> and </waypoint> or <onload> and </onload>. You can't put waypoints in an 'if' statment.

I think you want something like this.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<onLoad>
		changeProfileOption("INV_AUTOSELL_ENABLE", true)
		changeProfileOption("INV_AUTOSELL_FROMSLOT", 1) -- bag 1
		changeProfileOption("INV_AUTOSELL_TOSLOT", 90) -- bag 3
	</onLoad>
	<!-- #  1 --><waypoint x="-3947" z="4177" y="1" tag="start">   </waypoint>
	<!-- #  2 --><waypoint x="-4095" z="3967" y="-4">   </waypoint>
	<!-- #  3 --><waypoint x="-4152" z="3701" y="-2">   </waypoint>
	<!-- #  4 --><waypoint x="-4509" z="3601" y="12">   </waypoint>
	<!-- #  5 --><waypoint x="-4732" z="3590" y="11">   </waypoint>
		yrest(99);
		if inventory:itemTotalCount(0) >= 90 then
			printf("Move To Npc to empty bags")
			__WPL:setWaypointIndex(__WPL:findWaypointTag("to merchant"))
		else
			printf("Bags do not need to be emptied yet")
		end
	<!-- #  6 --><waypoint x="-4850" z="3710" y="7" tag="continue">   </waypoint>
	<!-- #  7 --><waypoint x="-4952" z="3808" y="5">   </waypoint>
	<!-- #  8 --><waypoint x="-4973" z="3994" y="1">   </waypoint>
	<!-- #  9 --><waypoint x="-4823" z="4077" y="-1">   </waypoint>
	<!-- # 10 --><waypoint x="-4609" z="4049" y="4">   </waypoint>
	<!-- # 11 --><waypoint x="-4513" z="4272" y="1">   </waypoint>
	<!-- # 12 --><waypoint x="-4466" z="4495" y="-6">   </waypoint>
	<!-- # 13 --><waypoint x="-4449" z="4723" y="4">   </waypoint>
	<!-- # 14 --><waypoint x="-4074" z="4629" y="-8">   </waypoint>
	<!-- # 15 --><waypoint x="-4103" z="4385" y="-8">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))
	</waypoint>
   
	<!-- #  1 --><waypoint x="-4947" z="3455" y="0" tag="to merchant">   </waypoint>
	<!-- #  2 --><waypoint x="-5036" z="3399" y="-4">   </waypoint>
	<!-- #  3 --><waypoint x="-5126" z="3337" y="-110">   </waypoint>
	<!-- #  4 --><waypoint x="-5100" z="3276" y="-108">   </waypoint>
	yrest(99); player:merchant("Kenen Maift"); yrest(99);
	<!-- #  5 --><waypoint x="-5119" z="3312" y="-110">   </waypoint>
	<!-- #  6 --><waypoint x="-5127" z="3362" y="-112">   </waypoint>
	<!-- #  7 --><waypoint x="-5362" z="3394" y="-114">   </waypoint>
	<!-- #  8 --><waypoint x="-5361" z="3597" y="-107">   </waypoint>
	<!-- #  9 --><waypoint x="-5359" z="3742" y="-65">   </waypoint>
	<!-- #  10 --><waypoint x="-5347" z="3842" y="-43">   </waypoint>
	<!-- #  11 --><waypoint x="-5316" z="3974" y="-28">   </waypoint>
	<!-- #  12 --><waypoint x="-5248" z="4099" y="-19">   </waypoint>
	<!-- #  13 --><waypoint x="-5121" z="4073" y="0">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("continue"))
	</waypoint>
</waypoints>
What this does is loop round and round the first part until only 10 spaces left in inventory. Then it jumps to the "to merchant" path, goes to the merchant then continues at waypoint "continue".
  • 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: how would i?

#7 Post by lisa »

wouldn't the code need to be in between the waypoint tags?

Code: Select all

 <!-- #  5 --><waypoint x="-4732" z="3590" y="11">   
     yrest(99);
      if inventory:itemTotalCount(0) >= 90 then
         printf("Move To Npc to empty bags")
         __WPL:setWaypointIndex(__WPL:findWaypointTag("to merchant"))
      else
         printf("Bags do not need to be emptied yet")
      end
</waypoint>
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
Golbez
Posts: 66
Joined: Sat Aug 02, 2008 8:27 pm

Re: how would i?

#8 Post by Golbez »

soo i got it to move to the merchant, talk to the merchant then return. buut it does it every time lol. also how would i make the bot delete/trash items that cant be sold?

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <onLoad>
      changeProfileOption("INV_AUTOSELL_ENABLE", true)
      changeProfileOption("INV_AUTOSELL_FROMSLOT", 1) -- bag 1
      changeProfileOption("INV_AUTOSELL_TOSLOT", 90) -- bag 3
   </onLoad>
   <!-- #  1 --><waypoint x="-3947" z="4177" y="1" tag="start">   </waypoint>
   <!-- #  2 --><waypoint x="-4095" z="3967" y="-4">   </waypoint>
   <!-- #  3 --><waypoint x="-4152" z="3701" y="-2">   </waypoint>
   <!-- #  4 --><waypoint x="-4509" z="3601" y="12">   </waypoint>
   <!-- #  5 --><waypoint x="-4732" z="3590" y="11">
      yrest(99);
      if inventory:itemTotalCount(0) >= 90 then
         printf("Move To Npc to empty bags")
         __WPL:setWaypointIndex(__WPL:findWaypointTag("to merchant"))
      else
         printf("Bags do not need to be emptied yet")
      end
	</waypoint>
   <!-- #  6 --><waypoint x="-4850" z="3710" y="7" tag="continue">   </waypoint>
   <!-- #  7 --><waypoint x="-4952" z="3808" y="5">   </waypoint>
   <!-- #  8 --><waypoint x="-4973" z="3994" y="1">   </waypoint>
   <!-- #  9 --><waypoint x="-4823" z="4077" y="-1">   </waypoint>
   <!-- # 10 --><waypoint x="-4609" z="4049" y="4">   </waypoint>
   <!-- # 11 --><waypoint x="-4513" z="4272" y="1">   </waypoint>
   <!-- # 12 --><waypoint x="-4466" z="4495" y="-6">   </waypoint>
   <!-- # 13 --><waypoint x="-4449" z="4723" y="4">   </waypoint>
   <!-- # 14 --><waypoint x="-4074" z="4629" y="-8">   </waypoint>
   <!-- # 15 --><waypoint x="-4103" z="4385" y="-8">
      __WPL:setWaypointIndex(__WPL:findWaypointTag("start"))
   </waypoint>

   <!-- #  1 --><waypoint x="-4947" z="3455" y="0" tag="to merchant">   </waypoint>
   <!-- #  2 --><waypoint x="-5036" z="3399" y="-4">   </waypoint>
   <!-- #  3 --><waypoint x="-5126" z="3337" y="-110">   </waypoint>
   <!-- #  4 --><waypoint x="-5100" z="3276" y="-108">
		yrest(1000)
		player:merchant("Kenen Maift")
		yrest(100)
		printf("Bags emptied")
	</waypoint>
   <!-- #  5 --><waypoint x="-5119" z="3312" y="-110">   </waypoint>
   <!-- #  6 --><waypoint x="-5127" z="3362" y="-112">   </waypoint>
   <!-- #  7 --><waypoint x="-5362" z="3394" y="-114">   </waypoint>
   <!-- #  8 --><waypoint x="-5361" z="3597" y="-107">   </waypoint>
   <!-- #  9 --><waypoint x="-5359" z="3742" y="-65">   </waypoint>
   <!-- #  10 --><waypoint x="-5347" z="3842" y="-43">   </waypoint>
   <!-- #  11 --><waypoint x="-5316" z="3974" y="-28">   </waypoint>
   <!-- #  12 --><waypoint x="-5248" z="4099" y="-19">   </waypoint>
   <!-- #  13 --><waypoint x="-5121" z="4073" y="0">
      __WPL:setWaypointIndex(__WPL:findWaypointTag("continue"))
   </waypoint>
</waypoints>
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: how would i?

#9 Post by rock5 »

Golbez wrote:if inventory:itemTotalCount(0) >= 90 then
Hm.. On second thought, this should be.

Code: Select all

if 10 >= inventory:itemTotalCount(0) then
  • 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
Golbez
Posts: 66
Joined: Sat Aug 02, 2008 8:27 pm

Re: how would i?

#10 Post by Golbez »

rock5 wrote:
Golbez wrote:if inventory:itemTotalCount(0) >= 90 then
Hm.. On second thought, this should be.

Code: Select all

if 10 >= inventory:itemTotalCount(0) then

this works alot better :) only problem now is. it seems like it does it every time. i also cant figure out how to make it delete items xD

need to throw out all these chupura bloods i keep getting. i only wanna keep 100 on me...

edit: now that i have all by bags unlocked again it gos to the merchant when it should.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: how would i?

#11 Post by rock5 »

Golbez wrote:this works alot better :) only problem now is. it seems like it does it every time
I don't understand. How can it "work alot better" if it "does it every time"? It should only go to the merchant when there are 10 or less spaces left. What is it doing?
Golbez wrote:need to throw out all these chupura bloods i keep getting. i only wanna keep 100 on me...
That's not so easy. To drop an item you just find it in your inventory then do

Code: Select all

item:delete()
But keeping 100 makes it a bit more of a problem. Hmm.. If 100 is a full stack we could check if the item count is more than 100, if so delete the smallest stack. Luckily, I changed "findItem" to return the smallest stack a while ago, so this should work.

Code: Select all

if inventory:itemTotalCount(bloodId) > 100 then
   inventory:findItem(bloodId):delete()
end
  • 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
abron1
Posts: 162
Joined: Wed Feb 22, 2012 12:43 am

Re: how would i?

#12 Post by abron1 »

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="-15146" z="40247" y="601 tag=farm">	
	if( 5 > inventory:itemTotalCount(0) ) then
	__WPL:setWaypointIndex(__WPL:findWaypointTag("npc"));
		end	
	</waypoint>
	<!-- #  2 --><waypoint x="-14949" z="40041" y="579">	</waypoint>
	<!-- #  3 --><waypoint x="-14821" z="40015" y="595">	</waypoint>
	<!-- #  4 --><waypoint x="-14644" z="40026" y="600">	</waypoint>
	<!-- #  5 --><waypoint x="-14625" z="40235" y="620">	</waypoint>
	<!-- #  6 --><waypoint x="-14832" z="40056" y="592">	</waypoint>
	<!-- #  7 --><waypoint x="-14963" z="40070" y="579">	</waypoint>
	<!-- #  8 --><waypoint x="-15184" z="40271" y="602">	</waypoint>
	<!-- #  9 --><waypoint x="-15302" z="40192" y="612">	</waypoint>
	<!-- # 10 --><waypoint x="-15295" z="40027" y="613">	</waypoint>
	<!-- # 11 --><waypoint x="-15101" z="40120" y="577">	</waypoint>
	<!-- # 12 --><waypoint x="-15170" z="40250" y="600">	</waypoint>
	
	<!-- #  1 --><waypoint x="-15133" z="40284" y="598" tag="npc">	</waypoint>
	<!-- #  2 --><waypoint x="-15290" z="40211" y="614"> player:mount();	</waypoint>
	<!-- #  3 --><waypoint x="-15445" z="40125" y="602">	</waypoint>
	<!-- #  4 --><waypoint x="-15553" z="40000" y="602">	</waypoint>
	<!-- #  5 --><waypoint x="-15628" z="39895" y="606">	</waypoint>
	<!-- #  6 --><waypoint x="-15607" z="39813" y="605">	</waypoint>
	<!-- #  7 --><waypoint x="-15567" z="39817" y="606">		player:merchant("Fadiya Royil");
	</waypoint>
	<!-- #  9 --><waypoint x="-15613" z="39815" y="605">	</waypoint>
	<!-- # 10 --><waypoint x="-15613" z="39929" y="606">	</waypoint>
	<!-- # 11 --><waypoint x="-15519" z="40013" y="604">	</waypoint>
	<!-- # 12 --><waypoint x="-15476" z="40121" y="597">	</waypoint>
	<!-- # 13 --><waypoint x="-15401" z="40166" y="610">	</waypoint>
	<!-- # 14 --><waypoint x="-15252" z="40190" y="612">	</waypoint>
	<!-- # 15 --><waypoint x="-15146" z="40252" y="601">_WPL:setWaypointIndex(__WPL:findWaypointTag("farm"))      </waypoint>
</waypoints>
both way points work on there own but when i try to combine then the bot gives me and error and won't load i've been gone for around 6 months so combining way points my have changed... sorry this is my first post so i don't know how to post the error as a screen shot...functions.lua:300: attempt to perform arithmetic on local 'y2' (a string value)
Last edited by abron1 on Thu Mar 08, 2012 6:09 pm, edited 1 time in total.
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: how would i?

#13 Post by lisa »

That error is to do with the distance function

Code: Select all

distance(x1, z1, y1, x2, z2, y2) 
So somewhere in your coding you are using distance and have y2 as a string.
abron1 wrote:attempt to perform arithmetic on local 'y2' (a string value)
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
abron1
Posts: 162
Joined: Wed Feb 22, 2012 12:43 am

Re: how would i?

#14 Post by abron1 »

man i have try everything and i don't see the y2 in my waypoint at all. thanks for the quick response.. funny thing is it only happens when i try to combine them... do you think i have the farm waypoint to far from the npc way point? because i tried to get there starting points in farly the same spot
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: how would i?

#15 Post by lisa »

<!-- # 1 --><waypoint x="-15146" z="40247" y="601 tag=farm">
there is your issue, missing 2 "

Code: Select all

<!-- # 1 --><waypoint x="-15146" z="40247" y="601" tag="farm"> 
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
abron1
Posts: 162
Joined: Wed Feb 22, 2012 12:43 am

Re: how would i?

#16 Post by abron1 »

wow that worked i would have never found that and also i want to put a dura check in waypoint 2 for main do i have to add the 2 with the y each time i add events?
Golbez
Posts: 66
Joined: Sat Aug 02, 2008 8:27 pm

Re: how would i?

#17 Post by Golbez »

"I don't understand. How can it "work alot better" if it "does it every time"? It should only go to the merchant when there are 10 or less spaces left. What is it doing?"

it seemed like it was going everytime. i get like 5 or 6 items cause it do 1 loop then go sell them. now that i have all of my bags unlocked it does about 5 or 6 loops then gos to sell stuff.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: how would i?

#18 Post by rock5 »

How much space is in your bag when it goes to the merchant? How much stuff is in your bags to start off with? Also can we have another look at how your code looks now?
  • 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
Golbez
Posts: 66
Joined: Sat Aug 02, 2008 8:27 pm

Re: how would i?

#19 Post by Golbez »

rock5 wrote:How much space is in your bag when it goes to the merchant? How much stuff is in your bags to start off with? Also can we have another look at how your code looks now?

i had like the first 3 bags open. the other 3 bags where locked until yesterday. once i unlocked them, it went back to it normal routine

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <onLoad>
      changeProfileOption("INV_AUTOSELL_ENABLE", true)
      changeProfileOption("INV_AUTOSELL_FROMSLOT", 1) -- bag 1
      changeProfileOption("INV_AUTOSELL_TOSLOT", 60) -- bag 2
   </onLoad>
   <!-- #  1 --><waypoint x="-3947" z="4177" y="1" tag="start">   </waypoint>
   <!-- #  2 --><waypoint x="-4095" z="3967" y="-4">   </waypoint>
   <!-- #  3 --><waypoint x="-4152" z="3701" y="-2">   </waypoint>
   <!-- #  4 --><waypoint x="-4509" z="3601" y="12">   </waypoint>
   <!-- #  5 --><waypoint x="-4732" z="3590" y="11">
      yrest(99);
      if 90 >= inventory:itemTotalCount(0) then
         printf("Move To Npc to empty bags")
         __WPL:setWaypointIndex(__WPL:findWaypointTag("to merchant"))
      else
         printf("Bags do not need to be emptied yet")
      end
	</waypoint>
   <!-- #  6 --><waypoint x="-4850" z="3710" y="7" tag="continue">   </waypoint>
   <!-- #  7 --><waypoint x="-4952" z="3808" y="5">   </waypoint>
   <!-- #  8 --><waypoint x="-4973" z="3994" y="1">   </waypoint>
   <!-- #  9 --><waypoint x="-4823" z="4077" y="-1">   </waypoint>
   <!-- # 10 --><waypoint x="-4609" z="4049" y="4">   </waypoint>
   <!-- # 11 --><waypoint x="-4513" z="4272" y="1">   </waypoint>
   <!-- # 12 --><waypoint x="-4466" z="4495" y="-6">   </waypoint>
   <!-- # 13 --><waypoint x="-4449" z="4723" y="4">   </waypoint>
   <!-- # 14 --><waypoint x="-4074" z="4629" y="-8">   </waypoint>
   <!-- # 15 --><waypoint x="-4103" z="4385" y="-8">
      __WPL:setWaypointIndex(__WPL:findWaypointTag("start"))
   </waypoint>

   <!-- #  1 --><waypoint x="-4947" z="3455" y="0" tag="to merchant">   </waypoint>
   <!-- #  2 --><waypoint x="-5036" z="3399" y="-4">   </waypoint>
   <!-- #  3 --><waypoint x="-5126" z="3337" y="-110">   </waypoint>
   <!-- #  4 --><waypoint x="-5100" z="3276" y="-108">
		yrest(1000)
		player:merchant("Kenen Maift")
		yrest(100)
		if inventory:itemTotalCount(206757) > 100 then
			inventory:findItem(206757):delete()
			printf("Dropped Extra Blood")
		end
		yrest(100)
		if inventory:itemTotalCount(206405) > 100 then
			inventory:findItem(206405):delete()
			printf("Dropped Extra Meat")
		end
		printf("Bags emptied")
	</waypoint>
   <!-- #  5 --><waypoint x="-5119" z="3312" y="-110">   </waypoint>
   <!-- #  6 --><waypoint x="-5127" z="3362" y="-112">   </waypoint>
   <!-- #  7 --><waypoint x="-5362" z="3394" y="-114">   </waypoint>
   <!-- #  8 --><waypoint x="-5361" z="3597" y="-107">   </waypoint>
   <!-- #  9 --><waypoint x="-5359" z="3742" y="-65">   </waypoint>
   <!-- #  10 --><waypoint x="-5347" z="3842" y="-43">   </waypoint>
   <!-- #  11 --><waypoint x="-5316" z="3974" y="-28">   </waypoint>
   <!-- #  12 --><waypoint x="-5248" z="4099" y="-19">   </waypoint>
   <!-- #  13 --><waypoint x="-5121" z="4073" y="0">
      __WPL:setWaypointIndex(__WPL:findWaypointTag("continue"))
   </waypoint>
</waypoints>
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: how would i?

#20 Post by rock5 »

Golbez wrote:if 90 >= inventory:itemTotalCount(0) then
I thought you had changed this to what I said. You did reply to that post.

What this does is if you have less than 90 free spaces left then it will go to the merchant. So if you have 2 or 3 bags, you will always go to the merchant. If you have 4 bags then it will go to the merchant when 1 bag fills. I don't think that's what you intended.

What I said you should do is this.

Code: Select all

if 10 >= inventory:itemTotalCount(0) then
I think I know what happened. You thought I had miss typed it. :) It should be 10 if you want it to go to the merchant when only 10 spaces left.
  • 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
Post Reply