Petey Pablo 0 Posted September 16, 2016 Please help me to make compatible for Hercules this Punching Bag is from rA. Thank you guys! //===== rAthena Script ============================================= //= Punching Bag NPC //===== By: ======================================================== //= Secretdataz //===== Current Version: =========================================== //= 0.2 //===== Changelog: ================================================= //= 0.1 Initial commit //= 0.2 Add MD_KNOCKBACK_IMMUNE //===== Compatible With: =========================================== //= rAthena Project //===== Additional Comments: ======================================= //= When duplicating this NPC. Only use NUMBER after the # [secret] //================================================================== prontera,224,79,0 script PunchingBag#0 CLEAR_NPC,{ end; OnMyMobDead: OnInit: getunitdata(getnpcid(0), .@d); monster strnpcinfo(4),.@d[UNPC_X],.@d[UNPC_Y],"Punching Bag",2411,1,strnpcinfo(0)+"::OnMyMobDead"; .@dupid = atoi(strnpcinfo(2)); .gid[.@dupid] = $@mobid[0]; .mhp[.@dupid] = strmobinfo(4,2411); setunitdata .gid[.@dupid],UMOB_MODE,.@d[UMOB_MODE]|0x4000000|0x0200000; // Set MD_STATUS_IMMUNE (0x4000000) because EDP/burn/%MHP based status can skew the DPS counter so much. initnpctimer; end; OnTimer5000: .@dupid = atoi(strnpcinfo(2)); if(unitexists(.gid[.@dupid])){ getunitdata(.gid[.@dupid],.@d); .@diff = (.mhp[.@dupid] - .@d[UMOB_HP]); if(.@diff > 0){ npctalk "Punching Bag : I've taken " + (.@diff/5) + " DPS in last 5 seconds."; setunitdata .gid[.@dupid],UMOB_HP,.mhp[.@dupid]; specialeffect EF_HEAL; } } initnpctimer; } prontera,216,79,0 duplicate(PunchingBag#0) PunchingBag#1 CLEAR_NPC prontera,224,70,0 duplicate(PunchingBag#0) PunchingBag#2 CLEAR_NPC prontera,216,58,0 duplicate(PunchingBag#0) PunchingBag#3 CLEAR_NPC prontera,224,58,0 duplicate(PunchingBag#0) PunchingBag#4 CLEAR_NPC Problem error [Error]: script error in file 'npc/PunchingBag.txt' line 20 column 2 parse_line: expect command, missing function name or calling undeclared func tion 17: 18: OnMyMobDead: 19: OnInit: * 20: getunitdata(getnpcid(0), .@d); ~~~~~~~~^ 21: monster strnpcinfo(4),.@d[UNPC_X],.@d[UNPC_Y],"Punching Bag",241 1,1,strnpcinfo(0)+"::OnMyMobDead"; 22: .@dupid = atoi(strnpcinfo(2)); 23: .gid[.@dupid] = $@mobid[0]; Quote Share this post Link to post Share on other sites
0 Asheraf 123 Posted September 16, 2016 the command getunitdata is not implemented in hercules you should add it check this link: http://herc.ws/board/topic/11097-setmobdata-getmobdata/ Quote Share this post Link to post Share on other sites
Please help me to make compatible for Hercules this Punching Bag is from rA. Thank you guys!
//===== rAthena Script ============================================= //= Punching Bag NPC //===== By: ======================================================== //= Secretdataz //===== Current Version: =========================================== //= 0.2 //===== Changelog: ================================================= //= 0.1 Initial commit //= 0.2 Add MD_KNOCKBACK_IMMUNE //===== Compatible With: =========================================== //= rAthena Project //===== Additional Comments: ======================================= //= When duplicating this NPC. Only use NUMBER after the # [secret] //================================================================== prontera,224,79,0 script PunchingBag#0 CLEAR_NPC,{ end; OnMyMobDead: OnInit: getunitdata(getnpcid(0), .@d); monster strnpcinfo(4),.@d[UNPC_X],.@d[UNPC_Y],"Punching Bag",2411,1,strnpcinfo(0)+"::OnMyMobDead"; .@dupid = atoi(strnpcinfo(2)); .gid[.@dupid] = $@mobid[0]; .mhp[.@dupid] = strmobinfo(4,2411); setunitdata .gid[.@dupid],UMOB_MODE,.@d[UMOB_MODE]|0x4000000|0x0200000; // Set MD_STATUS_IMMUNE (0x4000000) because EDP/burn/%MHP based status can skew the DPS counter so much. initnpctimer; end; OnTimer5000: .@dupid = atoi(strnpcinfo(2)); if(unitexists(.gid[.@dupid])){ getunitdata(.gid[.@dupid],.@d); .@diff = (.mhp[.@dupid] - .@d[UMOB_HP]); if(.@diff > 0){ npctalk "Punching Bag : I've taken " + (.@diff/5) + " DPS in last 5 seconds."; setunitdata .gid[.@dupid],UMOB_HP,.mhp[.@dupid]; specialeffect EF_HEAL; } } initnpctimer; } prontera,216,79,0 duplicate(PunchingBag#0) PunchingBag#1 CLEAR_NPC prontera,224,70,0 duplicate(PunchingBag#0) PunchingBag#2 CLEAR_NPC prontera,216,58,0 duplicate(PunchingBag#0) PunchingBag#3 CLEAR_NPC prontera,224,58,0 duplicate(PunchingBag#0) PunchingBag#4 CLEAR_NPCProblem error
Share this post
Link to post
Share on other sites