PDA

View Full Version : Looking for a script


sekan
07-21-2008, 08:05 PM
Hello,

Am looking for a script that gets if a npc is in combat. If the npc is in combat a action shall be run and if he is not in combat nothing shall happen. I tried creating a script of my own but It didn't work.

I get syntax error at { which I think means that I'm not using the Getisincombat properly or that I'm a complete moron sometimes when it comes to scripting and the whole script have to be re-made.

void main() {

object oStop = (OBJECT_SELF);

If (GetIsInCombat(oStop))
{


SetLocalBoolean( oStop, 15, FALSE );
}
}


Could someone help me here please?

Thanks for talking your time to read this :)

Tupac Amaru
07-22-2008, 05:35 AM
"if" should be in lower-case characters.

sekan
07-22-2008, 07:13 AM
How could I have missed that?

Thanks for the help it works now