View Single Post
Old 01-26-2003, 10:18 AM   #16
Obsidian the Black
Elminster
 

Join Date: May 8, 2002
Location: Leeds, West Yorkshire
Posts: 470
Ohh and the spell script doesnt seem it will be accepted. Heres what i put in it:

object oPC = GetLastSpellCaster();
object oCowledWizardWarning = GetObjectByTag("cowledwizard");
object oCowledWizardJail = GetObjectByTag("cowledwizard");
int nSpellsCast = GetLocalInt(OBJECT_SELF, "SPELLSCAST");
int nTimesWarned = GetLocalInt(OBJECT_SELF, "TIMESWARNED");
object WPJail = GetObjectByTag("WP_jail");

void main()
{
if ((GetIsPC(oPC))!&(GetItemPossessedBy(oPC, "magicpermit)))
{
SetLocalLocation(oPC, (GetLocation(oPC)));

CreateObjectAtLocation(oCowledWizardWarning, (GetLocalLocation(oPC)));

ActionSpeakString("This is your first warning. Do not cast magic within the city without a permit. If you do so again, we will be forced to take you to jail!") // or a dialogue start

SetLocalInt(oPC, "nTimesWarned", 1);

DeleteLocalLocation(); //not sure if you have to give a name for this
}

if ((GetIsPC(oPC))&&(nTimesWarned == 1)!&(GetItemPossessedBy(oPC, "magicpermit)))
{
SetLocalLocation(oPC, (GetLocalLocation(oPC));

CreateObjectAtLocation(oCowledWizardJail, (GetLocalLocation(oPC));

ActionSpeakString("That is it, we warned you once. Now come with us...");

ActionJumpToObject("WPJail); // maybe you have to give the creature which
//jumps to that location

DeleteLocalLocation();

SetLocalInt(OBJECT_SELF, "nTimesWarned", 0); // so the pc can start casting
//again and still be arrested

}
}

Is all this correct? Becuase it didnt like this line... if ((GetIsPC(oPC))!&(GetItemPossessedBy(oPC, "magicpermit)))
Obsidian the Black is offline   Reply With Quote