mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
Some improvements to some things.
This commit is contained in:
@@ -284,10 +284,6 @@ function numbertoboolean(number)
|
||||
end
|
||||
end
|
||||
|
||||
function postostring(pos)
|
||||
return pos.x .. " " .. pos.y .. " " .. pos.z
|
||||
end
|
||||
|
||||
function signalcall(param, ...)
|
||||
if type(param) == 'function' then
|
||||
local status, ret = pcall(param, ...)
|
||||
|
@@ -34,14 +34,25 @@ EmblemOther = 5
|
||||
VipIconFirst = 0
|
||||
VipIconLast = 10
|
||||
|
||||
North = 0
|
||||
East = 1
|
||||
South = 2
|
||||
West = 3
|
||||
NorthEast = 4
|
||||
SouthEast = 5
|
||||
SouthWest = 6
|
||||
NorthWest = 7
|
||||
Directions = {
|
||||
North = 0,
|
||||
East = 1,
|
||||
South = 2,
|
||||
West = 3,
|
||||
NorthEast = 4,
|
||||
SouthEast = 5,
|
||||
SouthWest = 6,
|
||||
NorthWest = 7
|
||||
}
|
||||
|
||||
North = Directions.North
|
||||
East = Directions.East
|
||||
South = Directions.South
|
||||
West = Directions.West
|
||||
NorthEast = Directions.NorthEast
|
||||
SouthEast = Directions.SouthEast
|
||||
SouthWest = Directions.SouthWest
|
||||
NorthWest = Directions.NorthWest
|
||||
|
||||
FightOffensive = 1
|
||||
FightBalanced = 2
|
||||
|
@@ -9,6 +9,7 @@ Module
|
||||
|
||||
@onLoad: |
|
||||
dofile 'const'
|
||||
dofile 'util'
|
||||
dofile 'protocol'
|
||||
dofile 'protocollogin'
|
||||
dofile 'protocolgame'
|
||||
|
@@ -18,4 +18,9 @@ function Position.lessThan(pos1, pos2, orEqualTo)
|
||||
else
|
||||
return pos1.x < pos2.x or pos1.y < pos2.y or pos1.z < pos2.z
|
||||
end
|
||||
end
|
||||
|
||||
function Position.isInRange(pos1, pos2, minXRange, maxXRange, minYRange, maxYRange)
|
||||
return (pos2.x >= pos1.x-minXRange and pos2.x <= pos1.x+maxXRange and pos2.y
|
||||
>= pos1.y-minYRange and pos2.y <= pos1.y+maxYRange and pos2.z == pos1.z);
|
||||
end
|
Reference in New Issue
Block a user