Tudo que jNo postou
-
Quest - Abrir apenas um bau.
Mas da ai amigo, você poe um item diferente em cada bau, entendeu?
-
Quest - Abrir apenas um bau.
Sim, esta sim Agora e só por no bau
-
(Resolvido)Alteração em 2 scripts
-
(Resolvido)Alteração em 2 scripts
Funciona perfeitamente se tiver apenas playeres online, mas com admin online, ele começa a emitir essa mensagem: 23:59 [LOTTERY SYSTEM]: Nao foi possivel realizer a loteria por falta de players online tipo, o script não esta ignorando o admin
-
(Resolvido)Alteração em 2 scripts
-
(Resolvido)Script de House Clean
O problema desse script (global events) é que, sempre que da 00:00, ele começa a salvar o servidor varias vezes até chegar 00:01, ai volta ao normal o server globalevents function onTimer() local days = 15*24*60*60 doSaveServer() local query = db.getResult("SELECT `owner`,`id` FROM `houses`;") if (query:getID() ~= -1) then while true do local own,houseid = query:getDataInt("owner"),query:getDataInt("id") local qry = db.getResult("SELECT `lastlogin` FROM `players` WHERE `id` = "..own) if(qry:getID() ~= -1) then last = tonumber(qry:getDataInt("lastlogin")) if last < os.time() - days then setHouseOwner(houseid, NO_OWNER_PHRASE,true) end end if not(query:next()) then break end end query:free() end return true end
-
Quest - Abrir apenas um bau.
E só por a mesma actionid nos 3 baús
-
(Resolvido)Alteração em 2 scripts
Sim, a cada 30 mins, faz isso amanhã, já esta tarde, uma cabeça descansada é melhor :D
-
(Resolvido)Alteração em 2 scripts
Não entendi o funcionamento, como eu programo para sortear a cada 30 min? Configurei só na tag, e esse days ai?
-
(Resolvido)Alteração em 2 scripts
Para surpreender você, o mod funcionou, e o do global events deu erro: Acusa que o player não esta online, mas ele esta
-
(Resolvido)Alteração em 2 scripts
O primeiro script que eu precisava que fosse alterado, é esse globalevents, o problema é que o lottery system está premiando membros da staff, precisava que impedisse isso: E o segundo script, era para incrementar nesse mod uma função para que não permita o uso do mesmo (item de double xp), se o player já estiver utilizando um segundo item que tem outra função e que corresponde a seguinte storage (71473). "Você não pode utilizar o potion exp enquanto estiver sob efeito do spirit gem." Se não entenderem, me avisa que tento explicar de outra forma: tfs 0.4 -- Lottery System local config = { lottery_hour = "30 minutos", -- Tempo ate a proxima loteria (Esse tempo vai aparecer somente como broadcast message) rewards_id = {2160}, -- ID dos Itens Sorteados na Loteria crystal_counts = 300, -- Usado somente se a rewards_id for crystal coin (ID: 2160). website = "no" -- Only if you have php scripts and table `lottery` in your database! } function onThink(interval, lastExecution) if(getWorldCreatures(0) == 0)then return true end local list = {} for i, tid in ipairs(getPlayersOnline()) do list[i] = tid end local winner = list[math.random(1, #list)] local random_item = config.rewards_id[math.random(1, #config.rewards_id)] if(random_item == 2160) then doPlayerAddItem(winner, random_item, config.crystal_counts) doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " .. config.crystal_counts .. " " .. getItemNameById(random_item) .. "s! Congratulations! (Proxima Loteria em " .. config.lottery_hour .. ")") else doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " .. getItemNameById(random_item) .. "! Congratulations! (Proxima Loteria em " .. config.lottery_hour .. ")") doPlayerAddItem(winner, random_item, 1) end if(config.website == "yes") then db.executeQuery("INSERT INTO `lottery` (`name`, `item`) VALUES ('".. getCreatureName(winner) .."', '".. getItemNameById(random_item) .."');") end return true end mod.xml <?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="XTibia.com"> <!-- Configs and Functions --> <config name="PotionExpConfigs"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES needpa = TRUE, needlvl = {FALSE, level = 1500}, costmana = {FALSE, mana = 1000}, addrate = 100, -- Exp que vai adicionar em % removeonuse = TRUE } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotion.lua --> <action itemid="12328" event="script"><![CDATA[ domodlib('PotionExpConfigs') if getPlayerStorageValue(cid, 49016) >= 1 then return doPlayerSendCancel(cid, "Voce ja esta ta Sob o efeito de uma exp potion.") end if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "Voce precisar ser premium para usar esse item.") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "Voce precisa ser " .. configs.needlvl.level .. " para usar a exp potion.") end if configs.costmana[1] then if getCreatureMana(cid) < configs.costmana.mana then return doPlayerSendCancel(cid, "Voce precisar ter " .. configs.costmana.mana .. " de mana para usar a exp potion.") else doCreatureAddMana(cid, -configs.costmana.mana) end end if configs.removeonuse then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "Efeito final da exp potion.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "O efeito da exp potion vai acabar em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 22, "Agora voce esta recebendo 2x de exp.") setPlayerStorageValue(cid, 49016, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 49016, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotion" event="script"><![CDATA[ domodlib('PotionExpConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 49016) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 49016))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 49016))) * 1000 , cid, 49016, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 49016))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 49016))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 49016)))*1000, cid, "O efeito da exp potion termina em.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 49016)))-i)*1000, cid, "O efeito da exp potion termina em "..a..".") end end return TRUE ]]></creaturescript> </mod>
-
(Resolvido)Erro em npc de skill
Resolveu, obrigado, rep
-
(Resolvido)Erro em npc de skill
@KotZletY da esse erro abaixo na imagem, e todos os npcs param de funcionar. O erro começa assim que eu dou hi
-
(Resolvido)Remover função de script e pedido
Amigo, não funcionava de nenhuma forma essa merda, e outra, se preocupa menos em responder os tópicos dos outros com hostilidade, e foca em resolver a dúvida dos usuários, esse é o proposito do fórum, flw E obrigado mais uma vez
-
remover
Opaaaa, curti, eu tive uma ideia assim a um tempo atrás, bora!
-
(Resolvido)Remover função de script e pedido
Diz que eu não posso usar o comando porque estou pz, só que não estou pz 16:32 Bank can not be used in fight. 16:32 Bank can not be used in fight. 16:32 Bank can not be used in fight. 16:32 Bank can not be used in fight.
-
(Resolvido)Remover função de script e pedido
-
(Resolvido)Erro em npc de skill
O script da esses erros monstro ao pedir a skill pro npc: <?xml version="1.0"?> <npc name="Raphael" script="data/npc/scripts/raphael.lua" access="3" lookdir="2" walkinterval="2000"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="132" head="20" body="39" legs="45" feet="7" addons="3"/> <parameters> <parameter key="message_greet" value="Hello, |PLAYERNAME|. I can {magic shield} and {invisible}, upgrade your 'melee', {magic}, {distance} and {shield} skills."/> </parameters> </npc> -- configs pricetobuff = 2000 invisibleseconds = 600 magicshieldseconds = 6000 skillsseconds = 6000 skillsupgrade = {} skillsupgrade['fist'] = 20 skillsupgrade['club'] = 20 skillsupgrade['sword'] = 20 skillsupgrade['axe'] = 20 skillsupgrade['distance'] = 20 skillsupgrade['shield'] = 20 skillsupgrade['ml'] = 20 -- end configs -- invisible combat local combatInvisible = createCombatObject() setCombatParam(combatInvisible, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatParam(combatInvisible, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_INVISIBLE) setConditionParam(condition, CONDITION_PARAM_TICKS, invisibleseconds*1000) setCombatCondition(combatInvisible, condition) -- utamo combat local combatUtamo = createCombatObject() setCombatParam(combatUtamo, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combatUtamo, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_MANASHIELD) setConditionParam(condition, CONDITION_PARAM_TICKS, magicshieldseconds*1000) setCombatCondition(combatUtamo, condition) -- melee condition local conditionMelee = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(conditionMelee, CONDITION_PARAM_TICKS, skillsseconds*1000) setConditionParam(conditionMelee, CONDITION_PARAM_SKILL_FIST, skillsupgrade['fist']) setConditionParam(conditionMelee, CONDITION_PARAM_SKILL_CLUB, skillsupgrade['club']) setConditionParam(conditionMelee, CONDITION_PARAM_SKILL_SWORD, skillsupgrade['sword']) setConditionParam(conditionMelee, CONDITION_PARAM_SKILL_AXE, skillsupgrade['axe']) -- distance condition local conditionDistance = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(conditionDistance, CONDITION_PARAM_TICKS, skillsseconds*1000) setConditionParam(conditionDistance, CONDITION_PARAM_SKILL_DISTANCE, skillsupgrade['distance']) -- shield condition local conditionShield = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(conditionShield, CONDITION_PARAM_TICKS, skillsseconds*1000) setConditionParam(conditionShield, CONDITION_PARAM_SKILL_SHIELD, skillsupgrade['shield']) -- ml condition local conditionMagic = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(conditionMagic, CONDITION_PARAM_TICKS, skillsseconds*1000) setConditionParam(conditionMagic, CONDITION_PARAM_STAT_MAGICPOINTS, skillsupgrade['ml']) local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function buff(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if doPlayerRemoveMoney(cid, pricetobuff) == TRUE then buff = parameters.buff message = parameters.message doCombat(cid, buff, numberToVariant(cid)) npcHandler:say(message, cid) keywordHandler:moveUp(1) return true else npcHandler:say("You need ".. pricetobuff .." gold coins to buff yourself.", cid) end end function buffMelee(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if doPlayerRemoveMoney(cid, pricetobuff) == TRUE then buff = parameters.buff errors = 0 message = parameters.message voc = getPlayerVocation(cid) if buff == conditionMagic and (isKnight(cid) or isPaladin(cid)) then npcHandler:say("Only master sorcerers and elder druids can upgrade their magic skills.", cid) errors = 1 end if errors == 0 then doTargetCombatCondition(0, cid, buff, CONST_ME_MAGIC_RED) npcHandler:say(message, cid) keywordHandler:moveUp(1) return true end else npcHandler:say("You need ".. pricetobuff .." gold coins to buff yourself.", cid) end end local node1 = keywordHandler:addKeyword({'invisible'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to be invisible for 3 hours?'}) node1:addChildKeyword({'yes'}, buff, {buff = combatInvisible, message = 'Now you are invisible!'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'}) local node1 = keywordHandler:addKeyword({'magic shield'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to get magic shield shield for 3 hours?'}) node1:addChildKeyword({'yes'}, buff, {buff = combatUtamo, message = 'Your magic shield is on!'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'}) local node1 = keywordHandler:addKeyword({'melee'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to upgrade your melee skills for 3 hours?'}) node1:addChildKeyword({'yes'}, buffMelee, {buff = conditionMelee, message = 'Your skills had been upgraded!'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'}) local node1 = keywordHandler:addKeyword({'shield'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to upgrade your shield skills for 3 hours?'}) node1:addChildKeyword({'yes'}, buffMelee, {buff = conditionShield, message = 'Your skills had been upgraded!'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'}) local node1 = keywordHandler:addKeyword({'distance'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to upgrade your distance skills for 3 hours?'}) node1:addChildKeyword({'yes'}, buffMelee, {buff = conditionDistance, message = 'Your skills had been upgraded!'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'}) local node1 = keywordHandler:addKeyword({'magic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to upgrade your magic skills for 3 hours?'}) node1:addChildKeyword({'yes'}, buffMelee, {buff = conditionMagic, message = 'Your skills had been upgraded!'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'}) keywordHandler:addKeyword({'offer'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "offer ? do you mean price? 6kk each buff. buy anything or leave me alone"}) keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "whats going on with you dude?"}) npcHandler:addModule(FocusModule:new())
-
(Resolvido)Erro no distro e dúvida
Esta declarado corretamente, tanto no rme como no config lua, townid 1 spawntime é o tempo de nascer a criatura, coloquei 2, que é o menor tempo possivel no rme, queria saber no config lua, se da para acelerar
-
(Resolvido)Remover função de script e pedido
Remoção que impede o uso da talk abaixo se estiver pz. E pedido de talk, !balance, que diz quanto o jogador possui no banco, em vermelho no default. Balance: !balance "Você tem 50000000 no Bank." "Você deve aguardar 1 minuto para utilizar novamente esse comando." function onSay(cid, words, param) local config = { bankSystemEnabled = getBooleanFromString(getConfigInfo('bankSystem')), playerIsFighting = hasCondition(cid, CONDITION_INFIGHT) } if config.bankSystemEnabled == TRUE then if config.playerIsFighting == FALSE then local m = tonumber(param) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.") return TRUE end if(not m) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires numeric param.") return TRUE end m = math.abs(m) if m <= getPlayerBalance(cid) then doPlayerWithdrawMoney(cid, m) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Here you are, " .. m .. " gold. Your account balance is " .. getPlayerBalance(cid) .. ".") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "There is not enough gold on your account.") end return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bank can not be used in fight.") return TRUE end else return FALSE end end
-
(Resolvido)Player não pega frag
Exatamente
-
(Resolvido)Item de exiva e talk e chat open
Tem razão, obrigado amigo, funcionou perfeitamente!
-
(Resolvido)Item de exiva e talk e chat open
Olá, esta exatamente como eu pedi, mas quando eu digito o !exivaspy Fulano, ele só fica mandando essa mensagem e não da erros no distro: 07:17 Digite o nome do player que deseja.
-
(Resolvido)Erro no distro e dúvida
O meu distro tem apresentado esse erro, não é frequente, as vezes aparece, não sei o que é, siga a imagem anexada. E a dúvida, eu coloquei os spawntime dos bichos no jogo em 2, mas tem jeito de fazer nascer ainda um pouco só mais rápido? experienceStages = false rateExperience = 999 rateExperienceFromPlayers = 0 rateSkill = 100 rateMagic = 80 rateLoot = 10 rateSpawn = 1 deSpawnRange = 2 deSpawnRadius = 50 function onStepIn(cid, item, position, fromPosition) if(item.actionid > 30020 and item.actionid < 30100) then local townId = (item.actionid - 30020) doPlayerSetTown(cid, townId) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are the newest resident of " .. getTownName(townId) .. ".") end return true end
-
(Resolvido)Item de exiva e talk e chat open
@KotZletY Faça em forma de talk um script que mostra o ultimo monstro morto pelo jogador X, com as característica que citei acima: