• 0
Sign in to follow this  
LearningRO

Spawn Monster And can be configuration

Question

Hi, All i want to spawn monster but all status include mdef/def/element can be configuration via NPC?

how to syncron between Monster and NPC for setting

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 1
1 hour ago, LearningRO said:

Hi, All i want to spawn monster but all status include mdef/def/element can be configuration via NPC?

how to syncron between Monster and NPC for setting

You can use "setunitdata" in your script when spawn monsters.
script_commands

Spoiler
*getunitdata <GID>,<arrayname>;
*setunitdata <GID>,<parameter>,<new value>;

This is used to get and set special data related to the unit.
With getunitdata, the array given will be filled with the current data. In setunitdata
the indexes in the array would be used to set that data on the unit.

Both getunitdata and setunitdata will return -1 if the given GID does not exist.

Note: When adjusting a unit's stat (STR, AGI, etc) the unit's respective statuses are
      recalculated (HIT, FLEE, etc) automatically. Keep in mind that some stats don't
	  affect a unit's status and will have to directly be modified.

Parameters (indexes) for monsters are:
	UMOB_SIZE
	UMOB_LEVEL
	UMOB_HP
	UMOB_MAXHP
	UMOB_MASTERAID
	UMOB_MAPID
	UMOB_X
	UMOB_Y
	UMOB_SPEED
	UMOB_MODE
	UMOB_AI
	UMOB_SCOPTION
	UMOB_SEX
	UMOB_CLASS
	UMOB_HAIRSTYLE
	UMOB_HAIRCOLOR
	UMOB_HEADBOTTOM
	UMOB_HEADMIDDLE
	UMOB_HEADTOP
	UMOB_CLOTHCOLOR
	UMOB_SHIELD
	UMOB_WEAPON
	UMOB_LOOKDIR
	UMOB_CANMOVETICK
	UMOB_STR
	UMOB_AGI
	UMOB_VIT
	UMOB_INT
	UMOB_DEX
	UMOB_LUK
	UMOB_SLAVECPYMSTRMD
	UMOB_DMGIMMUNE
	UMOB_ATKRANGE
	UMOB_ATKMIN
	UMOB_ATKMAX
	UMOB_MATKMIN
	UMOB_MATKMAX
	UMOB_DEF
	UMOB_MDEF
	UMOB_HIT
	UMOB_FLEE
	UMOB_PDODGE
	UMOB_CRIT
	UMOB_RACE
	UMOB_ELETYPE
	UMOB_ELELEVEL
	UMOB_AMOTION
	UMOB_ADELAY
	UMOB_DMOTION
	UMOB_TARGETID

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

Loading...
Sign in to follow this