Log in

View Full Version : Make logout() function



Funkgary
02-20-2013, 05:08 AM
Fairly simple and straightfoward, you should create a logout() function that closes the connectiong between the client and tibia so we can create scripts that xlog under certain circumstances.

Joshwa534
02-20-2013, 06:05 AM
Fairly simple and straightfoward, you should create a logout() function that closes the connectiong between the client and tibia so we can create scripts that xlog under certain circumstances.

The closest thing to this right now is:
Cavebot.Stop()
Walker.Stop() --- Already included in Cavebot.Stop()
We use this to logout characters in the depot in all of our scripts when your character reaches below 16:00 hours of stamina.

Funkgary
02-20-2013, 09:41 AM
The closest thing to this right now is:
Cavebot.Stop()
Walker.Stop() --- Already included in Cavebot.Stop()
We use this to logout characters in the depot in all of our scripts when your character reaches below 16:00 hours of stamina.

ye but I need a logout script so when someone heals my monsters it xlogs so I can go to school and bot also. Tired of buying new AOL's because some asshole healed my coryms

bkeener101
02-20-2013, 10:21 AM
Could achieve the same thing by creating a script to watch your targets health. (not real code, just an example in simple english):


targetCurrentHealth = target.health
if target.health > targetCurrentHealth then
cavebot.stop()
walker.start()
Walker.Goto("exit")
end

Basically, if the targets health goes up, then stop targeting and send the walker to the label 'exit:'
Of course, if the monster you are hunting heals itself, then you would have to set a specific amount of healing to trigger the effect.

Funkgary
02-20-2013, 11:29 AM
ive got my script in order, and what your suggesting doesnt work because I could be anywere on the wpts offscreen from where the exit label would be. the logout function is an imperative necesity to what i am suggesting.

bkeener101
02-20-2013, 11:33 AM
How would a logout function help you? If you are fighting a monster and someone heals it, you cannot logout because you are in battle. And if you xlog then you will stop healing yourself and die. What is it you want this function to do?

Funkgary
02-20-2013, 06:04 PM
It is an xlog function bro, if someone heals my monsters it usually means they haven't got me surrounded yet. So if it auto disconnects the moment they heal it I will xlog, making the monster stop atking me for 30 seconds then giving me a 30 second window to logout before I die. My knight and a lot of other peoples knights are high enough levels to live for 30 seconds without healing. That's why, and whether or not you can think of a use for the function it would be helpful in a lot of other situations.

arthurviolence
02-21-2013, 06:05 PM
You guys could also stop complaining about a feature that everybot used to have and this one doesnt, it would be nice to have, usefull sometimes, thats it. I approve this one.

Hendy
02-21-2013, 09:45 PM
And if you bothered checking Suggestion List II (http://forums.xenobot.net/showthread.php?10646-Suggestions-List-II) then you would know that it has already been suggested and you also would have seen that DarkstaR said "No comment" about it.

Bollo
02-21-2013, 10:13 PM
The closest thing to this right now is:
Cavebot.Stop()
Walker.Stop() --- Already included in Cavebot.Stop()
We use this to logout characters in the depot in all of our scripts when your character reaches below 16:00 hours of stamina.

Isnt it able to call like a windows command to just shut down the Tibia thats running?

Joshwa534
02-21-2013, 11:57 PM
Isnt it able to call like a windows command to just shut down the Tibia thats running?

Sure, you can kill the process Tibia.exe with an external piece of code.

Funkgary
02-23-2013, 11:35 PM
And if you bothered checking Suggestion List II (http://forums.xenobot.net/showthread.php?10646-Suggestions-List-II) then you would know that it has already been suggested and you also would have seen that DarkstaR said "No comment" about it.

I checked your suggestion list, it's not in there. It only has the suggestion "reconnect" not "disconnect"

Eion
03-13-2013, 05:49 AM
Sure, you can kill the process Tibia.exe with an external piece of code.

Could you integrate this into the xenobot script? and how?

mjbz68
03-16-2013, 11:51 PM
I've seen this suggested before, however - I honestly can't believe that this bot does not have this function. It's such a great bot - but I agree with Funkgary that this would be SOOOO useful for a very wide variety of applications, despite what anyone says.

I realize there are some other work arounds, but once again - I agree is it not the same thing as a log out function or Xlog function... Just my 2 cents

Milice
04-10-2013, 10:18 AM
Could you integrate this into the xenobot script? and how?

I would belive it's as simple as:


os.execute("taskkill /F /IM Tibia.exe")


Would close all Tibia.exe ofc.

Syntax
04-10-2013, 04:07 PM
I would belive it's as simple as:


os.execute("taskkill /F /IM Tibia.exe")


Would close all Tibia.exe ofc.

os.execute is not possible in later versions of XenoBot, security reasons of course.

Milice
04-10-2013, 11:24 PM
os.execute is not possible in later versions of XenoBot, security reasons of course.

Oh, okay. My bad then ^^ Wasn't aware of that.

Eion
04-11-2013, 01:40 AM
I went out of the way to create my own program that will reconnect after disconnects. I have the .LUA write a variable to a text file upon logging out because of low stamina and my program reads that file. It avoids logging in around server save and makes several checks so it does not attempt to inject or log in after an update. This allows me to run 24/7 basically on any account with 3 or more characters. Whenever the settings are loaded for a script. I have the .LUA open the backpacks and then I make a bunch location checks with an isLocation() function that I created to find out where to move the walker to, avoiding the walker stuck. There are still a few bugs in it, but I have been running 3 accounts for almost 3 days straight now switching between characters with no problem. It is really nice for when my ISP disconnects or Tibia lags... Sadly, I had to rely on mouse clicks to control xenobot as it has some sort of protection against debugging tools.

I don't understand why Xeno does not have a logout/reconnect feature built in. I have heard it was unsafe but never heard the explanation as to why.