Sub TBS_System(Index)
Dim X1
Dim Y1
Dim X2
Dim Y2
Dim X3
Dim Y4
Dim X5
Dim Y5
X1 = GetVar("TBS_System.ini", GetPlayerName(Index), "X1")
Y1 = GetVar("TBS_System.ini", GetPlayerName(Index), "Y1")
X2 = GetVar("TBS_System.ini", GetPlayerName(Index), "X2")
Y2 = GetVar("TBS_System.ini", GetPlayerName(Index), "Y2")
X3 = GetVar("TBS_System.ini", GetPlayerName(Index), "X3")
Y3 = GetVar("TBS_System.ini", GetPlayerName(Index), "Y3")
X4 = GetVar("TBS_System.ini", GetPlayerName(Index), "X4")
Y4 = GetVar("TBS_System.ini", GetPlayerName(Index), "Y4")
X5 = GetVar("TBS_System.ini", GetPlayerName(Index), "X5")
Y5 = GetVar("TBS_System.ini", GetPlayerName(Index), "Y5")
If GetPlayerSprite(Index) = 0 Then
If GetPlayerX(Index) = X2 AND GetPlayerY(Index) = Y2 OR GetPlayerX(Index) = X3 AND GetPlayerY(Index) = Y3 _
OR GetPlayerX(Index) = X4 AND GetPlayerY(Index) = Y4 OR GetPlayerX(Index) = X5 AND GetPlayerY(Index) = Y5 Then
Call PlayerMSG(Index, "You asshole! You cannot have 2 units on the same spot!!!", WHITE)
Else
Call PutVar("TBS_System.ini", GetPlayerName(Index), "X1", GetPlayerX(Index))
Call PutVar("TBS_System.ini", GetPlayerName(Index), "Y1", GetPlayerY(Index))
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 4, 1, 7, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 4, 0, 7, 7)
Call PlayerWarp(Index, GetPlayerMap(Index), X2, Y2)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 0, 0, 1, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 0, 0, 1, 7)
Call SetPlayerSprite(Index, 1)
Call SetPlayerDir(Index, 1)
Exit Sub
End If
End If
If GetPlayerSprite(Index) = 1 Then
If GetPlayerX(Index) = X1 AND GetPlayerY(Index) = Y1 OR GetPlayerX(Index) = X3 AND GetPlayerY(Index) = Y3 _
OR GetPlayerX(Index) = X4 AND GetPlayerY(Index) = Y4 OR GetPlayerX(Index) = X5 AND GetPlayerY(Index) = Y5 Then
Call PlayerMSG(Index, "You asshole! You cannot have 2 units on the same spot!!!", WHITE)
Else
Call PutVar("TBS_System.ini", GetPlayerName(Index), "X2", GetPlayerX(Index))
Call PutVar("TBS_System.ini", GetPlayerName(Index), "Y2", GetPlayerY(Index))
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 4, 3, 7, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 4, 2, 7, 7)
Call PlayerWarp(Index, GetPlayerMap(Index), X3, Y3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 0, 0, 1, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 0, 0, 1, 7)
Call SetPlayerSprite(Index, 2)
Call SetPlayerDir(Index, 1)
Exit Sub
End If
End If
If GetPlayerSprite(Index) = 2 Then
If GetPlayerX(Index) = X2 AND GetPlayerY(Index) = Y2 OR GetPlayerX(Index) = X1 AND GetPlayerY(Index) = Y1 _
OR GetPlayerX(Index) = X4 AND GetPlayerY(Index) = Y4 OR GetPlayerX(Index) = X5 AND GetPlayerY(Index) = Y5 Then
Call PlayerMSG(Index, "You asshole! You cannot have 2 units on the same spot!!!", WHITE)
Else
Call PutVar("TBS_System.ini", GetPlayerName(Index), "X3", GetPlayerX(Index))
Call PutVar("TBS_System.ini", GetPlayerName(Index), "Y3", GetPlayerY(Index))
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 4, 5, 7, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 4, 4, 7, 7)
Call PlayerWarp(Index, GetPlayerMap(Index), X4, Y4)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 0, 0, 1, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 0, 0, 1, 7)
Call SetPlayerSprite(Index, 3)
Call SetPlayerDir(Index, 1)
Exit Sub
End If
End If
If GetPlayerSprite(Index) = 3 Then
If GetPlayerX(Index) = X2 AND GetPlayerY(Index) = Y2 OR GetPlayerX(Index) = X1 AND GetPlayerY(Index) = Y1 _
OR GetPlayerX(Index) = X3 AND GetPlayerY(Index) = Y3 OR GetPlayerX(Index) = X5 AND GetPlayerY(Index) = Y5 Then
Call PlayerMSG(Index, "You asshole! You cannot have 2 units on the same spot!!!", WHITE)
Else
Call PutVar("TBS_System.ini", GetPlayerName(Index), "X4", GetPlayerX(Index))
Call PutVar("TBS_System.ini", GetPlayerName(Index), "Y4", GetPlayerY(Index))
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 4, 7, 7, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 4, 6, 7, 7)
Call PlayerWarp(Index, GetPlayerMap(Index), X5, Y5)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 0, 0, 1, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 0, 0, 1, 7)
Call SetPlayerSprite(Index, 4)
Call SetPlayerDir(Index, 1)
Exit Sub
End If
End If
If GetPlayerSprite(Index) = 4 Then
If GetPlayerX(Index) = X2 AND GetPlayerY(Index) = Y2 OR GetPlayerX(Index) = X1 AND GetPlayerY(Index) = Y1 _
OR GetPlayerX(Index) = X3 AND GetPlayerY(Index) = Y3 OR GetPlayerX(Index) = X4 AND GetPlayerY(Index) = Y4 Then
Call PlayerMSG(Index, "You asshole! You cannot have 2 units on the same spot!!!", WHITE)
Else
Call PutVar("TBS_System.ini", GetPlayerName(Index), "X5", GetPlayerX(Index))
Call PutVar("TBS_System.ini", GetPlayerName(Index), "Y5", GetPlayerY(Index))
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 4, 9, 7, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 4, 8, 7, 7)
Call PlayerWarp(Index, GetPlayerMap(Index), X1, Y1)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 0, 0, 1, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 0, 0, 1, 7)
Call SetPlayerSprite(Index, 0)
Call SetPlayerDir(Index, 1)
Exit Sub
End If
End If
End Sub
Dim X1
Dim Y1
Dim X2
Dim Y2
Dim X3
Dim Y4
Dim X5
Dim Y5
X1 = GetVar("TBS_System.ini", GetPlayerName(Index), "X1")
Y1 = GetVar("TBS_System.ini", GetPlayerName(Index), "Y1")
X2 = GetVar("TBS_System.ini", GetPlayerName(Index), "X2")
Y2 = GetVar("TBS_System.ini", GetPlayerName(Index), "Y2")
X3 = GetVar("TBS_System.ini", GetPlayerName(Index), "X3")
Y3 = GetVar("TBS_System.ini", GetPlayerName(Index), "Y3")
X4 = GetVar("TBS_System.ini", GetPlayerName(Index), "X4")
Y4 = GetVar("TBS_System.ini", GetPlayerName(Index), "Y4")
X5 = GetVar("TBS_System.ini", GetPlayerName(Index), "X5")
Y5 = GetVar("TBS_System.ini", GetPlayerName(Index), "Y5")
If GetPlayerSprite(Index) = 0 Then
If GetPlayerX(Index) = X2 AND GetPlayerY(Index) = Y2 OR GetPlayerX(Index) = X3 AND GetPlayerY(Index) = Y3 _
OR GetPlayerX(Index) = X4 AND GetPlayerY(Index) = Y4 OR GetPlayerX(Index) = X5 AND GetPlayerY(Index) = Y5 Then
Call PlayerMSG(Index, "You asshole! You cannot have 2 units on the same spot!!!", WHITE)
Else
Call PutVar("TBS_System.ini", GetPlayerName(Index), "X1", GetPlayerX(Index))
Call PutVar("TBS_System.ini", GetPlayerName(Index), "Y1", GetPlayerY(Index))
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 4, 1, 7, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 4, 0, 7, 7)
Call PlayerWarp(Index, GetPlayerMap(Index), X2, Y2)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 0, 0, 1, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 0, 0, 1, 7)
Call SetPlayerSprite(Index, 1)
Call SetPlayerDir(Index, 1)
Exit Sub
End If
End If
If GetPlayerSprite(Index) = 1 Then
If GetPlayerX(Index) = X1 AND GetPlayerY(Index) = Y1 OR GetPlayerX(Index) = X3 AND GetPlayerY(Index) = Y3 _
OR GetPlayerX(Index) = X4 AND GetPlayerY(Index) = Y4 OR GetPlayerX(Index) = X5 AND GetPlayerY(Index) = Y5 Then
Call PlayerMSG(Index, "You asshole! You cannot have 2 units on the same spot!!!", WHITE)
Else
Call PutVar("TBS_System.ini", GetPlayerName(Index), "X2", GetPlayerX(Index))
Call PutVar("TBS_System.ini", GetPlayerName(Index), "Y2", GetPlayerY(Index))
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 4, 3, 7, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 4, 2, 7, 7)
Call PlayerWarp(Index, GetPlayerMap(Index), X3, Y3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 0, 0, 1, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 0, 0, 1, 7)
Call SetPlayerSprite(Index, 2)
Call SetPlayerDir(Index, 1)
Exit Sub
End If
End If
If GetPlayerSprite(Index) = 2 Then
If GetPlayerX(Index) = X2 AND GetPlayerY(Index) = Y2 OR GetPlayerX(Index) = X1 AND GetPlayerY(Index) = Y1 _
OR GetPlayerX(Index) = X4 AND GetPlayerY(Index) = Y4 OR GetPlayerX(Index) = X5 AND GetPlayerY(Index) = Y5 Then
Call PlayerMSG(Index, "You asshole! You cannot have 2 units on the same spot!!!", WHITE)
Else
Call PutVar("TBS_System.ini", GetPlayerName(Index), "X3", GetPlayerX(Index))
Call PutVar("TBS_System.ini", GetPlayerName(Index), "Y3", GetPlayerY(Index))
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 4, 5, 7, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 4, 4, 7, 7)
Call PlayerWarp(Index, GetPlayerMap(Index), X4, Y4)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 0, 0, 1, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 0, 0, 1, 7)
Call SetPlayerSprite(Index, 3)
Call SetPlayerDir(Index, 1)
Exit Sub
End If
End If
If GetPlayerSprite(Index) = 3 Then
If GetPlayerX(Index) = X2 AND GetPlayerY(Index) = Y2 OR GetPlayerX(Index) = X1 AND GetPlayerY(Index) = Y1 _
OR GetPlayerX(Index) = X3 AND GetPlayerY(Index) = Y3 OR GetPlayerX(Index) = X5 AND GetPlayerY(Index) = Y5 Then
Call PlayerMSG(Index, "You asshole! You cannot have 2 units on the same spot!!!", WHITE)
Else
Call PutVar("TBS_System.ini", GetPlayerName(Index), "X4", GetPlayerX(Index))
Call PutVar("TBS_System.ini", GetPlayerName(Index), "Y4", GetPlayerY(Index))
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 4, 7, 7, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 4, 6, 7, 7)
Call PlayerWarp(Index, GetPlayerMap(Index), X5, Y5)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 0, 0, 1, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 0, 0, 1, 7)
Call SetPlayerSprite(Index, 4)
Call SetPlayerDir(Index, 1)
Exit Sub
End If
End If
If GetPlayerSprite(Index) = 4 Then
If GetPlayerX(Index) = X2 AND GetPlayerY(Index) = Y2 OR GetPlayerX(Index) = X1 AND GetPlayerY(Index) = Y1 _
OR GetPlayerX(Index) = X3 AND GetPlayerY(Index) = Y3 OR GetPlayerX(Index) = X4 AND GetPlayerY(Index) = Y4 Then
Call PlayerMSG(Index, "You asshole! You cannot have 2 units on the same spot!!!", WHITE)
Else
Call PutVar("TBS_System.ini", GetPlayerName(Index), "X5", GetPlayerX(Index))
Call PutVar("TBS_System.ini", GetPlayerName(Index), "Y5", GetPlayerY(Index))
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 4, 9, 7, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 4, 8, 7, 7)
Call PlayerWarp(Index, GetPlayerMap(Index), X1, Y1)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index), 0, 0, 1, 3)
Call SetTile(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1, 0, 0, 1, 7)
Call SetPlayerSprite(Index, 0)
Call SetPlayerDir(Index, 1)
Exit Sub
End If
End If
End Sub




