Hi guys. Long time lurker, first time poster.
I've recently started building bots from the bots and pieces here on these forums. I'm currently adding StoreItems functionality to a version of War Raptor 1.2 that I've spent the last week fixing, adding stuff to and tweaking.
My StoreItems function works just like it should, however, if I have several Black Dyes in my storage already and my bot goes to add another it won't add it to the stack. I understand why this is happening (my bot only searches for empty spaces), and I understand what must happen for the bot to add it to the stack (it must check every item in the bank to see if it matches one), I just can't get my head around how to code it without breaking what is already there.
My StoreItems code
I'm not looking for anyone to code it for me, but maybe a hint in the right direction. The name of a function that exists already. or a few that could be put together to make a new one. I've checked all of the #includes I have and searched these forums and the web but I just can't find what I'm looking for.
Any help is appreciated.
P.S. I've already thought about waiting for a full stack before adding to storage, but that doesn't seem practical.
I've recently started building bots from the bots and pieces here on these forums. I'm currently adding StoreItems functionality to a version of War Raptor 1.2 that I've spent the last week fixing, adding stuff to and tweaking.
My StoreItems function works just like it should, however, if I have several Black Dyes in my storage already and my bot goes to add another it won't add it to the stack. I understand why this is happening (my bot only searches for empty spaces), and I understand what must happen for the bot to add it to the stack (it must check every item in the bank to see if it matches one), I just can't get my head around how to code it without breaking what is already there.
My StoreItems code
I'm not looking for anyone to code it for me, but maybe a hint in the right direction. The name of a function that exists already. or a few that could be put together to make a new one. I've checked all of the #includes I have and searched these forums and the web but I just can't find what I'm looking for.
Any help is appreciated.
P.S. I've already thought about waiting for a full stack before adding to storage, but that doesn't seem practical.