bearnope246 Posted July 21, 2016 Posted July 21, 2016 How to get char name when they hit the punching bag? thanks. 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 "" + (.@diff/5) + " in 5 seconds."; setunitdata .gid[.@dupid],UMOB_HP,.mhp[.@dupid]; specialeffect EF_HEAL; Quote
Question
bearnope246
How to get char name when they hit the punching bag? thanks.
0 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.