poderia me ajudar a inserir essa parte
-- Verificar se é primeira vez que loga, pois ao usar storage ele ja começa com -1,
-- Então vamos zera-lo para que sua Reputação comece do 0.
if (getPlayerStorageValue(cid, 102087) ~= 1) then
setPlayerStorageValue(cid, 102087, 1)
setPlayerStorageValue(cid, 102086, 0)
end
registerCreatureEvent(cid, "RepSystem")
no meu login.lua ?
Da erro na hora de iniciar o ot,fala que nao consegue achar o repsystem...
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')),
addMount = getBooleanFromString(getConfigValue('gainMountOnLogin'))
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]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[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif] doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_TEAL, "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_TEAL, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_TEAL, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]if(config.addMount) then
doPlayerAddMount(cid, 1)
doPlayerAddMount(cid, 2)
doPlayerAddMount(cid, 3)
doPlayerAddMount(cid, 4)
doPlayerAddMount(cid, 5)
doPlayerAddMount(cid, 6)
doPlayerAddMount(cid, 7)
doPlayerAddMount(cid, 8)
doPlayerAddMount(cid, 9)
doPlayerAddMount(cid, 10)
doPlayerAddMount(cid, 11)
doPlayerAddMount(cid, 12)
end[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]if (getPlayerStorageValue(cid, 102087) ~= 1) then
setPlayerStorageValue(cid, 102087, 1)
setPlayerStorageValue(cid, 102086, 0)
end[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "ChannelEvents")[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "Castle")
registerCreatureEvent(cid, "FirstItems")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "VipReceive")
registerCreatureEvent(cid, "repsystem")
return true[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]end[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]
o meu login.lua esta assim