View Single Post
  #3  
Old 01-23-2015, 09:17 AM
silvergrin46
Fire Beetle
 
Join Date: Jan 2015
Posts: 9
Default This is an example of a script I am trying to convert from perl to lua

To be stored in global/spells/spellid.lua

The spell is Targettype 6 (self) and when cast is supposed to spawn an NPC.


sub EVENT_SPELL_EFFECT_CLIENT {

$ClientID = $entity_list->GetClientByID($caster_id);

my $x = $ClientID->GetX();
my $y = $ClientID->GetY();
my $z = $ClientID->GetZ();
my $h = $ClientID->GetHeading();

quest::spawn2(1079,0,0,$x+5,$y+5,$z,$h);


} #Close event
Reply With Quote