Ir para conteúdo

Bodak Reborn

Membro
  • Registro em

  • Última visita

Tudo que Bodak Reborn postou

  1. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
  2. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    local time = 15 -- tempo em segundos para voltar local points = 10 -- o tanto de skills ele ficara mais forte local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, time*1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, points) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, points) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, points) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, points) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, points) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, points) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, points) function onCastSpell(cid, var) local waittime = 15 -- Tempo de exhaustion local storage = 15288 if exhaustion.check(cid, storage) then return false end exhaustion.set(cid, storage, waittime) local pos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local targetpos = getCreaturePosition(target) local Tile1 = {x=1509, y=1255, z=7} -- position onde o player sera teleportado local Tile2 = {x=1509, y=1259, z=7} -- position onde o target sera teleportado local from,to = {x=979, y=911, z=7},{x=994, y=918, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to1 = {x=1504, y=1253, z=7},{x=1514, y=1263, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to2 = {x=1553, y=1253, z=7},{x=1562, y=1262, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to3 = {x=1160, y=1176, z=7},{x=1168, y=1190, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to4 = {x=664, y=1099, z=7},{x=685, y=1104, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado if isInRange(pos, from, to) and isInRange(pos, from1, to1) and isInRange(pos, from2, to2) and isInRange(pos, from3, to3) and isInRange(pos, from4, to4) then doPlayerSendCancel(cid, "Você nao pode usar o Tsukuyomi World aqui!") return FALSE end if not isPlayer(target) then doPlayerSendCancel(cid, "Você so pode usar essa magia em players!") return FALSE end local function Teleport_Player(cid) doTeleportThing(cid,pos) end local function Teleport_Target(target) doCreatureSetNoMove(target, 0) doTeleportThing(target,targetpos) end doAddCondition(cid, condition) doCreatureSetNoMove(target, 1) doTeleportThing(cid,Tile1) doTeleportThing(target,Tile2) doSendMagicEffect(targetpos, 252) addEvent(Teleport_Player, time*1000, cid) addEvent(Teleport_Target, time*1000, target) return TRUE end
  3. @Wakon, no IF tem um table.maxn e não tem nenhuma tabela declarada, por isso achei estranho...
  4. Esse é o script completo?
  5. De uma skill específica é o "f" mesmo, como você citou anteriormente.
  6. Você está procurando na tabela movestable = { aperte ctrl + f, digite pokes = { e aperte enter, lá vai ter, offense, defense...
  7. data/lib/configuration.lua procura por pokes = { e muda lá o offense, defense...
  8. Funcionou?
  9. local config = { affected = 10, -- how many players (deathAssits) from table deathList should this script be executed for? killStorageValue = 3943, deathStorageValue = 3944, -- commands for the texts (those inside of ||, example: |KILLS| to show skills): KILLS, KILLERNAME, TARGETNAME rewardItem = { use = true, itemid = 2152, itemid2 = 2151, minLevel = false, -- false if you don't want any level req minLevelDiff = false, -- false if you don't want any level diff req (negative numbers allowed). }, killMessage = { use = true, text = "You owned |TARGETNAME|! You have now |KILLERKILLS| kills!", messageClass = MESSAGE_STATUS_CONSOLE_BLUE }, broadcastMessage = { use = true, minLevel = false, -- false if you don't want any level req minLevelDiff = false, -- false if you don't want any level diff req (negative numbers allowed). text = "|KILLERNAME| [|KILLERLEVEL|] just killed |TARGETNAME| [|TARGETLEVEL|]!", messageClass = MESSAGE_STATUS_WARNING }, killerAnimation = { use = true, text = "Frag!", -- Only 9 letters! No "commands" here. color = 144 }, targetAnimation = { use = true, text = "Owned!", -- Only 9 letters! No "commands" here. color = 180 } } local function isMC (cid) for _, pid in pairs(getPlayersOnline()) do if(cid ~= pid and getPlayerIp(cid) == getPlayerIp(pid)) then doPlayerSendTextMessage (cid, MESSAGE_STATUS_CONSOLE_BLUE, "MSG caso seja MC.") return true end end return true end function onDeath(cid, corpse, deathList) if not isMC (cid) then for i = 1, math.min(config.affected, getConfigInfo('deathAssistCount')) do local killer = deathList if(isPlayer(killer) == TRUE) then local targetKills = math.max(0, getPlayerStorageValue(cid, config.killStorageValue)) + 1 local targetDeaths = math.max(0, getPlayerStorageValue(cid, config.deathStorageValue)) + 1 local killerKills = math.max(0, getPlayerStorageValue(killer, config.killStorageValue)) + 1 local killerDeaths = math.max(0, getPlayerStorageValue(killer, config.deathStorageValue)) + 1 setPlayerStorageValue(killer, config.killStorageValue, targetKills) setPlayerStorageValue(cid, config.deathStorageValue, targetDeaths) local killerLevel = getPlayerLevel(killer) local targetLevel = getPlayerLevel(cid) local levelDiff = targetLevel - killerLevel local values = { ["KILLERKILLS"] = killerKills, ["KILLERDEATHS"] = killerDeaths, ["KILLERNAME"] = getCreatureName(killer), ["KILLERLEVEL"] = killerLevel, ["TARGETKILLS"] = targetKills, ["TARGETDEATHS"] = targetDeaths, ["TARGETNAME"] = getCreatureName(cid), ["TARGETLEVEL"] = targetLevel } function formateString(str) return(str:gsub("|([A-Z]+)|", (function(a) return values[a] end))) end if(config.rewardItem.use and (not config.rewardItem.minLevel or targetLevel >= config.rewardItem.minLevel) and (not config.rewardItem.minLevelDiff or levelDiff >= config.rewardItem.minLevelDiff)) then local uid = doPlayerAddItem(killer, config.rewardItem.itemid, 5) doPlayerAddItem (killer, config.rewardItem.itemid2, 3) end if(config.killMessage.use) then doPlayerSendTextMessage(killer, config.killMessage.messageClass, formateString(config.killMessage.text)) end if(config.broadcastMessage.use and (not config.broadcastMessage.minLevel or getPlayerLevel(cid) >= config.broadcastMessage.minLevel) and (not config.broadcastMessage.minLevelDiff or levelDiff >= config.broadcastMessage.minLevelDiff)) then broadcastMessage(formateString(config.broadcastMessage.text), config.broadcastMessage.messageClass) end if(config.killerAnimation.use) then doSendAnimatedText(getCreaturePosition(killer), config.killerAnimation.text, config.killerAnimation.color) end if(config.targetAnimation.use) then doSendAnimatedText(getCreaturePosition(cid), config.targetAnimation.text, config.targetAnimation.color) end end end end return true end
  10. local config = { affected = 10, -- how many players (deathAssits) from table deathList should this script be executed for? killStorageValue = 3943, deathStorageValue = 3944, -- commands for the texts (those inside of ||, example: |KILLS| to show skills): KILLS, KILLERNAME, TARGETNAME rewardItem = { use = true, itemid = 2152, itemid2 = 2151, minLevel = false, -- false if you don't want any level req minLevelDiff = false, -- false if you don't want any level diff req (negative numbers allowed). }, killMessage = { use = true, text = "You owned |TARGETNAME|! You have now |KILLERKILLS| kills!", messageClass = MESSAGE_STATUS_CONSOLE_BLUE }, broadcastMessage = { use = true, minLevel = false, -- false if you don't want any level req minLevelDiff = false, -- false if you don't want any level diff req (negative numbers allowed). text = "|KILLERNAME| [|KILLERLEVEL|] just killed |TARGETNAME| [|TARGETLEVEL|]!", messageClass = MESSAGE_STATUS_WARNING }, killerAnimation = { use = true, text = "Frag!", -- Only 9 letters! No "commands" here. color = 144 }, targetAnimation = { use = true, text = "Owned!", -- Only 9 letters! No "commands" here. color = 180 } } function onDeath(cid, corpse, deathList) for i = 1, math.min(config.affected, getConfigInfo('deathAssistCount')) do local killer = deathList if(isPlayer(killer) == TRUE) then local targetKills = math.max(0, getPlayerStorageValue(cid, config.killStorageValue)) + 1 local targetDeaths = math.max(0, getPlayerStorageValue(cid, config.deathStorageValue)) + 1 local killerKills = math.max(0, getPlayerStorageValue(killer, config.killStorageValue)) + 1 local killerDeaths = math.max(0, getPlayerStorageValue(killer, config.deathStorageValue)) + 1 setPlayerStorageValue(killer, config.killStorageValue, targetKills) setPlayerStorageValue(cid, config.deathStorageValue, targetDeaths) local killerLevel = getPlayerLevel(killer) local targetLevel = getPlayerLevel(cid) local levelDiff = targetLevel - killerLevel local values = { ["KILLERKILLS"] = killerKills, ["KILLERDEATHS"] = killerDeaths, ["KILLERNAME"] = getCreatureName(killer), ["KILLERLEVEL"] = killerLevel, ["TARGETKILLS"] = targetKills, ["TARGETDEATHS"] = targetDeaths, ["TARGETNAME"] = getCreatureName(cid), ["TARGETLEVEL"] = targetLevel } function formateString(str) return(str:gsub("|([A-Z]+)|", (function(a) return values[a] end))) end if(config.rewardItem.use and (not config.rewardItem.minLevel or targetLevel >= config.rewardItem.minLevel) and (not config.rewardItem.minLevelDiff or levelDiff >= config.rewardItem.minLevelDiff)) then local uid = doPlayerAddItem(killer, config.rewardItem.itemid, 5) doPlayerAddItem (killer, config.rewardItem.itemid2, 3) end if(config.killMessage.use) then doPlayerSendTextMessage(killer, config.killMessage.messageClass, formateString(config.killMessage.text)) end if(config.broadcastMessage.use and (not config.broadcastMessage.minLevel or getPlayerLevel(cid) >= config.broadcastMessage.minLevel) and (not config.broadcastMessage.minLevelDiff or levelDiff >= config.broadcastMessage.minLevelDiff)) then broadcastMessage(formateString(config.broadcastMessage.text), config.broadcastMessage.messageClass) end if(config.killerAnimation.use) then doSendAnimatedText(getCreaturePosition(killer), config.killerAnimation.text, config.killerAnimation.color) end if(config.targetAnimation.use) then doSendAnimatedText(getCreaturePosition(cid), config.targetAnimation.text, config.targetAnimation.color) end end end return true end
  11. De fato, eu tinha esquecido uma vírgula e tinha colocado timeToRemove ao invés de config.timeToRemove, isso explica o erro. Bom, eu corrigi o código caso alguém mais precise. Se possível, marque uma resposta como "melhor resposta" para caso alguém tenha a mesma dúvida.
  12. Creaturescripts. XML: <event type="kill" name="pokemons" event="script" value="nome_arquivo.lua"/>
  13. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Explique melhor...
  14. Realmente... Teste assim e veja se funciona: local function doorEnter(cid, item, toPosition) doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, toPosition) end function onUse(cid, item, fromPosition, itemEx, toPosition) if item.actionid == ACTION_ID and getPlayerLevel(cid) >= LEVEL_NECESSÁRIO then doorEnter(cid, item, toPosition) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem o level necessário.") end return false end Lembrando que você tem que criar arquivos diferentes, como antes, e remover a mensagem que eu pedi anteriormente do doors.lua.
  15. Eu não tenho servidor aqui no momento, então não posso testar. Tem um jeito meio "gambiarra" que é tirar essa mensagem de todas as portas, ai não vai aparecer para nenhuma outra... Se tu quiser, basta tirar doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.") do doors.lua.
  16. Hmm, muito estranho... o_O O actionid que você tá usando (3111) é o mesmo do que você estava usando anteriormente? (que dava pra passar mas ficava com a mensagem e tal?) E você tinha criado um novo arquivo ou colocou no doors.lua?
  17. No meu servidor, o doors.lua fica dentro da pasta other. Verifique se no seu é igual, e então tente colocar other/doors.lua, ficando assim: <action actionid="3111" event="script" value="other/doors.lua"/>
  18. Você colocou o action id e o level necessário no código?
  19. Editei o comentário acima, tente novamente.
  20. Editei o comentário com a correção, tente novamente.
  21. Seu sistema de TV é por database, tente assim: -- Lottery System By Jeff local config = { lottery_hour = "1 Hours", -- Tempo ate a proxima loteria (Esse tempo vai aparecer somente como broadcast message) rewards_id = {2160, 9810, 9822, 9819, 2173, 9693}, -- ID dos Itens Sorteados na Loteria crystal_counts = 100, -- 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! storage = 165132, -- storage do cast system do seu servidor. } function onThink(interval, lastExecution) local casting = db.executeQuery("SELECT `broadcasting` FROM `players` WHERE `id` = " ..getPlayerGUID(cid)) if casting == 1 then 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] Ganhador: " .. getCreatureName(winner) .. ", Item: " .. getItemNameById(random_item) .. "! Parabens! (Proxima Loteria em " .. config.lottery_hour .. ") Premios que podem cair: 1kk, Rusty Armor, Rusty Helmet, Rusty Boots ou Addon Doll. Fique online! Quem sabe vc pode ser o proximo ganhador?") 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 end return true end
  22. No script do cast... Procura na pasta data, algo como tvSys.

Informação Importante

Confirmação de Termo