#spell_teleport ! Do the stuff of a Teleport ! ARGS[0] = Success/Failure level ! ARGS[1] = the Target Location didItWork = $ARGS[0] $NewLocation = $ARGS[1] :RandLocLoop $randomLoc = $tpLocations[rand(0,arrsize($tpLocations) - 1)] if $randomLoc = $NewLocation or $randomLoc = $EntryPoint: jump 'RandLocLoop' end if didItWork > 0: *nl "The blur you see just outside the ring seems to shift." wait 1000 if $treeCircArg[$NewLocation] = "": gt $treeCircLoc[$NewLocation] else gt $treeCircLoc[$NewLocation], $treeCircArg[$NewLocation] end elseif didItWork < 0: *nl "The blur you see just outside the ring seems to shift. Something did not go right!" wait 1000 if $treeCircArg[$randomLoc] = "": gt $treeCircLoc[$randomLoc] else gt $treeCircLoc[$randomLoc], $treeCircArg[$randomLoc] end else 'You feel drained, but the energy fizzles out and nothing happens' end killvar '$randomLoc' killvar '$NewLocation' killvar didItWork result = "" -- spell_teleport ---------------------------------