Jump to content
  • 0

How do I make "boss type" not to be thorn trapped?


johnbond

Question


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Is there a way that a boss or plant type mob cannot be "trapped" by thorn trap skill?
 

2479,6,6,2,0,0x1,0,5,1,yes,0,0x80,0,misc,0,	GN_THORNS_TRAP,Thorn Trap

Because I have this custom mob that is boss & plant type which I do not want the thorn trap skill of genetics to be able to trap it.

 

Is there a way for this either by mob_db or code editing on SRC?

 

Kindly somebody share me enlightenment on the matter. Any input is welcome and is appreciated.

 

Thank you guys. :)

 

 

 

 

 

 

Link to comment
Share on other sites

18 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

case UNT_THORNS_TRAP:

is a part of a big switch( )

just put before the switch

struct mob_data *md = BL_CAST(BL_MOB, bl);
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

Make them Teleport away if they are being thorn trapped. 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Make them Teleport away if they are being thorn trapped. 

 

No but, the mob behaves like the emperium, it does not move and does not skill. Every other skill applied to it misses except this thorn trap.

 

Players use thorn trap to move the custom mob 1 cell at a time to a location they want, so it is best if this mob cannot be thorn trapped. The mob is set as boss and plant type.

 

Thanks.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Follow up anyone?

 

I think this should be a SRC edit so that thorn trap cannot affect boss or plant type monsters (or skill fail). Can anyone show me how to make this happen in SRC?

 

Thank you guys. :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

Are u trying to make a Practice area? or a Punching Bag Monster? 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Are u trying to make a Practice area? or a Punching Bag Monster? 

 

 

Actually it is an event mob. 1 damage only, cannot move and no skill can affect it like emperium. But the problem is the thorn trap can make it move when the skill traps the mob 1 cell at a time so I want it not to be able to be trapped like emperium.

 

Thanks.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

 

Are u trying to make a Practice area? or a Punching Bag Monster? 

 

 

Actually it is an event mob. 1 damage only, cannot move and no skill can affect it like emperium. But the problem is the thorn trap can make it move when the skill traps the mob 1 cell at a time so I want it not to be able to be trapped like emperium.

 

Thanks.

 

Please try this one, test thorn trap on it if they can move it.. 

MONSTER ID,TESTMONSTER,TESTMONSTER,TESTMONSTER,98,999999999,1,0,0,1,0,0,0,0,1,17,1,80,126,20,10,12,2,7,80,0x120,300,1288,288,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,00,0,0,0

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

 

 

Are u trying to make a Practice area? or a Punching Bag Monster? 

 

 

Actually it is an event mob. 1 damage only, cannot move and no skill can affect it like emperium. But the problem is the thorn trap can make it move when the skill traps the mob 1 cell at a time so I want it not to be able to be trapped like emperium.

 

Thanks.

 

Please try this one, test thorn trap on it if they can move it.. 

MONSTER ID,TESTMONSTER,TESTMONSTER,TESTMONSTER,98,999999999,1,0,0,1,0,0,0,0,1,17,1,80,126,20,10,12,2,7,80,0x120,300,1288,288,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,00,0,0,0

 

 

 

Can you explain what was added in this mob_db? So I can also put it in my custom mod mob_db.

 

Thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

 

Please try this one, test thorn trap on it if they can move it.. 

MONSTER ID,TESTMONSTER,TESTMONSTER,TESTMONSTER,98,999999999,1,0,0,1,0,0,0,0,1,17,1,80,126,20,10,12,2,7,80,0x120,300,1288,288,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,00,0,0,0

 

 

 

Anyway, I tried this new mobdb but unfortunately the custom mob can still be trapped and is moved 1 cell at a time everytime the thorn trap traps it. It's like it is sucked in by the thorn trap making it move 1 cell everytime.

 

Anyone?

 

Thanks.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Anyone?

 

Thank you guys. :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Please help guys. :)

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Maybe add something like

			if (status_get_mode(bl)&MD_BOSS)
				break; // This skill doesn't affect to Boss monsters

or

if (((TBL_MOB*)bl)->mob_id == <your mob id>)
	break;

under

case UNT_THORNS_TRAP:

in skill.c. I'm a newbie in c btw

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Maybe add something like

			if (status_get_mode(bl)&MD_BOSS)
				break; // This skill doesn't affect to Boss monsters

or

if (((TBL_MOB*)bl)->mob_id == <your mob id>)
	break;

under

case UNT_THORNS_TRAP:

in skill.c. I'm a newbie in c btw

 

 

is this correct guys?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Maybe add something like

			if (status_get_mode(bl)&MD_BOSS)
				break; // This skill doesn't affect to Boss monsters

or

if (((TBL_MOB*)bl)->mob_id == <your mob id>)
	break;

under

case UNT_THORNS_TRAP:

in skill.c. I'm a newbie in c btw

 

 

Thank you.

Edited by johnbond
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Sir I used this code you gave:
 

if (status_get_mode(bl)&MD_BOSS)
				break; // This skill doesn't affect to Boss monsters

And it is working. But now the problem is players complain since all boss cant be thorn trapped anymore hehe.

 

May I ask for a code so that the MOBID 1845 is the only only affected by this mod? I mean only the 1845 mob will not be affected by Thorn Traps.

 

 

I tried to use the other code you gave:

 

if (((TBL_MOB*)bl)->mob_id == <your mob id>)
    break;

But it gave me a lot of errors in recompile.

 

 

Thank you.
 

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Try

struct mob_data *md = BL_CAST(BL_MOB, bl);
if (md && md->mob_id == <mobid>)// replace by your mobid
	break;

if you get a warning on md, insert the struct before the switch

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Try

struct mob_data *md = BL_CAST(BL_MOB, bl);
if (md && md->mob_id == <mobid>)// replace by your mobid
	break;

if you get a warning on md, insert the struct before the switch

 

 

I got an error on the recompile:

3>..\src\map\skill.c(11386) : error C2143: syntax error : missing ';' before 'type'

3>..\src\map\skill.c(11387) : error C2065: 'md' : undeclared identifier

5>int_pet.c

3>..\src\map\skill.c(11387) : error C2065: 'md' : undeclared identifier

3>..\src\map\skill.c(11387) : error C2223: left of '->mob_id' must point to struct/union

 

 

What do you mean by insert the struct before the switch? Kindly elaborate coz I am new with SRC hehe.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  457
  • Reputation:   11
  • Joined:  02/17/13
  • Last Seen:  

Thank you Sir Capuche for the help in PM.

 

You are very awesome! :D

 

Good to close.

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...