Thread: Porters
View Single Post
  #40  
Old 04-23-2015, 08:37 PM
markusdabrave's Avatar
markusdabrave
Sarnak
 
Join Date: Jan 2012
Location: Plano, TX
Posts: 69
Default

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]);
		}
Reply With Quote