New client loader for test server

Flunklesnarkin
Posts: 238
Joined: Wed Sep 05, 2012 10:48 am

Re: New client loader for test server

Post by Flunklesnarkin » Mon Jan 14, 2013 4:42 pm

atom0s wrote:The beta launcher was updated again today to fix a minor issue with language ids. For those still new to Ashita or haven't checked it out here are some helpful links: We're working on some new updates to the Ashita core soon as well. So stay tuned for another update soon.

Thanks for the information. I'll browse around and see if I can get it working.

A few of those links don't work at all for me. I also tried to access the "configuration files" link on the FAQ and it seems to be access restricted. I created an account and logged in also.

User avatar
atom0s
Developer
Posts: 537
Joined: Thu Oct 25, 2012 9:52 am

Re: New client loader for test server

Post by atom0s » Tue Jan 15, 2013 5:48 am

Seems these forums didn't like me pasting posts across sites.
Updated my original post too.

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: New client loader for test server

Post by bluekirby0 » Tue Jan 15, 2013 7:35 am

New version of the package is up in the OP. It works for the test server or classic by default. Make sure to read the updated instructions! It will force you to update the first time you use it so people don't complain about problems from using an old version anymore. The modified ffxi-boot inside also works with the search server when using dns names!

Modified ffxi-boot can be obtained separately (in both vc10 and vc11 flavors) here: http://kile.dyndns.info:8765/bak/ffxi-boot_mod_2a.zip

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: New client loader for test server

Post by bluekirby0 » Thu Jan 17, 2013 3:11 pm

New package that just changes the ffxi-boot_mod to version 2b now with hairpinning support! If you just want to update ffxi-boot_mod then grab it here: http://kile.dyndns.info:8765/bak/ffxi-boot_mod_2b.zip

A special thanks to atom0s for helping me out immensely in getting this working!

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: New client loader for test server

Post by tagban » Thu Jan 17, 2013 4:05 pm

bluekirby0 wrote:New version of the package is up in the OP. It works for the test server or classic by default. Make sure to read the updated instructions! It will force you to update the first time you use it so people don't complain about problems from using an old version anymore. The modified ffxi-boot inside also works with the search server when using dns names!

Modified ffxi-boot can be obtained separately (in both vc10 and vc11 flavors) here: http://kile.dyndns.info:8765/bak/ffxi-boot_mod_2a.zip
THANKS!

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: New client loader for test server

Post by bluekirby0 » Thu Jan 17, 2013 4:22 pm

Glad I could help :)

User avatar
atom0s
Developer
Posts: 537
Joined: Thu Oct 25, 2012 9:52 am

Re: New client loader for test server

Post by atom0s » Mon Jan 21, 2013 7:19 am

Ashita 1.0.2.6 Released!

Hey everyone, more updates again! This time a lot of love for LuaCast.

Code: Select all

----------------------------------------------------------------------------------------------------
Ashita Version: 1.0.2.6
----------------------------------------------------------------------------------------------------
    Change: INTERFACEVERSION 1.41
    Fixed : [Both] Resource dat parsing adjustments to fix invalid ability/spell data.
    Fixed : [Both] GetEquipItemID is now spelled properly.
    Fixed : [Both] ItemData by name is now const char*.
    Update: [Both] Resource ItemData is now GetItemByName/GetItemByID
    Update: [Extn] LuaCast: Added missing GetItemByName/GetItemByID functions.
    Update: [Extn] LuaCast: Added IInventory bindings to fully support inventory data in Lua.
    Added : [Extn] LuaCast: inventory.lua helper file for various inventory data.
    Added : [Extn] LuaCast: Added various extension files to extend math, string, table.
    Update: [Extn] LuaCast: Added memory handling functions.
    Update: [Extn] LuaCast: Updated main.lua for example usage.
    Fixed : [Extn] LuaCast: Fixed Player crafting information reporting wrong data.
    Change: [Extn] LuaCast: CraftSkills is now properly CraftLevels as it is in the SDK.
    Update: [Extn] Lotomatic: Added pass/loot commands to pass or roll on all current treasure pool items.
    Fixed : [Extn] AshitaAPI: Various structure definitions using wrong data types.
With this update we have a few bug fixes mostly to extensions.

Lotomatic
  • Added /lotomatic pass command to pass all current items in treasure pool.
  • Added /lotomatic loot command to loot all current items in the treasure pool.
  • WARNING: These commands do not check if you have rolled an item already. Use with caution!
LuaCast
  • Added missing GetItemByName/GetItemByID functions.
  • Fixed crafting information returning wrong data.
  • Fixed CraftSkills to be CraftLevels to match the SDK properly.
  • Added IInventory bindings to allow users to fully read inventory info from Lua.
  • Inventory reading includes:
    • Inventory (All inventory bags included.)
    • Storage
    • Current Equipment
    • Treasure Pool Data
  • Added memory handling functions.
  • Added several helper Lua files to extend some built in objects. (Math, String, Table)
With these new changes to LuaCast you can now do A LOT of customization.
Here are some new examples of whats changed:

Reading Current Equipment Information

Code: Select all

local inventory = AshitaCore:GetDataModule():GetInventory().Inventory;
local equipment = inventory.Equipment;

for k,v in pairs( equipment ) do
    local item = GetItemFromEquipmentSlot( v.Slot + 1 );
    local itemName = function() if (item == nil) then return ''; else return item.Name; end end
    print( string.format( '[Equiment Info]: Slot: %d - ItemIndex: %d - ItemName: %s', v.Slot, v.ItemIndex, itemName() ) );
end
Using the new memory stuff to mimic AllMaps extension:

Code: Select all

local allMaps   = { 0xE9, 0xFF, 0xFF, 0xFF, 0xFF, 0x50, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xBF, 0x96, 0xFF, 0xFF, 0xFF, 0xFF, 0x83, 0xC4, 0x04 };
local addr      = FindPattern( allMaps, #allMaps, "x????xx????xxx????xxx" );
if (addr ~= nil and addr ~= 0) then
    addr = addr + 6;
    
    local data = { 0xB8, 0x01, 0x00, 0x00, 0x00 };
    WriteArray( data, #data, addr );
end
Obtaining information about a spell:

Code: Select all

local res = AshitaCore:GetResources();
print( 'Zone 4: ' .. tostring( res:GetString( 'areas', 4 ) ) );
print( 'Zone 4: ' .. tostring( res:GetString( 'areas', res:GetString( 'areas', 4 ) ) ) );

local spell = AshitaCore:GetResources():GetSpellByID( 1 );
print( string.format( 'Spell ID: %d',           spell.ID ) );
print( string.format( 'Spell MagicType: %d',    spell.MagicType ) );
print( string.format( 'Spell Element: %d',      spell.Element ) );
print( string.format( 'Spell ValidTargets: %d', spell.ValidTargets ) );
print( string.format( 'Spell Skill: %d',        spell.Skill ) );
print( string.format( 'Spell MP: %d',           spell.MP ) );
print( string.format( 'Spell Cast: %d',         spell.Cast ) );
print( string.format( 'Spell Recast: %d',       spell.Recast ) );
print( string.format( 'Spell ResourceID: %d',   spell.ResourceID ) );
print( string.format( 'Spell IconIndex: %d',    spell.IconIndex ) );
print( string.format( 'Spell Name: %s',         spell.Name ) );
print( string.format( 'Spell Description: %s',  spell.Description ) );

print( string.format( 'Required Count: %d', #spell.RequiredLevel ) );
for k,v in pairs( spell.RequiredLevel ) do
    print( string.format( 'Job: %d -- Level: %d', k, v ) );
end
With the new additional support files I also wrote a command parser to handle incoming commands easier and cleaner. You can use the new command parser like this. (This is from the new main.lua that is included with LuaCast)

Code: Select all

----------------------------------------------------------------------
-- func : onHandleCommand
-- desc : Event callback for onHandleCommand event.
----------------------------------------------------------------------
function onHandleCommand( cmd, nType )
    -- Parse the command into arguments..
    local args = cmd:GetArgs();
    
    -- Validate this is a LuaCast command..
    if (args[1] ~= "/luacast") then
        return false;
    end
    
    -- Handle LuaCast wave command..
    if (args[2] == 'wave') then
        AshitaCore:GetDataModule():SendCommand( '/wave', CommandType.Typed );
        return true;
    end
    
    return false;
end
events.Add( "onHandleCommand", "luaCast_onHandleCommand", onHandleCommand );

With these updates to LuaCast users can now pull any data they wish from FFXI's memory and use it to their advantage to create whatever they desire.

Here is a list of all the new memory functions:
  • GetFFXiBase()
  • UnprotectMem()
  • FindPattern()
  • ReadUChar()
  • ReadChar()
  • ReadUShort()
  • ReadShort()
  • ReadULong()
  • ReadLong()
  • ReadULonglong()
  • ReadLonglong()
  • ReadFloat()
  • ReadDouble()
  • ReadArray()
  • ReadString()
  • WriteUChar()
  • WriteChar()
  • WriteUShort()
  • WriteShort()
  • WriteULong()
  • WriteLong()
  • WriteULonglong()
  • WriteLonglong()
  • WriteFloat()
  • WriteDouble()
  • WriteArray()

Feel free to check out the project:
http://www.ffevo.net/forum/80-ashita/

You can also always find us on IRC at:
Server: irc.ffevo.net
Port: 6667
Channel: #fface

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: New client loader for test server

Post by bluekirby0 » Sat Jan 26, 2013 11:45 pm

TEMORARY LINK WHILE FFEVO IS DOWN:

http://kile.dyndns.info:8765/bak/Ashita ... r_Full.zip

This version does not require the update step from the guide, but it will disappear once ffevo is running again to prevent people from using old versions.

User avatar
atom0s
Developer
Posts: 537
Joined: Thu Oct 25, 2012 9:52 am

Re: New client loader for test server

Post by atom0s » Mon Jan 28, 2013 9:56 pm

Ashita v1.0.2.8 Released

Hello again everyone, another update to Ashita has been released. :)
This release includes the following:

Code: Select all

----------------------------------------------------------------------------------------------------
Ashita Version: 1.0.2.8
----------------------------------------------------------------------------------------------------
    Fixed : [Core] Packet parsing methods not correctly handling some packets.
    Fixed : [Core] Crash that could occur from a colored string from a Windower based application.
    Added : [Extn] LuaCast: /luacast reload - Now able to fully reload LuaCast via command.
    Added : [Extn] LuaCast: /luacast dostring "<lua text here>" - Able to parse chat log text as a Lua string.
    Added : [Extn] LuaCast: recast, vanatime, weather helper files.
    Added : [Extn] LuaCast: timer module for allowing timed events.
    Fixed : [Core] Typos inside of the keymap file.
    Fixed : [Core] Issue that prevented plugins from ever seeing a certain packet.
    Added : [Core] IData::CommandType::ForceHandle - Causes commands passed to HandleCommand to be resent to extensions.
See previous change information in our release log here:
http://svn.ffevo.net/ashita/release/ChangeLog.txt

This update brought some bug fixes to the internal core of Ashita as well as some more LuaCast love.


LuaCast
The base folder structure of the LuaCast scripts has been adjusted, so with this update I recommend you delete your old folder and start fresh. The new layout is now as follows:
  • \LuaCast\
    • events.lua
    • main.lua
  • \LuaCast\extensions\
    • math.lua
    • string.lua
    • table.lua
    • timer.lua
  • \LuaCast\ffxi\
    • inventory.lua
    • recast.lua
    • vanatime.lua
    • weather.lua
Commands
Two new commands have been added to LuaCast to allow for more things.

/luacast reload
    • Allows users to fully reload the Lua state of LuaCast. (This will re-execute main.lua as if you just loaded the extension.) This is useful for developers working on scripts.
/luacast dostring "<script data here>"
    • Allows users to execute a chunk of Lua code from the command line. This can be EXTREMELY powerful when used with macros as well as any fancy scripts you create. For example, you print hello world:
      /luacast dostring "print( 'hello world' );"

      Keep in mind with this function, you have to surround the function in quotes. You cannot use double quotes inside the script chunk you are executing either.

      You can use this function to execute other Lua files as well using:
      /luacast dostring "dofile( filename )"

      This can process any valid Lua so use your imagination. :)
More Informational Helpers!
I have also coded a handful more helper Lua files.

timer.lua

Timers are based on how Garry's Mod implements Lua into his game. This allows for functions to be fired at a set interval for any amount of times you wish. You can also have a fire-once timer that is basically like a sleep allowing you to call a function in the future.

For example, we can setup a function to be called every 5 seconds, until we tell it to stop like this:

Code: Select all

timer.Create( 'myTimer', 5, 0, function()
    print( 'Hello world!' );
end );
If you want to just have an event fire once, you can use the following instead:

Code: Select all

timer.Once( 5, function()
    print( 'Hello world!' );
end );
The above would call the function once after 5 seconds has passed since we called the timer.Once command.

Please note:
Timers are fired during the rendering of the game. It is in your best interest to not do massively intensive operations in timers



recast.lua
As you can guess, recast.lua is a helper file that contains various functions to obtain recast data.
This is basically the entire Recast extension written in Lua.

Here is rundown of each of the functions this file has:
  • Recast.GetAbilityRecastIds() - Returns a table of all current recast ability ids.
    Recast.GetAbilityRecastIdFromIndex( index ) - Returns the recast ability id of the given index.
    Recast.GetAbilityRecastByIndex( index ) - Returns the recast timer of the given ability index.
    Recast.GetAbilityRecastById( id ) - Returns the ability recast timer for the given ability id.
    Recast.GetSpellRecastByIndex( index ) - Returns the spell recast by the given spell index.
    Recast.FormatTimestamp( timer ) - Formats a recast timer into a hh:mm:ss format.

These should be fairly straight forward to understand. Here's an example of a few of the functions:

Code: Select all

-- Print Two-Hour Recast Info 
local Recast = require( "recast" ); 
local index = 0; 
local timer = Recast.GetAbilityRecastByIndex( index ); 
local str = Recast.FormatTimestamp( timer ); 
print( string.format( 'Index: %d -- Recast: %d -- Timer String: %s', index, timer, str ) );

vanatime.lua
vanatime.lua is a helper file that contains functions for reading the Vanadiel time. This can be useful for getting the current time to check for day/night time, as well as checking moon phase etc.

Here is rundown of each of the functions this file has:
  • VanaTime.GetRawTimestamp() - Returns the absolute raw timestamp from the game.
    VanaTime.GetCurrentTimestamp() - Returns a formatted timestamp in the following format: hh:mm:ss
    VanaTime.GetCurrentTime() - Returns a Time table object.
    VanaTime.GetCurrentHour() - Returns the current in-game hour.
    VanaTime.GetCurrentMinute() - Returns the current in-game minute.
    VanaTime.GetCurrentSecond() - Returns the current in-game second.
    VanaTime.GetCurrentDate() - Returns a Date table object.

GetCurrentTime() returns a Time table object. This table has the following properties:
  • Hour - Current in-game hour.
    Minutes - Current in-game minutes.
    Seconds - Current in-game seconds.

GetCurrentDate() returns a Date table object. This table has the following properties:
  • WeekDay - The current elemental day.
    Day - Current Vanadiel day.
    Month - Current Vanadiel month.
    Year - Current Vanadiel year.
    MoonPercent - Current moon percent.
    MoonPhase - Current moon phase.

weather.lua
weather.lua is a simple helper that only exposes 1 function. To simply read the current in-game weather.
  • Weather.GetCurrentWeather() - Returns the current weather type.
Information
Please note, inside each of these listed Lua files I mentioned you will find global data. Such as:

Code: Select all

WEATHER_CLEAR       = 0;
WEATHER_SUNNY       = 1;
WEATHER_CLOUDY      = 2;
WEATHER_FOG         = 3;
WEATHER_FIRE        = 4;
These sets of data can be used anywhere as long as you have included the said Lua file. This should make your life a lot easier when comparing value and such.. For example:

Code: Select all

if (Weather.GetCurrentWeather() == WEATHER_ICE2) then
    -- Send an equip command here..
end
Performance Warning!
Please also note the following:
    • Each file found inside the 'ffxi' sub folder will more than likely do some sort of memory processing. Currently all the files listed here scan for patterns to locate their data. It is important that you only include these files once! Including them every time you need it will decrease your FPS and cause lag as the amount of unneeded rescanning for the data will occur.

      Simply add the files to the top of your main.lua once and leave them there. Do everything else after them.

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: New client loader for test server

Post by bluekirby0 » Sat Mar 09, 2013 4:57 am

Package updated with the most recent Beta Launcher and the new ffxi-boot_mod 3 now with support for EU versions and without the nasty character creation bug!

Post Reply