View Full Version : [SOLVED] Custom Boss keeps dying if exit combat
Helo! I have a custom boss and all good until i atack him. If by any method i exit combat he die no matter how much hp he has. After that he revive and keep diyng and reviving. Here is the script of the boss! If anyone can help me pls Reply. Thanks.
04-11-2014, 06:55 PM
"A custom boss" - you have like 4 boss scripts. Which one is doing it? I'm assuming the boss with the big script? I don't see anything that could cause the boss to randomly die. Have you tried removing pieces of the code to see what might be causing it?
that dying thing was caused by DB field `health_mod` probably set too high! Anyway that's not the problem anymore. When the boss has 66-65% hp suddenly i get disconnected from server and get a 1 minute rollback. The problem is in that if statement right? but i don't get what's the problem ``` if (HealthBelowPct(65) && !has_flied) ```
04-13-2014, 10:42 PM
It's most likely crashing because of:
sprintf(msg,"%s is starting to fly!", me->GetName());
'me->GetName()' is a const string, but when using it as a param argument it needs to be supplied as a const char*.
sprintf(msg,"%s is starting to fly!", me->GetName().c_str());
Yeah that was the problem thank you Tommy.
04-15-2014, 05:09 PM
Marking as solved.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.