Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Help

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 01.12.2005, 17:36   #2
kvoxi
Архивный участник
 
Join Date: Oct 2005
Posts: 102
Default

Try this
Code:
handler 10   //  MY_DYING 
   variable_begin 
      "c1" 
      "myself" 
      "_choiceN" 
      "_code" 
      "_from_choice" 
   variable_end 

   push_event   //  c1 
   push_const 276 
   add 
   push_reg_sp 
   fetch_i 
   shift_sp 1 
   func_call 83   //  func[GetLastAttacker] 
   assign 
   shift_sp -1 

   shift_sp 1 
   push_event   //  c1 
   push_const 276 
   add 
   fetch_i 
   push_const 4629 
   func_call 81   //  func[OwnItemCount] 
   shift_sp -2 
   push_const 0 
   equal 
   branch_false L<N>

   shift_sp 1 
   push_event   //  c1 
   push_const 276 
   add 
   fetch_i 
   push_const 4630 
   push_const 1 
   func_call 77   //  func[GiveItem1] 
   shift_sp -3 
   shift_sp -1 

   shift_sp 1 
   push_event   //  c1 
   push_const 276 
   add 
   fetch_i 
   push_const 4629 
   push_const 1 
   func_call 80   //  func[DeleteItem1] 
   shift_sp -3 
   shift_sp -1 
L<N>
   call_super 
handler_end
L<N> - must be unique
If u kill many mobs simultaneously, OwnItemCount() will return the items amount to all mobs handler. If mobs count > items count, then ur AI code will try to delete an nonexistent item => error. IMHO
To check the OwnItemCount(), DeleteItem1() func`s work, try this:
...
c1=GetLastAttacker();
SayInt(OwnItemCount(c1));
DeleteItem1(c1,...);
SayInt(OwnItemCount(c1));
...
U should get the same value after both SayInt(OwnItemCount(c1)) functions execution.
IMHO, CacheD.exe
kvoxi is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:44.