Postado Agosto 10, 2016 8 anos Bom dia, Boa tarde, Boa noite... Olá galera do TibiaKing! Venho pedir uma script de o Player spawnar em alguns lugares aleatórios configurados na mesma. Se não me engano no "config.lua" da para configurar somente uma posição marcada, e, nessa script seria possivel spawnar em vários lugares aleatórios... Se alguém poder me ajudar, ficarei grato! Abraços a Todos! Editado Agosto 10, 2016 8 anos por SomeBody (veja o histórico de edições)
Postado Agosto 10, 2016 8 anos Olá de novo SHAUSHUAHSAHUS Tu quer que seja no primeiro login msm? Passa o teu config.lua aí De onde eu venho se dizia, que o chorar não é do homem, e o homem o que sente guarda bem no coração...
Postado Agosto 10, 2016 8 anos Autor 17 minutos atrás, Gabriel Netto disse: Olá de novo SHAUSHUAHSAHUS Tu quer que seja no primeiro login msm? Passa o teu config.lua aí Olá novamente amigo, hueheuhue. No primeiro login não, só depois da primeira morte . Aqui está: Spoiler accountManager = true namelockManager = true newPlayerChooseVoc = true newPlayerSpawnPosX = 1026 newPlayerSpawnPosY = 910 newPlayerSpawnPosZ = 7 newPlayerTownId = 1 newPlayerLevel = 1 newPlayerMagicLevel = 1 generateAccountNumber = false redSkullLength = 1 * 24 * 60 * 60 blackSkullLength = 3 * 24 * 60 * 60 dailyFragsToRedSkull = 20 weeklyFragsToRedSkull = 0 monthlyFragsToRedSkull = 0 dailyFragsToBlackSkull = 40 weeklyFragsToBlackSkull = 0 monthlyFragsToBlackSkull = 0 dailyFragsToBanishment = 50 weeklyFragsToBanishment = 0 monthlyFragsToBanishment = 0 blackSkulledDeathHealth = 1 blackSkulledDeathMana = 0 useBlackSkull = true useFragHandler = true advancedFragList = false notationsToBan = 3 warningsToFinalBan = 4 warningsToDeletion = 5 banLength = 1 * 24 * 60 * 60 killsBanLength = 1 * 24 * 60 * 60 finalBanLength = 1 * 24 * 60 * 60 ipBanishmentLength = 1 * 24 * 60 * 60 broadcastBanishments = true maxViolationCommentSize = 200 violationNameReportActionType = 2 autoBanishUnknownBytes = false worldType = "pvp" protectionLevel = 199 pvpTileIgnoreLevelAndVocationProtection = true pzLocked = 15 * 1000 huntingDuration = 60 * 1000 criticalHitChance = 30 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 = "127.0.0.1" bindOnlyConfiguredIpAddress = false loginPort = 7171 gamePort = 7172 adminPort = 7171 statusPort = 7171 loginTries = 10 retryTimeout = 5 * 1000 loginTimeout = 60 * 1000 maxPlayers = 125 motd = "Bem Vindo ao NTOServer!" displayOnOrOffAtCharlist = false onePlayerOnlinePerAccount = false allowClones = false serverName = "NTOServer" loginMessage = "Bem Vindo ao NTOServer!! para quem tiver levando Debugs baixe o novo client atualizado (01/07/13): http://www.mediafire.com/download/7qzx32xa6w39x3a/NTOServer_0.4.3.rar" statusTimeout = 5 * 60 * 1000 replaceKickOnLogin = true forceSlowConnectionsToDisconnect = false loginOnlyWithLoginServer = false premiumPlayerSkipWaitList = false sqlType = "sqlite" sqlHost = "localhost" sqlPort = 3306 sqlUser = "root" sqlPass = "" sqlDatabase = "" sqlFile = "forgottenserver.s3db" sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 encryptionType = "plain" deathListEnabled = true deathListRequiredTime = 1 * 60 * 1000 deathAssistCount = 19 maxDeathRecords = 5 ingameGuildManagement = true levelToFormGuild = 150 premiumDaysToFormGuild = 0 guildNameMinLength = 3 guildNameMaxLength = 20 highscoreDisplayPlayers = 15 updateHighscoresAfterMinutes = 2 buyableAndSellableHouses = true houseNeedPremium = false bedsRequirePremium = false levelToBuyHouse = 150 housesPerAccount = 0 houseRentAsPrice = false housePriceAsRent = false housePriceEachSquare = 15000 houseRentPeriod = "Week" houseCleanOld = 15 guildHalls = false timeBetweenActions = 200 timeBetweenExActions = 1000 hotkeyAimbotEnabled = true mapName = "NTOServer" mapAuthor = "NTOServer Team" randomizeTiles = true storeTrash = true cleanProtectedZones = true mailboxDisabledTowns = "-1" defaultPriority = "high" niceLevel = 5 coresUsed = "-1" optimizeDatabaseAtStartup = true removePremiumOnInit = true confirmOutdatedVersion = false formulaLevel = 5.0 formulaMagic = 1.0 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 = false blessingOnlyPremium = false blessingReductionBase = 100 blessingReductionDecreament = 100 eachBlessReduction = 17 experienceStages = true rateExperience = 1 rateExperienceFromPlayers = 0 rateSkill = 100 rateMagic = 60 rateLoot = 4 rateSpawn = 4 rateMonsterHealth = 1.0 rateMonsterMana = 1.0 rateMonsterAttack = 1.0 rateMonsterDefense = 1.0 minLevelThresholdForKilledPlayer = 0.9 maxLevelThresholdForKilledPlayer = 1.1 rateStaminaLoss = 1 rateStaminaGain = 3 rateStaminaThresholdGain = 12 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 = "NTOServer" ownerEmail = "--" url = "--" location = "Brazil" displayGamemastersWithOnlineCommand = false adminLogsEnabled = false displayPlayersLogging = true prefixChannelLogs = "" runFile = "" outLogName = "" errorLogName = "" truncateLogsOnStartup = false Abraços! Editado Agosto 10, 2016 8 anos por SomeBody Corrigi o que tinha dito. (veja o histórico de edições)
Postado Agosto 10, 2016 8 anos 45 minutes ago, SomeBody said: Olá novamente amigo, hueheuhue. No primeiro login não, só depois da primeira morte . Aqui está: Hide contents accountManager = true namelockManager = true newPlayerChooseVoc = true newPlayerSpawnPosX = 1026 newPlayerSpawnPosY = 910 newPlayerSpawnPosZ = 7 newPlayerTownId = 1 newPlayerLevel = 1 newPlayerMagicLevel = 1 generateAccountNumber = false redSkullLength = 1 * 24 * 60 * 60 blackSkullLength = 3 * 24 * 60 * 60 dailyFragsToRedSkull = 20 weeklyFragsToRedSkull = 0 monthlyFragsToRedSkull = 0 dailyFragsToBlackSkull = 40 weeklyFragsToBlackSkull = 0 monthlyFragsToBlackSkull = 0 dailyFragsToBanishment = 50 weeklyFragsToBanishment = 0 monthlyFragsToBanishment = 0 blackSkulledDeathHealth = 1 blackSkulledDeathMana = 0 useBlackSkull = true useFragHandler = true advancedFragList = false notationsToBan = 3 warningsToFinalBan = 4 warningsToDeletion = 5 banLength = 1 * 24 * 60 * 60 killsBanLength = 1 * 24 * 60 * 60 finalBanLength = 1 * 24 * 60 * 60 ipBanishmentLength = 1 * 24 * 60 * 60 broadcastBanishments = true maxViolationCommentSize = 200 violationNameReportActionType = 2 autoBanishUnknownBytes = false worldType = "pvp" protectionLevel = 199 pvpTileIgnoreLevelAndVocationProtection = true pzLocked = 15 * 1000 huntingDuration = 60 * 1000 criticalHitChance = 30 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 = "127.0.0.1" bindOnlyConfiguredIpAddress = false loginPort = 7171 gamePort = 7172 adminPort = 7171 statusPort = 7171 loginTries = 10 retryTimeout = 5 * 1000 loginTimeout = 60 * 1000 maxPlayers = 125 motd = "Bem Vindo ao NTOServer!" displayOnOrOffAtCharlist = false onePlayerOnlinePerAccount = false allowClones = false serverName = "NTOServer" loginMessage = "Bem Vindo ao NTOServer!! para quem tiver levando Debugs baixe o novo client atualizado (01/07/13): http://www.mediafire.com/download/7qzx32xa6w39x3a/NTOServer_0.4.3.rar" statusTimeout = 5 * 60 * 1000 replaceKickOnLogin = true forceSlowConnectionsToDisconnect = false loginOnlyWithLoginServer = false premiumPlayerSkipWaitList = false sqlType = "sqlite" sqlHost = "localhost" sqlPort = 3306 sqlUser = "root" sqlPass = "" sqlDatabase = "" sqlFile = "forgottenserver.s3db" sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 encryptionType = "plain" deathListEnabled = true deathListRequiredTime = 1 * 60 * 1000 deathAssistCount = 19 maxDeathRecords = 5 ingameGuildManagement = true levelToFormGuild = 150 premiumDaysToFormGuild = 0 guildNameMinLength = 3 guildNameMaxLength = 20 highscoreDisplayPlayers = 15 updateHighscoresAfterMinutes = 2 buyableAndSellableHouses = true houseNeedPremium = false bedsRequirePremium = false levelToBuyHouse = 150 housesPerAccount = 0 houseRentAsPrice = false housePriceAsRent = false housePriceEachSquare = 15000 houseRentPeriod = "Week" houseCleanOld = 15 guildHalls = false timeBetweenActions = 200 timeBetweenExActions = 1000 hotkeyAimbotEnabled = true mapName = "NTOServer" mapAuthor = "NTOServer Team" randomizeTiles = true storeTrash = true cleanProtectedZones = true mailboxDisabledTowns = "-1" defaultPriority = "high" niceLevel = 5 coresUsed = "-1" optimizeDatabaseAtStartup = true removePremiumOnInit = true confirmOutdatedVersion = false formulaLevel = 5.0 formulaMagic = 1.0 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 = false blessingOnlyPremium = false blessingReductionBase = 100 blessingReductionDecreament = 100 eachBlessReduction = 17 experienceStages = true rateExperience = 1 rateExperienceFromPlayers = 0 rateSkill = 100 rateMagic = 60 rateLoot = 4 rateSpawn = 4 rateMonsterHealth = 1.0 rateMonsterMana = 1.0 rateMonsterAttack = 1.0 rateMonsterDefense = 1.0 minLevelThresholdForKilledPlayer = 0.9 maxLevelThresholdForKilledPlayer = 1.1 rateStaminaLoss = 1 rateStaminaGain = 3 rateStaminaThresholdGain = 12 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 = "NTOServer" ownerEmail = "--" url = "--" location = "Brazil" displayGamemastersWithOnlineCommand = false adminLogsEnabled = false displayPlayersLogging = true prefixChannelLogs = "" runFile = "" outLogName = "" errorLogName = "" truncateLogsOnStartup = false Abraços! Cara, eu tentei fazer aqui e não dá pra por isso no config.lua. Fiz meio gambiarra mas fiz, ehauaehu. Tu deixa o town 1 no config.lua e deixa o spawnpos que tá. Ele vai ficar meio "inutilizado". Cria um arquivo chamado primeirologin.lua no creaturescripts e põe isso: (não esquece de botar as posições que o player vai spawnar) function onLogin(cid) --[[se quiser adicionar mais é só ir repetindo essa linha, aumentando no a = math.random(1, aumentaaq) e no elseif a == aumentaaq elseif a == 5 doTeleportThing(cid, {x = , y = , z = }) --põe a posição do quarto local doSendMagicEffect(getCreaturePosition(cid), 11) doPlayerSetTown(cid, POEAIDDACIDADEDOLOCAL) ]]-- if getCreatureName(cid) ~= "Account Manager" then if (getPlayerLastLoginSaved(cid) < 0) then local a = math.random(1, 4) --por último tu põe o número de locais que pode nascer doPlayerPopupFYI(cid, "Põe o texto que vai aparecer ao logar pela primeira vez") if a == 1 doTeleportThing(cid, {x = , y = , z = }) --põe a posição do primeiro local doSendMagicEffect(getCreaturePosition(cid), 11) doPlayerSetTown(cid, POEAIDDACIDADEDOLOCAL) elseif a == 2 doTeleportThing(cid, {x = , y = , z = }) --põe a posição do segundo local doSendMagicEffect(getCreaturePosition(cid), 11) doPlayerSetTown(cid, POEAIDDACIDADEDOLOCAL) elseif a == 3 doTeleportThing(cid, {x = , y = , z = }) --põe a posição do terceiro local doSendMagicEffect(getCreaturePosition(cid), 11) doPlayerSetTown(cid, POEAIDDACIDADEDOLOCAL) elseif a == 4 doTeleportThing(cid, {x = , y = , z = }) --põe a posição do quarto local doSendMagicEffect(getCreaturePosition(cid), 11) doPlayerSetTown(cid, POEAIDDACIDADEDOLOCAL) end end end return true end Dps cria uma tag no creaturescripts.xml <event type="login" name="primeiroLogin" event="script" value="primeirologin.lua"/> Editado Agosto 10, 2016 8 anos por Gabriel Netto (veja o histórico de edições) De onde eu venho se dizia, que o chorar não é do homem, e o homem o que sente guarda bem no coração...
Postado Agosto 10, 2016 8 anos Autor Olá amigo, estou no celular, logo irei testar a script, Obrigado! Mas só uma dúvida... essa script é de spawnar pela primeira vez logo em seguida depois da primeira morte? Ou ela serve para o primeiro login e depois da morte ele ir para os lugares configuradas na mesma? Abraços! 19 horas atrás, Gabriel Netto disse: Cara, eu tentei fazer aqui e não dá pra por isso no config.lua. Fiz meio gambiarra mas fiz, ehauaehu. Tu deixa o town 1 no config.lua e deixa o spawnpos que tá. Ele vai ficar meio "inutilizado". Cria um arquivo chamado primeirologin.lua no creaturescripts e põe isso: (não esquece de botar as posições que o player vai spawnar) function onLogin(cid) --[[se quiser adicionar mais é só ir repetindo essa linha, aumentando no a = math.random(1, aumentaaq) e no elseif a == aumentaaq elseif a == 5 doTeleportThing(cid, {x = , y = , z = }) --põe a posição do quarto local doSendMagicEffect(getCreaturePosition(cid), 11) doPlayerSetTown(cid, POEAIDDACIDADEDOLOCAL) ]]-- if getCreatureName(cid) ~= "Account Manager" then if (getPlayerLastLoginSaved(cid) < 0) then local a = math.random(1, 4) --por último tu põe o número de locais que pode nascer doPlayerPopupFYI(cid, "Põe o texto que vai aparecer ao logar pela primeira vez") if a == 1 doTeleportThing(cid, {x = , y = , z = }) --põe a posição do primeiro local doSendMagicEffect(getCreaturePosition(cid), 11) doPlayerSetTown(cid, POEAIDDACIDADEDOLOCAL) elseif a == 2 doTeleportThing(cid, {x = , y = , z = }) --põe a posição do segundo local doSendMagicEffect(getCreaturePosition(cid), 11) doPlayerSetTown(cid, POEAIDDACIDADEDOLOCAL) elseif a == 3 doTeleportThing(cid, {x = , y = , z = }) --põe a posição do terceiro local doSendMagicEffect(getCreaturePosition(cid), 11) doPlayerSetTown(cid, POEAIDDACIDADEDOLOCAL) elseif a == 4 doTeleportThing(cid, {x = , y = , z = }) --põe a posição do quarto local doSendMagicEffect(getCreaturePosition(cid), 11) doPlayerSetTown(cid, POEAIDDACIDADEDOLOCAL) end end end return true end Dps cria uma tag no creaturescripts.xml <event type="login" name="primeiroLogin" event="script" value="primeirologin.lua"/> Testei aqui, a script deu uns eros de "Then", mas consegui configurar, só não entendi muito essa parte: " Tu deixa o town 1 no config.lua e deixa o spawnpos que tá", e essa: "doPlayerSetTown(cid, POEAIDDACIDADEDOLOCAL)" Se possivel explicar um pouquinho mais... ficarei grato! Abraços Amigo!
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.