request EoJ Farming Timer
Re: request EoJ Farming Timer
I guess it's possible that the bug you mentioned is not similar to what I was experiencing with other events and maybe some or all of those functions work. In that case I suggest testing all those functions on that channel when the frame is not visible and see if they return the info.
- 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
Re: request EoJ Farming Timer
edited, fixed my type-O errors. I'll be back...
Re: request EoJ Farming Timer
The functions we are testing are in game functions so wont work from the bot unless you use a RoMScript. Replacing the functions would only work in a game addon.
What I meant by testing the functions is just type something like this in the game chat.
What I meant by testing the functions is just type something like this in the game chat.
Code: Select all
/script SendSystemChat(PE_GetPEScore(1))
- 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
Re: request EoJ Farming Timer
I keep going back to the idea that if EoJs are awarded on bugged channels there must be some way to see what's going on. Possible there is just some type-O error in the .lua file? Anything in there that addresses differences between channels? I searched for "para" and "chan" to no avail. Maybe all the j,k,m math got FUBAR somewhere? hmmm...
Any idea how to get info on the "getglobal" entries below just the same as you do for "/script SendSystemChat(PE_GetPEScore(1))" ? "getglobal(PEFrame:GetName().."_Info_Score".."_Text");" seems interesting
Isn't this a type-O? "else--if" ?? shouldn't that just be elseif? Even if it is a type-O I've now learned that they must do some sort of MD5-like integrity check on this fdb file because the icon buttons are all that appear (no detailed score/event info) if you change the active file even a tad.. tried it with a space at the end. you probably know this already lol
I tired messing with the above but channel 2 always remained bugged even though you can still get awards for the events on all channels... just can't see wtf is going on in ch2 lol.
In this part they actually comment out this part " --objSC_old = getglobal(PEFrame:GetName().."_SuccesCondition_"..j);" why?
this isn't returning anything..... /script SendSystemChat(_Info_SuccessCondition_(1))
LOL I can be pretty stubborn. This may be a lost cause
Any idea how to get info on the "getglobal" entries below just the same as you do for "/script SendSystemChat(PE_GetPEScore(1))" ? "getglobal(PEFrame:GetName().."_Info_Score".."_Text");" seems interesting
Isn't this a type-O? "else--if" ?? shouldn't that just be elseif? Even if it is a type-O I've now learned that they must do some sort of MD5-like integrity check on this fdb file because the icon buttons are all that appear (no detailed score/event info) if you change the active file even a tad.. tried it with a space at the end. you probably know this already lol
Code: Select all
else--if( ikind == 1) then
objPOB = getglobal(PEFrame:GetName().."_Info_LoseCondition_"..n);
n = n + 1 ;
k = k + 1 ;
In this part they actually comment out this part " --objSC_old = getglobal(PEFrame:GetName().."_SuccesCondition_"..j);" why?
Code: Select all
function PEFs_SetDetail(PEFrame, index )
local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= PE_GetInfo(index); --����PE_index
local objPE,objPH,objScore;
objPE = getglobal(PEFrame:GetName().."_Info");
if(objPE:IsVisible() ) then
objPE = getglobal(PEFrame:GetName().."_Button_Text");
objPE:SetText(namePE);
objPE:SetColor( 0.27,0.79, 0.8 );
else
if(IsScoreVisible and ScorePE) then
objPE = getglobal(PEFrame:GetName().."_Button_Text");
objPE:SetText(PUBLICENCOUNTER_SCORE..": "..ScorePE);
else
objPE = getglobal(PEFrame:GetName().."_Button_Text");
objPE:SetText(PUBLICENCOUNTER_SCORE..": 0");
end
objPE:SetColor( 1, 1, 0 );
end
objPH = getglobal(PEFrame:GetName().."_Info_PH_Text");
objPH:SetText(namePH);
objScore = getglobal(PEFrame:GetName().."_Info_Score".."_Text");
if(ScorePE) then
objScore:SetText(PUBLICENCOUNTER_SCORE..": "..ScorePE);
else
objScore:SetText(PUBLICENCOUNTER_SCORE..": 0");
end
local objPOB;
local m,n,k,i;
local temp;
m = 1;
n = 1;
k = 0;
if(Count and Count ~= 0 and Count <= 20 ) then
for i = 1, Count , 1 do -- ��Ƽg�J
local namePOB , itype , ikind , nowvalue, doolsill = PE_GetPOBInfo( index , i-1 );
if(doolsill) then
if( ikind == 0 ) then
objPOB = getglobal(PEFrame:GetName().."_Info_SuccesCondition_"..m);
m = m + 1 ;
k = k + 1 ;
else--if( ikind == 1) then
objPOB = getglobal(PEFrame:GetName().."_Info_LoseCondition_"..n);
n = n + 1 ;
k = k + 1 ;
end
objPOB:Show();
if(itype ~= 7) then
temp = namePOB.." ("..nowvalue.."/"..doolsill..")";
local objT_ = getglobal(objPOB:GetName().."_TimeText");
objT_:Hide();
objT_ = getglobal(objPOB:GetName().."_Time");
objT_:Hide();
elseif(itype == 7) then
nowvalue= math.floor(nowvalue/1000);
nowvalue = nowvalue - 1 ;
local tempTime = PE_Time(nowvalue);
local objT_ = getglobal(objPOB:GetName().."_TimeText");
objT_:Show();
objT_:SetText(tempTime);
objT_ = getglobal(objPOB:GetName().."_Time");
objT_:Show();
temp = namePOB;
end
objPOB = getglobal(objPOB:GetName().."_Text");
objPOB:SetText(temp);
end
end
end
objPH = getglobal(PEFrame:GetName().."_Info_PH");
objScore = getglobal(PEFrame:GetName().."_Info_Score");
local objSC_1, objSC_old,objFC_1, objFC_old;
local j;
for i = 1, m-1 , 1 do -- ��m�վ�
objSC_1 = getglobal(PEFrame:GetName().."_Info_SuccesCondition_"..i);
objSC_1:Show();
objSC_1:ClearAllAnchors();
if( i == 1 ) then
objSC_1:SetAnchor("TOPLEFT", "BOTTOMLEFT", objPH , 0, 7);
else
j = i - 1;
--objSC_old = getglobal(PEFrame:GetName().."_SuccesCondition_"..j);
objSC_old = getglobal(PEFrame:GetName().."_Info_SuccesCondition_"..j);
objSC_1:SetAnchor("TOPLEFT", "BOTTOMLEFT", objSC_old , 0, 7);
end
end
for i = 1, n-1 , 1 do -- ��m�վ�
objFC_1 = getglobal(PEFrame:GetName().."_Info_LoseCondition_"..i);
objFC_1:Show();
objFC_1:ClearAllAnchors();
if( m > 1) then
objSC_1 = getglobal(PEFrame:GetName().."_Info_SuccesCondition_"..i);
if( i == 1 ) then
objFC_1:SetAnchor("TOPLEFT", "BOTTOMLEFT", objSC_1 , 0, 7); -- 0 -35
else
j = i - 1;
objFC_old = getglobal(PEFrame:GetName().."_Info_LoseCondition_"..j);
objFC_1:SetAnchor("TOPLEFT", "BOTTOMLEFT", objFC_old , 0, 7);
end
elseif( m == 1 )then
if( i == 1 ) then
objFC_1:SetAnchor("TOPLEFT", "BOTTOMLEFT", objPH , 0, 7);
else
j = i - 1;
objFC_old = getglobal(PEFrame:GetName().."_Info_LoseCondition_"..j);
objFC_1:SetAnchor("TOPLEFT", "BOTTOMLEFT", objFC_old , 0, 7);
end
end
end
if( IsScoreVisible )then
objScore:Show();
objScore:ClearAllAnchors();
if( m == 1 and n == 1) then --�L���
objScore:SetAnchor("TOPLEFT", "BOTTOMLEFT", objPH , 0, 7);
elseif(m ~= 1 and n == 1) then -- �����\��� �L����
objSC_1 = getglobal(PEFrame:GetName().."_Info_SuccesCondition_"..m-1);
objScore:SetAnchor("TOPLEFT", "BOTTOMLEFT", objSC_1 , 0, 7);
elseif( n ~= 1) then -- �����ѱ��
objFC_1 = getglobal(PEFrame:GetName().."_Info_LoseCondition_"..n-1);
objScore:SetAnchor("TOPLEFT", "BOTTOMLEFT", objFC_1 , 0, 7);
end
else
objScore:Hide();
end
--�p��frame���j�p,�M��^��
local Ysize;
Ysize = k;
Ysize = Ysize * 17 + 40;
return Ysize ;
end
LOL I can be pretty stubborn. This may be a lost cause
Re: request EoJ Farming Timer
I can see you are making a real effort to understand. Good for you.
. Or maybe the addon LuaExplorer might help. It shows a few variables that end in "_Info_Score_Text" that start with "PEFs_Item1" where the number increments so that might be what it is referring to. I tried printing PEFs_Item1_Info_Score_Text but it printed "_uilua.lightuserdata = userdata:35439680" which I think means it's a frame element, not a variable. Considering that it's a frame widget, I used a widget function on it. PEFs_Item1_Info_Score_Text:GetText() returned "Current Score: 0". So yeah, you could read the text in the frame elements but I doubt they are kept up to date if the frame is not visible. If they were and the bug is simply that it's not showing the frame, you could just execute "PEFs:Show()" to show it.
but it's a widget so will print gibberish. You could try widget functions on it.
It's an interesting idea that there might be a type-o that affects only one channel. Seems unlikely though. Which channel is it, BTW? There's too much I don't understand, for me to find such a type-o. There is also the possibility that, if there is such a type-o, it might be in the code that is not available to us. Most functions we can't see the contents of. Have you tried sending a problem report.grande wrote: Possible there is just some type-O error in the .lua file? Anything in there that addresses differences between channels? I searched for "para" and "chan" to no avail. Maybe all the j,k,m math got FUBAR somewhere? hmmm...
getglobal returns a variable or ui element(widget) of the string in the brackets. So to know what that's talking about, you need to know what frame it is referring to, which is not that easy. If you are successfully overriding the functions, you could just add a print statement before that line. That might work. eg.grande wrote:Any idea how to get info on the "getglobal" entries below just the same as you do for "/script SendSystemChat(PE_GetPEScore(1))" ? "getglobal(PEFrame:GetName().."_Info_Score".."_Text");" seems interesting
Code: Select all
SendSystemChat(PEFrame:GetName())
I think that just means it used to be an 'elseif' but they commented out the 'if' and made it just an 'else'.grande wrote:Isn't this a type-O? "else--if" ??
I'm not sure what you are doing but my "fastlogin" replaces and changes fdb files with no problem. The bot overwrites the function that displays titles to use for it's own ends with no problem.grande wrote:I've now learned that they must do some sort of MD5-like integrity check on this fdb file because the icon buttons are all that appear (no detailed score/event info) if you change the active file even a tad.. tried it with a space at the end. you probably know this already lol
If you notice, the next line is another "objSC = ..." so it just looks like they renamed the variable and left the old command as a comment. In fact LuaExplorer shows no "PEFs_Item1_SuccesCondition".grande wrote:In this part they actually comment out this part " --objSC_old = getglobal(PEFrame:GetName().."_SuccesCondition_"..j);" why?
That's because that is not a variable or function, it's a string. Note the quotes. You would have to reconstruct the whole string to know what getglobal will return. Looking at LuaExplorer I think in most of these getglobal commands "PEFrame:GetName()" refers to PEFs_Itemn where n is a number. So you could trygrande wrote:this isn't returning anything..... /script SendSystemChat(_Info_SuccessCondition_(1))
Code: Select all
/script SendSystemChat(PEFs_Item1_Info_SuccesCondition_1)
Code: Select all
/script SendSystemChat(PEFs_Item1_Info_SuccesCondition_1:GetText())
- 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
Re: request EoJ Farming Timer
Shifting gears.
How do I go about comparing inventory item count to the count at a previous waypoint OR to a "starting" or incremented count? So, if I have 10 EoJ at start and more drop into my bag, I want to be able to detect that increment (any increment, even just "1") to my initial and ongoing/current EoJ count and then implement some code (change channel) based on the change/increment.
This is wrong:
So if I put EOJmath() in some waypoint it would just go to this function and stay in an infinite loop, right? suxx :/
How do I go about comparing inventory item count to the count at a previous waypoint OR to a "starting" or incremented count? So, if I have 10 EoJ at start and more drop into my bag, I want to be able to detect that increment (any increment, even just "1") to my initial and ongoing/current EoJ count and then implement some code (change channel) based on the change/increment.
This is wrong:
Code: Select all
<onLoad>
Function EOJmath()
local n = inventory:itemTotalCount(201545);
while (true) --Infinite Loop
if n == n + 1 then
break --Cancel Loop
end
n = n + 1
end
if n == n + 1 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Change Channel"));
<onLoad>
Re: request EoJ Farming Timer
Depend if you want to do it once or multiple times.
If once, you could get the tally in the onload
Then somewhere, such as a waypoint, you could check the difference.
BTW "n == n + 1" will never be true no matter what the value of 'n'.
If once, you could get the tally in the onload
Code: Select all
<onload>
startcount = inventory:itemTotalCount(201545)
</onload>
Code: Select all
if inventory:itemTotalCount(201545) - startcount > 10 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("head back"))
-- or
loadPaths("head_back")
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
Re: request EoJ Farming Timer
Not sure I'm tracking. Wouldn't this just subtract the start count from the current count and see if it's greater than "10"? I want it.... ahhh think I just had a revelation. So if I do a loadpaths then... well I still need to change "10" to "0" (lol edited from 1 to 0, F-math!hahah). That way it will change channels/load new path even if 1 token drops which is what I'm looking forrock5 wrote:Depend if you want to do it once or multiple times.
:
Code: Select all
if inventory:itemTotalCount(201545) - startcount > 10 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("head back"))
-- or
loadPaths("head_back")
end
And on the n == n + 1 never being true. Is that because of the "==" syntax or do you mean generally speaking in math? If you add "1" so anything it will be that thing +1

And thanks again BTW. Owe you a beverage or three!
Re: request EoJ Farming Timer
10 is just a number I pulled out of my .. ahem .. the air. If you want to act on 1 then you could use "> 0" or even easiergrande wrote:Not sure I'm tracking. Wouldn't this just subtract the start count from the current count and see if it's greater than "10"
Code: Select all
if inventory:itemTotalCount(201545) > startcount then
Code: Select all
if inventory:itemTotalCount(201545) > startcount then
-- Do some code, change channel maybe
startcount = inventory:itemTotalCount(201545)
end
n = n + 1 means, assign the value of n + 1 to n, essentially incrementing it.grande wrote:And on the n == n + 1 never being true. Is that because of the "==" syntax or do you mean generally speaking in math?
n == n + 1 means, is n the same as n + 1? Well obviously no it isn't and never will be. Get it?
- 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
Re: request EoJ Farming Timer
Exactly what I was looking for, thx!If you reload the waypoint file then startcount will reset to the current count. But what I think you want is, if you get 1 and act on it, eg. change channel or whatever, you will want to reset it to the current count so you can detect another collection. So for example
Code:
if inventory:itemTotalCount(201545) > startcount then
-- Do some code, change channel maybe
startcount = inventory:itemTotalCount(201545)
end
Ah yes, thanks again. Had no idea what == meant. I always thought it just meant some form of "equal to" which is sort of true as you say, "same as" a pure sense of the operation. good stuffn = n + 1 means, assign the value of n + 1 to n, essentially incrementing it.
n == n + 1 means, is n the same as n + 1? Well obviously no it isn't and never will be. Get it?
Re: request EoJ Farming Timer
Okay, so I posted this in another thread http://www.solarstrike.net/phpBB3/viewt ... 811#p41811 but it really has more applicability to EOJ events so I want it here.
Was mincing between Lisa's "LOL" eventmonitortest and an attempt to --make it work-- with monitoring system chat and then I stumbled on this post.
This works fine but I want to try something else, further down
The code below gives a string error. Studied a bit and learned string.find is looking for the text. Unfortunately it doesn't seem like the system chat gets logged the same OR (more likely) I'm assigning the event monitor incorrectly. I read about EventMonitorCheck saving to a log... is this a real-time log or is it saved somewhere I can view?
Another swing and a miss as I tried to make the code look more like yours LOL
So now, after reading this http://www.solarstrike.net/phpBB3/viewt ... 811#p41811 thread it looks like my solution is this?
And then at a WP
So I changed the system message to look for above to "Positive Effect" and "Time remaining" based on what I know "sendMacro("SendSystemChat(PE_GetPOBInfo( 1 , 0 ),'SYSTEM');")" will return in the system chat window.
Once startEVENTDetect() is initiated in the /onLoad section do I need to call it again at a specific WP or does it just run continually as long as the WP is running?
Problem has been with actually getting the response I want out of system chat messages. The isEventFinished and IsScoreVisible stuff isn't working like I expected it to so I moved into trying the above.
The waitforevent function works great though. Probably my lack of understanding what's going on with the math... ~=1 or... ==2 or... ~=nil... or what those numbers even mean or how they are calculated.
Thx again and again
Was mincing between Lisa's "LOL" eventmonitortest and an attempt to --make it work-- with monitoring system chat and then I stumbled on this post.
This works fine but I want to try something else, further down
Code: Select all
<!-- # 1 --><waypoint x="-18556" z="-18129" y="999"> EventMonitorStart("Test", "CHAT_MSG_SAY");
sendMacro("SendChatMessage('LOL','SAY');")
yrest(1000)
local time, moreToCome, msg = EventMonitorCheck("Test", "1") if string.find(msg, "LOL") then printf("Event monitoring works fine.\n")
player:sleep()
end
</waypoint>
</waypoints>
Code: Select all
<!-- # 1 --><waypoint x="-18556" z="-18129" y="999"> EventMonitorStart("Test", "CHAT_MSG_SYSTEM");
sendMacro("SendSystemChat(PE_GetPOBInfo( 1 , 0 ),'SYSTEM');")
yrest(1000)
local time, moreToCome, msg = EventMonitorCheck("Test", "1")
if string.find(msg, "Time remaining") then
printf("Event monitoring works fine.\n")
player:sleep()
end
</waypoint>
</waypoints>
Another swing and a miss as I tried to make the code look more like yours LOL
Code: Select all
<!-- # 1 --><waypoint x="-18556" z="-18129" y="999"> EventMonitorStart("Test", "CHAT_MSG_SYSTEM");
sendMacro("SendSystemChat(PE_GetPOBInfo( 1 , 0 ),'SYSTEM');")
yrest(1000)
local time, moreToCome, msg = EventMonitorCheck("Test", "1") if string.find(msg, "PE_GetPOBInfo( 1 , 0 )") then printf("Event monitoring works fine.\n")
player:sleep()
end
</waypoint>
</waypoints>
So now, after reading this http://www.solarstrike.net/phpBB3/viewt ... 811#p41811 thread it looks like my solution is this?
Code: Select all
</onLoad>
function EVENTdetection()
repeat
local time, moreToCome, name, msg = EventMonitorCheck("EVENTdetect", "4,1")
if msg ~= nil then
if string.find(msg,"Positive Effect") then
__WPL:setWaypointIndex(__WPL:findWaypointTag("START"));
end
if string.find(msg,"Time remaining") then
__WPL:setWaypointIndex(__WPL:findWaypointTag("GOTOSLEEP"));
end
end
until moreToCome == false
end
function startEVENTDetect()
unregisterTimer("EVENTdetection");
printf("EVENT detection started\n");
EventMonitorStart("EVENTdetect", "CHAT_MSG_SYSTEM");
registerTimer("EVENTdetection", secondsToTimer(5), EVENTdetection);
end
startEVENTDetect()
</onLoad>
And then at a WP
Code: Select all
<!-- # 1 --><waypoint x="-18556" z="-18129" y="999">
sendMacro("SendSystemChat(PE_GetPOBInfo( 1 , 0 ),'SYSTEM');")
yrest(100)
EVENTdetection()
</waypoint>
</waypoints>
So I changed the system message to look for above to "Positive Effect" and "Time remaining" based on what I know "sendMacro("SendSystemChat(PE_GetPOBInfo( 1 , 0 ),'SYSTEM');")" will return in the system chat window.
Once startEVENTDetect() is initiated in the /onLoad section do I need to call it again at a specific WP or does it just run continually as long as the WP is running?
Problem has been with actually getting the response I want out of system chat messages. The isEventFinished and IsScoreVisible stuff isn't working like I expected it to so I moved into trying the above.
The waitforevent function works great though. Probably my lack of understanding what's going on with the math... ~=1 or... ==2 or... ~=nil... or what those numbers even mean or how they are calculated.
Thx again and again
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests