Postado Janeiro 18, 2023 2 anos Autor 1 hora atrás, Anderson Sacani disse: Mostra o arquivo de login.lua, provavelmente tu adicionou estas linha a cima da função 'function onLogin' foi a última coisa que adicionei: local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) if(getBooleanFromString(getConfigValue('accountManager')) == false) then if (getCreatureName(cid) == "Account Manager") then return doRemoveCreature(cid, true) end end local loss = getConfigValue('deathLostPercent') if(loss ~= nil and getPlayerStorageValue(cid, "bless") ~= 5) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 7) end if(getPlayerStorageValue(cid, "death_bless") == 1) then local t = {PLAYERLOSS_EXPERIENCE, PLAYERLOSS_SKILLS, PLAYERLOSS_ITEMS, PLAYERLOSS_CONTAINERS} for i = 1, #t do doPlayerSetLossPercent(cid, t[i], 100) end setPlayerStorageValue(cid, "death_bless", 0) 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 addEvent(valid(doCreatureSay), 500, cid, "Hello, it appears that your character has been locked for name violating rules, what new name would you like to have?", TALKTYPE_PRIVATE_NP, true, cid) elseif(accountManager == MANAGER_ACCOUNT) then addEvent(valid(doCreatureSay), 500, cid, "Hello, type 'account' to manage your account. If you would like to start over, type 'cancel' anywhere.", TALKTYPE_PRIVATE, true, cid) else addEvent(valid(doCreatureSay), 500, cid, "Hello, type 'account' to create an account or 'recover' to recover an account.", TALKTYPE_PRIVATE, true, cid) end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "PVPCreature") registerCreatureEvent(cid, "ReportBug") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "GuildEvents") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "ProtectLevel") 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) doPlayerSendTextMessage(cid, TALKTYPE_PRIVATE, "New feature: now you can use command <!auto spell, mana> ex: <!auto exura, 25>") doPlayerSendTextMessage(cid, TALKTYPE_PRIVATE, "This command will automatically eat food for you, It work for making runes.>.") return true end if getPlayerStorageValue(cid, 5937910) ~= -1 then if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 412, 2) else doPlayerAddOutfit(cid, 316, 2) end end
Postado Janeiro 18, 2023 2 anos Como falei, você adicionou as linhas fora da função 'function onLogin', no caso substitua por esse: local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) if (getBooleanFromString(getConfigValue('accountManager')) == false) then if (getCreatureName(cid) == "Account Manager") then return doRemoveCreature(cid, true) end end local loss = getConfigValue('deathLostPercent') if (loss ~= nil and getPlayerStorageValue(cid, "bless") ~= 5) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 7) end if (getPlayerStorageValue(cid, "death_bless") == 1) then local t = { PLAYERLOSS_EXPERIENCE, PLAYERLOSS_SKILLS, PLAYERLOSS_ITEMS, PLAYERLOSS_CONTAINERS } for i = 1, #t do doPlayerSetLossPercent(cid, t[i], 100) end setPlayerStorageValue(cid, "death_bless", 0) 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 addEvent(valid(doCreatureSay), 500, cid, "Hello, it appears that your character has been locked for name violating rules, what new name would you like to have?" , TALKTYPE_PRIVATE_NP, true, cid) elseif (accountManager == MANAGER_ACCOUNT) then addEvent(valid(doCreatureSay), 500, cid, "Hello, type 'account' to manage your account. If you would like to start over, type 'cancel' anywhere.", TALKTYPE_PRIVATE, true, cid) else addEvent(valid(doCreatureSay), 500, cid, "Hello, type 'account' to create an account or 'recover' to recover an account.", TALKTYPE_PRIVATE, true, cid) end if (not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "PVPCreature") registerCreatureEvent(cid, "ReportBug") if (config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "GuildEvents") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "ProtectLevel") 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) doPlayerSendTextMessage(cid, TALKTYPE_PRIVATE, "New feature: now you can use command <!auto spell, mana> ex: <!auto exura, 25>") doPlayerSendTextMessage(cid, TALKTYPE_PRIVATE, "This command will automatically eat food for you, It work for making runes.>.") --[[ Se o persoangem têm a storage 5937910, irá automáticamente receber o addon do chapéu; Se for homem, receberá o chapéu do mage; Se for mulher, receberá o chapéu da summoner; ]] if getPlayerStorageValue(cid, 5937910) ~= -1 then if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 412, 2) else doPlayerAddOutfit(cid, 316, 2) end end return true end
Postado Janeiro 18, 2023 2 anos Autor 7 minutos atrás, Anderson Sacani disse: Como falei, você adicionou as linhas fora da função 'function onLogin', no caso substitua por esse: local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) if (getBooleanFromString(getConfigValue('accountManager')) == false) then if (getCreatureName(cid) == "Account Manager") then return doRemoveCreature(cid, true) end end local loss = getConfigValue('deathLostPercent') if (loss ~= nil and getPlayerStorageValue(cid, "bless") ~= 5) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 7) end if (getPlayerStorageValue(cid, "death_bless") == 1) then local t = { PLAYERLOSS_EXPERIENCE, PLAYERLOSS_SKILLS, PLAYERLOSS_ITEMS, PLAYERLOSS_CONTAINERS } for i = 1, #t do doPlayerSetLossPercent(cid, t[i], 100) end setPlayerStorageValue(cid, "death_bless", 0) 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 addEvent(valid(doCreatureSay), 500, cid, "Hello, it appears that your character has been locked for name violating rules, what new name would you like to have?" , TALKTYPE_PRIVATE_NP, true, cid) elseif (accountManager == MANAGER_ACCOUNT) then addEvent(valid(doCreatureSay), 500, cid, "Hello, type 'account' to manage your account. If you would like to start over, type 'cancel' anywhere.", TALKTYPE_PRIVATE, true, cid) else addEvent(valid(doCreatureSay), 500, cid, "Hello, type 'account' to create an account or 'recover' to recover an account.", TALKTYPE_PRIVATE, true, cid) end if (not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "PVPCreature") registerCreatureEvent(cid, "ReportBug") if (config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "GuildEvents") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "ProtectLevel") 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) doPlayerSendTextMessage(cid, TALKTYPE_PRIVATE, "New feature: now you can use command <!auto spell, mana> ex: <!auto exura, 25>") doPlayerSendTextMessage(cid, TALKTYPE_PRIVATE, "This command will automatically eat food for you, It work for making runes.>.") --[[ Se o persoangem têm a storage 5937910, irá automáticamente receber o addon do chapéu; Se for homem, receberá o chapéu do mage; Se for mulher, receberá o chapéu da summoner; ]] if getPlayerStorageValue(cid, 5937910) ~= -1 then if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 412, 2) else doPlayerAddOutfit(cid, 316, 2) end end return true end salvou irmão, agradeço dmss!!
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.