Page 1 of 18

Shaiya[US] - Shaiya Bot ZS

Posted: Mon Oct 27, 2008 4:47 am
by zer0
Edit: This is a new version using XML.
You need the Latest release of Micromacro which includes LuaExpat, and a modified version of Elverions' XML Parser.
[attachment=1]xml.lua[/attachment]

http://www.solarstrike.net/get_download.php?id=5

This program is ZeroSignal's Shaiya Bot (ZS Shaiya Bot).

FEATURES:
* Lots of them ;)


IMPORTANT:

* Since this is covered under GPL, you can distribute this software, however
please realise that this software has the potential to be abused therefore
I recommend to only give a copy to those who are responsible and who have
contributed something to the Shaiya hacker community.

* There are allot of Easter Eggs in the code, so it pays to learn lua.
<http://lua-users.org/wiki/LuaTutorial>
Then you will be able to modify the code, or hopefully add to the codebase.

* This program is intended for educational purposes only.


REQUIRED SOFTWARE:
MicroMacro.
Shaiya GameGuard Bypass.


SETUP:
1. Open ".\data\config.xml", set the install_path to your Shaiya installed direcory.
2. Open ".\char\My_Avatar.xml", Select All, then copy the data into a new file.
Save the file, in the same folder, and as your avatar name.
3. This is now your avatar file, read through the comments carefully so you can
modify the file, to suit your needs.


RUNNING SCRIPT:
1. Start Shaiya.
Note - Do not move any GUI bars, if you do, the script may not work,
and you will need to close Shaiya down, and restart.
2. Select Character and enter the world.
3. Run "launch.bat".
4. Switch to Shaiya, then press the Insert key to Start, Pause key to Pause.


CONTACT DETAILS:
ZeroSignal - z3rosign4l [at] hotmail [dot] com

Re: Shaiya - ZS Shaiya Bot - v0.02b

Posted: Tue Oct 28, 2008 1:04 am
by zer0
Apologies on the the release 0-02b, it had a few bugs, which I didn't test properly, this release 0-021b should work ok.

See original post.

Re: Shaiya - ZS Shaiya Bot - v0.02b

Posted: Sat Nov 01, 2008 5:31 pm
by vvayinsane
This bot is still no good. To many problems with the script. Once i fix one problem with the filename a new one pops up. The frist problem off the bat is the class.lua is miss named in lib folder. Its class.lua_

after that the problems keep coming and coming

Re: Shaiya - ZS Shaiya Bot - v0.02b

Posted: Sun Nov 02, 2008 2:24 am
by zer0
In main.lua
remove line 21:

Code: Select all

include(g_script_dir .. "lib/class.lua")

Re: Shaiya - ZS Shaiya Bot - v0.02b

Posted: Sun Nov 02, 2008 8:28 pm
by Administrator
Part of the problem is the changes to include(). The newest version will automatically try to include from the current working path, so there's no need for 'g_script_dir'. include("lib/utils.lua") should work just fine.

As a quick work around, this also works:

Code: Select all

g_script_dir = getExecutionPath() .. "/"
Now, another problem is this:

Code: Select all

include(g_script_dir .. "data/waypoints.lua")
data/waypoints.lua does not exist. data/waypoint.xml does.

I commented it out temporarily, and it appears to run. I can only assume that this version does not yet contain XML reading support, so I won't be able to test the actual waypoint setup yet. Works great otherwise. Nice work so far. If there's anything else I can do to help, let me know.

Re: Shaiya - ZS Shaiya Bot - v0.02b

Posted: Tue Nov 04, 2008 10:05 pm
by zer0
I've migrated a few data based things over to XML, Waypoints, Skill, most Character Data (except the Avatar_class overidden functions), and some global values.

One question I do have is there a way I can place Lua in XML, and have it read a load the XML, so I can have all Character data in the one file, rather than having two separate character files, one for the Lua, and the other for the XML?

There is still allot of testing and fixes that need to be done, and I'm gonna have to put this on the backburner for a few weeks while I get my end-of-year tertiary exams out of the way.

Re: Shaiya - ZS Shaiya Bot - v0.02b

Posted: Tue Nov 04, 2008 10:31 pm
by Administrator
It is for the best to separate data from code as much as possible. What are you having problems with, exactly?

The only way I can see you storing bits of Lua code into the XML file would be to store it as a string value and possibly use Lua's loadstring() function to parse and execute it. There could, however, be problems parsing that string out of the XML file; especially if the '<' and '>' characters are used.

Re: Shaiya - ZS Shaiya Bot - v0.02b

Posted: Wed Nov 05, 2008 8:13 am
by zer0
the Avatar_class functions need to be polymorphed, with user created functions. I only briefly looked at it but I think loadString() should work, thanks.

edit: ahh yeah xml special characters, hmm maybe the lua is better left in the separate file, when I get the new version out perhaps u can take a look at it, and offer some suggestions.

Re: Shaiya - ZS Shaiya Bot - v0.02b

Posted: Sun Nov 09, 2008 8:14 am
by byhoratiss
Maybe i did something wrong.
After i run it, i modify the lines that u posted here before i read, just using common sense, and then i read it.

But, my problem is that my char dosnt attack by itself. Perhaps im doing something wrong, maybe shorcuts or something.

Do u have any idea?

PD: this is a masterful piece of code, amazing really.

Re: Shaiya - ZS Shaiya Bot - v0.03b

Posted: Sun Nov 09, 2008 9:09 am
by zer0
I've just released a new version 0-03b that uses XML for most of the data. The benefits are that character scripts are much easier to understand. :D
See Top.

edit:
Here is the link for the ZS Waypoint Editor for those who want to edit the waypoint.xml file.
http://solarimpact.servegame.com/phpBB3 ... f=10&t=156

Re: Shaiya - ZS Shaiya Bot - v0.03b

Posted: Sun Nov 09, 2008 4:56 pm
by Administrator
I just put up a full release of the latest copy of 0.98, which includes a few improvements to the library and the XML module. If you can't get the XML stuff to work for you, just download the latest version of MicroMacro off the download page.

byhoratiss: Did you edit char/<mycharacter>.lua and set key_attack to the hotkey that you put attack into? I typically place it into slot 1, or key.VK_1.

Re: Shaiya - ZS Shaiya Bot - v0.03b

Posted: Sun Nov 09, 2008 5:59 pm
by zer0
thanks elverion. :D

Re: Shaiya - ZS Shaiya Bot - v0.03b

Posted: Wed Nov 12, 2008 9:05 am
by zer0
How's it going for everyone, any issues they have come across?

Most of the skills in './data/skills.xml' need adding, and a bit of fixing. Here is my latest:
skills.xml
(6.31 KiB) Downloaded 540 times
For my next release I am experimenting with Finite State Machines, so functions like flee, and other functions that are time imperative, will be able to be called, without causing threading issues, or bloated code. ;)

Re: Shaiya - ZS Shaiya Bot - v0.03b

Posted: Wed Nov 12, 2008 12:37 pm
by Sgraffite
I use the move_to, and functions that function depends on, but in a different script. I noticed moving from your old version to the new version where you correct the angle every so often, sometimes it will seem to get stuck in an infinite loop that will freeze up the game until I stop the script. I've had this happen in about 3 times in 6 hours of botting using the new functions, but with the old versions of the functions it never happened in 12+ hours.

I will check into this more since it's in my script, but possibly something you can watch out for too I guess.

Re: Shaiya - ZS Shaiya Bot - v0.03b

Posted: Wed Nov 12, 2008 8:33 pm
by zer0
Thanks for the heads up, I'll have to modify and fix it up.

Re: Shaiya - ZS Shaiya Bot - v0.03b

Posted: Sun Nov 16, 2008 4:04 am
by shakey
I'm getting this when I try to run it. After the setup, ofcourse.

Code: Select all

...shakey\Desktop\micromacro\scripts\zs_shaiya/main.lua:24: cannot open C:/Users
/shakey/Desktop/micromacro/scripts/zs_shaiya/./scripts/zs_shaiya/classes/avatar_
class.lua: No such file or directory

Which I find odd because the avatar_class.lua is obviously there...

Re: Shaiya - ZS Shaiya Bot - v0.03b

Posted: Sun Nov 16, 2008 6:57 am
by Administrator
I'm pretty sure it's due to the pathing issue noted here. Zero, have you updated your lib lately (since changes to include())?

Re: Shaiya - ZS Shaiya Bot - v0.03b

Posted: Sun Nov 16, 2008 10:47 pm
by zer0
I was using 0.98 during testing, the Deprecated line was active, though the new line has been added, for compatibility to 0.99 it's just a matter of commenting the old line, and un-commenting the new:

In main.lua, line 19 & 20.

Code: Select all

--g_script_dir = "scripts/zs_shaiya/"
g_script_dir = getExecutionPath() .. "/"

Re: Shaiya - ZS Shaiya Bot - v0.03b

Posted: Mon Nov 17, 2008 12:09 pm
by shakey
Then I get this.

Mon Nov 17 08:08:16 2008 : Executing script "main.lua".
==================================================

Mon Nov 17 08:08:16 2008 : ...shakey\Desktop\micromacro\scripts\zs_shaiya/main.lua:60: attempt to call global 'debug_message' (a nil value)
Mon Nov 17 08:08:16 2008 : Execution of main.lua complete.
Mon Nov 17 08:08:16 2008 : Execution error: Runtime error
Mon Nov 17 08:08:16 2008 : Collecting garbage...
Mon Nov 17 08:08:16 2008 : 69KB freed.

Re: Shaiya - ZS Shaiya Bot - v0.03b

Posted: Mon Nov 17, 2008 3:45 pm
by Administrator
A cheap fix would be to open up main.lua, and add this near the top:

Code: Select all

debug_message = print;
That should do the trick.