![]() |
|
|
#1 | |
|
Архивный участник
Join Date: Sep 2005
Posts: 150
|
I'm trying to make a holy ****ing easy AI and I can't get it to work.
Here is what I'm trying to do : Code:
class 1 giran_guard_clan : guard_stand
{
handler SEE_CREATURE (creature, myself)
{
if((myself->GetLifeTime() > 5 && myself->InMyTerritory(myself.sm) == 1 && creature->pledge_id == 2))
{
myself->AddAttackDesire(creature, 1, 1500);
}
}
}
Code:
class 1 giran_guard_clan : guard_stand handler 5 25 // SEE_CREATURE variable_begin "creature" "myself" "_choiceN" "_code" "_from_choice" variable_end push_event // myself push_const 704 add fetch_i func_call 184549406 // func[GetLifeTime] push_const 5 greater push_reg_sp fetch_i branch_false L300001 push_event // myself push_const 704 add fetch_i push_event // myself push_const 704 add fetch_i // sm push_const 544 add fetch_i func_call 184615156 // func[InMyTerritory] shift_sp -1 push_const 1 equal and push_event // creature push_const 112 add fetch_i // pledge_id push_const 792 add fetch_i4 push_const 2 // clan 2 equal and branch_false L300001 L300000 push_event // myself push_const 704 add fetch_i push_event // creature push_const 112 add fetch_i push_const 1 push_const 1500 func_call 184745993 // func[AddAttackDesire] shift_sp -3 shift_sp -1 L300001 handler_end class_end Quote:
Thanks for your help. |
|
|
|
|
|
#2 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
handler 5 25 // SEE_CREATURE
Thats wrong. |
|
|
|
|
#3 |
|
Архивный участник
Join Date: May 2006
Posts: 135
|
I was looking at ai.obj and there seems to be like 10 different SEE_CREATURE handlers, whats the difference between them ?
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Apr 2006
Posts: 118
|
lol? There is just one SEE_CREATURE handler....
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Sep 2005
Posts: 150
|
Handler 5 is right. So I guess the second number is false.
What is it ? Number seems to change, according to ... ? I'll try to guess. |
|
|
|
|
#6 |
|
Архивный участник
Join Date: May 2006
Posts: 135
|
Only one my ass lol
handler 5 391 // SEE_CREATURE handler 5 231 // SEE_CREATURE handler 5 917 // SEE_CREATURE handler 5 481 // SEE_CREATURE handler 5 426 // SEE_CREATURE 5 seems to remain but what are the other numbers then, I cant see the pattern ... |
|
|
|
|
#7 |
|
Архивный участник
Join Date: Jan 2006
Posts: 607
|
number of lines: 54
handler 5 54 // SEE_CREATURE |
|
|
|
|
#8 |
|
Архивный участник
Join Date: Sep 2005
Posts: 150
|
C4 sucks ... Thanks. T_T.
|
|
|
|
|
#9 |
|
Архивный участник
Join Date: May 2006
Posts: 135
|
aah, Thanks m4rk, you are truly an information library of L2 server files :P
#include <m4rk.h> O.o |
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|