johnbond Posted January 27, 2015 Posted January 27, 2015 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. Quote
Capuche Posted March 16, 2015 Posted March 16, 2015 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); 1 Quote
karazu Posted January 27, 2015 Posted January 27, 2015 Make them Teleport away if they are being thorn trapped. Quote
johnbond Posted January 27, 2015 Author Posted January 27, 2015 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. Quote
johnbond Posted January 30, 2015 Author Posted January 30, 2015 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. Quote
karazu Posted January 30, 2015 Posted January 30, 2015 Are u trying to make a Practice area? or a Punching Bag Monster? Quote
johnbond Posted January 30, 2015 Author Posted January 30, 2015 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. Quote
karazu Posted January 30, 2015 Posted January 30, 2015 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 Quote
johnbond Posted February 5, 2015 Author Posted February 5, 2015 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! Quote
johnbond Posted February 6, 2015 Author Posted February 6, 2015 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. Quote
Capuche Posted February 27, 2015 Posted February 27, 2015 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 1 Quote
johnbond Posted February 27, 2015 Author Posted February 27, 2015 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? Quote
johnbond Posted March 10, 2015 Author Posted March 10, 2015 (edited) 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 March 16, 2015 by johnbond Quote
johnbond Posted March 16, 2015 Author Posted March 16, 2015 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. Quote
Capuche Posted March 16, 2015 Posted March 16, 2015 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 Quote
johnbond Posted March 16, 2015 Author Posted March 16, 2015 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. Quote
johnbond Posted March 21, 2015 Author Posted March 21, 2015 Thank you Sir Capuche for the help in PM. You are very awesome! Good to close. Quote
Question
johnbond
Is there a way that a boss or plant type mob cannot be "trapped" by thorn trap skill?
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.
18 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.