Page 1 of 1

/ja Ready

Posted: Sun Jul 05, 2015 9:35 pm
by Delaide
So, I have noticed, sic seems to work, SMN bloodpacks work, but the ready ability always shows nothing, even when the jug pet should have abilities.
I would like to look into creating this, but I need to understand more of how the pet abilities work.
Can anyone explain to me where to find the smn pet abilities?
I know the actual smn abilities are scripted here: https://github.com/DarkstarProject/dark ... ities/pets

But I am more curious where the info is that says "x pet has y ability". Then I can see if I can recreate this for the ready ja.

Re: /ja Ready

Posted: Sat Oct 24, 2015 8:02 pm
by aizenmyou
Delaide wrote:So, I have noticed, sic seems to work, SMN bloodpacks work, but the ready ability always shows nothing, even when the jug pet should have abilities.
I would like to look into creating this, but I need to understand more of how the pet abilities work.
Can anyone explain to me where to find the smn pet abilities?
I know the actual smn abilities are scripted here: https://github.com/DarkstarProject/dark ... ities/pets

But I am more curious where the info is that says "x pet has y ability". Then I can see if I can recreate this for the ready ja.
Ready would be so nice to have working. I just don't have the time with real life stuff to go through it. :(

Re: /ja Ready

Posted: Tue Jan 19, 2016 5:34 am
by Metalfiiish
If I'm with you, your looking for how the smn pet abilities work?

Seems like the core of what is calling those scripts is built in luautils.cpp:
https://github.com/DarkstarProject/dark ... autils.cpp

From Line 3284:
int32 OnPetAbility(CBaseEntity* PTarget, CBaseEntity* PMob, CMobSkill* PMobSkill, CBaseEntity* PMobMaster)
{
lua_prepscript("scripts/globals/abilities/pets/%s.lua", PMobSkill->getName());

If your looking for the checks to ensure the player/pet can use the ability, I am 98% sure it is all handled client side. closet thing I see if a query to database to get pet skill list:

https://github.com/DarkstarProject/dark ... tutils.cpp
Pet->m_MobSkillList = (uint16)Sql_GetUIntData(SqlHandle, 40);


There is another example for automations attachments:

Line 1911:
int32 OnManeuverGain(CBattleEntity* PEntity, CItemPuppet* attachment, uint8 maneuvers)


Both of these are what is exposing the entities from C to Lua. The lua is setting the proper directory for pets in line 3225:

int32 OnAbilityCheck(CBaseEntity* PChar, CBaseEntity* PTarget, CAbility* PAbility, CBaseEntity** PMsgTarget)

.....
if (PAbility->isAvatarAbility())
{
memcpy(filePath, "scripts/globals/abilities/pets/%s.lua", 38);
}

lua_prepscript(filePath, PAbility->getName());

if (prepFile(File, "onAbilityCheck"))
{
return 87;
}

hope this helps. I noticed the ability ready already has an id located in ability.h, so it likely needs only the ready.lua file to be made in srcipts/abilities/:
https://github.com/DarkstarProject/dark ... /ability.h.

The above file also lists all smn pet abilities at around ID number 246 + , it also appears to list all the pet jug abilities that ready could provoke (saw a few around ID 719).

Re: /ja Ready

Posted: Tue Jan 19, 2016 7:06 am
by demolish
Metalfiiish wrote:If I'm with you, your looking for how the smn pet abilities work?

Seems like the core of what is calling those scripts is built in luautils.cpp:
https://github.com/DarkstarProject/dark ... autils.cpp

From Line 3284:
int32 OnPetAbility(CBaseEntity* PTarget, CBaseEntity* PMob, CMobSkill* PMobSkill, CBaseEntity* PMobMaster)
{
lua_prepscript("scripts/globals/abilities/pets/%s.lua", PMobSkill->getName());

If your looking for the checks to ensure the player/pet can use the ability, I am 98% sure it is all handled client side. closet thing I see if a query to database to get pet skill list:

https://github.com/DarkstarProject/dark ... tutils.cpp
Pet->m_MobSkillList = (uint16)Sql_GetUIntData(SqlHandle, 40);


There is another example for automations attachments:

Line 1911:
int32 OnManeuverGain(CBattleEntity* PEntity, CItemPuppet* attachment, uint8 maneuvers)


Both of these are what is exposing the entities from C to Lua. The lua is setting the proper directory for pets in line 3225:

int32 OnAbilityCheck(CBaseEntity* PChar, CBaseEntity* PTarget, CAbility* PAbility, CBaseEntity** PMsgTarget)

.....
if (PAbility->isAvatarAbility())
{
memcpy(filePath, "scripts/globals/abilities/pets/%s.lua", 38);
}

lua_prepscript(filePath, PAbility->getName());

if (prepFile(File, "onAbilityCheck"))
{
return 87;
}

hope this helps. I noticed the ability ready already has an id located in ability.h, so it likely needs only the ready.lua file to be made in srcipts/abilities/:
https://github.com/DarkstarProject/dark ... /ability.h.

The above file also lists all smn pet abilities at around ID number 246 + , it also appears to list all the pet jug abilities that ready could provoke (saw a few around ID 719).
click line number when viewing on github and copy from address bar/right click line number and copy/paste the link, github auto scrolls to that line number :)