-
Uniden65
- Posts: 151
- Joined: Thu Aug 20, 2009 5:17 pm
#1
Post
by Uniden65 » Tue May 29, 2012 11:38 am
Hey rock5 or lisa is there a way to show what you have the LOGOUT_TIMER set too when you start the bot ?
Code: Select all
<!-- Log out and resurrect settings -->
<option name="LOGOUT_TIME" value="300" /> <!-- in minutes, 0 = timer disabled -->
Code: Select all
<option name="LOGOUT_SHUTDOWN" value="false" />
<option name="LOGOUT_WHEN_STUCK" value="false" />
<option name="CLOSE_WHEN_STUCK" value="false" />
<option name="RES_AUTOMATIC_AFTER_DEATH" value="true" />
<option name="MAX_DEATHS" value="10" /> <!-- Log out after this many deaths -->
This option is very nice ....and i have looked for your Var. for LOGOUT_TIMER with no luck , something like a CPRINT in the start or the bot tell you what the timer is set too ? or NOT showing at all if its at default 0 ...
"The Bot will Auto Log in %d Minutes"
or let me know something about adding it to Profile ....I tryed
Code: Select all
cprintf(cli.red, "TIME BEFORE LOG OUT: %s\n\n Min", LOGOUT_TIME);
but with no luck, so i tryed to track down your Var. for LOGOUT_TIME... i could not find nothing
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#2
Post
by rock5 » Tue May 29, 2012 11:48 am
Profile "Options" are stored like this.
Code: Select all
settings.profile.options.LOGOUT_TIME
So you should be able to print that.
- 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.”
-
Uniden65
- Posts: 151
- Joined: Thu Aug 20, 2009 5:17 pm
#3
Post
by Uniden65 » Tue May 29, 2012 1:49 pm
thanks rock5 ..... Where does it store the Var. for the actual timer ..... the above will show me the time set ...Great added to /Onload command but i also would like to show time left after combat in profile? is this possible?
for anyone else who would like to see time set ....when bot starts add this to /onload
Code: Select all
<onLoad><![CDATA[
-- Additional Lua code to execute after loading the profile
-- and before the bot starts. e.g. You could overwrite profile settings here
-- like: changeProfileOption("HP_REST", 60);
startGMDetect()
cprintf(cli.pink, "LOGOUT Time Set To: %s Min\n\n", settings.profile.options.LOGOUT_TIME);
Code: Select all
if 999 > inventory:itemTotalCount("Runic Thorn") then
inventory:useItem(212183) -- Use Rune War Bow
yrest(1000)
RoMScript("UseEquipmentItem(10);")
yrest(1000)
inventory:useItem(212615) -- Use Fury of the Defender of the Jungle
yrest(1000)
if inventory:getAmmunitionCount() == 0 then
inventory:useItem(212185)
end
end
]]></onLoad>
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#4
Post
by rock5 » Tue May 29, 2012 2:07 pm
Looking at the logout code it looks like it uses os.time. Might be easier to copy that and modify it.
Code: Select all
if( settings.profile.options.LOGOUT_TIME > 0 ) then
local elapsed = os.difftime(os.time(), self.BotStartTime);
printf("Only %d minutes before logout.\n", settings.profile.options.LOGOUT_TIME - elapsed/60 )
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.”
-
Uniden65
- Posts: 151
- Joined: Thu Aug 20, 2009 5:17 pm
#5
Post
by Uniden65 » Tue May 29, 2012 2:17 pm
I thought about changing that ...but if i do it would not be Svn correct why i added it to profile?
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#6
Post
by rock5 » Tue May 29, 2012 2:26 pm
I thought you might misunderstand. That's why I specifically said I'd "copy it". You misunderstood anyway. Oh well. Doesn't matter.
I meant I copied it instead of starting from scratch and you can use that in your onLeaveCombat to display the time left.
- 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.”
-
Uniden65
- Posts: 151
- Joined: Thu Aug 20, 2009 5:17 pm
#7
Post
by Uniden65 » Tue May 29, 2012 2:29 pm
thanks rock5 ill try this later off to work ........Your Ej scripts the best thanks for all the help
-
Uniden65
- Posts: 151
- Joined: Thu Aug 20, 2009 5:17 pm
#8
Post
by Uniden65 » Tue May 29, 2012 11:30 pm
no luck rock5 it errors out :attempt to index global self"
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#9
Post
by rock5 » Tue May 29, 2012 11:38 pm
Ooops. I even tested it but forgot that when I trested it I had to change self to player. Sorry.
So just change 'self' to 'player'.
- 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.”
-
Uniden65
- Posts: 151
- Joined: Thu Aug 20, 2009 5:17 pm
#11
Post
by Uniden65 » Wed May 30, 2012 9:33 am
this is what i finally added for anyone who would like to use it ...
Top of my /Onload i added
Code: Select all
-- Shows Start of timer in hrs/min left before logout, only shown once on start
if( settings.profile.options.LOGOUT_TIME > 0 ) then
cprintf(cli.pink, "\n LOGOUT Time Set To: %d Hr.\n", settings.profile.options.LOGOUT_TIME/60);
cprintf(cli.pink, "\n Or: %d Minutes In Profile\n\n", settings.profile.options.LOGOUT_TIME);
end
and top of my onLeaveCombati added this to show timer count down after every kill ..
Code: Select all
-- Shows time of timer, before logout
if( settings.profile.options.LOGOUT_TIME > 0 ) then
local elapsed = os.difftime(os.time(), player.BotStartTime);
cprintf(cli.red, "\n Only %d minutes before logout.\n\n", settings.profile.options.LOGOUT_TIME - elapsed/60 )
end
Both work great together .... and thanks rock5
Who is online
Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 0 guests