Mhunt Crash Prevention

  • Sapphire
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
2 years 10 months ago #8128 by Sapphire
Mhunt Crash Prevention was created by Sapphire
I have mhunt working where a mobile hunts a character if they flee, and I have also made other scenarios where say a mobile flees at 35% health and begins a backstab/flee loop on players (so awesome!). The issue that I am encountering is when another player enters the mix and is then attached to the mobiles memory/the mob is trying to hunt 2 players at once. It crashes the mud every time.

Does anyone know a way to create a check for a mobile that is already hunting a player so that it doesn't trigger another hunting query/memory addition? Even a workaround is fine as long as it works. Included below is one of the examples of the triggers I am using currently that makes a mob backstab/flee. This does work on my mud, but if I have another character in the room where the mob flees to and that 2nd player hits the mob, they are added to the mobiles memory as well and it crashes the game.

I need a mob hunt memory setup that doesn't allow for multiple names to be added to mobs memory, and I need to make it where a mobile seeing the player again isn't necessary for the mob to hunt them. Any help is greatly appreciated!
Name: 'Hunt: Danar Wimpy Hunt',  VNum: [17016], RNum: [  220]
Trigger Intended Assignment: Mobiles
Trigger Type: HitPrcnt Memory , Numeric Arg: 35, Arg list: None
eval pc_lev %char.level%
if %actor.is_pc% && %pc_lev% > 40
eval pc_lev %char.level%
if %actor.canbeseen% && %actor.is_pc% && %pc_lev% <= 40
wait 3 sec
mremember %actor% mhunt
wait 2 sec
mhunt %actor%

Please Log in or Create an account to join the conversation.

2 years 10 months ago #8129 by WhiskyTest
Replied by WhiskyTest on topic Mhunt Crash Prevention
Maybe try it just using mhunt. That piece of code just sets HUNTING(ch) to point to a character.

If that works, something might be afoot in mremember..

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds