bearnope246 Posted July 21, 2016 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 94 Reputation: 5 Joined: 06/30/16 Last Seen: July 6, 2018 Share 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 Link to comment Share on other sites More sharing options...
Question
bearnope246
How to get char name when they hit the punching bag? thanks.
Link to comment
Share on other sites
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.