Sorry for the time gap. Work and brain melt. Had to take a break. Tried the above code but it seems to only be performing this part of the action:
Code:
else {
quest::doanim(43);
$client->SpellEffect(43,10);
castdelay(5);
quest::selfcast(34);
quest::movepc($porthash{$text}[1],$porthash{$text}[2],$porthash{$text}[3],$porthash{$text}[4],$porthash{$text}[5]);
}
Edit:
I'm ok with using the selfcast but if you self-cast and already have the spell it sends an error that the player is already invisible. Is there a way to check for a spell effect active on the player? If there is I could just throw an if statement in there to see if player is already invisible and skip the selfcast if they are. Digging through the lexicon now because I'm not quite sure what I"m searching for.
Edit2:
BreakInvis(); will do.
Code:
else {
quest::doanim(43);
$client->SpellEffect(43,10);
castdelay(5);
$client->BreakInvis();
quest::selfcast(34);
quest::movepc($porthash{$text}[1],$porthash{$text}[2],$porthash{$text}[3],$porthash{$text}[4],$porthash{$text}[5]);
}