NoobBotter's Kashaylan Research Expert EoJ Script
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
-
- Posts: 527
- Joined: Fri Aug 31, 2012 1:15 pm
Re: NoobBotter's Kashaylan Research Expert EoJ Script
Thanks Lisa. I updated my changing between 2 channels using your code.
I also went through and revised it a bit and made it work properly. With the little testing I did, the new script seems to work properly.
Regardless of your starting channel it will complete on one channel then switch to the other (if you happen to be on the non-channel of 3, it will go to 2 next). After finishing the second round, it will wait for new start then complete on that channel again then change to the other.
For some reason, the code I had for revision 1.9 kept erroring out with an XML parsing error in the comments section so I took most of my comments out. Anyway, the new 2.0 version is posted on the first post of this thread.
I also went through and revised it a bit and made it work properly. With the little testing I did, the new script seems to work properly.
Regardless of your starting channel it will complete on one channel then switch to the other (if you happen to be on the non-channel of 3, it will go to 2 next). After finishing the second round, it will wait for new start then complete on that channel again then change to the other.
For some reason, the code I had for revision 1.9 kept erroring out with an XML parsing error in the comments section so I took most of my comments out. Anyway, the new 2.0 version is posted on the first post of this thread.
Re: NoobBotter's Kashaylan Research Expert EoJ Script
there is a way to ensure that at the end of each event the player changes the channel immediately and finish the event in the other channel and then return to the first ? What would I change in the script?
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>
--=============================================================================================--
--=== NoobBotter's Research Expert EOJ script ===--
--=== Version 1.8d ===--
--=== ===--
--=== This script will farm Energy of Justice in Kashaylan using the Research ===--
--=== Expert public quest. ===--
--=== ===--
--=== The script will start farming immediately when script starts regardless of ===--
--=== where the event is (started, finished, etc...). After it gets a message that ===--
--=== the event is finished that first time, it will wait for an event start message. ===--
--=== Once the Event starting message appears, it will farm until event is complete. ===--
--=== Then if there is more than 5 minutes left in the event, it will change channel ===--
--=== and then farm there until it gets an ending message. ===--
--=== ===--
--=== This Waypoint has user settings to tell it when to stop, by either max EOJ in ===--
--=== inventory, or by amount of time the script has been running. It can stop and rest ===--
--=== for an amount of time, and then resume, or run continuously. ===--
--=== ===--
--=== Additionally, I am using Rock5's checkRelog() function to allow you to either end ===--
--=== the script, change characters, or load a different waypoint file once this one ===--
--=== completes. ===--
--=== ===--
--=== Revision Notes: Added a counter so it will only do 3 channels during a 20 ===--
--=== minute event. previously, if it was working fast enough, it would go back to the ===--
--=== original channel and start doing it there and wouldn't stop until after the next ===--
--=== event would start, then it would rest until the complete next event, thus losing ===--
--=== lots of time. ===--
--=== ===--
--=============================================================================================--
--=== *** USER INSTRUCTIONS *** ===--
--=== ===--
--=== 1. This script depends on having the DailyNotes Addon activated for auto accepting ===--
--=== the Research Expert public quest. ===--
--=== 2. This script also requires the LoginNextChar userfunction by Rock5. ===--
--=== ===--
--=== 3. Set preferences in the following User Settings section. ===--
--=== ===--
--=============================================================================================--
--=== User Settings ===--
local objectClickRest = 200 -- this is the delay time (in milliseconds) that it wait when clicking on one of the flasks. Higher ping time may need a higher value.
local disableSkills = true -- set to true to disable skills, or false to keep skills enabled
local maxEoj = 4000 -- set to the maximum amount of eoj's you want to have. Script will stop when you reach this amount. I believe in-game maximum is 4000.
local maxMinutes = 50 -- Maximum amount of time (in minutes) to run the script for. 999 (or greater) will run indefinitely.
-- the time check is performed between event rounds so if max time is passed during an event, it will complete that event before stopping.
local restTime = 120 -- this is how many minutes the bot will rest after reaching maxMinutes. A setting of 0 will cause the bot to never start back up after reaching max minutes.
--=== Examples:
-- if you want the bot to run for 2 hours and then take a 3 hour break, set the following settings:
-- local maxMinutes = 120
-- local restTime = 180
-- if you want the bot to run for 12 hours and then stop until you manually restart it, set the following:
-- local maxMinutes = 720
-- local restTime = 0
When_Finished = "end"
-- "end" to end script, "relog" to log next character, "charlist" to log next in 'charlist', or filename for next waypoint to load (without .xml).
CharList = {
}
-- Character list to use when using the "charlist" option above. Requires Rock5's "userfunction_LoginNextChar" userfunction.
-- Find it here. http://www.solarstrike.net/phpBB3/viewtopic.php?p=10350
-- eg.
-- CharList = {
-- {account=4,chars={}},
-- {account=8,chars={1}},
-- {account=7,chars={1,2,5}}
-- }
-- NO NEED TO EDIT BELOW THIS LINE.
startChannel = RoMScript("GetCurrentParallelID()")
yrest(500)
if startChannel ~= 1 then
RoMScript("ChangeParallelID(1)")
repeat
yrest(4000)
until RoMScript("GetCurrentParallelID()") == 1
end
--============= FUNCTIONS ===============--
--============= function to check player location +==============--
local function locationCheck()
local myitem = player:findNearestNameOrId(123561) -- Jenn Shadoli
if myitem then
if distance(myitem, player) > 50 then
print("%s is not close enough to start location for this eoj quest.\n")
checkRelog()
end
else
print("Cannot locate eoj quest giver Jenn Shadoli (ID: 123561).\n")
checkRelog()
end
end
--============= function to disable pet and skills for this quest ===============--
function setSkills()
if disableSkills == true then
settings.profile.options.EGGPET_ENABLE_ASSIST = false
for k,v in pairs(settings.profile.skills) do
v.AutoUse = false
end
end
end
--=== relog function from Rock5's scripts ===--
function checkRelog()
-- Log result
local filename = getExecutionPath() .. "/logs/eoj.log";
local file, err = io.open(filename, "a+");
if file then
file:write("Acc: "..RoMScript("GetAccountName()").."\tName: " ..string.format("%-10s",player.Name ).." \tDate: " .. os.date() ..
"\tEnergy of Justice Gained:"..totalEojEarned.." \tTotal EoJ on character: "..getCurrency("eoj").."\n")
file:close();
end
if When_Finished == "relog" then
ChangeChar()
waitForLoadingScreen();
yrest(3000)
loadProfile()
loadPaths(__WPL.FileName);
elseif When_Finished == "charlist" then
SetCharList(CharList)
LoginNextChar()
loadProfile()
loadPaths(__WPL.FileName);
elseif When_Finished == "end" then
error("EOJ Script is complete")
else
loadProfile() -- Because we messed with the skills
loadPaths(When_Finished)
end
end
--=== Function to change channels when needed ===--
function changeChannel()
local currentChannel = RoMScript("GetCurrentParallelID()")
yrest(1000)
printf("Current Channel is %s\n",currentChannel)
if currentChannel == 3 then
currentChannel = 1
else
currentChannel = currentChannel + 1
end
printf("Changing to channel %s.\n",currentChannel)
RoMScript("ChangeParallelID("..currentChannel..")")
repeat
yrest(4000)
until RoMScript("GetCurrentParallelID()") == currentChannel
yrest(4000)
end
--=== Function to target the objects very quickly in succession ===--
function fastTarget(_objid, waittime)
obj = player:findNearestNameOrId(_objid)
player:target(obj.Address)
yrest(100)
Attack()
yrest(waittime)
end
--== main function that loops over, and over, and over ===--
local function mainfunction()
setSkills()
--============= create variables ===============--
local gomsg = getTEXT("SC_ZONE_PE_3TH_ST1START")
local endmsg = getTEXT("SC_ZONE_PE_3TH_FAIL")
local endmsg2 = getTEXT("SC_ZONE_PE_3TH_ST1OVER")
local startTime = os.time()
local nextRound = 0
local roundTime = 0
local eventFinished = false
local firstRun = true
local timerIncorrect = true
local changedChannels = false
local eojs = getCurrency("eoj")
yrest(500)
local neweoj = eojs
local gained = neweoj-eojs
local totalEojEarned = 0
local roundendedtime = os.time()
local roundCount = 1
repeat -- Loops once per event.
eojs = getCurrency("eoj")
if firstRun == false then
eventFinished = false
roundTime = (os.time()-startTime)/60
nextRound = 20-roundTime
if nextRound > 5 and 3 > roundCount and timerIncorrect == false then -- if more than 5 minutes remaining in round, change channel:
cprintf(cli.yellow,"\r%0.1f minutes until next round starts... Changing channel.", nextRound)
roundCount = roundCount + 1
changeChannel()
firstRun = false
timerIncorrect = false
changedChannels = true
else
repeat
roundTime = (os.time()-startTime)/60
if timerIncorrect == false then
nextRound = 20-roundTime
--============= insert option to change channel and continue =====--
if 1 > nextRound then
roundCount = 1
changedChannels = false
cprintf(cli.yellow,"\rTime till next round start: %0.1f seconds.",nextRound/60)
else
local currentChannel = RoMScript("GetCurrentParallelID()")
if currentChannel ~= 1 then
print("Changing to channel 1.\n")
RoMScript("ChangeParallelID(1)")
repeat
yrest(4000)
until RoMScript("GetCurrentParallelID()") == 1
yrest(2000)
end
roundCount = 1
changedChannels = false
cprintf(cli.yellow,"\rTime till next round start: %0.1f minutes.",nextRound)
end
else
changedChannels = false
--cprintf(cli.red,"timerIncorrect = %s.\t\tfirstRun = %s.",timerIncorrect, firstRun)
cprintf(cli.yellow,"\rWaiting on next round to start.")
end
yrest(500)
until getLastWarning("|cffffff80"..gomsg.."|r", 10)
end
if changedChannels == false then
startTime = os.time()
end
if 5 > nextRound then
print("Event has started...\n")
else
print("Continuing event...\n")
end
if firstRun == false and timerIncorrect == true then
cprintf(cli.red,"Finished first round. Now going to wait for official start of a round, staying on Channel 1.\n")
timerIncorrect = false
end
cprintf(cli.red,"timerIncorrect = %s.\t\tfirstRun = %s.\n",timerIncorrect, firstRun)
print("Event has started...\n")
else
timerIncorrect = true
cprintf(cli.yellow,"\rStarting immediately...\n")
end
repeat
player:target_NPC(123561) -- Jenn Shadoli
yrest(200)
fastTarget(123369,objectClickRest);
fastTarget(123368,objectClickRest);
fastTarget(123508,objectClickRest);
yrest(200)
player:target_NPC(123561) -- Jenn Shadoli
yrest(200)
if getLastWarning("|cffffff80"..endmsg.."|r", 10) then
eventFinished = true
end
if getLastWarning("|cffffff80"..endmsg2.."|r", 10) then
eventFinished = true
end
printf("Been running for %0.1f minutes.\n", (os.time()-scriptStartTime)/60)
until eventFinished == true
inventory:update()
yrest(1000)
neweoj = getCurrency("eoj")
gained = neweoj-eojs
totalEojEarned = totalEojEarned + gained
roundendedtime = os.time()
roundTime = (roundendedtime-startTime)/60
cprintf(cli.red,"Round took %s Minutes. EOJ's Gained this round: %s.\t\tCurrent Energy of Justice: %s. \n",roundTime, gained, neweoj)
--=== At start of script, I don't have a timer for when the event will start. ===--
--=== but after first event completes, this variable is set to false so it can display a timer ===--
--=== for when the next event will start, located in waitevent() function. ===--
if firstRun == true then
firstRun = false
end
if neweoj >= maxEoj then
print("You have reached your maximum number of EoJ's as per the maxEoj variable.\n")
checkRelog()
end
--== section to determine max run time, and rest time ==--
if 999 > maxMinutes then
if (roundendedtime-scriptStartTime)/60 >= maxMinutes then
if restTime == 0 then
print("Maximum run time has been exceeded.")
checkRelog()
else
printf("Now resting for %s minutes.\n", restTime)
repeat
local doneResting = ((roundendedtime/60)+restTime)-os.time()/60
yrest(6000)
cprintf(cli.yellow,"\rTime till done resting: %0.1f minutes.",doneResting)
until 0 >= doneResting
scriptStartTime = os.time()
end
end
end
until false
end
locationCheck()
scriptStartTime = os.time() -- to determine total script run time
mainfunction()
</onload>
</waypoints>
Re: NoobBotter's Kashaylan Research Expert EoJ Script
i have a prob with research rev 20.xml.rombot say me this ...................
Re: NoobBotter's Kashaylan Research Expert EoJ Script
It seems to be the & in the commented section, just delete it.
Code: Select all
--=== Does only channels 1, 2, will start on whichever channel you're on ===--
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
-
- Posts: 527
- Joined: Fri Aug 31, 2012 1:15 pm
Re: NoobBotter's Kashaylan Research Expert EoJ Script
Thanks Lisa. It was really bugging me that the commented area was causing that problem. I couldn't figure out why.
Supergala, make sure you download and use the new 2.0 version. In that version, if you want it to change channels between every single round, you'll see the following on lines 163 and 164:
if you copy those 2 lines in between the "else" on 166 and the "repeat" on 167 that should make it change channels on each round.
After your changes, lines 161 thru 185 will look like this:
let me know if that does it.
Supergala, make sure you download and use the new 2.0 version. In that version, if you want it to change channels between every single round, you'll see the following on lines 163 and 164:
Code: Select all
cprintf(cli.yellow,"\r%0.1f minutes until next round starts... Changing channel.", nextRound)
changeChannel()
After your changes, lines 161 thru 185 will look like this:
Code: Select all
if firstRun == false then
if nextRound > 5 and EventComplete == false then -- if more than 5 minutes remaining in round, change channel:
cprintf(cli.yellow,"\r%0.1f minutes until next round starts... Changing channel.", nextRound)
changeChannel()
else
cprintf(cli.yellow,"\r%0.1f minutes until next round starts... Changing channel.", nextRound)
changeChannel()
repeat
roundTime = (os.time()-roundStartTime)/60
nextRound = 20-roundTime
--============= insert option to change channel and continue =====--
if 1 > nextRound then
roundCount = 1
cprintf(cli.yellow,"\rTime till next round start: %0.1f seconds.",nextRound/60)
else
cprintf(cli.yellow,"\rTime till next round start: %0.1f minutes.",nextRound)
end
yrest(500)
until getLastWarning("|cffffff80"..gomsg.."|r", 10)
end
end
Re: NoobBotter's Kashaylan Research Expert EoJ Script
If you want to be as expressive as you like without any xml special character limitations you can use the CDATA code, eg.noobbotter wrote:Thanks Lisa. It was really bugging me that the commented area was causing that problem. I couldn't figure out why.
Code: Select all
<onload><![CDATA[
-- Any characters special to xml will be ignored here such as < and &.
]]></onload>
- 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
-
- Posts: 1
- Joined: Fri Oct 02, 2015 3:46 am
Re: NoobBotter's Kashaylan Research Expert EoJ Script
hey,
tested your new version.
the bot played channel1 -> changed to channel 2 -> played the event on channel 2 -> changed back to channel 1 and wait until next round-> started the event after waiting in channel 1 -> changed to channel 2 after that the bot stoped and i got the message "Time till next round start: -0.1 secounds"
what i have to do that the bot now play the event on channel 2 and after finishing, change back to ch 1 and wait until next round starts?
tested your new version.
the bot played channel1 -> changed to channel 2 -> played the event on channel 2 -> changed back to channel 1 and wait until next round-> started the event after waiting in channel 1 -> changed to channel 2 after that the bot stoped and i got the message "Time till next round start: -0.1 secounds"
what i have to do that the bot now play the event on channel 2 and after finishing, change back to ch 1 and wait until next round starts?
-
- Posts: 527
- Joined: Fri Aug 31, 2012 1:15 pm
Re: NoobBotter's Kashaylan Research Expert EoJ Script
Hmm... not sure. I'll have to take a look and figure out why it's doing that.
Re: NoobBotter's Kashaylan Research Expert EoJ Script
i change line but i have the same problem
-
- Posts: 527
- Joined: Fri Aug 31, 2012 1:15 pm
Re: NoobBotter's Kashaylan Research Expert EoJ Script
Looks like you're missing the userfunction for turning on/off DailyNotes' autoquesting. Try adding this userfunction to your userfunctions and see if it works:
Re: NoobBotter's Kashaylan Research Expert EoJ Script
Is there a complete workable script available ??
I tried many versions and tried to edit myself using keeping in mind all those guidelines you guys have told but always end up fcking something up.
The script I am using does the event in 1 channel and keeps on doing it for next 20 mins, doesnt even change the channel
Help some1 ??
I tried many versions and tried to edit myself using keeping in mind all those guidelines you guys have told but always end up fcking something up.
The script I am using does the event in 1 channel and keeps on doing it for next 20 mins, doesnt even change the channel
Help some1 ??
- Attachments
-
- ResearchExpertEOJrev20.xml
- (8.85 KiB) Downloaded 430 times
Re: NoobBotter's Kashaylan Research Expert EoJ Script
If you are wondering, yes, I did crop your picture. Learn to crop please.
- 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
-
- Posts: 2
- Joined: Sun Nov 01, 2015 4:16 pm
Re: NoobBotter's Kashaylan Research Expert EoJ Script
Hello everyone.
I'm new here and first thank you for creating such good opportunities for us gamers. I'm working for most of my time so I have very little time to play RoM so I was searching a macro to help me farm eoj faster end I ended up here.
I'm really not familiar with coding and C++ or anything else. My only programming experience was Fortran when I was a freshman at university so I'm really lost here.
I started game, downloaded micromacro, started it then load the script on this thread (2nd version) and I keep getting
unexpected symbol near '<'
error.
I checked < symbols in code but I didnt find anything wrong (just compared symbols near < in commands )
Also checked other threads to see If I should do something else to run micromacro but as far as I can understand, they were for using other scripts or creating a script. So I decided to ask for help.
With considering that I'm a complete noob and dummy about this, Is there anyway you can help me or should I just quit trying and go on playing manually?
Thanks in advance.
I'm new here and first thank you for creating such good opportunities for us gamers. I'm working for most of my time so I have very little time to play RoM so I was searching a macro to help me farm eoj faster end I ended up here.
I'm really not familiar with coding and C++ or anything else. My only programming experience was Fortran when I was a freshman at university so I'm really lost here.
I started game, downloaded micromacro, started it then load the script on this thread (2nd version) and I keep getting
unexpected symbol near '<'
error.
I checked < symbols in code but I didnt find anything wrong (just compared symbols near < in commands )
Also checked other threads to see If I should do something else to run micromacro but as far as I can understand, they were for using other scripts or creating a script. So I decided to ask for help.
With considering that I'm a complete noob and dummy about this, Is there anyway you can help me or should I just quit trying and go on playing manually?
Thanks in advance.
Re: NoobBotter's Kashaylan Research Expert EoJ Script
I think you loaded an XML/waypoint file if it is an < then properly the line above isn't closed properly.specialist wrote:Hello everyone.
I'm new here and first thank you for creating such good opportunities for us gamers. I'm working for most of my time so I have very little time to play RoM so I was searching a macro to help me farm eoj faster end I ended up here.
I'm really not familiar with coding and C++ or anything else. My only programming experience was Fortran when I was a freshman at university so I'm really lost here.
I started game, downloaded micromacro, started it then load the script on this thread (2nd version) and I keep getting
unexpected symbol near '<'
error.
I checked < symbols in code but I didnt find anything wrong (just compared symbols near < in commands )
Also checked other threads to see If I should do something else to run micromacro but as far as I can understand, they were for using other scripts or creating a script. So I decided to ask for help.
With considering that I'm a complete noob and dummy about this, Is there anyway you can help me or should I just quit trying and go on playing manually?
Thanks in advance.
Jack-of-all-trades, but master-of-only of a few
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
-
- Posts: 2
- Joined: Sun Nov 01, 2015 4:16 pm
Re: NoobBotter's Kashaylan Research Expert EoJ Script
I dont know blubblab.
I downloaded second version of the file in the first message and loaded that. Tried changing its name to .lua and didnt work too. What else can i do?
I downloaded second version of the file in the first message and loaded that. Tried changing its name to .lua and didnt work too. What else can i do?
Re: NoobBotter's Kashaylan Research Expert EoJ Script
i have this problem guys....what i must change?i set 1000 where macro said
-
- Posts: 527
- Joined: Fri Aug 31, 2012 1:15 pm
Re: NoobBotter's Kashaylan Research Expert EoJ Script
I'm not sure.. you said you set 1000 where macro said? What do you mean? If you mean the max amount of eojs to earn, it looks like you already have 4994 of them. The defulat setting for maxEoj is 4000, so if you want to keep going, you'll have to set that setting higher (Line 10 of the script). I'm not sure why totalEojEarned turned up nil, but that is only used for the logging portion after the character is done, so that didn't contribute to why it quit running the script.
Re: NoobBotter's Kashaylan Research Expert EoJ Script
i set xml as default .i download version 2.0 at the first page of discussion,i change only one section where you asnwer me(check up on this page)
"Supergala, make sure you download and use the new 2.0 version. In that version, if you want it to change channels between every single round, you'll see the following on lines 163 and 164:"
but macro stop after each event .......can you help?
"Supergala, make sure you download and use the new 2.0 version. In that version, if you want it to change channels between every single round, you'll see the following on lines 163 and 164:"
but macro stop after each event .......can you help?
-
- Posts: 527
- Joined: Fri Aug 31, 2012 1:15 pm
Re: NoobBotter's Kashaylan Research Expert EoJ Script
nuk, according to the picture you posted 3 posts up, it looks like you're at 4992 eojs. Check the maxEoj variable in script (line 10 I believe) and make sure it is above that value. Maybe change it to "maxEoj = 8000" and see if it runs more than 1 round.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests