Difference between revisions of "Npc talk pl V3"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
(Created page with "==Syntax== ''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:red'>npc_talk_pl_v3</span> ''Register1''</span> * ''Register1'' = Start of continuo...")
 
Line 17: Line 17:
 
7th register = NPC Template (0 - 63 in decimal, look in someusefulinfo.zip)
 
7th register = NPC Template (0 - 63 in decimal, look in someusefulinfo.zip)
  
7th register = Player slot. (0-3, takes any open slot)
+
8th register = Player slot. (0-3, takes any open slot)
  
  
Line 33: Line 33:
 
  <span style='color:green'>        leti </span>R4, 00000032 <span style='color:orange'>//Makes register 4 equal 50. (Rotation of spawned npc.)</span>
 
  <span style='color:green'>        leti </span>R4, 00000032 <span style='color:orange'>//Makes register 4 equal 50. (Rotation of spawned npc.)</span>
 
  <span style='color:green'>        leti </span>R5, 000000B4 <span style='color:orange'>//Makes register 5 equal 180. (Rotation of spawned npc.)</span>
 
  <span style='color:green'>        leti </span>R5, 000000B4 <span style='color:orange'>//Makes register 5 equal 180. (Rotation of spawned npc.)</span>
  <span style='color:green'>        leti </span>R6, 00000000 <span style='color:orange'>//Makes register 5 equal 0. (Is npc dead flag set to 00000000 for alive, 00000001 for dead and lying on the ground.)</span>
+
  <span style='color:green'>        leti </span>R6, 00000000 <span style='color:orange'>//Makes register 6 equal 0. (Is npc dead flag set to 00000000 for alive, 00000001 for dead and lying on the ground.)</span>
  <span style='color:green'>        leti </span>R7, 00000011 <span style='color:orange'>//Makes register 6 equal 17. (Preset npc number. Determines what the npc will have equipped, level, and type. 00000011 is MONTAGUE)</span>
+
  <span style='color:green'>        leti </span>R7, 00000011 <span style='color:orange'>//Makes register 7 equal 17. (Preset npc number. Determines what the npc will have equipped, level, and type. 00000011 is MONTAGUE)</span>
  <span style='color:green'>        leti </span>R8, 00000001 <span style='color:orange'>//Makes register 7 equal 1. (The slot id to give the npc.)</span>
+
  <span style='color:green'>        leti </span>R8, 00000001 <span style='color:orange'>//Makes register 8 equal 1. (The slot id to give the npc.)</span>
 
  <span style='color:red'>        npc_talk_pl_V3 </span>R1 <span style='color:orange'>//Loads the npc with the leti arguments listed above. When you walk within 50 units of its spawn point, the NPC will appear and disappear outside it.</span>
 
  <span style='color:red'>        npc_talk_pl_V3 </span>R1 <span style='color:orange'>//Loads the npc with the leti arguments listed above. When you walk within 50 units of its spawn point, the NPC will appear and disappear outside it.</span>
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>

Revision as of 05:59, 27 March 2022

Syntax

Syntax: npc_talk_pl_v3 Register1

  • Register1 = Start of continuous 8 Registers

1st register = Position X (decimal)

2nd register = Position Y (decimal)

3rd register = Position Z (decimal)

4th register = Spawn Radius (decimal)

5th register = Rotation of NPC (decimal)

6th register = State (0 is alive, 1 is dead, 2 is Invisible Named Text Box)

7th register = NPC Template (0 - 63 in decimal, look in someusefulinfo.zip)

8th register = Player slot. (0-3, takes any open slot)


Use

Used to create an NPC occupying a character slot. They will spawn/burst in when within the coordinates' radius value, disappear when outside it, and will have the appropriate colored text box for their slot.

NOTE: Though this OPCode does not overwrite the Player Character's data, it is still highly recommended to put failsafes and checks to prevent spawning an NPC with multiple players.

Example


100:     leti R1, 00000208 //Makes register 1 equal 520. (X position of where the npc will spawn.)
         leti R2, 00000000 //Makes register 2 equal 520. (Y position of where the npc will spawn.).
         leti R3, 00000022 //Makes register 3 equal 34. (Z position of where the npc will spawn.)
         leti R4, 00000032 //Makes register 4 equal 50. (Rotation of spawned npc.)
         leti R5, 000000B4 //Makes register 5 equal 180. (Rotation of spawned npc.)
         leti R6, 00000000 //Makes register 6 equal 0. (Is npc dead flag set to 00000000 for alive, 00000001 for dead and lying on the ground.)
         leti R7, 00000011 //Makes register 7 equal 17. (Preset npc number. Determines what the npc will have equipped, level, and type. 00000011 is MONTAGUE)
         leti R8, 00000001 //Makes register 8 equal 1. (The slot id to give the npc.)
         npc_talk_pl_V3 R1 //Loads the npc with the leti arguments listed above. When you walk within 50 units of its spawn point, the NPC will appear and disappear outside it.
         ret 

Also see

load_npc_data, get_npc_data, leti,

npc_crp_id_V3, npc_stop, ret,

npc_play, npc_kill, HEX: