Reward ability

Forum rules
NO LONGER BEING MAINTAINED!
Post Reply
altalus
Posts: 136
Joined: Wed Nov 14, 2012 8:31 pm
Location: Montreal Qc, CAN

Reward ability

Post by altalus » Tue Dec 25, 2012 2:31 pm

So, I know reward does nothing right now but... it seems not even to call the right lua file.

Code: Select all

[14:28:38][Debug] CLIENT [GM]Little_GM PERFORMING ACTION 09
[14:28:55][Info] parse: 01C | 0060 005F 06 from user: [GM]Little_GM
[14:28:55][Debug]  1c 06 60 00 00 04 00 00 01 00 00 00
[14:28:55][Info] parse: 01A | 0060 005F 08 from user: [GM]Little_GM
[14:28:55][Debug] CLIENT [GM]Little_GM PERFORMING ACTION 09
I suppose something in the core is needed ? I don't mind writing the lua file but it needs to be called :P

Edit:

It seems it needs to be worked on in the packet_system.cpp:

Code: Select all

/************************************************************************
*																		*
*  Purpose of the package is unknown, but is beginning to appear at *
* Use of the ability, if a character has a pet. Possible *
* Client requires the missing packages.									*
*																		*
************************************************************************/

void SmallPacket0x01C(map_session_data_t* session, CCharEntity* PChar, int8* data)
{
	PrintPacket(data);
	return;
} 

altalus
Posts: 136
Joined: Wed Nov 14, 2012 8:31 pm
Location: Montreal Qc, CAN

Re: Reward ability

Post by altalus » Tue Dec 25, 2012 8:00 pm

Woohoo !

Code: Select all

PChar->PBattleAI->SetCurrentJobAbility(62); //reward
PChar->PBattleAI->SetCurrentAction(ACTION_JOBABILITY_START); //No target, it is myself ?
PChar->PBattleAI->CheckCurrentAction(gettick());
This will call the lua file in question. Now I did wrap it in a switch and all and need WAY more testing but at least I can work on the reward.lua :D

EDIT: Please note that I am still looking at the way to check if a biscuit is equipped or not (in the core) and to give an error message if it is not :)

Edit 2: Ok, I now have part of it done, the lua script seems to work. But I have 2 issues. 1- How to remove a cookie once the action is ran ? I suppose it is in the core that I should do that. For now I do it in the lua file (and check if I have a pet) so I suppose that I need someone to check the code :P and 2- how to properly show the message that X HP has been restored to the pet.

Post Reply