;'Transportation' skill script

BloodCost=GetUserMaxMana(#USERID)
TimedDelay=10000
Graphic=3



WarpToMap = 0

If #MAPID = 1058
	WarpToMap = 515
ElseIf #MAPID = 515
	WarpToMap = 479
ElseIf #MAPID = 479
	WarpToMap = 170
ElseIf #MAPID = 170
	WarpToMap = 786
ElseIf #MAPID = 786
	WarpToMap = 1058
Else
	SendCombatMessage(#USERID,"You can't warp from this spot. ")
	GoTo END
EndIf


UserOnPlat = 0

If #XPOS > 7
  If #XPOS < 13
    If #YPOS > 7
      If #YPOS < 13
	   UserOnPlat = 1
	 EndIf
    EndIf
  EndIf
EndIf

If UserOnPlat = 0
	SendCombatMessage(#USERID,"You must stand on the platform to use this skill. ")
	GoTo END
EndIf


WarpUser(#USERID,WarpToMap,#XPOS,#YPOS)

CreateEffect(Graphic,350,0,#DIR_UP,#MAPID,#XPOS,#YPOS,0,#USERID,0)
CreateEffect(Graphic,350,0,#DIR_UP,WarpToMap,#XPOS,#YPOS,0,#USERID,0)


Y=8
While Y < 13
	X=8
	While X < 13
		UserID = GetUserAtXY(#MAPID,X,Y)
		If UserID > 0
			CreateEffect(Graphic,350,0,#DIR_UP,#MAPID,X,Y,0,UserID,0)
			WarpUser(UserID,WarpToMap,X,Y)
			CreateEffect(Graphic,350,0,#DIR_UP,WarpToMap,X,Y,0,UserID,0)
		EndIf
		X=X+1
	Wend
	Y=Y+1
Wend

Label END

Continue = 1