View Single Post
Old 15.09.2005, 16:00   #32
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by SoaPy
HF dont tested if it work but i think the code for teleport has to be like this

Code:
...
	push_const 19090
  negate
	push_const 13500
	push_const 4816
  negate
...
Both of a variant work. Only you on 2 lines have more.
But I have already thought, that it will be better to optimize a code and will be one class for all GK:

Code:
class ziggurat_gate_keeper : instant_teleporter 
// Dark Omen Catacomb - Ziggurat Gate Keeper (Enter) 
parameter_define_begin
        int zgk_x1 0
        int zgk_y1 0
        int zgk_z1 0
parameter_define_end
handler 28   //  TELEPORT_REQUESTED 
   variable_begin 
      "talker" 
      "i6" 
      "myself" 
      "_choiceN" 
      "_code" 
      "_from_choice" 
   variable_end 

   shift_sp 1 
   push_event   //  talker 
   push_const 32 
   add 
   fetch_i 
   push_parameter zgk_x1
   push_parameter zgk_y1
   push_parameter zgk_z1
   func_call 46   //  func[InstantTeleport] 
   shift_sp -4 
   shift_sp -1 
handler_end 

class_end
And change npcdata for all npc's, sure.

torune the good developer, but all proffesions are necessary in the world. And not just presidents of the country
HF is offline