Merge pull request #37 from tigerw/master
MagicCarpet now confirms to chat standards
This commit is contained in:
commit
88ba86be57
@ -36,12 +36,12 @@ function HandleCarpetCommand( Split, Player )
|
|||||||
Carpet = Carpets[ Player ]
|
Carpet = Carpets[ Player ]
|
||||||
if( Carpet == nil ) then
|
if( Carpet == nil ) then
|
||||||
Carpets[ Player ] = cCarpet:new()
|
Carpets[ Player ] = cCarpet:new()
|
||||||
Player:SendMessage("You're on a magic carpet!" )
|
Player:SendMessage(cChatColor.Green .. "[INFO] " .. cChatColor.White .. "You're on a magic carpet!" )
|
||||||
Player:SendMessage("Look straight down to descend. Jump to ascend!" )
|
Player:SendMessage(cChatColor.Yellow .. "[INFO] " .. cChatColor.White .. "Look straight down to descend. Jump to ascend!" )
|
||||||
else
|
else
|
||||||
Carpet:remove()
|
Carpet:remove()
|
||||||
Carpets[ Player ] = nil
|
Carpets[ Player ] = nil
|
||||||
Player:SendMessage("The carpet vanished!" )
|
Player:SendMessage(cChatColor.Green .. "[INFO] " .. cChatColor.White .. "The carpet vanished!" )
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
@ -73,11 +73,8 @@ function OnPlayerMoving(Player)
|
|||||||
Carpet:moveTo( cLocation:new( Player:GetPosX(), Player:GetPosY() - 1, Player:GetPosZ() ) )
|
Carpet:moveTo( cLocation:new( Player:GetPosX(), Player:GetPosY() - 1, Player:GetPosZ() ) )
|
||||||
else
|
else
|
||||||
if( Player:GetPosY() < Carpet:getY() ) then
|
if( Player:GetPosY() < Carpet:getY() ) then
|
||||||
Player:TeleportToCoords(Player:GetPosX(), Carpet:getY(), Player:GetPosZ())
|
Player:TeleportToCoords(Player:GetPosX(), Carpet:getY() + 0.2, Player:GetPosZ())
|
||||||
end
|
end
|
||||||
Carpet:moveTo( cLocation:new( Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() ) )
|
Carpet:moveTo( cLocation:new( Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() ) )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user