Postado Novembro 2, 2012 12 anos Autor Config.lua deathLostPercent = 10 Creaturescripts -> Scripts -> Login.lua local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") 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, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "recompensa") registerCreatureEvent(cid, "ProtectLevel") registerCreatureEvent(cid, "pvpsystem") registerCreatureEvent(cid, "FullHpMana") local exp = 1.2 ---- 50% de exp extra if not isPremium(cid) then doPlayerSendTextMessage(cid,28,"Torne-se premium e ganhe "..((exp - 1)*100).."% a mais de experiencia de todos os monstros que você matar! (!doar | !shop)") else doPlayerSendTextMessage(cid,26,"Você e premium por isso ganha "..exp.."% a mais de experiencia de todos os monstros que você matar!") doPlayerSetExperienceRate(cid, exp) end if getPlayerStorageValue(cid, 6555) < 1 then item = doPlayerAddItem(cid, 2598, 1) setPlayerStorageValue(cid, 6555, 1) return doSetItemText(item, "Por favor olhe nosso guia no nosso fórum explicando tudo sobre o servidor: http://emperia.forumeiros.com/t17-guia-novato.") end return true end
Postado Novembro 2, 2012 12 anos Autor seu servidor é mysql? se sim, pode estar faltando alguma query. É sim, o que eu faço?
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.