Blessing of the flower God macro?

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
Montoro
Posts: 6
Joined: Tue Sep 10, 2013 10:56 am

Blessing of the flower God macro?

#1 Post by Montoro » Sun Mar 02, 2014 8:39 am

Hello

Can anyone be so kind to make a small macro to be able to buy a lot of Blessing of the flower God from Adam "flower Spirit Envoy" in central plaza of varanas, one of the NPC from the flower event?

Thanks!!

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Blessing of the flower God macro?

#2 Post by ZZZZZ » Sun Mar 02, 2014 9:21 am

In game macro:

Code: Select all

/run CastSpellByName("Attack")
/wait.5
/script ChoiceOption(2)
/wait.5
/script ChoiceOption(1)

Rombot function:

Code: Select all

function FG()
   repeat
   inventory:update();
		player:target_NPC("Adam");
		yrest(500);
		RoMScript("ChoiceOption(2);");
		yrest(500);
		RoMScript("ChoiceOption(1);");
   until inventory:itemTotalCount(0) == 0
end
simple and easy.
I tried making a more informative one but for some reason it doesn't stop at the specified amount....

Code: Select all

function FG()
   blankslots = inventory:itemTotalCount(0)
   FlowersToGet = (blankslots*10)
   repeat
   inventory:update();
		player:target_NPC("Adam");
		yrest(500);
		RoMScript("ChoiceOption(2);");
		yrest(500);
		RoMScript("ChoiceOption(1);");
   until inventory:itemTotalCount(203024) == FlowersToGet
   printf("\nCollected "..FlowersToGet.." Blessing of the Flower God\n")
end

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Blessing of the flower God macro?

#3 Post by noobbotter » Mon Mar 03, 2014 8:20 am

I tried making a more informative one but for some reason it doesn't stop at the specified amount....
Maybe you need either a yrest after the last line of the repeat function RoMScript("ChoiceOption(1);"); and/or an inventory:update() after the purchase of each item is complete?

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

Re: Blessing of the flower God macro?

#4 Post by lisa » Mon Mar 03, 2014 8:47 am

My guess is that it will stop 9 before you intend it to

itemTotalCount does it's own update, so yeah no need for the update.

a yrest after the last option would help with more accurate item count but at the end of the day once u get the first of the last stack it will fail because it will just keep saying inventory is full, itemTotalCount will also be 0 when that first item of last stack hits bag aswell because there will be no empty slots.

All I do is set up a for i = 1,X do and have the X set when you call function.

Code: Select all

function FG(X)
   for i = 1,X do
      player:target_NPC("Adam");
      yrest(500);
      RoMScript("ChoiceOption(2);");
      yrest(500);
      RoMScript("ChoiceOption(1);");
      yrest(500);
   end
end
I just edited the code posted previously.

so on commandline just do
FG(30)
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

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Blessing of the flower God macro?

#5 Post by ZZZZZ » Tue Mar 04, 2014 8:48 am

Na, it actually doesnt stop at all once bags are full. It *should* get the max you can, hence the (blankslots*10). But for some reason it doesnt stop when it reaches that value :(

edit: never mind....just after I had post this I realised what is wrong with it....

Code: Select all

until inventory:itemTotalCount(203024) == FlowersToGet
should be

Code: Select all

until inventory:itemTotalCount(203024) >= FlowersToGet
darn little things like that :/

Montoro
Posts: 6
Joined: Tue Sep 10, 2013 10:56 am

Re: Blessing of the flower God macro?

#6 Post by Montoro » Tue Mar 04, 2014 9:17 am

i have to apologyze for asking this, but, could you please add to this post directly the waypoint script (xml) for the people and me to download, so that we put it into the waypoint folder and finish? I know nothing about creating an script with what you are writing, and for that reason, for me, it doesn't work at all only copy-pasting.

thanks!! :oops:

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Blessing of the flower God macro?

#7 Post by noobbotter » Tue Mar 04, 2014 10:03 am

I took what ZZZZZ put together and put it in a waypoint file for you. This is untested.
Attachments
BlessingofFlowerGod.xml
(1.08 KiB) Downloaded 183 times

spyfromsiochain
Posts: 84
Joined: Sun Aug 18, 2013 9:57 am

Re: Blessing of the flower God macro?

#8 Post by spyfromsiochain » Mon Mar 17, 2014 9:01 pm

noobbotter wrote:I took what ZZZZZ put together and put it in a waypoint file for you. This is untested.
the only condition regarding currency is 999 gold for ea flower.

There is a small typo on the waypoint done by noobbotter.

uploaded the fix.

credits maintained

regards
Attachments
BlessingofFlowerGod1.1.xml
(1.08 KiB) Downloaded 182 times
I look at those fans with no blades and it amazes me everytime, how can they push air without using blades lol - lisa (pro sentence :D)

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Blessing of the flower God macro?

#9 Post by ZZZZZ » Tue Mar 18, 2014 1:19 am

Changed the function around a bit, this way it'll only buy what it can, taking gold into consideration.

Code: Select all

	function FG()
		blankslots = inventory:itemTotalCount(0)
		MaxToBuy = (blankslots*10)
		gold = RoMScript('GetPlayerMoney("copper");')
		LimitToBuy = math.floor(gold/999)
		if MaxToBuy > LimitToBuy then
			FlowersToGet = LimitToBuy
		else
			FlowersToGet = MaxToBuy
		end
		CurrentFlowers = inventory:itemTotalCount(203024)
		FlowersToGet = (FlowersToGet + CurrentFlowers)
		repeat
			inventory:update();
			player:target_NPC(112187); -- Adam
			yrest(500);
			RoMScript("ChoiceOption(2);");
			yrest(500);
			RoMScript("ChoiceOption(1);");
		until inventory:itemTotalCount(203024) >= FlowersToGet
		printf("\nCollected "..(FlowersToGet - CurrentFlowers).." Blessing of the Flower God\n")
	end

Post Reply

Who is online

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