Jump to content
  • 0

Specific Weapon


Doye Ra

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  06/05/20
  • Last Seen:  

Hello,

I've made a costume monster and added the command line
setunitdata UMOB_DMGIMMUNE,1;
is there anyway i can disable the monsters immunity to a specific weapon.
lets say MVP X can only be hit by Weapon called Z, how would i go into that ?
at the same time i don't want it to disable it's immunity, so if a normal weapon and Z weapon is attacking at the same time,
the normal weapon will still deal 0 damage but the Z weapon would deal damage.
or is there any other way ?

any hint is appreciated.

Thanks,

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2357
  • Joined:  10/28/11
  • Last Seen:  

there are some trick you can try if you dont have any available src mod to support it yet.

  - Id: 1203
    AegisName: Knife__
    Script: |
      donpcevent "Sample::OnAttack";
-	script	Sample	-1,{
OnAttack:
	.@gid = <MONSTER_GID>; // SET YOUR MONSTER GID HERE
	if (!unitexists(.@gid)) end;
	getunitdata .@gid, .@data;
	
	if (.@data[UMOB_HP] <= 1000) {
		unitkill .@gid;
		end;
	}
	
	setunitdata .@gid, UMOB_HP, (.@data[UMOB_HP] - 1000);
	end;
}

every attack shall reduce the monster HP by 1000.

use at your own risk, script like these may cause performance issues, or max event queues, etc.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  06/05/20
  • Last Seen:  

On 4/25/2023 at 1:51 PM, Emistry said:

there are some trick you can try if you dont have any available src mod to support it yet.

  - Id: 1203
    AegisName: Knife__
    Script: |
      donpcevent "Sample::OnAttack";
-	script	Sample	-1,{
OnAttack:
	.@gid = <MONSTER_GID>; // SET YOUR MONSTER GID HERE
	if (!unitexists(.@gid)) end;
	getunitdata .@gid, .@data;
	
	if (.@data[UMOB_HP] <= 1000) {
		unitkill .@gid;
		end;
	}
	
	setunitdata .@gid, UMOB_HP, (.@data[UMOB_HP] - 1000);
	end;
}

every attack shall reduce the monster HP by 1000.

use at your own risk, script like these may cause performance issues, or max event queues, etc.

thx

Link to comment
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.

×
×
  • Create New...