luizragna 41 Posted May 14, 2018 Hello everyone, How do I make this unit invincible? universe,19,40,4 script Huena#OP 1_F_MARIA,{ set .@amount,1; for (.@i = 0; .@i < .@amount; .@i++) { .mobGID = monster ("universe",20,36,"[Teste] Puto",1004,1); setunitdata .mobGID,UDT_LEVEL,7; setunitdata .mobGID,UDT_MAXHP,10; setunitdata .mobGID,UDT_HP,10; } Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted May 16, 2018 https://rathena.org/board/topic/115702-how-i-do-make-a-invencible-mob/ unfortunately, hercules doesn't have the script command to make monster immune ... although I have a better idea on how to do this ...but I have to say currently hercules mob controller system is f*ck up better fix existing one 1st before moving on implement new stuffs Quote Share this post Link to post Share on other sites
0 bWolfie 138 Posted May 16, 2018 i cant think of a way to make an individual mob invincible, but you could make a mapflag for mob's not receiving damage Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted May 17, 2018 (edited) On 5/16/2018 at 11:21 PM, luizragna said: In case, I can not attack mob. I want to attack mob and he gets 0 damage. let's see ... #include "common/hercules.h" #include "map/pc.h" #include "map/mob.h" #include "map/battle.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "Poring invincible", SERVER_TYPE_MAP, "0_0", HPM_VERSION, }; int64 battle_calc_damage_pre(struct block_list **src,struct block_list **bl,struct Damage **d,int64 *damage,uint16 *skill_id,uint16 *skill_lv) { struct block_list *s_bl = *src; if ( (s_bl = battle->get_master(*src)) == NULL ) { s_bl = *src; } if ( s_bl->type == BL_PC && (*bl)->type == BL_MOB ) { TBL_PC *sd = BL_CAST( BL_PC, s_bl ); TBL_MOB *md = BL_CAST( BL_MOB, *bl ); if ( !strcmp( mapindex_id2name(sd->mapindex), "prontera" ) && md->class_ == 1002 ) { hookStop(); return 0; } } return 0; } HPExport void plugin_init (void) { addHookPre( battle, calc_damage, battle_calc_damage_pre ); } still can agi down the mob ... etc lazy to do the rest EDIT: some other answers on rathena forum ... NPC_INVINCIBlE = SC_INVINCIBLE .... means dealing 1 damage .... not 0 damage though EDIT2: change BL_UCAST into BL_CAST BL_UCAST should be only use in iteration Edited June 4, 2018 by AnnieRuru Quote Share this post Link to post Share on other sites
0 luizragna 41 Posted May 19, 2018 On 16/05/2018 at 9:56 PM, AnnieRuru said: let's see ... #include "common/hercules.h" #include "map/pc.h" #include "map/mob.h" #include "map/battle.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "Poring invincible", SERVER_TYPE_MAP, "0_0", HPM_VERSION, }; int64 battle_calc_damage_pre(struct block_list **src,struct block_list **bl,struct Damage **d,int64 *damage,uint16 *skill_id,uint16 *skill_lv) { struct block_list *s_bl = *src; if ( (s_bl = battle->get_master(*src)) == NULL ) { s_bl = *src; } if ( s_bl->type == BL_PC && (*bl)->type == BL_MOB ) { TBL_PC *sd = BL_UCAST( BL_PC, s_bl ); TBL_MOB *md = BL_UCAST( BL_MOB, *bl ); if ( !strcmp( mapindex_id2name(sd->mapindex), "prontera" ) && md->class_ == 1002 ) { hookStop(); return 0; } } return 0; } HPExport void plugin_init (void) { addHookPre( battle, calc_damage, battle_calc_damage_pre ); } still can agi down the mob ... etc lazy to do the rest EDIT: some other answers on rathena forum ... NPC_INVINCIBlE = SC_INVINCIBLE .... means dealing 1 damage .... not 0 damage though It's a plugin? What i do after add this plugin? Quote Share this post Link to post Share on other sites
Hello everyone, How do I make this unit invincible?
Share this post
Link to post
Share on other sites