Load npc data

From Unofficial QEdit Wiki Guide
Jump to: navigation, search


Syntax: load_npc_data

  • None


Used to allow the loading of custom npc data.


100:     load_npc_data  //Allows the loading of custom npc data.
         get_npc_data 103 //Creates the npc hex data from the npc you make in the gui and stores the data in function 103.
         leti R1, 0000009E //Makes register 1 equal 0000009E. (X position of where the npc will spawn.)
         leti R2, 00000000 //Makes register 2 equal 00000000. (Y position of where the npc will spawn.).
         leti R3, 000000E4 //Makes register 3 equal 000000E4. (Z position of where the npc will spawn.)
         leti R4, 0000278E //Makes register 4 equal 0000278E. (Rotation of spawned npc.)
         leti R5, 00000000 //Makes register 5 equal 00000000. (Is npc dead flag set to 00000000 for alive, 00000001 for dead and lying on the ground.)
         leti R6, 00000001 //Makes register 6 equal 00000001. (The slot id to give the npc.)
         leti R7, 00000011 //Makes register 7 equal 00000011. (Preset npc number. Determines what the npc will have equipped, level, and type. 00000011 is MONTAGUE)
         npc_crp_id_V3 R1 //Loads the npc with the leti arguments listed above.
         npc_stop 00000001 //Used to prevent the npc from following you.
101:     npc_play 00000000 //Call function 101 to make the npc follow and fight with you.
102:     npc_kill 00000001 //Call function 102 to make the npc leave the party and disappear.
103:     HEX: Bytes of data. //The npc's data is stored in this function. Unless you know what you are changing leave this function alone.

Also see

load_npc_data, get_npc_data, leti,

npc_crp_id_V3, npc_stop, ret,

npc_play, npc_kill, HEX: