Page 1 of 2

how would i?

Posted: Sat Feb 18, 2012 11:57 am
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?

Re: how would i?

Posted: Sat Feb 18, 2012 9:18 pm
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.

Re: how would i?

Posted: Sun Feb 19, 2012 3:31 am
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?

Re: how would i?

Posted: Sun Feb 19, 2012 3:53 am
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.

Re: how would i?

Posted: Sun Feb 19, 2012 11:50 am
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...

Re: how would i?

Posted: Sun Feb 19, 2012 1:13 pm
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".

Re: how would i?

Posted: Sun Feb 19, 2012 9:36 pm
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>

Re: how would i?

Posted: Mon Feb 20, 2012 3:06 am
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>

Re: how would i?

Posted: Mon Feb 20, 2012 7:11 am
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

Re: how would i?

Posted: Tue Feb 21, 2012 2:07 pm
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.

Re: how would i?

Posted: Wed Feb 22, 2012 1:23 am
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

Re: how would i?

Posted: Wed Feb 22, 2012 3:08 am
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)

Re: how would i?

Posted: Wed Feb 22, 2012 3:17 am
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)

Re: how would i?

Posted: Wed Feb 22, 2012 7:34 am
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

Re: how would i?

Posted: Wed Feb 22, 2012 7:39 am
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"> 

Re: how would i?

Posted: Wed Feb 22, 2012 8:12 am
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?

Re: how would i?

Posted: Wed Feb 22, 2012 8:39 am
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.

Re: how would i?

Posted: Wed Feb 22, 2012 9:37 am
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?

Re: how would i?

Posted: Wed Feb 22, 2012 9:43 am
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>

Re: how would i?

Posted: Wed Feb 22, 2012 9:59 am
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.