Difference between revisions of "Get chara class"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
(Syntax)
(Example)
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
==Class values==
 
==Class values==
  
Humar 00000000
+
Returned value 1:
  
Huney 00000001
+
Human : 00
  
Hucast 00000002
+
Newman : 01
  
Hucassy 00000002
+
Cast : 02
  
Ramar 00000000
+
Returned Value 2:
  
Ramarl 00000000
+
Hunter: 00
  
Racast 00000002
+
Ranger : 01
  
Racassy 00000002
+
Force : 02
 
+
Fomar 00000000
+
 
+
Fomarl 00000000
+
 
+
Fonewman 00000001
+
 
+
Foney 00000001
+
 
+
mar/marl = 00000000
+
 
+
newman/neweral = 00000001
+
 
+
cast/castel = 00000002
+
  
 
==Use==
 
==Use==
Line 46: Line 32:
 
  <span style='font-size:12px;font-family:courier'>
 
  <span style='font-size:12px;font-family:courier'>
 
  <span style='color:blue'>100:    </span><span style='color:green'>get_slotnumber </span>R250 <span style='color:orange'>//Stores the value of the slot the player is in in register 250.</span>
 
  <span style='color:blue'>100:    </span><span style='color:green'>get_slotnumber </span>R250 <span style='color:orange'>//Stores the value of the slot the player is in in register 250.</span>
  <span style='color:blue'>        get_chara_class </span>R250, R1 <span style='color:orange'>//Stores the characters class of the players in register 1.</span>
+
  <span style='color:blue'>        get_chara_class </span>R250, R1 <span style='color:orange'>//Stores the characters' race in register 1 and class type in register 2.</span>
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>
 
  </span>
 
  </span>

Latest revision as of 23:13, 22 May 2014

Syntax

Syntax: get_chara_class register 1, register 2

  • register 1 = Reserved register 250 to get the players slot number.
  • register 2 = Register to store characters class in.

NOTE: This Opcode returns 2 values. The 2nd register used will be the next register to the register specified for register 2

Class values

Returned value 1:

Human : 00

Newman : 01

Cast : 02

Returned Value 2:

Hunter: 00

Ranger : 01

Force : 02

Use

Used to store the characters class of the players in a register. For example you could make an npc say different things depending on what class the character is playing as with the appropriate jumps.

Example


100:     get_slotnumber R250 //Stores the value of the slot the player is in in register 250.
         get_chara_class R250, R1 //Stores the characters' race in register 1 and class type in register 2.
         ret 

Also see

get_slotnumber, ret, reservedregisters