local config = {
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
local text = "- Welcome to Euforia :\n!commands -> see your commands\n!spells -> List of your spells\n!frags -> See your current frags."
local useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
local lastLogin = getPlayerLastLoginSaved(cid)
if(lastLogin > 0) then
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, text)
else
doPlayerSendOutfitWindow(cid)
end
if getCreatureName(cid) == "Account Manager" then
return doRemoveCreature(cid)
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "inquisitionPortals")
registerCreatureEvent(cid, "countKill")
registerCreatureEvent(cid, "SaveReportBug")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "fullmh")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "LMSSummon")
registerCreatureEvent(cid, "LMSAttack")
registerCreatureEvent(cid, "LMSTarget")
registerCreatureEvent(cid, "Promotion")
registerCreatureEvent(cid, "kill")
registerCreatureEvent(cid, "reward")
--registerCreatureEvent(cid, "30")
registerCreatureEvent(cid, "ArenaKill")
registerCreatureEvent(cid, "ExpVip")
registerCreatureEvent(cid, "killbossesbroadcast")
registerCreatureEvent(cid, "EndVip")
registerCreatureEvent(cid, "PythiusDead")
registerCreatureEvent(cid, "zombieevent")
registerCreatureEvent(cid, "Achievements")
registerCreatureEvent(cid, "showKD")
registerCreatureEvent(cid, "premcheck")
registerCreatureEvent(cid, "Frags")
registerCreatureEvent(cid, "demonOakLogout")
registerCreatureEvent(cid, "demonOakDeath")
registerCreatureEvent(cid, "demonOakComplete")
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "BountyHunter")
registerCreatureEvent(cid, "Addons")
registerCreatureEvent(cid, "PWNED")
registerCreatureEvent(cid, "pointsforlvl")
if (InitArenaScript ~= 0) then
InitArenaScript = 1
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
if getPlayerStorageValue(cid, 42309) < 1 then
for i = 42300, 42309 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42319) < 1 then
for i = 42310, 42319 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42329) < 1 then
for i = 42320, 42329 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0)
end
setPlayerStorageValue(cid, 42350, 0)
setPlayerStorageValue(cid, 42352, 0)
return true
end