Farming Arrowhead Carved with Name script problems

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.
Message
Author
Darkonnian
Posts: 14
Joined: Thu Dec 22, 2011 9:37 am

Farming Arrowhead Carved with Name script problems

#1 Post by Darkonnian » Sun Oct 14, 2012 8:32 am

Hi. Since Chrysalia became the new paradise for EoJ farming and there are really some nice event quests taken from dropped items such as Arrows and Eggs, I created a script for farming, selling surplus to the closest vendor and mailing "Arrowhead Carved with Name" to an alt (because max farmed items are 500, but if u take them from mail they are infinite).

So far I have problems with inventory check, so in the script the bot doesn't count if inventory is full, but goes straight to waypoint 15, where it gives a lua code error. I am not a good xml editor so if you PROs would give me some help I would very much appreciate it. The script is in attachment. Thanks!
Attachments
KBNZone_ArrowheadsFarm.xml
Arrowhead Carved with Name waypoints file good version
(7.12 KiB) Downloaded 425 times
Last edited by Darkonnian on Sun Oct 14, 2012 12:58 pm, edited 3 times in total.

Darkonnian
Posts: 14
Joined: Thu Dec 22, 2011 9:37 am

Re: Farming Arrowhead Carved with Name script problems

#2 Post by Darkonnian » Sun Oct 14, 2012 8:36 am

Forgot to say where the script starts:

entrance in the arena where KBN instance is, at approx 59, 71.5 :)

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

Re: Farming Arrowhead Carved with Name script problems

#3 Post by lisa » Sun Oct 14, 2012 10:02 am

the code at #15 looks fine but there are definately issues later on

Code: Select all

<!-- # 22 --><waypoint x="-3935" z="-17876" y="660"> type="TRAVEL">	</waypoint>
A copy/pasting issue I would say, 20 lines are like that.

Code: Select all

<!-- # 22 --><waypoint x="-3935" z="-17876" y="660" type="TRAVEL">	</waypoint>
See if you can spot the difference =)

I do however fail to find the logic of the code in #14

Code: Select all

	<!-- # 14 --><waypoint x="-3979" z="-20826" y="848">	
if inventory:itemTotalCount(0) == 0 then
player:update();
__WPL:setWaypointIndex(__WPL:findWaypointTag("rerun"));

end
</waypoint>
	<!-- # 15 --><waypoint x="-3971" z="-20757" y="853" tag="rerun">
	player:mount();
		yrest(1000);
	</waypoint>
if you have no bag space then it goes to tag rerun which IS the next waypoint, so it goes there regardless.
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

Darkonnian
Posts: 14
Joined: Thu Dec 22, 2011 9:37 am

Re: Farming Arrowhead Carved with Name script problems

#4 Post by Darkonnian » Sun Oct 14, 2012 10:41 am

Lol, ty Lisa. I did spot the difference. it was the ">" symbol, indeed a copy paste issue.

Regarding line 14, I wanted the bot to check if inventory is full then run the rest of the waypoints, starting with 15, which is tagged "rerun", and go to vendor, sell, then go to mail, send arrows to alt, then go back to KBN zone and repeat. But it goes to "rerun" even if I have lots of unoccupied backpack slots, and that's where I couldn't find a solution. Think I did something wrong; i am no programmer, I just compiled some commands taken from other scripts.

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

Re: Farming Arrowhead Carved with Name script problems

#5 Post by lisa » Sun Oct 14, 2012 12:18 pm

well the logical flow is to go from 14 to 15, so yes it will do that.

If you want it to not do that then you need to tell it to go somewhere else.

I am assuming if bags arn't full you want to go back to waypoint #1?

Then add a tag to #1 and tell the bot to go there is ~= 0

Code: Select all

   <!-- # 14 --><waypoint x="-3979" z="-20826" y="848">   
if inventory:itemTotalCount(0) ~= 0 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("rerun"));
end
</waypoint>

and change #1 tag to rerun and get rid of the tag on #15
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

Darkonnian
Posts: 14
Joined: Thu Dec 22, 2011 9:37 am

Re: Farming Arrowhead Carved with Name script problems

#6 Post by Darkonnian » Sun Oct 14, 2012 12:57 pm

I can't thank you enough Lisa. Problem solved and working like a charm. I updated the correct script for those who wanna use it.

Starting Position:
entrance in the arena where KBN instance is, at approx 59, 71.5

in the file, search for "YourMailRecipientHere" and change it to the name of the char you want to email the Arrowheads for later use.
The file uses the mail functions that you can find here:

http://www.solarstrike.net/phpBB3/viewt ... t=mail+mod

Thanks Lisa for making this script work :D :D :D :D :D

kilbord
Posts: 49
Joined: Fri Feb 24, 2012 11:27 am

Re: Farming Arrowhead Carved with Name script problems

#7 Post by kilbord » Fri Oct 19, 2012 4:19 am

never please delete this right when i post it it works o.O

Darkonnian
Posts: 14
Joined: Thu Dec 22, 2011 9:37 am

Re: Farming Arrowhead Carved with Name script problems

#8 Post by Darkonnian » Tue Oct 23, 2012 3:24 am

Ok, another thing. Some people pointed to the fact that when using the Arrowheads farming waypoints, you look like a bot. And we want us to look like preoccupied players that are struggling to be the best, aren't we? :D The reasons are: char leaves Mysterious bags untouched, char runs in circles if mobs aren't spawn, and one that I found it recently, the char continues sometimes to kill adds even if his bag is full. I have some ideas, but I need solutions for them.

1. If bags are empty, the char should set "Nest Guard Myrmex", "Earth Inspector Myrmex" and "Gloomy Spy" as mobs, but if bags are full, the char should set them as friends and run to the vendor. I know that's done under "on load" at the beginning at the script file, I just don't know the code and syntax for it.

2. Mysterious bags. I was tinkering with some commands I found on solarstrike, and I inserted at each waypoint the following lines:

if player:findNearestNameOrId("Mysterious Bag") then
player:target_Object("Mysterious Bag")
yrest(300)
player:target_Object("Mysterious Bag")
yrest(300)
end
if inventory:itemTotalCount(0) ~= 0 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("rerun"));
end
</waypoint>


Well, he gathers Mysterious Bags, but he does it when he pleases, not in the second he sees them. so if there are more people in the area, some might not think this is negligence, but botting.
The idea would be to disengage all enemies and loot the Mysterious Bag the moment it is spawned, then re-engage enemies. Simple for me, since my char is tank and they hardly do any damage for me. But for some paper rogue or mage, it could be worse. Any idea on how those bags would be properly collected?

3. Due to the fact that char's max target distance is 200, he has to move, or I couldn't find a hidden, safe spawning spot for those 3 mobs we target, so he could stand and patiently wait for them to spawn and not "running in circles" even there are no mobs. I could fool the eye by inserting random "yrest(3000)" lines to the code, but that will just make it look more bot-ish I think. Any suggestions on that one? ;)

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

Re: Farming Arrowhead Carved with Name script problems

#9 Post by rock5 » Tue Oct 23, 2012 4:40 am

1. Instead of tinkering with the mobs and friends list, just leave your mobs list as it is and change the waypoint type to "RUN" (respond to aggro) or "TRAVEL" (ignore even aggro mobs) when you want to head to vendor and back to "NORMAL" when you want to fight again. The command for this is.

Code: Select all

__WPL:setForcedWaypointType("RUN")
2. The problem is that code will be run at the waypoints only, not when running between them or attacking mobs. If you want it to stop everything to get the bags then you are looking at a timed event. Basically you would set up a function that will be used in the timed event. You would set it up in the onload of the waypoint eg.

Code: Select all

function bagcheck()
	if player:findNearestNameOrId("Mysterious Bag") then
		player:target_Object("Mysterious Bag")
		yrest(300)
		player:target_Object("Mysterious Bag")
		yrest(300)
	end
	if inventory:itemTotalCount(0) ~= 0 then
		__WPL:setWaypointIndex(__WPL:findWaypointTag("rerun"));
	else
		__WPL:setForcedWaypointType("RUN")
		unregisterTimer("bagcheck");
	end
end
Then at a waypoint on the way to the fighting area from the vender start the timed event and set the waypoint type back to normal.

Code: Select all

		__WPL:setForcedWaypointType("NORMAL")
		registerTimer("bagcheck");
3. I'm not sure what you are asking and I'm not familiar with the area to advice you on this one.
  • 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

Darkonnian
Posts: 14
Joined: Thu Dec 22, 2011 9:37 am

Re: Farming Arrowhead Carved with Name script problems

#10 Post by Darkonnian » Tue Oct 23, 2012 5:00 am

Thanks Rock. I will try it out as soon as servers are up again :)

Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: Farming Arrowhead Carved with Name script problems

#11 Post by Jandrana » Tue Oct 23, 2012 7:59 am

The idea would be to disengage all enemies and loot the Mysterious Bag the moment it is spawned, then re-engage enemies. Simple for me, since my char is tank and they hardly do any damage for me. But for some paper rogue or mage, it could be worse. Any idea on how those bags would be properly collected?
Bags drop after killing a mob. If you activate "LOOT_IN_COMBAT" the mobs will be looted immediately after being killed.
Perhaps we should put code into the player:loot() function to collect these bags, similar to the code that collects sigils.

regarding #3. If you don't plan to walk around, you could do everything in the <onLoad> section. Some pseudo code:
repeat
do
enemy = findNearestEnemy();
while enemy = nil;

target(enemy);
fight();
loot();
until BagsAreFull;

loadPath("goto_town_cleanupbags";
The bot has all necessary classes/functions for this. You must look and find the stuff yourself.

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Farming Arrowhead Carved with Name script problems

#12 Post by Cindy » Fri Oct 26, 2012 3:34 pm

There is code for this somewhere on here.. just loot it on exit combat (or leave combat or whatever it is called)

Darkonnian
Posts: 14
Joined: Thu Dec 22, 2011 9:37 am

Re: Farming Arrowhead Carved with Name script problems

#13 Post by Darkonnian » Sun Oct 28, 2012 9:43 am

Ok. Sorry for my late answer; the farming zone was bugged on my server for some days and mobs weren't spawning, so I couldn't test the script properly. Now, after the last maintenance I did it and works like a charm. I am attaching it to the post here. The starting zone is the middle of the arena in front of KBN.

I did change something in my profile: find the onLeaveCombat section and replace / add this code (taken from solarstrike.net with many thanks):

<onLeaveCombat><![CDATA[
if player:findNearestNameOrId("Mysterious Bag") then
player:target_Object("Mysterious Bag")
yrest(500) -- If not enough time to pick up bag, increase it.
player:target_Object("Mysterious Bag")
yrest(500)
end -- Additional Lua code to execute after killing an enemy
]]></onLeaveCombat>

it seems it really makes my char loot every Mysterious Bag he finds, so it works. I also made him mail to alt guild runes, guild stones, Suspicious Myrmex Eggs and the blue items that he loots from Mysterious Bags before going to sell the inventory. just replace MAILRECIPIENTHERE with your alt's name and it's done.
Attachments
Arrowheads-KBN.xml
(7.74 KiB) Downloaded 365 times

Darkonnian
Posts: 14
Joined: Thu Dec 22, 2011 9:37 am

Re: Farming Arrowhead Carved with Name script problems

#14 Post by Darkonnian » Sun Oct 28, 2012 6:55 pm

Tested it for 5 hours with small interruptions. Looted all the blue items from Mysterious bags. 36 in total. so thx to all who helped me in developing the script furthermore. :idea: :idea: :idea:

Tamyra
Posts: 133
Joined: Tue Feb 01, 2011 6:09 pm

Re: Farming Arrowhead Carved with Name script problems

#15 Post by Tamyra » Thu Dec 06, 2012 11:46 am

Another suggestion for this is that you may need to add in a function for mailing off the items from the "Mysterious Bags" as the yellow X-Stats on them still sell pretty good. Otherwise if you don't NPC-vendor them and do not mail them, your bags will end up filling pretty fast from just the Mysterious Bag items.

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Farming Arrowhead Carved with Name script problems

#16 Post by silinky » Tue Dec 11, 2012 8:22 am

heey :)
i have a question rgearding the arrowhead quests.

when you "use" the arrowhead, a windows appears to "accept quest"
is there a bot or macro command to accept it from code? if yes, would smone tell me how?

thanks :)

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

Re: Farming Arrowhead Carved with Name script problems

#17 Post by rock5 » Tue Dec 11, 2012 9:02 am

Quests you get from items are called border quests. Just use

Code: Select all

RoMScript("AcceptBorderQuest()")
  • 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
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Farming Arrowhead Carved with Name script problems

#18 Post by silinky » Tue Dec 11, 2012 9:23 am

ty :) i just found it also after some digging around. now i can be faster handing in those stuff ^_^

Darkonnian
Posts: 14
Joined: Thu Dec 22, 2011 9:37 am

Re: Farming Arrowhead Carved with Name script problems

#19 Post by Darkonnian » Sat Dec 15, 2012 6:50 am

silinky wrote:heey :)
i have a question rgearding the arrowhead quests.

when you "use" the arrowhead, a windows appears to "accept quest"
is there a bot or macro command to accept it from code? if yes, would smone tell me how?

thanks :)
Here is an useful macro for those arrowheads and eggs quests. works just fine, but you have to monitor the items you give regarding how crowded the event is, so you score max and still don't use too many items:

/script UseAction(1);
/script UseAction(2);
/run AcceptBorderQuest();
/script UseAction(1);

where I put Attack skill on 1 (simple Attack opens NPC dialogue), on 2 I put either eggs or arrowheads. It ends with attack skill so it ensures the loop. Macros are influenced by lag and that event surely produces lot of lag. Otherwise the last line wouldn't been needed.
Just select the corresponding NPC (eggs or arrows, and DON'T FORGET selecting the NPC prior of spamming macro), put item on 2, put Attack on slot 1, macro on another key of your choice and spam it until you win. Eyes on the score on ch1, then after changing channel, eyes on EoJ, cause there is no timer on 2 and 3 :D

Well, that would be nice to create a script for rombot that do all these, for example: monitor timer, monitor participants at event (which i find it impossible since there are people just hanging there), spam macro, change channel etc. But manually spamming that macro works best atm :D

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

Re: Farming Arrowhead Carved with Name script problems

#20 Post by lisa » Thu Dec 27, 2012 4:44 am

Darkonnian wrote:Well, that would be nice to create a script for rombot that do all these, for example: monitor timer, monitor participants at event (which i find it impossible since there are people just hanging there), spam macro, change channel etc. But manually spamming that macro works best atm

Well I got the RoM bug when I heard about the tripple XP on xmas day and leveled a couple of characters to 75 (leveled = botted dailies lol)

So then I decided to hit up the eoj fad that everyone seems so keen on, at times.

Few things that might help you.

Code: Select all

local __,__,__,Score,Count = RoMScript("PE_GetInfo(1)")
Count is either 1 or 2, this indicates if the event is actually on or not, so I think count is a bad name for it.
2 is event active
1 is event on timer waiting to start again.

Score is your current score

I did put a few hours into trying to get the actual timer from the game and it is easy enough to find it using CE but unfortunately I failed to find reliable pointers for it.
At the end of the day though the event is always :10 :30 :50 for me on my server and I suspect that all servers use the same time, but using their server time.

So you basically just have to know the actual minutes of the hour to work out how much time is left before event starts.

Code: Select all

os.date("*t").min
that little bit of code will tell you the minutes of the hour, just a matter of doing some number type comparisons to work out how long before event starts up again.

I have 1 quest I do and with 2 chars I can get just under 5800 before the timer runs out, with some tweaking I should be able to use 2 chars and "solo" the event all on my own, handy when everyone is asleep.

quest takes roughly 20 seconds to do and gets 40 points, it also happens to be a daily that gives more xp than butterflies, lvl 72 minimum though.

I haven't done much browsing in that map yet though, literally just hit 75 yesterday.
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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest