-- ordered as in creaturescripts.xml
local events = {
'pythiusDead',
'bossesGrayIsland',
'ElementalSpheres',
'ElementalSpheresKill',
'ElementalSpheresLogin',
'WarzoneThree',
'WarzoneTwo',
'ExpExtra',
'bossesWarzone',
'SvargrondArenaKill',
'PharaoKillPortal',
'inServiceOfYalaharQuestsDiseased',
'inServiceOfYalaharQuestsMorik',
'inServiceOfYalaharQuestsQuara',
'inquisitionQuestBosses',
'inquisitionQuestUngreez',
'killingInTheNameOfQuestKills',
'TaskCustom',
'Yielothax',
'Energized',
'Raging',
'MastersVoiceServants',
'wrathBoss',
'wrathZalamon',
'PlayerDeath',
'ThievesGuildNomad',
'AdvanceSave',
'timelevel',
'DoubleXP',
'SpikeDrillworm',
'SecretServiceBlackKnight'
}
function onLogin(cid)
local player = Player(cid)
local loginStr = 'Witamy na ' .. configManager.getString(configKeys.SERVER_NAME) .. '!'
if player:getLastLoginSaved() <= 0 then
loginStr = loginStr .. ' Prosze zmien swoj wyglad.'
player:sendTutorial(1)
else
if loginStr ~= '' then
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
end
registerCreatureEvent(cid, "countKill")
if getPlayerStorageValue(cid, 95673) < 0 then
setPlayerStorageValue(cid, 95673, 0)
end
if getPlayerStorageValue(cid, 95674) < 0 then
setPlayerStorageValue(cid, 95674, 0)
end
registerCreatureEvent(cid, "ExpExtra")
loginStr = string.format('Byles u nas ostatnio %s.', os.date('%a %b %d %X %Y', player:getLastLoginSaved()))
db.query("UPDATE `players` SET `cast` = 0 WHERE `id` = " .. getPlayerGUID(cid) .. ";")
end
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
for i = 1, #events do
player:registerEvent(events)
end
return true
end
Onde devo colocar isso?