Jump to content
  • 0

Ai.obj - Editing One Specific Npc


Question

Posted (edited)

Hello,

 

The NPC: event_prv_collector teleports randomly around towns. I'd like to make him stop teleporting (as he is my choosen dude to be the event items seller at RMT.

 

I am trying to make this behaviour stop - so he doesn't leave the towns he visits (collectors event) and his RMT spawn that I added.

 

Event_prv_collect code:

 

Pastebin: http://pastebin.com/NmYL3mgg

 

class 0 event_prv_collect : citizenparameter_define_begin    int TelPosX1 0    int TelPosY1 0    int TelPosZ1 0    int TelPosX2 0    int TelPosY2 0    int TelPosZ2 0    int TelPosX3 0    int TelPosY3 0    int TelPosZ3 0    int TelPosX4 0    int TelPosY4 0    int TelPosZ4 0    int TelPosX5 0    int TelPosY5 0    int TelPosZ5 0    int TelPosX6 0    int TelPosY6 0    int TelPosZ6 0    int TelPosX7 0    int TelPosY7 0    int TelPosZ7 0    int TelPosX8 0    int TelPosY8 0    int TelPosZ8 0    int TelPosX9 0    int TelPosY9 0    int TelPosZ9 0    int TelPosX10 0    int TelPosY10 0    int TelPosZ10 0    int TelPosX11 0    int TelPosY11 0    int TelPosZ11 0    int TelPosX12 0    int TelPosY12 0    int TelPosZ12 0    int TelPosX13 0    int TelPosY13 0    int TelPosZ13 0    int TelPosX14 0    int TelPosY14 0    int TelPosZ14 0    int TelPosX15 0    int TelPosY15 0    int TelPosZ15 0    int TelPosX16 0    int TelPosY16 0    int TelPosZ16 0    int TelPosX17 0    int TelPosY17 0    int TelPosZ17 0parameter_define_endhandler 12 13    //  CREATED    variable_begin        "myself"        "_choiceN"        "_code"        "_from_choice"    variable_end    push_event    //  myself    push_const 784            //AddTimerEx    add    fetch_i            //AddTimerEx    push_const 1700            //unary->INTEGER_CONST    push_const 1000            //unary->INTEGER_CONST    push_const 60            //unary->INTEGER_CONST    mul    push_const 10            //unary->INTEGER_CONST    mul    func_call 235012139    //  func[AddTimerEx]    shift_sp -2    shift_sp -1handler_endhandler 11 509    //  TIMER_FIRED_EX    variable_begin        "timer_id"        "talker"        "i0"        "myself"        "_choiceN"        "_code"        "_from_choice"    variable_end    push_event    //  timer_id    push_const 244            //timer_id    add    fetch_i4    push_const 1700            //unary->INTEGER_CONST    equal    branch_false L27191L27190    push_event    //  i0    push_const 280            //i0    add    push_reg_sp    fetch_i            //expr =    push_event    //  gg    push_const 704            //Rand    add    fetch_i            //Rand    push_const 17            //unary->INTEGER_CONST    func_call 268500997    //  func[Rand]    shift_sp -1    assign    shift_sp -1    push_event    //  i0    push_const 280            //i0    add    fetch_i    push_reg_sp    fetch_i            //select_case compare    push_const 0            //select_case    equal    branch_false L27194L27193    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX1    push_parameter TelPosY1    push_parameter TelPosZ1    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27195L27194    push_reg_sp    fetch_i            //select_case compare    push_const 1            //select_case    equal    branch_false L27196L27195    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX2    push_parameter TelPosY2    push_parameter TelPosZ2    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27197L27196    push_reg_sp    fetch_i            //select_case compare    push_const 2            //select_case    equal    branch_false L27198L27197    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX3    push_parameter TelPosY3    push_parameter TelPosZ3    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27199L27198    push_reg_sp    fetch_i            //select_case compare    push_const 3            //select_case    equal    branch_false L27200L27199    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX4    push_parameter TelPosY4    push_parameter TelPosZ4    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27201L27200    push_reg_sp    fetch_i            //select_case compare    push_const 4            //select_case    equal    branch_false L27202L27201    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX5    push_parameter TelPosY5    push_parameter TelPosZ5    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27203L27202    push_reg_sp    fetch_i            //select_case compare    push_const 5            //select_case    equal    branch_false L27204L27203    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX6    push_parameter TelPosY6    push_parameter TelPosZ6    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27205L27204    push_reg_sp    fetch_i            //select_case compare    push_const 6            //select_case    equal    branch_false L27206L27205    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX7    push_parameter TelPosY7    push_parameter TelPosZ7    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27207L27206    push_reg_sp    fetch_i            //select_case compare    push_const 7            //select_case    equal    branch_false L27208L27207    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX8    push_parameter TelPosY8    push_parameter TelPosZ8    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27209L27208    push_reg_sp    fetch_i            //select_case compare    push_const 8            //select_case    equal    branch_false L27210L27209    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX9    push_parameter TelPosY9    push_parameter TelPosZ9    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27211L27210    push_reg_sp    fetch_i            //select_case compare    push_const 9            //select_case    equal    branch_false L27212L27211    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX10    push_parameter TelPosY10    push_parameter TelPosZ10    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27213L27212    push_reg_sp    fetch_i            //select_case compare    push_const 10            //select_case    equal    branch_false L27214L27213    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX11    push_parameter TelPosY11    push_parameter TelPosZ11    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27215L27214    push_reg_sp    fetch_i            //select_case compare    push_const 11            //select_case    equal    branch_false L27216L27215    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX12    push_parameter TelPosY12    push_parameter TelPosZ12    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27217L27216    push_reg_sp    fetch_i            //select_case compare    push_const 12            //select_case    equal    branch_false L27218L27217    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX13    push_parameter TelPosY13    push_parameter TelPosZ13    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27219L27218    push_reg_sp    fetch_i            //select_case compare    push_const 13            //select_case    equal    branch_false L27220L27219    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX14    push_parameter TelPosY14    push_parameter TelPosZ14    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27221L27220    push_reg_sp    fetch_i            //select_case compare    push_const 14            //select_case    equal    branch_false L27222L27221    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX15    push_parameter TelPosY15    push_parameter TelPosZ15    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27223L27222    push_reg_sp    fetch_i            //select_case compare    push_const 15            //select_case    equal    branch_false L27224L27223    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX16    push_parameter TelPosY16    push_parameter TelPosZ16    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27225L27224    push_reg_sp    fetch_i            //select_case compare    push_const 16            //select_case    equal    branch_false L27226L27225    push_event    //  myself    push_const 784            //InstantTeleport    add    fetch_i            //InstantTeleport    push_event    //  myself    push_const 784            //myself    add    fetch_i            //sm    push_const 408            //sm    add    fetch_i    push_parameter TelPosX17    push_parameter TelPosY17    push_parameter TelPosZ17    func_call 235143247    //  func[InstantTeleport]    shift_sp -4    shift_sp -1    jump L27192    jump L27227L27226L27227L27192    shift_sp -1    push_event    //  myself    push_const 784            //Shout    add    fetch_i            //Shout    push_event    //  gg    push_const 704            //MakeFString    add    fetch_i            //MakeFString    push_const 99601            //unary->INTEGER_CONSTS4680.    ""    push_string S4680S4681.    ""    push_string S4681S4682.    ""    push_string S4682S4683.    ""    push_string S4683S4684.    ""    push_string S4684    func_call 268828714    //  func[MakeFString]    shift_sp -6    func_call 234946627    //  func[Shout]    shift_sp -1    shift_sp -1    push_event    //  myself    push_const 784            //AddTimerEx    add    fetch_i            //AddTimerEx    push_const 1700            //unary->INTEGER_CONST    push_const 1000            //unary->INTEGER_CONST    push_const 60            //unary->INTEGER_CONST    mul    push_const 10            //unary->INTEGER_CONST    mul    func_call 235012139    //  func[AddTimerEx]    shift_sp -2    shift_sp -1L27191handler_endclass_end
Testing takes about 1hourish because you need to fully load the server + wait for the NPC to leave the spot - that's why I am asking for help. Do you think removing the Lines between parameter_define_begin and end ( every TelPos line) would make that behavior stop or he would simply disappear?

Do you see something else that may make this stop (like a value that's being trigged that I can't see, so that I'd modify it to 99999999) or have any idea for one NPC to be my "event items multisell shop" on RMT?

 

Thanks.

 

edit:

 

maybe change his AI to default_npc would make it work?

 

class 0 event_prv_collector : event_prv_collect

class_end

 

to:

 

class 0 event_prv_collector : default_npc

class_end

 

?

Edited by ericvini

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

remove the created handler that starts the timers and done.

 

or remove all ai code and do:

 

class 0 event_prv_collect : citizen

class_end

Edited by mcbigmac

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...