Ir para conteúdo

Featured Replies

Postado
  • Solução

Um script mais completo ^^

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

local name = getCreatureName(cid)
local days = 30 -- dias que serão adicionados
local strg = 33339 -- valor da sua storage
local strg_n = 12120 -- não precisa editar
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, strg)
local timenow = os.time()


    if getPlayerStorageValue(cid, strg) - os.time() <= 0 then
time = timenow + daysvalue
    else
time = storageplayer + daysvalue
    end

        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
        setPlayerStorageValue(cid, strg, time)
local quantity = math.floor((getPlayerStorageValue(cid, strg) - timenow)/(24 * 60 * 60))
        doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
        doPlayerAddPremiumDays(cid, days)
        doRemoveItem(item.uid, 1)
    if getPlayerStorageValue(cid, strg_n) < 1  then
        setPlayerStorageValue(cid, strg_n, 1) 
        addEvent(doRemoveCreature, 5000, cid)
    end
return TRUE
end

Editado por Noob II (veja o histórico de edições)

  • Respostas 23
  • Visualizações 954
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Um script mais completo   function onUse(cid, item, fromPosition, itemEx, toPosition) local name = getCreatureName(cid) local days = 30 -- dias que serão adicionados local strg = 33339 -- va

  • Você testou o meu script de premium points? apareceu algo no client ou ainda ficou free account? 

Postado
  • Autor
1 minuto atrás, Noob II disse:

Um script mais completo ^^

 

 


function onUse(cid, item, fromPosition, itemEx, toPosition)

local name = getCreatureName(cid)
local days = 30 -- dias que serão adicionados
local strg = 33339 -- valor da sua storage
local strg_n = 12120 -- não precisa editar
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, strg)
local timenow = os.time()


    if getPlayerStorageValue(cid, strg) - os.time() <= 0 then
time = timenow + daysvalue
    else
time = storageplayer + daysvalue
    end

        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
        setPlayerStorageValue(cid, strg, time)
local quantity = math.floor((getPlayerStorageValue(cid, strg) - timenow)/(24 * 60 * 60))
        doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
        doPlayerAddPremiumDays(cid, 30)
        doRemoveItem(item.uid, 1)
    if getPlayerStorageValue(cid, strg_n) < 1  then
        setPlayerStorageValue(cid, strg_n, 1) 
        addEvent(doRemoveCreature, 5000, cid)
    end
return TRUE
end

 



Muito bom rep++ , porem me diga oque mudou ?? (ficou maior a script porem não entendo muito.)

 

Postado
5 minutos atrás, Noob II disse:

 

Posta teu config.lua ai 

 

Desculpa, não sei esconder, mas tá ai

accountManager = true
namelockManager = true
newPlayerChooseVoc = true
newPlayerSpawnPosX = 1027
newPlayerSpawnPosY = 910
newPlayerSpawnPosZ = 7
newPlayerTownId = 1
newPlayerLevel = 1
newPlayerMagicLevel = 1
generateAccountNumber = false

redSkullLength = 7 * 24 * 60 * 60
blackSkullLength = 15 * 24 * 60 * 60
dailyFragsToRedSkull = 30
weeklyFragsToRedSkull = 40
monthlyFragsToRedSkull = 100
dailyFragsToBlackSkull = 40
weeklyFragsToBlackSkull = 30
monthlyFragsToBlackSkull = 120
dailyFragsToBanishment = 25
weeklyFragsToBanishment = 45
monthlyFragsToBanishment = 450
blackSkulledDeathHealth = 1
blackSkulledDeathMana = 0
useBlackSkull = true
useFragHandler = true
advancedFragList = false

notationsToBan = 3
warningsToFinalBan = 4
warningsToDeletion = 5
banLength = 3 * 24 * 60 * 60
killsBanLength = 0
finalBanLength = 3 * 24 * 60 * 60
ipBanishmentLength = 3 * 24 * 60 * 60
broadcastBanishments = false
maxViolationCommentSize = 200
violationNameReportActionType = 2
autoBanishUnknownBytes = true

worldType = "pvp"
protectionLevel = 150
pvpTileIgnoreLevelAndVocationProtection = true
pzLocked = 20 * 1000
huntingDuration = 60 * 1000
criticalHitChance = 20
criticalHitMultiplier = 1
displayCriticalHitNotify = false
removeWeaponAmmunition = false
removeWeaponCharges = false
removeRuneCharges = true
whiteSkullTime = 3 * 60 * 1000
noDamageToSameLookfeet = false
showHealingDamage = true
showHealingDamageForMonsters = false
fieldOwnershipDuration = 5 * 1000
stopAttackingAtExit = true
oldConditionAccuracy = false
loginProtectionPeriod = 5 * 1000
deathLostPercent = 10
stairhopDelay = 2 * 1000
pushCreatureDelay = 1 * 1000
deathContainerId = 1987
gainExperienceColor = 215
addManaSpentInPvPZone = true
squareColor = 0
allowFightback = true

worldId = 0
ip = "lovestoo.zapto.org"
bindOnlyConfiguredIpAddress = false
loginPort = 7171
gamePort = 7172
adminPort = 7171
statusPort = 7171
loginTries = 10
retryTimeout = 5 * 1000
loginTimeout = 60 * 1000
maxPlayers = 100
motd = "Bem Vindo ao NTO Lovestoo!"
displayOnOrOffAtCharlist = false
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "NTO Lovestoo"
loginMessage = "Bem Vindo ao NTO Lovestoo!"
statusTimeout = 5 * 60 * 1000
replaceKickOnLogin = true
forceSlowConnectionsToDisconnect = false
loginOnlyWithLoginServer = false
premiumPlayerSkipWaitList = false

sqlType = "sqlite"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "root"
sqlPass = "ja2uk2p2"
sqlDatabase = "naruto"
sqlFile = "forgottenserver.s3db"
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
encryptionType = "plain"

deathListEnabled = true
deathListRequiredTime = 1 * 60 * 1000
deathAssistCount = 19
maxDeathRecords = 5

ingameGuildManagement = true
levelToFormGuild = 200
premiumDaysToFormGuild = 0
guildNameMinLength = 3
guildNameMaxLength = 20

highscoreDisplayPlayers = 15
updateHighscoresAfterMinutes = 1

buyableAndSellableHouses = true
houseNeedPremium = false
bedsRequirePremium = false
levelToBuyHouse = 200
housesPerAccount = 0
houseRentAsPrice = false
housePriceAsRent = false
housePriceEachSquare = 25000
houseRentPeriod = "Never"
houseCleanOld = 0
guildHalls = false

timeBetweenActions = 200
timeBetweenExActions = 1000
hotkeyAimbotEnabled = true

mapName = "NTOServer"
mapAuthor = "MadaraOT"
randomizeTiles = true
storeTrash = true
cleanProtectedZones = true
mailboxDisabledTowns = ""

defaultPriority = "high"
niceLevel = 5
coresUsed = "-1"

optimizeDatabaseAtStartup = true
removePremiumOnInit = true
confirmOutdatedVersion = false

formulaLevel = 2.0
formulaMagic = 0.5
bufferMutedOnSpellFailure = false
spellNameInsteadOfWords = true
emoteSpells = true

allowChangeOutfit = false
allowChangeColors = false
allowChangeAddons = false
disableOutfitsForPrivilegedPlayers = true
addonsOnlyPremium = true

dataDirectory = "data/"
bankSystem = true
displaySkillLevelOnAdvance = true
promptExceptionTracerErrorBox = true
separateViplistPerCharacter = false
maximumDoorLevel = 999
maxMessageBuffer = 8

saveGlobalStorage = false
useHouseDataStorage = false
storePlayerDirection = false

checkCorpseOwner = false
monsterLootMessage = 3
monsterLootMessageType = 25

ghostModeInvisibleEffect = false
ghostModeSpellEffects = true

idleWarningTime = 14 * 60 * 1000
idleKickTime = 15 * 60 * 1000
expireReportsAfterReads = 1
playerQueryDeepness = 2
maxItemsPerPZTile = 0
maxItemsPerHouseTile = 0

freePremium = false
premiumForPromotion = true

blessingOnlyPremium = false
blessingReductionBase = 100
blessingReductionDecreament = 100
eachBlessReduction = 17

experienceStages = true
rateExperience = 1
rateExperienceFromPlayers = 0
rateSkill = 10
rateMagic = 15
rateLoot = 4
rateSpawn = 6

rateMonsterHealth = 1.0
rateMonsterMana = 1.0
rateMonsterAttack = 1.0
rateMonsterDefense = 1.0

minLevelThresholdForKilledPlayer = 0.9
maxLevelThresholdForKilledPlayer = 1.1

rateStaminaLoss = 1
rateStaminaGain = 3
rateStaminaThresholdGain = 1
staminaRatingLimitTop = 40 * 60
staminaRatingLimitBottom = 14 * 60
rateStaminaAboveNormal = 1.5
rateStaminaUnderNormal = 0.0
staminaThresholdOnlyPremium = false

experienceShareRadiusX = 30
experienceShareRadiusY = 30
experienceShareRadiusZ = 1
experienceShareLevelDifference = 2 / 3
extraPartyExperienceLimit = 20
extraPartyExperiencePercent = 5
experienceShareActivity = 2 * 60 * 1000

globalSaveEnabled = false
globalSaveHour = 8
shutdownAtGlobalSave = false
cleanMapAtGlobalSave = false

deSpawnRange = 2
deSpawnRadius = 50

maxPlayerSummons = 4
teleportAllSummons = false
teleportPlayerSummons = false

ownerName = "NTO Server"
ownerEmail = "--"
url = "--"
location = "Brazil"
displayGamemastersWithOnlineCommand = false

adminLogsEnabled = false
displayPlayersLogging = true
prefixChannelLogs = ""
runFile = ""
outLogName = ""
errorLogName = ""
truncateLogsOnStartup = false

Postado
7 minutos atrás, Yago Blind. disse:



Muito bom rep++ , porem me diga oque mudou ?? (ficou maior a script porem não entendo muito.)

 

 

Não muita coisa amigo, só foi adicionado uma função para setar e checar a storage dos dias premium do player e algumas linhas para deixar o script mais organizado ^^

 

12 minutos atrás, Bazires disse:

 

Desculpa, não sei esconder, mas tá ai

accountManager = true


namelockManager = true
newPlayerChooseVoc = true
newPlayerSpawnPosX = 1027
newPlayerSpawnPosY = 910
newPlayerSpawnPosZ = 7
newPlayerTownId = 1
newPlayerLevel = 1
newPlayerMagicLevel = 1
generateAccountNumber = false

redSkullLength = 7 * 24 * 60 * 60
blackSkullLength = 15 * 24 * 60 * 60
dailyFragsToRedSkull = 30
weeklyFragsToRedSkull = 40
monthlyFragsToRedSkull = 100
dailyFragsToBlackSkull = 40
weeklyFragsToBlackSkull = 30
monthlyFragsToBlackSkull = 120
dailyFragsToBanishment = 25
weeklyFragsToBanishment = 45
monthlyFragsToBanishment = 450
blackSkulledDeathHealth = 1
blackSkulledDeathMana = 0
useBlackSkull = true
useFragHandler = true
advancedFragList = false

notationsToBan = 3
warningsToFinalBan = 4
warningsToDeletion = 5
banLength = 3 * 24 * 60 * 60
killsBanLength = 0
finalBanLength = 3 * 24 * 60 * 60
ipBanishmentLength = 3 * 24 * 60 * 60
broadcastBanishments = false
maxViolationCommentSize = 200
violationNameReportActionType = 2
autoBanishUnknownBytes = true

worldType = "pvp"
protectionLevel = 150
pvpTileIgnoreLevelAndVocationProtection = true
pzLocked = 20 * 1000
huntingDuration = 60 * 1000
criticalHitChance = 20
criticalHitMultiplier = 1
displayCriticalHitNotify = false
removeWeaponAmmunition = false
removeWeaponCharges = false
removeRuneCharges = true
whiteSkullTime = 3 * 60 * 1000
noDamageToSameLookfeet = false
showHealingDamage = true
showHealingDamageForMonsters = false
fieldOwnershipDuration = 5 * 1000
stopAttackingAtExit = true
oldConditionAccuracy = false
loginProtectionPeriod = 5 * 1000
deathLostPercent = 10
stairhopDelay = 2 * 1000
pushCreatureDelay = 1 * 1000
deathContainerId = 1987
gainExperienceColor = 215
addManaSpentInPvPZone = true
squareColor = 0
allowFightback = true

worldId = 0
ip = "lovestoo.zapto.org"
bindOnlyConfiguredIpAddress = false
loginPort = 7171
gamePort = 7172
adminPort = 7171
statusPort = 7171
loginTries = 10
retryTimeout = 5 * 1000
loginTimeout = 60 * 1000
maxPlayers = 100
motd = "Bem Vindo ao NTO Lovestoo!"
displayOnOrOffAtCharlist = false
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "NTO Lovestoo"
loginMessage = "Bem Vindo ao NTO Lovestoo!"
statusTimeout = 5 * 60 * 1000
replaceKickOnLogin = true
forceSlowConnectionsToDisconnect = false
loginOnlyWithLoginServer = false
premiumPlayerSkipWaitList = false

sqlType = "sqlite"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "root"
sqlPass = "ja2uk2p2"
sqlDatabase = "naruto"
sqlFile = "forgottenserver.s3db"
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
encryptionType = "plain"

deathListEnabled = true
deathListRequiredTime = 1 * 60 * 1000
deathAssistCount = 19
maxDeathRecords = 5

ingameGuildManagement = true
levelToFormGuild = 200
premiumDaysToFormGuild = 0
guildNameMinLength = 3
guildNameMaxLength = 20

highscoreDisplayPlayers = 15
updateHighscoresAfterMinutes = 1

buyableAndSellableHouses = true
houseNeedPremium = false
bedsRequirePremium = false
levelToBuyHouse = 200
housesPerAccount = 0
houseRentAsPrice = false
housePriceAsRent = false
housePriceEachSquare = 25000
houseRentPeriod = "Never"
houseCleanOld = 0
guildHalls = false

timeBetweenActions = 200
timeBetweenExActions = 1000
hotkeyAimbotEnabled = true

mapName = "NTOServer"
mapAuthor = "MadaraOT"
randomizeTiles = true
storeTrash = true
cleanProtectedZones = true
mailboxDisabledTowns = ""

defaultPriority = "high"
niceLevel = 5
coresUsed = "-1"

optimizeDatabaseAtStartup = true
removePremiumOnInit = true
confirmOutdatedVersion = false

formulaLevel = 2.0
formulaMagic = 0.5
bufferMutedOnSpellFailure = false
spellNameInsteadOfWords = true
emoteSpells = true

allowChangeOutfit = false
allowChangeColors = false
allowChangeAddons = false
disableOutfitsForPrivilegedPlayers = true
addonsOnlyPremium = true

dataDirectory = "data/"
bankSystem = true
displaySkillLevelOnAdvance = true
promptExceptionTracerErrorBox = true
separateViplistPerCharacter = false
maximumDoorLevel = 999
maxMessageBuffer = 8

saveGlobalStorage = false
useHouseDataStorage = false
storePlayerDirection = false

checkCorpseOwner = false
monsterLootMessage = 3
monsterLootMessageType = 25

ghostModeInvisibleEffect = false
ghostModeSpellEffects = true

idleWarningTime = 14 * 60 * 1000
idleKickTime = 15 * 60 * 1000
expireReportsAfterReads = 1
playerQueryDeepness = 2
maxItemsPerPZTile = 0
maxItemsPerHouseTile = 0

freePremium = false
premiumForPromotion = true

blessingOnlyPremium = false
blessingReductionBase = 100
blessingReductionDecreament = 100
eachBlessReduction = 17

experienceStages = true
rateExperience = 1
rateExperienceFromPlayers = 0
rateSkill = 10
rateMagic = 15
rateLoot = 4
rateSpawn = 6

rateMonsterHealth = 1.0
rateMonsterMana = 1.0
rateMonsterAttack = 1.0
rateMonsterDefense = 1.0

minLevelThresholdForKilledPlayer = 0.9
maxLevelThresholdForKilledPlayer = 1.1

rateStaminaLoss = 1
rateStaminaGain = 3
rateStaminaThresholdGain = 1
staminaRatingLimitTop = 40 * 60
staminaRatingLimitBottom = 14 * 60
rateStaminaAboveNormal = 1.5
rateStaminaUnderNormal = 0.0
staminaThresholdOnlyPremium = false

experienceShareRadiusX = 30
experienceShareRadiusY = 30
experienceShareRadiusZ = 1
experienceShareLevelDifference = 2 / 3
extraPartyExperienceLimit = 20
extraPartyExperiencePercent = 5
experienceShareActivity = 2 * 60 * 1000

globalSaveEnabled = false
globalSaveHour = 8
shutdownAtGlobalSave = false
cleanMapAtGlobalSave = false

deSpawnRange = 2
deSpawnRadius = 50

maxPlayerSummons = 4
teleportAllSummons = false
teleportPlayerSummons = false

ownerName = "NTO Server"
ownerEmail = "--"
url = "--"
location = "Brazil"
displayGamemastersWithOnlineCommand = false

adminLogsEnabled = false
displayPlayersLogging = true
prefixChannelLogs = ""
runFile = ""
outLogName = ""
errorLogName = ""
truncateLogsOnStartup = false

 

Já tá configurado corretamente, ainda continua free account? 

Postado
Agora, Noob II disse:

 

Não muita coisa amigo, só foi adicionado uma função para setar e checar a storage dos dias premium do player e algumas linhas para deixar o script mais organizado ^^

 

 

Já tá configurado corretamente, ainda continua free account? 

Sim, to usando até sua script, e continua a mesma coisa, da o acesso mas fica free account

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo