kito2
www.masteria.net
Nice.
[11/08/2009 16:15:25] data/talkactions/scripts/ban.lua:17: attempt to call global 'doAddBanishment' (a nil value)
[11/08/2009 16:15:25] stack traceback:
[11/08/2009 16:15:25] data/talkactions/scripts/ban.lua:17: in function <data/talkactions/scripts/ban.lua:4>
<?xml version="1.0" encoding="UTF-8"?>
<mod name="/ban command" version="1.0" author="Gesior.pl & modded by Hermes" contact="otland.net" enabled="yes">
<description>
This mod will add new command for server staff - /ban.
Usage:
/ban Nick - ban player for default time (set in config)
/ban Nick,12 - ban player for 12 hours
/ban Nick,35,AFK BOT - ban player for 35 hours with comment "AFK BOT"
</description>
<config name="banishment_config"><![CDATA[
banconfig = {
default_comment = ""
default_lenght = 1 -- ban time in hours
}
]]></config>
<talkaction log="yes" words="/ban" access="3" event="buffer"><![CDATA[
domodlib('banishment_config')
function onSay(cid, words, param)
local parametres = string.explode(param, ",")
if(parametres[1] ~= nil) then
local accId = getAccountIdByName(parametres[1])
if(accId > 0) then
local lenght = banconfig.default_lenght
local comment = banconfig.default_comment
if(parametres[2] ~= nil and tonumber(parametres[2]) > 0) then
lenght = tonumber(parametres[2])
end
if(parametres[3] ~= nil) then
comment = parametres[3]
end
doAddBanishment(accId, lenght * 3600, 23, ACTION_BANISHMENT, comment, getPlayerGUID(cid), comment)
local player = getPlayerByNameWildcard(parametres[1])
if(isPlayer(player) == TRUE) then
doRemoveCreature(player)
end
else
doPlayerSendCancel(cid, "Player with name " .. parametres[1] .. " doesn't exist.")
end
else
doPlayerSendCancel(cid, "You must enter name.")
end
return true
end
]]></talkaction>
</mod>
[03/10/2009 13:44:08] Lua Script Error: [TalkAction Interface]
[03/10/2009 13:44:08] data/talkactions/scripts/ban.lua:onSay
[03/10/2009 13:44:08] data/talkactions/scripts/ban.lua:17: attempt to call global 'doAddBanishment' (a nil value)
[03/10/2009 13:44:08] stack traceback:
[03/10/2009 13:44:08] data/talkactions/scripts/ban.lua:17: in function <data/talkactions/scripts/ban.lua:4>