How do i change it to be:
You advanced from Level 19 to Level 20. (Start up level) Allways 20!
How do i edit this ?
Title:You advanced from level 12 to Level 120
I Don't get it ..... Neither The Title with the Post
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")
return true
end
Show creaturescripts.xml
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
<event type="login" name="Lowlevellock" event="script" value="lowlevellock.lua"/>
<event type="kill" name="FragReward" event="script" value="fragreward.lua"/>
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>
<event type="think" name="Idle" event="script" value="idle.lua"/>
<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
<event type="death" name="DeathBroadcast" script="deathBroadcast.lua"/>
<event type="login" name="SlotLogin" script="slot.lua"/>
</creaturescripts>
<event type="login" name="Lowlevellock" event="script" value="lowlevellock.lua"/>
find that file in scripts, and edit where it says <120 change it to 20
that means a player cannot go below level 20.
function onLogin(cid)
if getPlayerLevel(cid) < 120 then
doPlayerAddExperience(cid, (getExperienceForLevel(120) - getPlayerExperience(cid)))
end
return TRUE
end
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
if getPlayerName(cid) ~= "Account Manager" then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doPlayerAddPremiumDays(cid, 2)
doPlayerSetPromotionLevel(cid, 1)
end
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, "FragReward")
return true
end
function onLogin(cid)
local rebalanceStor = getPlayerStorageValue(cid, 37454)
if rebalanceStor == -1 and getPlayerLevel(cid) >= 140 then
doPlayerAddExperience(cid, (getExperienceForLevel(130) - getPlayerExperience(cid)))
setPlayerStorageValue(cid, 37454, 1)
elseif rebalanceStor == -1 and getPlayerLevel(cid) > 125 and getPlayerLevel(cid) < 130 then
doPlayerAddExperience(cid, (getExperienceForLevel(125) - getPlayerExperience(cid)))
setPlayerStorageValue(cid, 37454, 1)
elseif rebalanceStor == -1 and getPlayerLevel(cid) < 120 then
doPlayerAddExperience(cid, (getExperienceForLevel(120) - getPlayerExperience(cid)))
setPlayerStorageValue(cid, 37454, 1)
else setPlayerStorageValue(cid, 37454, 1)
end
return TRUE
end
why not remove the script and set on the config for players to start at level 20...
function onLogin(cid)
if getPlayerLevel(cid) < 20 then
doPlayerAddExperience(cid, (getExperienceForLevel(20) - getPlayerExperience(cid)))
end
return TRUE
end