Rock5's ToDo list

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: Rock5's ToDo list

#21 Post by swietlowka » Tue Dec 07, 2010 9:12 am

ekhm, i belive its agruments are the npc namem just tryi it ;)

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

Re: Target Specific Mobs

#22 Post by rock5 » Tue Dec 07, 2010 9:56 am

jduartedj wrote: How do I tell player:target() to target the result from player:findNearestNameOrId()? does player:target() take any arguments?
player:target() accept an address or pawn. player:findNearestNameOrId() returns an object which is basically the same as a pawn but with less info. What player:target() needs is the address which objects have. So ...

Code: Select all

targetObj = player:findNearestNameOrId(arguments)
player:target(targetObj)
-- or
player:target(targetObj.Address)
  • 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
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Target Specific Mobs

#23 Post by jduartedj » Tue Dec 07, 2010 10:08 am

rock5 wrote:
jduartedj wrote: How do I tell player:target() to target the result from player:findNearestNameOrId()? does player:target() take any arguments?
player:target() accept an address or pawn. player:findNearestNameOrId() returns an object which is basically the same as a pawn but with less info. What player:target() needs is the address which objects have. So ...

Code: Select all

targetObj = player:findNearestNameOrId(arguments)
player:target(targetObj)
-- or
player:target(targetObj.Address)

thank you vmuch ! this simplifies many of my scripts xD... and to think it's so simple!
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

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

Re: Rock5's ToDo list

#24 Post by rock5 » Fri Jan 07, 2011 7:03 pm

My work on an updated version of lootBodies and also the chicken egg script has been hampered by a bug in the bot that causes the client to crash. It's taken me ages to figure out.

I've fixed that in 554. The fix may also have fixed other peoples issues with the client occasionally crashing (or may not). So if you are having client crashes, try it out.

With the current lootbodies, I'm aiming at a function that can handle all situations and wont get stuck. It's looking good so far. I'll be releasing it soon. With the way it's working now, I can foresee it could be added to the bot in the future.

With the chicken script I may hold off until I implement buying crafting tools so I can incorporate that as well.
  • 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: Rock5's ToDo list

#25 Post by lisa » Mon Jan 10, 2011 3:58 am

I see moving house is still at 65%, you must have a lot of stuff lol
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

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

Re: Rock5's ToDo list

#26 Post by rock5 » Mon Jan 10, 2011 6:18 am

lisa wrote:I see moving house is still at 65%, you must have a lot of stuff lol
He he. I've moved but I still have a lot of junk there. I wont count the move complete until everything has been cleared away and I can get tenants in there. But there are interruption. For instance I fractured my thumb about 3 weeks ago. Still healing but I'm also lazy so that doesn't help :)

The main reason I have that in my list, just so you know, is so people know why I'm not tackling the bigger projects. When I finish moving I'll have more time.
  • 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: Rock5's ToDo list

#27 Post by lisa » Mon Jan 10, 2011 8:04 pm

I know how you feel, I did same thing to my thumb about 4 years ago, spent 5 weeks playing FFX on PS2 as I couldn't do much else lol
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

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Pet crafting issue at max level

#28 Post by Alkaiser » Tue Jan 11, 2011 3:52 pm

Having a problem with pet crafting. A pet has reached max crafting level, and now only produces Ash Wood... though it should still default to the highest level material, right?

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

Re: Pet crafting issue at max level

#29 Post by rock5 » Tue Jan 11, 2011 6:26 pm

Alkaiser wrote:Having a problem with pet crafting. A pet has reached max crafting level, and now only produces Ash Wood... though it should still default to the highest level material, right?
This is not related to my list. Please start a new thread.
  • 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: Rock5's ToDo list

#30 Post by lisa » Wed Feb 02, 2011 2:24 am

On the subject of quest by name, it would be possible to do up a huge table that had the values for each quest as to which option it would be depending on the lvl. I think this would work but no way I am spending the next month doing it lol

I notice you can check the actual status of the quest by using it's sys***_name, I wonder if there is a way to use that sys_name in our favour to accept the quest we want??

I notice the memory address changes for quests each time, however the sys***_ name remains the same and always preceeds the actual text in the quest.

Code: Select all

Stolen Tools.Sys420059_name_plural.Stolen Tools.Sys420059_szquest_accept_detail.
It then starts the actual text from the quest which appears when you click the quest.

Lol I just adjusted the memory for the quest text and it showed up. That is an easy way to do a practical joke or funny images.

This might be exactly what we are after, just need to make it into a function.

Code: Select all

http://www.theromwiki.com/API:GetQuestNameByIndex
I'll do some testing, cyclone won't hit my area for a few hours, just gusty winds atm lol
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

JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

Re: Rock5's ToDo list

#31 Post by JackBlonder » Wed Feb 02, 2011 10:44 am

Hey lisa. I followed your link and this is the result.
It accepts quests by name (_name) or all available quests (_all=true)

[Edit]:
Just added a second function to also complete quests.

Code: Select all

function AcceptQuestByName(_name, _all)
	_all = _all or false
	local questToAccept = _name or ""
	local questOnBoard
	
	-- Accepts all available quests
	if (_all == true) then
		for i = 1,sendMacro("GetNumQuest(1)") do
			sendMacro("OnClick_QuestListButton(1, "..i..")") -- Clicks the quest
			yrest(100)
			sendMacro("AcceptQuest()") -- Accepts the quest
		end
	
	-- Accepts a quest by quest name
	else
		for i = 1,sendMacro("GetNumQuest(1)") do
			questOnBoard = sendMacro("GetQuestNameByIndex(1, "..i..")")
			if questOnBoard == questToAccept then
				sendMacro("OnClick_QuestListButton(1,"..i..")") -- Clicks the quest
				yrest(100)
				sendMacro("AcceptQuest()") -- Accepts the quest
			end
		end
	end
end

function CompleteQuestByName(_name, _all)
	_all = _all or false
	local questToComplete = _name or ""
	local questOnBoard
	
	-- Complete all available quests
	if (_all == true) then
		for i = 1,sendMacro("GetNumQuest(3)") do
			sendMacro("OnClick_QuestListButton(3, "..i..")") -- Clicks the quest
			yrest(100)
			sendMacro("CompleteQuest()") -- Accepts the quest
		end
	
	-- Complete a quest by quest name
	else
		for i = 1,sendMacro("GetNumQuest(1)") do
			questOnBoard = sendMacro("GetQuestNameByIndex(3, "..i..")")
			if questOnBoard == questToComplete then
				sendMacro("OnClick_QuestListButton(3,"..i..")") -- Clicks the quest
				yrest(100)
				sendMacro("CompleteQuest()") -- Accepts the quest
			end
		end
	end
end

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

Re: Rock5's ToDo list

#32 Post by rock5 » Wed Feb 02, 2011 7:28 pm

Do you really need to use a second argument?

So if you want to accept all you have to do

Code: Select all

AcceptQuestByName(nil, true)
Wouldn't it be better to use just 1 argument like this

Code: Select all

AcceptQuestByName("all")
And then say

Code: Select all

if _name = "all" then
    do all 
else
    do only _name
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

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

Re: Rock5's ToDo list

#33 Post by lisa » Wed Feb 02, 2011 8:08 pm

Nice work jack.


Code: Select all

		player:target_NPC("Logar Bulletin Board");
		AcceptQuestByName("Stolen Tools","")
gets this

Code: Select all

We try to find NPC Logar Bulletin Board:
We successfully target NPC Logar Bulletin Board and try to open the dialog windo
w.
Use MACRO: Executing RoMScript "GetNumQuest(1)".
Use MACRO: Executing RoMScript "GetQuestNameByIndex(1, 1)".
Use MACRO: Executing RoMScript "OnClick_QuestListButton(1,1)".
Use MACRO: Executing RoMScript "AcceptQuest()".
Use MACRO: Executing RoMScript "GetQuestNameByIndex(1, 2)".
Use MACRO: Executing RoMScript "GetQuestNameByIndex(1, 3)".
Use MACRO: Executing RoMScript "GetQuestNameByIndex(1, 4)".
Use MACRO: Executing RoMScript "GetQuestNameByIndex(1, 5)".
Use MACRO: Executing RoMScript "GetQuestNameByIndex(1, 6)".
Use MACRO: Executing RoMScript "GetQuestNameByIndex(1, 7)".
Use MACRO: Executing RoMScript "GetQuestNameByIndex(1, 8)".
Use MACRO: Executing RoMScript "GetQuestNameByIndex(1, 9)".
Use MACRO: Executing RoMScript "GetQuestNameByIndex(1, 10)".
Use MACRO: Executing RoMScript "GetQuestNameByIndex(1, 11)".
With some tidying up I think this would be good addition to the bot.
What you think Rock5
Accept quest by name 95% complete?
lol
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

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

Re: Rock5's ToDo list

#34 Post by rock5 » Wed Feb 02, 2011 8:12 pm

Looking at that output, 2 things are obvious.

1. RoMScript should be used instead of sendMacro so you don't get so much junk messages and
2. When searching for a quest name, once found it can break from the loop so it stops searching.

BTW. Good to hear it looks like no one was hurt up there.
  • 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

JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

Re: Rock5's ToDo list

#35 Post by JackBlonder » Thu Feb 03, 2011 2:55 am

Do you really need to use a second argument?
Not really. I'll change it.
1. RoMScript should be used instead of sendMacro so you don't get so much junk messages and
2. When searching for a quest name, once found it can break from the loop so it stops searching.
OK, I'll change this, too.

[Edit]:
My changed version:

Code: Select all

function AcceptQuestByName(_name)
	
	_name = _name or "All"
	local questToAccept = _name 
	local questOnBoard = ""
	local i
	
	-- Accept all available quests
	if (_name == "" or _name == "All" or _name == "ALL" or _name == "all") then
		printf("We accept all quests\n")
		for i = 1,RoMScript("GetNumQuest(1)") do
			RoMScript("OnClick_QuestListButton(1, "..i..")") -- Clicks the quest
			yrest(100)
			RoMScript("AcceptQuest()") -- Accepts the quest
		end
	
	-- Accept a quest by quest name
	else
		for i = 1,RoMScript("GetNumQuest(1)") do
			questOnBoard = RoMScript("GetQuestNameByIndex(1, "..i..")")
			if questOnBoard == questToAccept then
				RoMScript("OnClick_QuestListButton(1,"..i..")") -- Clicks the quest
				yrest(100)
				RoMScript("AcceptQuest()") -- Accepts the quest
				break
			end
		end
	end
end

function CompleteQuestByName(_name)

	_name = _name or "All"
	local questToComplete = _name
	local questOnBoard = ""
	local i
	
	-- Complete all available quests
	if (_name == "" or _name == "All" or _name == "ALL" or _name == "all") then
		for i = 1,RoMScript("GetNumQuest(3)") do
			RoMScript("OnClick_QuestListButton(3, "..i..")") -- Clicks the quest
			yrest(100)
			RoMScript("CompleteQuest()") -- Completes the quest
		end
	
	-- Complete a quest by quest name
	else
		for i = 1,RoMScript("GetNumQuest(1)") do
			questOnBoard = RoMScript("GetQuestNameByIndex(3, "..i..")")
			if questOnBoard == questToComplete then
				RoMScript("OnClick_QuestListButton(3,"..i..")") -- Clicks the quest
				yrest(100)
				RoMScript("CompleteQuest()") -- Completes the quest
				break
			end
		end
	end
end
What came to my mind though.
Sometimes there are quests where you have to choose a reward.
Any idea on how to implement this?

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

Re: Rock5's ToDo list

#36 Post by lisa » Sat Feb 12, 2011 10:58 am

rock5 wrote:Guild function addon to send resources to guild.
This is mostly done :D
Well it does the resources just not the "guild" items
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

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

Re: Rock5's ToDo list

#37 Post by rock5 » Sat Feb 12, 2011 7:56 pm

Why don't you add the other stuff too? Runes and stones use the same method to add I believe. Then it's just a matter of working out the way to add money and rubies. I wouldn't be surprised if it's the same command.

I'll make a comment about your work but I'd still like to create a guild class at some time.
  • 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: Rock5's ToDo list

#38 Post by lisa » Sat Feb 12, 2011 8:19 pm

adding gold is a different RoMScript, it's a very simple script. but reason I didn't add gold was I couldn't see the point in adding an automated gold donaton.

As for the other "guild" items the issue I had was I saw the function usage as basically the same as resources, need an arg for donating all or runes/rubies/stones. I just didn't see it fitting in with the resources for a single function call unless it was for all. I guess if I added another arg to that function to donate all the "guild" items or not then it would work ok.
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

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

Re: Rock5's ToDo list

#39 Post by rock5 » Sat Feb 12, 2011 9:11 pm

Yes I think a function for donating materials should only do that. The other stuff can be added later as different functions.

I thought of something though. What if a user whats to only send 1 type of resource to the guild? Eg. they have a bunch of materials in their inventory but only want to send the Ash Sand they just processed? They should be able to;

Code: Select all

GuildDonate("Ash","green")
Do you agree?

To do this I think all you have to do is change this

Code: Select all

		if ( _type == "all" and (item:isType("Ores") or item:isType("Herbs") or item:isType("Wood")) ) or 
			( _type ~= "all" and item:isType(_type) ) then
to this

Code: Select all

		if ( _type == "all" and (item:isType("Ores") or item:isType("Herbs") or item:isType("Wood")) ) or 
			( _type ~= "all" and item:isType(_type) ) or
			( string.find(item.Name,_type) ) then
Of course there is no way of processing materials automatically yet but there may be in the future. But this could also be used to get rid of those rare materials you can collect so you remain with only the good stuff :)
  • 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
Tsutomu
Posts: 77
Joined: Thu Mar 24, 2011 1:50 am

Re: Rock5's ToDo list

#40 Post by Tsutomu » Thu Mar 24, 2011 4:38 am

Suggestion:

A "OnArrived" event would be highly appreciated! It would give a lot of power to the script.
I know that there is a place in each script to put what it should do after coming to the point, BUT
this would be the same generic action for all waypoints.
In scripts with a lot of waypts, it's very annoying putting stuff in every point, this would be very elegant resolvation, for ex.when player wants to check lootBodies(); after arriving on point.

Thank you for great script, wish you only best.
Regards.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests