This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<CustomEquipment> | |
<equipment equipid="100" baseItem="2400" article="a" name="zelda sword"> | |
<attribute key="description" value="a worthy blade." /> | |
<attribute key="defense" value="45" /> | |
<attribute key="attack" value="89" /> | |
<attribute key="extradef" value="10" /> | |
</equipment> | |
<equipment equipid="101" baseItem="2400" article="a" name="blade of the ruined king"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local noLagSave = GlobalEvent("noLagSave") | |
local timeBetweenSaves = 1 * 60 * 60 * 1000 -- in milliseconds | |
local delayBetweenSaves = 100 | |
function delayedSave(cid) | |
local p = Player(cid) | |
if p then | |
p:save() | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local matrixFields = { | |
area = {} | |
} | |
local Matrix = setmetatable(matrixFields, | |
{ | |
__call = function(matrix, ...) | |
return matrix.new(...) | |
end | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local defaults = { | |
name = "", | |
words = "", | |
mana = 0, | |
manaPercent = 0, | |
soul = 0, | |
spellId = 0, | |
range = -1, | |
level = 0, | |
magLevel = 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local Class = setmetatable ({ }, | |
{ | |
__call = function (class, ...) | |
return class.new (...) | |
end | |
} | |
) | |
Class.__index = Class | |
Class.__call = function (self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- creates a full copy of a table | |
-- changing the value of copied table doesn't touch the original anymore | |
-- warning: using methods on "copied" userdata will still affect original object | |
local a = { | |
["abc"] = {1, 2}, | |
[1] = {4, {2}} | |
} | |
function cloneTable(t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- usage: dumpTable(t) | |
-- to dump to file: | |
--[[ | |
local str = dumpTable(t) | |
local f = io.open("dumped_table.txt", "w+") | |
f:write(str) | |
f:close() | |
]] | |
local function getTabulation(depth) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- who is showing changes and who is watching | |
spectated = Player("player") | |
spectator = Player("Administrator") | |
-- animated text, otclient only (or old clients) | |
-------------------------------- | |
msg = NetworkMessage() | |
msg:addByte(0x84) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
dumps file directory to a console | |
example output: | |
linedefined 0 | |
lastlinedefined 207 | |
source @F:\ot\data\scripts\filename.lua | |
what main | |
short_src ...ot\data\scripts\filename.lua | |
]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project.exe test.txt | |
pause |
OlderNewer