
Tudo que Rusherzin postou
-
Widget Upcoming Events para tfs 1.2
Nunca vi esse widget. Poderia me mostrar algum site que tem isso? Se entender a ideia, posso fazer o código.
-
ERROR Login.lua
Já ia comentar que achava que era aquele # antes de player, mas se já resolveu, poste qual foi a resolução para ajudar quem estiver com o mesmo erro.
-
ERROR Login.lua
Tem que postar o arquivo que está com o erro.
-
[RESOLVIDO] Otserver n conecta!
As portas 7171 UDP/TCP e 7172 UDP/TCP estão abertas na máquina?
-
Pago Suporte
O script parece okay, mas achei esse tópico aqui Link. Não sei se funciona e qual é a razão disso, mas alguns disseram que deu certo.
-
Pago Suporte
Posta o arquivo data/talkactions/scripts/move1.lua.
-
Spell que usa distance effects ao inves de effect.
Eu sei fazer algo parecido com isso:
-
(Resolvido)Bau que da um item por dia
Não testei, mas: local config = { storage = 45392, exstorage = 40822, days = { ["Monday"] = { {itemid = 8839, count = {1, 3}} }, ["Tuesday"] = { {itemid = 2681, count = {1}}, {itemid = 2682, count = {1}}, {itemid = 2683, count = {1}} }, ["Wednesday"] = { {itemid = 2674, count = {1, 10}}, {itemid = 2675, count = {1, 10}}, {itemid = 2676, count = {1, 10}}, {itemid = 2673, count = {1, 10}} }, ["Thursday"] = { {itemid = 2679, count = {2, 15}}, {itemid = 2680, count = {1, 5}} }, ["Friday"] = { {itemid = 2788, count = {1, 3}} }, ["Saturday"] = { {itemid = 6393, count = {1}} }, ["Sunday"] = { {itemid = 2389, count = {2, 12}}, {itemid = 2690, count = {1, 5}} } } } function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) local x = config.days[os.date("%A")] if getPlayerStorageValue(cid, config.storage) == tonumber(os.date("%w")) and getPlayerStorageValue(cid, config.exstorage) > os.time() then return doPlayerSendCancel(cid, "The chest is empty, come back tomorrow for a new reward.") end local c = math.random(#x) local info, count = x[c].itemid, x[c].count[2] and math.random(x[c].count[1], x[c].count[2]) or x[c].count[1] if count > 1 then text = count .. " " .. getItemPluralNameById(info) else text = getItemArticleById(info) .. " " .. getItemNameById(info) end local itemx = doCreateItemEx(x[c].itemid, count) if doPlayerAddItemEx(itemx) ~= RETURNVALUE_NOERROR then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) text = "You have found a reward weighing " .. getItemWeightById(x[c].itemid, count) .. " oz. It is too heavy or you have not enough space." else text = "You have received " .. text .. "." setPlayerStorageValue(config.storage, tonumber(os.date("%w"))) setPlayerStorageValue(config.exstorage, os.time() + 24*60*60) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, text) return true end
-
(Resolvido)Bau que da um item por dia
Como eu estou com bastante sono e vi que a dúvida era simples, peguei o script lá na otland, olha: <action uniqueid="3001" script="quests/dailyquest.lua"/> local config = { storage = 45392, exstorage = 40822, days = { ["Monday"] = { {itemid = 8839, count = {1, 3}} }, ["Tuesday"] = { {itemid = 2681, count = {1}}, {itemid = 2682, count = {1}}, {itemid = 2683, count = {1}} }, ["Wednesday"] = { {itemid = 2674, count = {1, 10}}, {itemid = 2675, count = {1, 10}}, {itemid = 2676, count = {1, 10}}, {itemid = 2673, count = {1, 10}} }, ["Thursday"] = { {itemid = 2679, count = {2, 15}}, {itemid = 2680, count = {1, 5}} }, ["Friday"] = { {itemid = 2788, count = {1, 3}} }, ["Saturday"] = { {itemid = 6393, count = {1}} }, ["Sunday"] = { {itemid = 2389, count = {2, 12}}, {itemid = 2690, count = {1, 5}} } } } function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) local player = Player(cid) local x = config.days[os.date("%A")] if player:getStorageValue(config.storage) == tonumber(os.date("%w")) and player:getStorageValue(config.exstorage) > os.time() then return player:sendCancelMessage("The chest is empty, come back tomorrow for a new reward.") end local c = math.random(#x) local info, count = ItemType(x[c].itemid), x[c].count[2] and math.random(x[c].count[1], x[c].count[2]) or x[c].count[1] if count > 1 then text = count .. " " .. info:getPluralName() else text = info:getArticle() .. " " .. info:getName() end local itemx = Game.createItem(x[c].itemid, count) if player:addItemEx(itemx) ~= RETURNVALUE_NOERROR then player:getPosition():sendMagicEffect(CONST_ME_POFF) text = "You have found a reward weighing " .. itemx:getWeight() .. " oz. It is too heavy or you have not enough space." else text = "You have received " .. text .. "." player:setStorageValue(config.storage, tonumber(os.date("%w"))) player:setStorageValue(config.exstorage, os.time() + 24*60*60) end player:sendTextMessage(MESSAGE_INFO_DESCR, text) return true end Créditos: Limos
-
Spell que usa distance effects ao inves de effect.
Bom, creio que seja com: doSendDistanceShoot(fromPos, toPos, type) Se explicar melhor como quer o script, posso te ajudar a fazer.
-
Storage Spell [AJUDA FÁCIL]
Creio que seja assim: local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 41) setAttackFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 100, 100) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 43) setAttackFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 100,100) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 52) setAttackFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 300, 300) local area = createCombatArea(AREA_CROSS5X5) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 52) setAttackFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 300, 300) arr1 = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 3, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0} } arr2 = { {0, 0, 1, 1, 1, 0, 0}, {0, 1, 0, 0, 0, 1, 0}, {1, 0, 0, 0, 0, 0, 1}, {1, 0, 0, 3, 0, 0, 1}, {1, 0, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 1, 0}, {0, 0, 1, 1, 1, 0, 0} } arr3 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } arr4 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) local function onCastSpell1(parameters) doCombat(parameters.cid, combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, combat3, parameters.var) end local function onCastSpell4(parameters) doCombat(parameters.cid, combat4, parameters.var) end function onCastSpell(cid, var) if (getPlayerStorageValue(cid,9991) == 1) then local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 500, parameters) addEvent(onCastSpell3, 900, parameters) addEvent(onCastSpell4, 1300, parameters) else doPlayerPopupFYI(cid,"Voce nao usou a pedra demonic strike para habilitar esta spell.") end return true end
-
Tabela player_depotitems excluida.
REPAIR TABLE player_depotitems;
-
Mecher nas Ouflits
<outfit id="10" premium="yes" default="0" quest="6664"> <list gender="0" lookType="269" name="Guerreiro"/> <list gender="1" lookType="268" name="Guerreiro"/> </outfit> <outfit id="11" premium="yes" default="0" quest="6665"> <list gender="0" lookType="127" name="Arqueiro"/> <list gender="1" lookType="129" name="Arqueiro"/> </outfit> <outfit id="12" premium="yes" default="0" quest="6666"> <list gender="0" lookType="141" name="Mago"/> <list gender="1" lookType="130" name="Mago"/> </outfit> @Gustavo Ntos É só entregar a storage que está em quest ao player para que ele possa usá-la.
-
Definir posições iniciais
Sim, tem que mudar o local dos samples. Também fique atento ao town id configurado, ele tem que ser de uma cidade existente.
-
Não perdendo Aol após morrer
Tu comprou esse AoL ou criou ele com o /i ? Quando tu cria com comando, ele vem com várias cargas.
-
(Resolvido)Adicionar/Alterar Atributos, Editar descrição.
Sim, acho que seria mais apropriado um tópico da seção de pedidos.
-
(Resolvido)Adicionar/Alterar Atributos, Editar descrição.
Assim: local desc = getItemInfo(ITEMID).description local newitem = doPlayerAddItem(cid, ID, 1) doItemSetAttribute(newitem, "description", desc.." ".."Nova description")
-
(Resolvido)[PEDIDO] Criar char com foto.
Aquele ali é só o accountmanagement.php.
-
(Resolvido)[PEDIDO] Criar char com foto.
Cara, tentei fazer aqui, não sei se deu certo. Sou horrível com html. Já que o spoiler está bugando os códigos comigo, vou mandar link do pastebin. LINK A imagem precisa estar na paste images com o nome da vocação. Exemplo: sorcerer.png
-
Erro Geisor 2012
Estava False ao invés de false. Tenta assim: accountManager = "yes" namelockManager = "yes" newPlayerChooseVoc = "yes" newPlayerSpawnPosX = 160 newPlayerSpawnPosY = 54 newPlayerSpawnPosZ = 7 newPlayerTownId = 1 newPlayerLevel = 8 newPlayerMagicLevel = 0 generateAccountNumber = "no" redSkullLength = 50 * 62 * 70 * 90 blackSkullLength = 64 * 72 * 80 * 95 dailyFragsToRedSkull = 55 weeklyFragsToRedSkull = 80 monthlyFragsToRedSkull = 90 dailyFragsToBlackSkull = dailyFragsToRedSkull weeklyFragsToBlackSkull = weeklyFragsToRedSkull monthlyFragsToBlackSkull = monthlyFragsToRedSkull dailyFragsToBanishment = dailyFragsToRedSkull weeklyFragsToBanishment = weeklyFragsToRedSkull monthlyFragsToBanishment = monthlyFragsToRedSkull blackSkulledDeathHealth = 40 blackSkulledDeathMana = 0 useBlackSkull = true useFragHandler = true advancedFragList = false notationsToBan = 3 warningsToFinalBan = 4 warningsToDeletion = 5 banLength = 7 * 24 * 60 * 60 killsBanLength = 8 * 24 * 60 * 60 finalBanLength = 30 * 24 * 60 * 60 ipBanishmentLength = 1 * 24 * 60 * 60 broadcastBanishments = true maxViolationCommentSize = 200 violationNameReportActionType = 2 autoBanishUnknownBytes = false worldType = "pvp" protectionLevel = 50 pvpTileIgnoreLevelAndVocationProtection = true pzLocked = 20 * 700 huntingDuration = 60 * 1000 criticalHitChance = 7 criticalHitMultiplier = 1 displayCriticalHitNotify = true removeWeaponAmmunition = false removeWeaponCharges = false removeRuneCharges = "no" whiteSkullTime = 5 * 10 * 100 noDamageToSameLookfeet = false showHealingDamage = true showHealingDamageForMonsters = true fieldOwnershipDuration = 5 * 1000 stopAttackingAtExit = false oldConditionAccuracy = false loginProtectionPeriod = 10 * 1000 deathLostPercent = 10 stairhopDelay = 2 * 1000 pushCreatureDelay = 2 * 1000 deathContainerId = 1987 gainExperienceColor = 215 addManaSpentInPvPZone = true squareColor = 0 allowFightback = true worldId = 0 ip = "xxxxxxxx'" bindOnlyConfiguredIpAddress = false loginPort = 7171 gamePort = 7172 adminPort = 7171 statusPort = 7171 loginTries = 10 retryTimeout = 5 * 1000 loginTimeout = 60 * 1000 maxPlayers = 841 motd = "Updades No Site [ Compre Sua Vip 3 Seja Top !]" displayOnOrOffAtCharlist = false onePlayerOnlinePerAccount = true allowClones = false serverName = "We Bass" loginMessage = "Jogue Faciu Com Os Novos Updades [God]We Bass Drun" statusTimeout = 5 * 60 * 1000 replaceKickOnLogin = true forceSlowConnectionsToDisconnect = false loginOnlyWithLoginServer = false premiumPlayerSkipWaitList = false sqlType = "mysql" sqlHost = "localhost" sqlPort = 3306 sqlUser = "root" sqlPass = "xxxxxx" sqlDatabase = "baiakashe" sqlFile = "baiakashe.s3db" sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 encryptionType = "plain" deathListEnabled = true deathListRequiredTime = 1 * 60 * 1000 deathAssistCount = 19 maxDeathRecords = 5 ingameGuildManagement = true levelToFormGuild = 500 premiumDaysToFormGuild = 0 guildNameMinLength = 4 guildNameMaxLength = 20 highscoreDisplayPlayers = 100 updateHighscoresAfterMinutes = 2 buyableAndSellableHouses = true houseNeedPremium = true bedsRequirePremium = true levelToBuyHouse = 1 housesPerAccount = 0 houseRentAsPrice = false housePriceAsRent = false housePriceEachSquare = 1000 houseRentPeriod = "never" houseCleanOld = 0 guildHalls = false timeBetweenActions = 200 timeBetweenExActions = 1000 checkCorpseOwner = true hotkeyAimbotEnabled = true maximumDoorLevel = 500 mapName = "Baiak Yurots" mapAuthor = "We Bass Drun Kill" randomizeTiles = true useHouseDataStorage = false storeTrash = true cleanProtectedZones = true mailboxDisabledTowns = "-1" defaultPriority = "high" niceLevel = 5 coresUsed = "-1" optimizeDatabaseAtStartup = true removePremiumOnInit = true confirmOutdatedVersion = false maxMessageBuffer = 4 bufferMutedOnSpellFailure = false dataDirectory = "data/" allowChangeOutfit = true allowChangeColors = true allowChangeAddons = true disableOutfitsForPrivilegedPlayers = false bankSystem = true saveGlobalStorage = true displaySkillLevelOnAdvance = true spellNameInsteadOfWords = true emoteSpells = true promptExceptionTracerErrorBox = true storePlayerDirection = false monsterLootMessage = 3 monsterLootMessageType = 25 separateViplistPerCharacter = false ghostModeInvisibleEffect = false ghostModeSpellEffects = true idleWarningTime = 14 * 60 * 1000 idleKickTime = 1000 * 1000 * 10000 expireReportsAfterReads = 1 playerQueryDeepness = 2 maxItemsPerPZTile = 0 maxItemsPerHouseTile = 0 freePremium = false premiumForPromotion = true blessingOnlyPremium = true blessingReductionBase = 30 blessingReductionDecreament = 5 eachBlessReduction = 8 experienceStages = "no" rateExperience = 800 rateExperienceFromPlayers = 0 rateSkill = 300 rateMagic = 200 rateLoot = 35 rateSpawn = 2 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 = 41 * 60 staminaRatingLimitBottom = 14 * 60 rateStaminaAboveNormal = 1.5 rateStaminaUnderNormal = 0.5 staminaThresholdOnlyPremium = true experienceShareRadiusX = 30 experienceShareRadiusY = 30 experienceShareRadiusZ = 1 experienceShareLevelDifference = 2 / 3 extraPartyExperienceLimit = 20 extraPartyExperiencePercent = 5 experienceShareActivity = 2 * 60 * 1000 globalSaveEnabled = false globalSaveHour = 8 shutdownAtGlobalSave = true cleanMapAtGlobalSave = false deSpawnRange = 2 deSpawnRadius = 50 maxPlayerSummons = 0 teleportAllSummons = false teleportPlayerSummons = false ownerName = "We Bass Drun Raell's Kill's" ownerEmail = "[email protected]" url = "frozen-hell.net" location = "usa" displayGamemastersWithOnlineCommand = false adminLogsEnabled = false displayPlayersLogging = true prefixChannelLogs = "" runFile = "" outLogName = "" errorLogName = "" truncateLogsOnStartup = false
-
(Resolvido)[PEDIDO] Criar char com foto.
Precisam postar os arquivos para alguém poder ajudá-los.
-
[Function] Converter tempo
Bom, eu estava cansado de ficar fazendo os cálculos para exibir as horas, minutos ou segundos quando faço algum script com cooldown. Então, eu criei essa função simples que converte o valor em segundos para hora, minuto e segundo. Exemplos: convertTime(60) retornará "1 minuto" convertTime(61) retornará "1 minuto e 1 segundo" convertTime(3600) retornará "1 hora" convertTime(3601) retornará "1 hora e 1 segundo" convertTime(3661) retornará "1 hora, 1 minuto e 1 segundo" E como eu sou babaca perfeccionista, o português também vem correto. Enfim, aqui está a função. function convertTime(a) if(type(tonumber(a)) == "number" and a > 0) then if (a <= 3599) then local minute = math.floor(a/60) local second = a - (60 * minute) if(second == 0) then return ((minute)..((minute > 1) and " minutos" or " minuto")) else return ((minute ~= 0) and ((minute>1) and minute.." minutos e " or minute.." minuto e ").. ((second>1) and second.." segundos" or second.." segundo") or ((second>1) and second.." segundos" or second.. " segundo")) end else local hour = math.floor(a/3600) local minute = math.floor((a - (hour * 3600))/60) local second = (a - (3600 * hour) - (minute * 60)) if (minute == 0 and second > 0) then return (hour..((hour > 1) and " horas e " or " hora e "))..(second..((second > 1) and " segundos" or " segundo")) elseif (second == 0 and minute > 0) then return (hour..((hour > 1) and " horas e " or " hora e "))..(minute..((minute > 1) and " minutos" or " minuto")) elseif (second == 0 and minute == 0) then return (hour..((hour > 1) and " horas" or " hora")) end return (hour..((hour > 1) and " horas, " or " hora, "))..(minute..((minute > 1) and " minutos e " or " minuto e "))..(second..((second > 1) and " segundos" or " segundo")) end end end Obs: se der algum bug com algum número, é só postar, não testei todas possibilidades (obviamente). Por fim, sei que fazer o horário no formato 00:00:00 ou retornar o valor de horas, minutos e segundos separadamente me pouparia metade do trabalho e, no segundo caso, deixaria mais fácil para controlar os dados, mas eu queria que viesse nesse formato mesmo. Anyway, espero que seja útil e poupe o trabalho de alguém.
-
(Resolvido)UPDATE 'table' SET 'old_name'
Não mudou o erro? Veja se é exatamente igual, pode ter uma pequena diferença. Tenta usar essa query: ALTER TABLE `players` ADD `old_name` varchar(255);
-
(Resolvido)UPDATE 'table' SET 'old_name'
function onLogin(cid) if getPlayerStorageValue(cid, 23112) == -1 then setPlayerStorageValue(cid, 23112, 1) db.executeQuery("UPDATE `players` SET `old_name` = '"..getCreatureName(cid).."' WHERE `old_name` = '' and `name` = '"..getCreatureName(cid).."';") end return true end
-
(Resolvido)UPDATE 'table' SET 'old_name'
Olha no creaturescripts.xml todos os eventos que tem type="login".