/*
var npcdatabase := ReadConfigFile("npcdesc");
var alignment := npcdatabase[npc.npctemplate].alignment;
Print( npc.alignment );
If( npc.alignment == "evil" )
Return TEXT_MURDER_COLOR;
EndIf
if( npc.alignment == "good" )
Return TEXT_INNOCENT_COLOR;
EndIf
*/
i'm working on my singleclickhook system, adapting for zuluhotel system, builded by beaud, i don't know why i used print after the variable 'alignment', and returning <unitialized object> i don't know what to do =/, i'm working in pol 096.7 core
thanks
Ps: MontuZ, thanks by the other post
Hi another question ;)
Re: Hi another question ;)
You already read out the alignment from the npcdesc.
Assuming that the npc has an alignment it should
look this way:
Assuming that the npc has an alignment it should
look this way:
Code: Select all
var npcdatabase := ReadConfigFile("npcdesc");
var alignment := npcdatabase[npc.npctemplate].alignment;
Print( alignment );
If( alignment == "evil" )
Return TEXT_MURDER_COLOR;
EndIf
If( alignment == "good" )
Return TEXT_INNOCENT_COLOR;
EndIf
-
richardali
- New User
- Posts: 7
- Joined: Tue Sep 09, 2008 4:27 am
Re: Hi another question ;)
yes dude i did that and returning <unitialized object>
thanks
thanks
-
richardali
- New User
- Posts: 7
- Joined: Tue Sep 09, 2008 4:27 am
Re: Hi another question ;)
solved 
the problem are was:
var npcdatabase := ReadConfigFile("::npcdesc");
var alignment := npcdatabase[npc.npctemplate].alignment;
in the '::'
i put it and now the script can read the config file
the problem are was:
var npcdatabase := ReadConfigFile("::npcdesc");
var alignment := npcdatabase[npc.npctemplate].alignment;
in the '::'
i put it and now the script can read the config file