ElfDaily simplyfied

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
Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

ElfDaily simplyfied

#1 Post by Jandrana » Sat Jul 14, 2012 10:38 am

During my first days working with the RoM-Bot, I was browsing the forum and found a version of ElfDaily: http://www.solarstrike.net/phpBB3/viewt ... f=21&t=770

I learned a lot in the mean time and now this script looks quite complicated to me. So I rewrote it, to be a bit simpler and faster.

Checking the quest state at WP2 is done, because sometimes your char is nearer to WP2 and then the script starts at this WP2 and does not accept the quest. So the first run is wasted. I also like to avoid language dependent stuff as much as possible. So I'm putting quest names into variables. This way ppl using different client languages only need to change very few things.

Edit: moved code into attachment.

I also did a script to get a new Elf char ready doing the ElfDailies. It's "quick and dirty", but did the job for my purposes. In the end it loads the ElfDaily script and starts doing the daily quests at Blinsik.

Have fun!

Requires: Rock5's fastLogin and userfunction_LoginNextChar.
Attachments
ElfDaily.xml
V1.2 - use transport if not in valley of preparation, try to delete newbie pet egg, if bag is full
(3.65 KiB) Downloaded 521 times
ElfValley.xml
(4.96 KiB) Downloaded 509 times
Last edited by Jandrana on Mon Jan 28, 2013 6:19 am, edited 1 time in total.

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

Re: ElfDaily simplyfied

#2 Post by rock5 » Sat Jul 14, 2012 2:21 pm

These days, if you want to make a script for multi language use and you can't substitute the id instead of the name, then you would use GetIdName(id) to get the local name for that id. eg.

Code: Select all

 questname1 = GetIdName(422340) -- Helping Them Grow
  • 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
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: ElfDaily simplyfied

#3 Post by Ego95 » Sun Jul 22, 2012 5:26 pm

Nice script, but your quests script is useless. You are right, it's a lvl4 daily, but you can accept it with lvl2, so you only have to walk to the daily quest manager and then do the 3 quests with "the basics of..."

But anyway thanks :)

rage447
Posts: 18
Joined: Thu Dec 22, 2011 9:56 am

Re: ElfDaily simplyfied

#4 Post by rage447 » Wed Jul 25, 2012 11:36 am

Is there a waypoint for the pre quest ? Doing pre quest with all my chars would be very exhausting.

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

Re: ElfDaily simplyfied

#5 Post by Jandrana » Thu Jul 26, 2012 7:04 am

Is there a waypoint for the pre quest ?
Just read the initial posting completely!

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: ElfDaily simplyfied

#6 Post by wilifox » Fri Jul 27, 2012 12:05 am

Nice script, could you tell me where to enter the code to use "fastlogin"? I do not know how to do it to make me daily with all my characters. I read the post but i Fastlogin Rock I dont understand. Thx very much. Sorry for my English, translated from google translator. ;)

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

Re: ElfDaily simplyfied

#7 Post by lisa » Fri Jul 27, 2012 12:27 am

http://www.solarstrike.net/phpBB3/viewt ... =27&t=1245

Loginxml[3.0].zip
save the loginxml folder from the zip file to
/Runes of Magic/Interface/
loginxml.png
Open accountlogin.lua and logindialog.lua and add in your account details.

Code: Select all

	Account1 = {	UserName = "accnamehere",	Password = "firstpasswordhere", Server = "servernamehere",	},

Code: Select all

	Account1 = {	ID = 1,		SecondaryPassword = "secondarypasswordhere",	},
loginfiles.png
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

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: ElfDaily simplyfied

#8 Post by wilifox » Fri Jul 27, 2012 4:46 am

Lisa thank you very much, doubt is that I have to write code in the file "ElfValley.xml" so I relog the characters. A greeting.

Code: Select all


<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
 <!-- # 1 --><waypoint x="31847" z="4592" tag ="Main">
    local dqCount, dqPerDay = RoMScript("Daily_count()");
    if dqPerDay > dqCount then 
       queststate = getQuestStatus(questName1);
       if queststate == "complete" then
...........
..........
.........
..........


where write the code, relog?
¿¿¿

Code: Select all


local function loadprofile()
      -- Re-initialize player
      player = CPlayer.new();
      settings.load();
      settings.loadProfile(convertProfileName(player.Name))
   end

Code: Select all

  SetCharList({
   {account=54 , chars= {1,2,3,4,5,6,7,8}},
   {account=55 , chars= {1,2,3,4,5,6,7,8}},
   {account=56 , chars= {1,2,3,4,5,6,7,8}},
   })
      LoginNextChar()
      loadprofile()
      loadPaths("ElfDaily");
    end

Sorry noobie question! where write the code, i dont know ;( Thx you

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

Re: ElfDaily simplyfied

#9 Post by lisa » Fri Jul 27, 2012 5:38 am

Something like this will work.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
questEndNpcID1 = 112794
questName1 = "Helping Them Grow" 
function relog()
  SetCharList({
   {account=54 , chars= {}},
   {account=55 , chars= {}},
   {account=56 , chars= {}},
   })
      LoginNextChar()
      loadProfile()
      loadPaths("ElfDaily");
end
</onLoad>
 <!-- # 1 --><waypoint x="31847" z="4592" tag ="Main">
    local dqCount, dqPerDay = RoMScript("Daily_count()");
    if dqPerDay > dqCount then 
       queststate = getQuestStatus(questName1);
       if queststate == "complete" then
          player:target_NPC(questEndNpcID1);
          CompleteQuestByName(questName1);
         yrest(300);
         __WPL:setWaypointIndex(__WPL:findWaypointTag("Main")); 
        else
          player:target_NPC(questEndNpcID1);
          AcceptQuestByName(questName1,questEndNpcID1);
         yrest(300);
       end
    else
relog()
    end
    </waypoint>
   <!-- #  4 --><waypoint x="31847" z="4583" y="9">   
       queststate = getQuestStatus(questName1);
       if queststate == "not accepted" then
         __WPL:setWaypointIndex(1);
      end
   </waypoint>
   <!-- #  3 --><waypoint x="31860" z="4646" y="9">   </waypoint>
   <!-- #  2 --><waypoint x="31742" z="5070" y="-11">   </waypoint>
   <!-- #  1 --><waypoint x="31416" z="5715" y="-33" tag = "Item1">   
    queststate = getQuestStatus(questName1)
    if queststate == "incomplete" then
       player:target_Object(112976,300);
       yrest(2500);
       __WPL:setWaypointIndex(__WPL:findWaypointTag("Item1"));
   end
    </waypoint>
   <!-- #  1 --><waypoint x="31416" z="5715" y="-33">   </waypoint>
   <!-- #  2 --><waypoint x="31742" z="5070" y="-11">   </waypoint>
   <!-- #  3 --><waypoint x="31860" z="4646" y="9">   </waypoint>
   <!-- #  4 --><waypoint x="31847" z="4583" y="9">   </waypoint>
  
   
</waypoints>
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: ElfDaily simplyfied

#10 Post by rock5 » Fri Jul 27, 2012 5:55 am

The code could be written different ways. Typically, because you finish your dailies after completing a quest, I usually start by completing the quest, then checking dailies, then accepting, so you don't have to repeat the waypoint to recheck the dailies. So something like;

Code: Select all

 <!-- # 1 --><waypoint x="31847" z="4592" tag ="Main">
       local queststate = getQuestStatus(questName1);
       if queststate == "complete" then
          player:target_NPC(questEndNpcID1);
          CompleteQuestByName(questName1);
          yrest(300);
       end

       local dqCount, dqPerDay = RoMScript("Daily_count()");
       if dqPerDay == dqCount then 
          relog()
       else
          player:target_NPC(questEndNpcID1);
          AcceptQuestByName(questName1,questEndNpcID1);
          yrest(300);
       end
    </waypoint>
  • 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

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: ElfDaily simplyfied

#11 Post by wilifox » Sun Jul 29, 2012 3:38 am

Thx very much Lisa and Rock, now work!! Fastlogin increible!! Thx :P

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: ElfDaily simplyfied

#12 Post by vo2male » Mon Aug 27, 2012 6:51 am

Hello guys, i need some help.I followed the instructions above by lisa but i just cant figure out how to make this work. i read all the pages of
rock5's "fastLogin Revisited"
, tried and tried but kept on failing.

i wanted to include this code to my elven quest, "Helping them grow". i have 5 accounts with 8characters on each account. this is my code:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
	
<onLoad>
questEndNpcID1 = 112794
questName1 = "Helping Them Grow" 
function relog()
  SetCharList({
   {account=1 , chars= {}},
   {account=2 , chars= {}},
   {account=3 , chars= {}},
   {account=4 , chars= {}},
   {account=5 , chars= {}},
   })
      LoginNextChar()
      loadProfile()
      loadPaths("Daily.xml");
end
</onLoad>
<!-- #  1 --><waypoint x="31847" z="4592" tag ='Main'>
			
			local dqCount, dqPerDay = RoMScript("Daily_count()");
			if 10 > dqCount then	
				queststate = getQuestStatus("Helping Them Grow");
				if queststate == "complete" then
					-- Complete quest
					player:target_NPC("Blinsik");
					sendMacro("CompleteQuest()"); yrest(2000);
					-- Accept quest
					player:target_NPC("Blinsik");
					sendMacro("AcceptQuest()"); yrest(2000);
					--__WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));	
				else
					-- Accept quest
					player:target_NPC("Blinsik");
					sendMacro("AcceptQuest()"); yrest(2000);
				end
			else
				player:logout();
			end
	</waypoint>
	<!-- #  2 --><waypoint x="31812" z="4849">	</waypoint>
	<!-- #  3 --><waypoint x="31415" z="5720" tag = "Item">
			queststate = getQuestStatus("Helping Them Grow")
			if queststate == "incomplete" then
				player:target_NPC("Cleansing Crystal");
				yrest(3000);
				__WPL:setWaypointIndex(__WPL:findWaypointTag("Item"));
			end
	</waypoint>
	<!-- #  4 --><waypoint x="31878" z="4692">	</waypoint>
	<!-- #  5 --><waypoint x="31843" z="4593">	</waypoint>
</waypoints>
i am having this error:
Did not find any crashed game clients.
2:34pm - [string "..."]:5: attempt to call global 'SetCharList' (a nil value)

Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
Additional error i got:

Code: Select all

08/27/12 14:57:13  Auto-logging out.
Did not find any crashed game clients.
2:57pm - C:/micromacro/scripts/rom/functions.lua:594: bad argument #1 to 'memory
ReadBytePtr' ((null))


Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
the second error is after i put the userfunction_LoginNextChar.lua inside the userfunction folder
Last edited by vo2male on Mon Aug 27, 2012 7:01 am, edited 1 time in total.

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

Re: ElfDaily simplyfied

#13 Post by rock5 » Mon Aug 27, 2012 7:00 am

Have you installed the 'LoginNextChar' userfunction?
http://www.solarstrike.net/phpBB3/viewt ... innextchar
  • 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

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: ElfDaily simplyfied

#14 Post by vo2male » Mon Aug 27, 2012 7:03 am

rock5 wrote:Have you installed the 'LoginNextChar' userfunction?
i've edited my first post.check it out. i dont know if i installed it correctly on the right directory..
i put it inside /rom/userfunctions folder

i have this error when i installed userfunction_LoginNextChar.lua

Code: Select all

08/27/12 14:57:13  Auto-logging out.
Did not find any crashed game clients.
2:57pm - C:/micromacro/scripts/rom/functions.lua:594: bad argument #1 to 'memory
ReadBytePtr' ((null))


Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
maybe my waypoint is incorrect?
Last edited by vo2male on Mon Aug 27, 2012 7:10 am, edited 1 time in total.

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

Re: ElfDaily simplyfied

#15 Post by rock5 » Mon Aug 27, 2012 7:10 am

There is no read memory on line 594 of functions.lua. What version of the bot are you running?

Edit: 'rom/userfunctions' is the right folder.
  • 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

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: ElfDaily simplyfied

#16 Post by vo2male » Mon Aug 27, 2012 7:12 am

rock5 wrote:There is no read memory on line 594 of functions.lua. What version of the bot are you running?

i checked it out and it says RoM Bot Version 3.29, Revision 734


EDIT:
hmm something about the loading screen :roll:

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

Re: ElfDaily simplyfied

#17 Post by rock5 » Mon Aug 27, 2012 7:28 am

Nope, still no read memory. I'd say you have a corrupted installation. Try following these steps.
  • 1. Right click the "rom" folder and do an "SVN Update"
    2. Right click the "rom" folder and do a "TortoiseSVN/Revert"
    3. Right click the 'ingamefunctions' folder in the games 'interface/addons' folder and do an "SVN Update"
    4. Restart the game or type "/script ReloadUI()" in chat.
Then see if that works.
  • 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

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: ElfDaily simplyfied

#18 Post by vo2male » Mon Aug 27, 2012 7:39 am

rock5 wrote:Nope, still no read memory. I'd say you have a corrupted installation. Try following these steps.
  • 1. Right click the "rom" folder and do an "SVN Update"
    2. Right click the "rom" folder and do a "TortoiseSVN/Revert"
    3. Right click the 'ingamefunctions' folder in the games 'interface/addons' folder and do an "SVN Update"
    4. Restart the game or type "/script ReloadUI()" in chat.
Then see if that works.

By doing this will it not matter what RoM client version im using? im playing on a ROM version 5.0.0.2559 btw


EDIT:
found this error after the update

Code: Select all

!! Notice: !!
The game may have been updated or altered.
 It is recommended that you run rom/update.lua

Did not find any crashed game clients.
3:43pm - Error while reading memory address for 'playerAddress'. Game seems to b
e changed!!! Please run 'rom/bot.lua update' AND install the new RoM Bot version
!


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

Re: ElfDaily simplyfied

#19 Post by rock5 » Mon Aug 27, 2012 7:48 am

I don't think 734 would work with 5.0.0. I think you should be using 725.
  • 1. Right click the "rom" folder and select "TortoiseSVN/Update to revision..."
    2. Enter 725 and click ok.
    3. Right click the "rom" folder and do a "TortoiseSVN/Revert"
    4. Copy the 'ingamefunctions' folder from 'rom/devtools' to the games 'interface/addons' folder.
    5. Restart the game or type "/script ReloadUI()" in chat.
  • 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

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: ElfDaily simplyfied

#20 Post by vo2male » Mon Aug 27, 2012 7:54 am

still with error :(

Code: Select all

Moving to waypoint #1, (31847, 4592)
08/27/12 15:51:42  Auto-logging out.
Did not find any crashed game clients.
3:52pm - C:/micromacro/scripts/rom/functions.lua:601: bad argument #1 to 'memory
ReadBytePtr' ((null))


Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
well basically, what happen is. after it logs out, it will be directed to the log-on screen where you put in your username and password. but it doesn't automatically logs in.. i see my 5 accounts though on the 1 to 5 button.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests