View Single Post
Old 02.06.2009, 01:25   #7
darkmenx
Guest
 
Posts: n/a
Default L2Extend Functions/Calls/Tokens/Questions

Can anyone answer any of these questions? Thanks in advance!


1. I'm looking for a skill token that has two arguments. How can I use it and what would it look like in CParserForSkill.cpp and CParserForSkill.h?


2. How does the Die() function work and how could I use it in a skill.


bool Die(CCreature *pEnemy)

{

typedef bool (__thiscall *_DIE) (CCreature *MySelf, CCreature *Enemy);

_DIE xDie = (_DIE)0x00511D70L;

return ( xDie(this, pEnemy) );

}

The above is from CCreature.h


Die(pTargetCreature);


The above is what I used in a skill but returns an error. I guess it should at least be pTargetCreature->Die()

pTargetCreature->Die(pTargetCreature); seemed to have worked but if it is used to kill an NPC/mob then the corpse of the mob never disapears. The body is left on the ground forever. How can I fix this.


3. I created a damaging skill but right now it only reduces a target's HP which does not kill them if they reach less than 0 HP. I wanted to use the Die() function to make them die if they were under 1 HP. Is there a better way to do this? Is there a damage function?


this needs 2 args:

typedef bool (__thiscall *_DIE) (CCreature *MySelf, CCreature *Enemy)


here you passed only 1:

Die(pTargetCreature);


even if its valid arg or not, its still just 1.

Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 06-02-2009, 01:25 AM. Открыть источник.