View Single Post
Old 14.09.2005, 04:36   #13
Kenster
Архивный участник
 
Join Date: Sep 2005
Posts: 455
Default

Ok, it is my time to give back to the community. Starting to get the hang of this.

arena_director001.htm
Code:
<html><head><body>Arena Director:
Play the game according to the rules! The loser should be silent! What? Unfair? Then, why don't you hold your 
tongue and give it another try!


<a action="bypass -h menu_select?ask=-1&reply=0">
HP Recovery: consumption of 100 adena</a>

<a action="bypass -h menu_select?ask=-1&reply=1">Open door</a>
</body></head></html>
That was missing the closing </head> tag.

doordata.txt
Code:
door_begin  [aden_coliseum_outer_001]    type=normal_type static_object_id=24190001 open_method=by_npc pos={147086;46721;-3408} range={{146986;46621;-3408};{147186;46621;-3408};{147186;46821;-3408};{146986;46821;-3408}} height=500 hp=147086 physical_defence=644 magical_defence=518 level=3 close_time=300 door_end 
door_begin  [aden_coliseum_inner_001]    type=normal_type static_object_id=24190002 open_method=by_npc pos={148045;46721;-3408} range={{147945;46621;-3408};{148145;46621;-3408};{149045;46821;-3408};{147945;46821;-3408}} height=500 hp=148045 physical_defence=644 magical_defence=518 level=3 close_time=300 door_end 
door_begin  [aden_coliseum_outer_002]    type=normal_type static_object_id=24190004 open_method=by_npc pos={151911;46721;-3408} range={{151811;46621;-3408};{152011;46621;-3408};{152011;46821;-3408};{151811;46821;-3408}} height=500 hp=151911 physical_defence=644 magical_defence=518 level=3 close_time=300 door_end 
door_begin  [aden_coliseum_inner_002]    type=normal_type static_object_id=24190003 open_method=by_npc pos={150951;46721;-3408} range={{150801;46521;-3408};{151201;46521;-3408};{151201;46921;-3408};{150801;46921;-3408}} height=500 hp=150951 physical_defence=644 magical_defence=518 level=3 close_time=300 door_end
Has many spelling errors, which on compile, would fail.


ai.obj
Code:
class arena_director : citizen    //collseum addon
parameter_define_begin 
   float UseSkill_DecayRatio 660xx.xx0000 
   float UseSkill_BoostValue 1000xx.xx0000 
   string door1 "aden_coliseum_outer_001" 
   string door2 "aden_coliseum_outer_002" 
   string door3 "aden_coliseum_inner_001" 
   string door4 "aden_coliseum_inner_002" 
parameter_define_end 
handler 13   //  CREATED 
   variable_begin 
      "myself" 
      "_choiceN" 
      "_code" 
      "_from_choice" 
   variable_end 

   shift_sp 1 
S8899.   "aden_coliseum_outer_001" 
   push_string S8899 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
   shift_sp 1 
S8900.   "aden_coliseum_outer_002" 
   push_string S8900 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
   shift_sp 1 
S8901.   "aden_coliseum_inner_001" 
   push_string S8901 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
   shift_sp 1 
S8902.   "aden_coliseum_inner_002" 
   push_string S8902 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
handler_end 

handler 32   // MENU_SELECTED 
   variable_begin 
      "talker" 
      "ask" 
      "reply" 
      "myself" 
      "_choiceN" 
      "_code" 
      "_from_choice" 
   variable_end 

   push_event   //  ask 
   push_const 100 
   add 
   fetch_i 
   push_const 1 
   negate 
   equal 
   push_reg_sp 
   fetch_i 
   branch_false L41934 
   push_event   //  reply 
   push_const 104 
   add 
   fetch_i 
   push_const 0 
   equal 
   and 
L41934 
   branch_false L41938 
L41935 
   shift_sp 1 
   push_event   //  talker 
   push_const 32 
   add 
   fetch_i 
   push_const 57 
   func_call 81   //  func[OwnItemCount] 
   shift_sp -2 
   push_const 100 
   greater_equal 
   branch_false L41937 
L41936 
   shift_sp 1 
   push_event   //  talker 
   push_const 32 
   add 
   fetch_i 
   push_const 57 
   push_const 100 
   func_call 80   //  func[DeleteItem1] 
   shift_sp -3 
   shift_sp -1 
   shift_sp 1 
   push_event   //  talker 
   push_const 32 
   add 
   fetch_i 
   push_const 1121281 
   push_const 1 
   push_const 0 
   push_const 1000000 
   func_call 10   //  func[AddUseSkillDesire] 
   shift_sp -5 
   shift_sp -1 
L41937 
   shift_sp 1 
   push_event   //  talker 
   push_const 32 
   add 
   fetch_i 
   push_parameter fnHi 
   func_call 43   //  func[ShowPage] 
   shift_sp -2 
   shift_sp -1 
   jump L41942 
L41938 
   push_event   //  ask 
   push_const 100 
   add 
   fetch_i 
   push_const 1 
   negate 
   equal 
   push_reg_sp 
   fetch_i 
   branch_false L41939 
   push_event   //  reply 
   push_const 104 
   add 
   fetch_i 
   push_const 1 
   equal 
   and 
L41939 
   branch_false L41941 
L41940 
   shift_sp 1 
   push_parameter door1 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
   shift_sp 1 
   push_parameter door2 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
   shift_sp 1 
   push_parameter door3 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
   shift_sp 1 
   push_parameter door4 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
   shift_sp 1 
   push_event   //  talker 
   push_const 32 
   add 
   fetch_i 
   push_parameter fnHi 
   func_call 43   //  func[ShowPage] 
   shift_sp -2 
   shift_sp -1 
L41941 
L41942 
handler_end 

handler 5   //  SEE_CREATURE 
   variable_begin 
      "creature" 
      "myself" 
      "_choiceN" 
      "_code" 
      "_from_choice" 
   variable_end 

   shift_sp 1 
S8903.   "aden_coliseum_outer_001" 
   push_string S8903 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
   shift_sp 1 
S8904.   "aden_coliseum_outer_002" 
   push_string S8904 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
   shift_sp 1 
S8905.   "aden_coliseum_inner_001" 
   push_string S8905 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
   shift_sp 1 
S8906.   "aden_coliseum_inner_001" 
   push_string S8906 
   push_const 0 
   func_call 125   //  func[Castle_GateOpenClose2] 
   shift_sp -2 
   shift_sp -1 
handler_end 

class_end
Again, more spelling errors. Fixed. > I am still unable to get the bunny out, because I can't figure out how to encrypt "npcgrp" to .dat (I have the txt of it. Any help, would be great. Also, if you used this code, I have edited the ai. No errors report now.



**UPDATED AGAIN!!***
Kenster is offline