| Mirage Source http://www.miragesource.net/forums/ |
|
| Targeted NPC Dies, set everyone on the maps target to 0 http://www.miragesource.net/forums/viewtopic.php?f=201&t=3438 |
Page 1 of 1 |
| Author: | Coke [ Sat Mar 01, 2008 3:55 pm ] |
| Post subject: | Targeted NPC Dies, set everyone on the maps target to 0 |
This is either a huge job or a little one, I've played around with packets and things for a couple of hours and no luck >_> Any of you guys? |
|
| Author: | Ramsey [ Sat Mar 01, 2008 5:40 pm ] |
| Post subject: | Re: Targeted NPC Dies, set everyone on the maps target to 0 |
Well this is the code the resets the target after killing an NPC: Code: ' Check if target is npc that died and if so set target to 0 If Player(Attacker).TargetType = TARGET_TYPE_NPC And Player(Attacker).Target = MapNpcNum Then Player(Attacker).Target = 0 Player(Attacker).TargetType = 0 End If Maybe you forgot to add this since you did modify it: Code: If Player(Attacker).Target = MapNpcNum Then Just a thought though. |
|
| Author: | Coke [ Sat Mar 01, 2008 7:42 pm ] |
| Post subject: | Re: Targeted NPC Dies, set everyone on the maps target to 0 |
Ramsey wrote: Well this is the code the resets the target after killing an NPC: Code: ' Check if target is npc that died and if so set target to 0 If Player(Attacker).TargetType = TARGET_TYPE_NPC And Player(Attacker).Target = MapNpcNum Then Player(Attacker).Target = 0 Player(Attacker).TargetType = 0 End If Maybe you forgot to add this since you did modify it: Code: If Player(Attacker).Target = MapNpcNum Then Just a thought though. This is all server side, the client knows nothing while this is happening. Underneath Player(Attacker).TargetType = 0 a packet is called that tells the attacker his Target is 0 and his TargetType = 0, this allows the client to know when it has something targeted, so it knows when to blt a target onto it. The issue is, this is only sent to the attacker, so if someone else has that npc targeted their client goes skitz. Funny how it only happens outside of the IDE though >.> |
|
| Author: | Coke [ Sun Mar 02, 2008 11:59 am ] |
| Post subject: | Re: Targeted NPC Dies, set everyone on the maps target to 0 |
Sorted, thanks Dugor! |
|
| Author: | Jacob [ Sun Mar 02, 2008 1:16 pm ] |
| Post subject: | Re: Targeted NPC Dies, set everyone on the maps target to 0 |
Glad I could help out. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|