Kirikups
01.02.2006, 16:24
Hola everybody,
here what i tested today:
class rabbit : warrior_flee
{
handler:
EventHandler MY_DYING(c1)
{
c1 = GetLastAttacker();
if (OwnItemCount(c1, @red_soul_crystal_0) >= 1) {
DeleteItem1(c1, @red_soul_crystal_0, 1);
GiveItem1(c1, @red_soul_crystal_1,1);
}
if (OwnItemCount(c1, @red_soul_crystal_1) >= 1) {
DeleteItem1(c1, @red_soul_crystal_1, 1);
GiveItem1(c1, @red_soul_crystal_2,1);
}
if (OwnItemCount(c1, @red_soul_crystal_2) >= 1) {
DeleteItem1(c1, @red_soul_crystal_2, 1);
GiveItem1(c1, @red_soul_crystal_3,1);
}
if (OwnItemCount(c1, @red_soul_crystal_3) >= 1) {
DeleteItem1(c1, @red_soul_crystal_3, 1);
GiveItem1(c1, @red_soul_crystal_4,1);
}
if (OwnItemCount(c1, @red_soul_crystal_4) >= 1) {
DeleteItem1(c1, @red_soul_crystal_4, 1);
GiveItem1(c1, @red_soul_crystal_5,1);
}
if (OwnItemCount(c1, @red_soul_crystal_5) >= 1) {
DeleteItem1(c1, @red_soul_crystal_5, 1);
GiveItem1(c1, @red_soul_crystal_6,1);
}
if (OwnItemCount(c1, @red_soul_crystal_6) >= 1) {
DeleteItem1(c1, @red_soul_crystal_6, 1);
GiveItem1(c1, @red_soul_crystal_7,1);
}
if (OwnItemCount(c1, @red_soul_crystal_7) >= 1) {
DeleteItem1(c1, @red_soul_crystal_7, 1);
GiveItem1(c1, @red_soul_crystal_8,1);
}
if (OwnItemCount(c1, @red_soul_crystal_8) >= 1) {
DeleteItem1(c1, @red_soul_crystal_8, 1);
GiveItem1(c1, @red_soul_crystal_9,1);
}
if (OwnItemCount(c1, @red_soul_crystal_9) >= 1) {
DeleteItem1(c1, @red_soul_crystal_9, 1);
GiveItem1(c1, @red_soul_crystal_10,1);
}
}
}
it give me:
class rabbit : warrior_flee
handler 10 // MY_DYING
variable_begin
"c1"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
push_event // c1
push_const 260
add
push_reg_sp
fetch_i
shift_sp 1
func_call 61 // func[GetLastAttacker]
assign
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4629
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L1
L0
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4629
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4630
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4630
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L3
L2
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4630
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4631
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L3
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4631
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L5
L4
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4631
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4632
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L5
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4632
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L7
L6
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4632
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4633
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L7
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4633
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L9
L8
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4633
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4634
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L9
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4634
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L11
L10
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4634
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4635
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L11
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4635
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L13
L12
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4635
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4636
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L13
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4636
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L15
L14
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4636
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4637
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L15
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4637
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L17
L16
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4637
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4638
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L17
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4638
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L19
L18
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4638
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4639
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L19
handler_end
class_end
But that damned rabbit doesnt give me anything when i kill it :cry:
here what i tested today:
class rabbit : warrior_flee
{
handler:
EventHandler MY_DYING(c1)
{
c1 = GetLastAttacker();
if (OwnItemCount(c1, @red_soul_crystal_0) >= 1) {
DeleteItem1(c1, @red_soul_crystal_0, 1);
GiveItem1(c1, @red_soul_crystal_1,1);
}
if (OwnItemCount(c1, @red_soul_crystal_1) >= 1) {
DeleteItem1(c1, @red_soul_crystal_1, 1);
GiveItem1(c1, @red_soul_crystal_2,1);
}
if (OwnItemCount(c1, @red_soul_crystal_2) >= 1) {
DeleteItem1(c1, @red_soul_crystal_2, 1);
GiveItem1(c1, @red_soul_crystal_3,1);
}
if (OwnItemCount(c1, @red_soul_crystal_3) >= 1) {
DeleteItem1(c1, @red_soul_crystal_3, 1);
GiveItem1(c1, @red_soul_crystal_4,1);
}
if (OwnItemCount(c1, @red_soul_crystal_4) >= 1) {
DeleteItem1(c1, @red_soul_crystal_4, 1);
GiveItem1(c1, @red_soul_crystal_5,1);
}
if (OwnItemCount(c1, @red_soul_crystal_5) >= 1) {
DeleteItem1(c1, @red_soul_crystal_5, 1);
GiveItem1(c1, @red_soul_crystal_6,1);
}
if (OwnItemCount(c1, @red_soul_crystal_6) >= 1) {
DeleteItem1(c1, @red_soul_crystal_6, 1);
GiveItem1(c1, @red_soul_crystal_7,1);
}
if (OwnItemCount(c1, @red_soul_crystal_7) >= 1) {
DeleteItem1(c1, @red_soul_crystal_7, 1);
GiveItem1(c1, @red_soul_crystal_8,1);
}
if (OwnItemCount(c1, @red_soul_crystal_8) >= 1) {
DeleteItem1(c1, @red_soul_crystal_8, 1);
GiveItem1(c1, @red_soul_crystal_9,1);
}
if (OwnItemCount(c1, @red_soul_crystal_9) >= 1) {
DeleteItem1(c1, @red_soul_crystal_9, 1);
GiveItem1(c1, @red_soul_crystal_10,1);
}
}
}
it give me:
class rabbit : warrior_flee
handler 10 // MY_DYING
variable_begin
"c1"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
push_event // c1
push_const 260
add
push_reg_sp
fetch_i
shift_sp 1
func_call 61 // func[GetLastAttacker]
assign
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4629
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L1
L0
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4629
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4630
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4630
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L3
L2
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4630
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4631
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L3
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4631
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L5
L4
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4631
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4632
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L5
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4632
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L7
L6
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4632
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4633
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L7
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4633
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L9
L8
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4633
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4634
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L9
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4634
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L11
L10
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4634
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4635
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L11
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4635
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L13
L12
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4635
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4636
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L13
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4636
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L15
L14
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4636
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4637
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L15
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4637
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L17
L16
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4637
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4638
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L17
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4638
func_call 59 // func[OwnItemCount]
shift_sp -2
push_const 1
greater_equal
branch_false L19
L18
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4638
push_const 1
func_call 58 // func[DeleteItem1]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // c1
push_const 260
add
fetch_i
push_const 4639
push_const 1
func_call 55 // func[GiveItem1]
shift_sp -3
shift_sp -1
L19
handler_end
class_end
But that damned rabbit doesnt give me anything when i kill it :cry: