Source: (arg1) Becomes the spell targetcounter: arg2magic to use: arg3target x: arg4target y: arg5
1st argument: Event to generate (usually 66). The counter is set to 1.The event is sent to the caller of this function (makes sense).The spell target is either the close combat target if available, or the x/y coordinates specified in that 95h-event (there are probably other ways to populate that 95h-event)2nd argument: The flag the spell must have (I'm not sure yet how to specify exactly which spell you want exactly...)3rd argument: Maximum amount of spell points of the spell (Wand of Jet is respected)
init_teleport_spell 16 ; Use coordinates of BTB_6000 element 16; init teleport also resets the CC target and sets arg4 and arg5 of the 95h event; Maybe init_teleport_spell is actually a bad name, this is maybe to force a spell; cast location even while in CC I guess.set_unit_flag2 16 ; No ideaadd_magic_points 3cast_spell 66, 256, 3 ; Has no CC target, spell target will be the BTB_6000 obstacle