Thanx!
Edit: Works all fine, excpet it seems to still give XP to players who are NOT in
the correct area. I am trying to find a way around this, and have found
"GetArea", but can't seem to find what it returns as (so what to check
on the "if" statement). My current script is looking like this:
//Thanks to ehye_khandee for the main body of this script!
void main()
{
object oAnch = GetObjectByTag("port_control");
object oTarget = GetFirstPC();
object oArea = GetArea(oTarget);
object oAnAr = GetArea(oAnch);
while(GetIsObjectValid(oTarget))
{
//Reward XP Here!
if (oArea = oAnAr)
{
GiveXPToCreature(oTarget, 1);
}
oTarget = GetNextPC();
}
}
This comes up with the error:
05/07/2012 09:23:43: Error. 'sc_give_xp' did not compile.
sc_give_xp.nss(11): ERROR: NON INTEGER EXPRESSION WHERE INTEGER REQUIRED
Edit: I forgot to mention earlier. "port_control" is the tag of a Flaming Satue in the Arena area that I am trying to use to compare the player's area to the area it is in, to see if the player needs the XP.
Any help with sorting this out would be great!
BuilderOfLegend
PS: Your script worked great, apart from this problem, which is probably due to my scripting. The original script is perfect but for the problem it works on Anyone in Any area.
Modifié par BuilderOfLegend, 05 juillet 2012 - 08:52 .