Ir para conteúdo

Vodkart

Héroi
  • Registro em

Solutions

  1. Vodkart's post in [Spell] Como fazer monstro perde o target durante o cast was marked as the answer   
    tenta usar addEvent, +ou- assim:
     
    local conf = { stunTime = 4500, delayCast = 600, scream = "EXPLOSION FIRE", speakChance = 5, speakList = {"Did you get burned?", "I like well-done meat"} } local s = 0 -- Combat local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN) -- Stun local stun = createConditionObject(CONDITION_PARALYZE) setConditionParam(stun, CONDITION_PARAM_TICKS, conf.stunTime) setConditionFormula(stun, -1, 0, -1, 0) local function setInitCast(cid) if isCreature(cid) then doAddCondition(cid, stun) doCreatureSetLookDir(cid, SOUTH) doCreatureSay(cid, conf.scream, TALKTYPE_MONSTER_YELL) end end function onCastSpell(cid, var) setInitCast(cid) addEvent(function() if not isCreature(cid) then return true elseif s > conf.stunTime then return true end doCreatureSetLookDir(cid, SOUTH) s = s + 250 end, 250) return doCombat(cid, combat, var) end  
  2. function onSay(cid, words, param) local level = getPlayerLevel(cid) local vocation = getPlayerVocationName(cid) local health, maxhealth = getCreatureHealth(cid), getCreatureMaxHealth(cid) local mana, maxmana = getCreatureMana(cid), getCreatureMaxMana(cid) local balance, pdays = getPlayerBalance(cid), getPlayerPremiumDays(cid) local fist, club, sword, axe = getPlayerSkillLevel(cid, 0), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3) local distance, shield, fishing, magic = getPlayerSkillLevel(cid, 4), getPlayerSkillLevel(cid, 5), getPlayerSkillLevel(cid, 6), getPlayerMagLevel(cid) local lvldodge = getPlayerStorageValue(cid, 98798644) local lvlcrit = getPlayerStorageValue(cid, 48903) local lvlatk = getPlayerStorageValue(cid, 48904) local a = os.time() local b = math.floor((getPlayerStorageValue(cid, 13545) - a)/(24 * 60 * 60)) local reset = getPlayerStorageValue(cid, 54676) local cap = getPlayerFreeCap(cid) local msg = "Vocation: "..vocation.."\nLevel: ".. level .."\nHP: ".. health .."/".. maxhealth .."\nMP: ".. mana .."/".. maxmana .."\nCapacity: ".. cap .."\nBalance: "..balance.."\nPremium Days: "..pdays.."\nDodge Level: ".. lvldodge .."\nCritical Level: ".. lvlcrit .."\nBOOSTER ATK: ".. lvlatk .."\nMagic Level: ".. magic .."\n[VIP] Days: ".. (b < 0 and 0 or b) .."\nReset Count: ".. reset .." \n\nFist: ".. fist .."\nClub: ".. club .."\nSword: ".. sword .."\nAxe: ".. axe .."\nDistance: ".. distance .."\nShield: ".. shield .."\nFishing: ".. fishing .."" doPlayerPopupFYI(cid, msg) return true end  
  3. Vodkart's post in (Resolvido)Boss Room tfs 0.4 was marked as the answer   
    já existe a função de remover o boss, basta usá-la.
     
    function onUse(cid, item, fromPosition, itemEx, toPosition) local players = {} for i = 1, #BossRoom.alavanca do local v = getTopCreature(BossRoom.alavanca[i]).uid players[i] = isPlayer(v) and v or nil end function checkPlayersInRoom() -- Responsável por verificar se há jogadores na sala enfrentando o boss. local player_room = 0 for x = BossRoom.areaSalaBoss[1].x, BossRoom.areaSalaBoss[2].x do for y = BossRoom.areaSalaBoss[1].y, BossRoom.areaSalaBoss[2].y do for z = BossRoom.areaSalaBoss[1].z, BossRoom.areaSalaBoss[2].z do local pos = {x=x, y=y, z=z,stackpos = 253} local thing = getThingfromPos(pos) if thing.itemid > 0 and isPlayer(thing.uid) == true then player_room = player_room+1 end end end end return player_room end if #players < BossRoom.minPlayers then doPlayerSendCancel(cid, "You need at least "..BossRoom.minPlayers.." players to enter.") return true end if checkPlayersInRoom() >= 1 then doPlayerSendTextMessage(cid,19, "There is already a team in the boss room.") return true end function playersTP(position) -- Responsável por teleportar os jogadores for i = 1, 6 do if players[i] then doTeleportThing(players[i], position) doSendMagicEffect(position, CONST_ME_TELEPORT) end end end function removeBoss() -- Responsavel por Remover o BOSS da sala (caso os players nao tenham matado) for x = BossRoom.areaSalaBoss[1].x, BossRoom.areaSalaBoss[2].x do for y = BossRoom.areaSalaBoss[1].y, BossRoom.areaSalaBoss[2].y do for z = BossRoom.areaSalaBoss[1].z, BossRoom.areaSalaBoss[2].z do local area = {x = x, y = y, z = z} local creature = getTopCreature(area).uid if isCreature(creature) then doRemoveCreature(creature) end end end end end function checkBossTime() -- Responsável por verificar se os jogadores matou ou não o boss após 10 minutos. for x = BossRoom.areaSalaBoss[1].x - 1, BossRoom.areaSalaBoss[2].x + 1 do for y = BossRoom.areaSalaBoss[1].y - 1, BossRoom.areaSalaBoss[2].y + 1 do local pos = {x=x, y=y, z=BossRoom.areaSalaBoss[1].z} local m = getTopCreature(pos).uid if m ~= 0 and isMonster(m) and isInArray(BossRoom.name, getCreatureName(m)) then playersTP(BossRoom.positionKickPlayer) removeBoss() end end end return false end removeBoss() playersTP(BossRoom.positionSalaBoss) doCreateMonster(BossRoom.name, BossRoom.positionSpawnBoss) addEvent(checkBossTime, BossRoom.timeToKill*60*1000) return true end  
  4. Vodkart's post in (Resolvido)Ajuda com boss diário. 8.0 was marked as the answer   
  5. Vodkart's post in Storage para alavanca was marked as the answer   
    CLARO CARA VOCÊ NÃO POSTOU SEU CÓDIGO EM BB CODE, AI QUANDO VOCÊ JOGOU DESSE JEITO O 
     
    [i] some , porque o forum buga o codigo e entende como ITALICO
     
     
     
     
    --------------------
    local config = { requiredLevel = 100, daily = false, playerPositions = { Position(33010, 31660, 14), Position(33010, 31661, 14), Position(33010, 31662, 14), Position(33010, 31663, 14), Position(33010, 31664, 14) }, newPositions = { Position(32974, 31670, 14), Position(32975, 31670, 14), Position(32976, 31670, 14), Position(32977, 31670, 14), Position(32978, 31670, 14) }, BossPositions = { Position(32977, 31658, 14) } } local check, hours, storage = true, 24, 574984 function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 1946 then local storePlayers, playerTile = {} for i = 1, #config.playerPositions do playerTile = Tile(config.playerPositions[i]):getTopCreature() if playerTile and not playerTile:isPlayer() then player:sendTextMessage(MESSAGE_STATUS_SMALL, "summon? u are noob?") return true end if playerTile:getLevel() < config.requiredLevel then player:sendTextMessage(MESSAGE_STATUS_SMALL, "All the players need to be level ".. config.requiredLevel .." or higher.") return true end if check and playerTile:getStorageValue(storage) - os.time() > 0 then player:sendCancelMessage("The chest is empty, come back tomorrow for a new reward.") return true end storePlayers[#storePlayers + 1] = playerTile end for i = 1, #config.BossPositions do Game.createMonster("The Time Guardian", config.BossPositions[i]) end local players for i = 1, #storePlayers do players = storePlayers[i] config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) players:teleportTo(config.newPositions[i]) config.newPositions[i]:sendMagicEffect(CONST_ME_ENERGYAREA) players:setDirection(DIRECTION_EAST) players:setStorageValue(storage, os.time()+hours*3600) end elseif item.itemid == 1945 then if config.daily then player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_NOTPOSSIBLE)) return true end end item:transform(item.itemid == 1946 and 1945 or 1946) return true end  
  6. Vodkart's post in (Resolvido)GetGainedExperience, como usar a função? was marked as the answer   
    na lib tenta deixar assim:
     
    monsters_boosteds = { -- Configuracao dos monstros que irão ter exp e loot aumentados [1] = {monster_name = "Dwarf", exp = 0.05, loot = 7}, [2] = {monster_name = "Goblin", exp = 0.05, loot = 5}, [3] = {monster_name = "Orc", exp = 0.25, loot = 15}, [4] = {monster_name = "Dwarf Soldier", exp = 0.35, loot = 10}, --[5] = {monster_name = "NOME DO MONSTRO", exp = "PORCENTAGEM DE EXP", loot = "PORCENTAGEM DO LOOT"}, }  
     
    o onKill
     
    function onKill(cid, target, damage, flags) if not (isMonster(target)) then return true end if (string.lower(getCreatureName(target)) == string.lower(getGlobalStorageValue(monster_name_backup))) then local percent = tonumber(getGlobalStorageValue(74813)) local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local amount = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent)) doPlayerAddExperience(cid, amount) addLoot(getCreaturePosition(target), getCreatureName(target), {}) end return true end function addLoot(position, name, ignoredList) local check = false for i = 0, 255 do position.stackpos = i corpse = getTileThingByPos(position) if corpse.uid > 0 and isCorpse(corpse.uid) then check = true break end end if check == true then local newRate = (1 + (getGlobalStorageValue(monster_loot_backup)/100)) * getConfigValue("rateLoot") local mainbp = doCreateItemEx(1987, 1) local monsterLoot = getMonsterLootList(name) for i, loot in pairs(monsterLoot) do if math.random(1, 100000) <= newRate * loot.chance then if #ignoredList > 0 then if (not isInArray(ignoredList, loot.id)) then doAddContainerItem(mainbp, loot.id, loot.countmax and math.random(1, loot.countmax) or 1) end else doAddContainerItem(mainbp, loot.id, loot.countmax and math.random(1, loot.countmax) or 1) end end end doAddContainerItemEx(corpse.uid, mainbp) end end  
     
    OBS: O EVENTO TEM QUE SER COMEÇADO DE NOVO PARA ATUALIZAR A EXP NA STORAGE, ou seja, testa só depois que dar o boost exp
  7. Vodkart's post in Ajuda com getslot item was marked as the answer   
    local slots = {CONST_SLOT_HEAD, CONST_SLOT_ARMOR, CONST_SLOT_LEGS, CONST_SLOT_FEET, CONST_SLOT_LEFT, CONST_SLOT_RIGHT} for _, i in pairs(slots) do local check = getPlayerSlotItem(cid, i) if check.uid ~= 0 then doPlayerSendTextMessage(cid, 24, "Você não pode fazer está ação com algum item equipado! Retire todos os seus itens e coloque em sua backpack.") return true end end  
  8. Vodkart's post in [AJUDA] QUEST ANIHI COM TEMPO was marked as the answer   
    local t = { lvl = 100, Time = 5, -- em minutos entrada = { {x = 710, y = 1420, z = 5}, -- pos players {x = 709, y = 1420, z = 5}, {x = 708, y = 1420, z = 5}, {x = 707, y = 1420, z = 5} }, saida = { {x = 710, y = 1420, z = 6}, -- pos para onde eles irão {x = 709, y = 1420, z = 6}, {x = 708, y = 1420, z = 6}, {x = 707, y = 1420, z = 6} }, monstros = { {{x = 707, y = 1418, z = 6}, "Demon"}, -- defina pos dos montros e nomes {{x = 709, y = 1418, z = 6}, "Demon"}, {{x = 708, y = 1422, z = 6}, "Demon"}, {{x = 710, y = 1422, z = 6}, "Demon"}, {{x = 712, y = 1420, z = 6}, "Hellfire Fighter"}, {{x = 713, y = 1420, z = 6}, "Hellfire Fighter"}, {{x = 711, y = 1420, z = 6}, "Ghazbaran"} } } function VarAnihiPlayer(cid) if not isCreature(cid) then return LUA_ERROR end if isInRange(getPlayerPosition(cid), t.saida[1], t.saida[#t.saida]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end end function getPlayersInArea(fromPos, toPos) local players = {} for _, pid in ipairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), fromPos, toPos) then table.insert(players, pid) end end return players end function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} if #getPlayersInArea(t.saida[1], t.saida[#t.saida]) > 0 then doPlayerSendCancel(cid, 'Aguarde, tem jogadores fazendo a quest.') return true end for _, k in ipairs(t.entrada) do local x = getTopCreature(k).uid if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.lvl) then doPlayerSendCancel(cid, 'Está faltando player ou alguém não possui level '..t.lvl..' ou mais.') return true end table.insert(check, x) end for _, summon in pairs(t.monstros) do local creature = getTopCreature(summon[1]).uid if(creature > 0 and not isPlayer(creature)) then doRemoveCreature(creature) end doCleanTile(summon[1]) doCreateMonster(summon[2], summon[1]) end for i, tid in ipairs(check) do doSendMagicEffect(t.entrada[i], CONST_ME_POFF) doTeleportThing(tid, t.saida[i], false) addEvent(VarAnihiPlayer, t.Time*60*1000, tid) doSendMagicEffect(t.saida[i], CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end  
  9. Vodkart's post in porque esse script não lê a função de trocar de outfit? was marked as the answer   
    local STORAGE = 91811 local imortal_time = 5 --Segundos. local homem = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} --outfit que muda caso seja homem local mulher = {lookType = 156, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} --outfit que muda caso seja mulher function onCastSpell(cid, var) if getPlayerStorageValue(cid, STORAGE) > os.time() then doPlayerSendCancel(cid, "Você já está imortal.") return true end setPlayerStorageValue(cid, STORAGE, os.time() + imortal_time) doPlayerSendTextMessage(cid, 27, "During ".. imortal_time .." you'll be imortal.") doSetCreatureOutfit(cid, getPlayerSex(cid) == 0 and mulher or homem, imortal_time*1000) doCombat(cid, combat, var) return true end  
  10. Vodkart's post in (Resolvido)comprar outfit por alavanca com points was marked as the answer   
    local lever = { [5550] = {type = "items", amount = 5, id = 2379}, [5551] = {type = "items", amount = 5, id = 7901}, [5552] = {type = "items", amount = 5, id = 2492}, [5553] = {type = "items", amount = 5, id = 2469}, [5554] = {type = "items", amount = 5, id = 2510}, [5555] = {type = "items", amount = 5, id = 2514}, [5556] = {type = "items", amount = 5, id = 2003}, [5557] = {type = "items", amount = 5, id = 2480}, [5558] = {type = "items", amount = 5, id = 2387}, [5559] = {type = "outfit", amount = 5, name="Deadpool", sex = {[0] = 221, [1] = 221}, addon = 3, storage = 785481} } local storage,exausted = 98762,10 local stackable = {8303,8310} -- coloque o ID aqui dos que só vem 1 function onUse(cid,item,fromPosition,itemEx,toPosition) local ret = lever[item.actionid] if getPoints(cid) < ret.amount then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Você precisa de "..ret.amount.." points.") return true elseif getPlayerStorageValue(cid, storage) >= os.time() then doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, storage) - os.time() .. " seconds to use this item again.") return true end if ret.type == "items" then doPlayerAddItem(cid, ret.id, isItemStackable(ret.id) and isInArray(stackable, ret.id) and 1 or 100) doPlayerSendTextMessage(cid,22,"Você comprou um " .. getItemNameById(ret.id)) elseif ret.type == "outfit" then if getPlayerStorageValue(cid, ret.storage) > 0 then doPlayerSendCancel(cid, "voce ja comprou essa outfit.") return true end setPlayerStorageValue(cid, ret.storage, 1) doPlayerSendTextMessage(cid,22,"Você recebeu uma outfit: " .. ret.name) doPlayerAddOutfit(cid, ret.sex[getPlayerSex(cid)], ret.addon) end removePoints(cid, ret.amount) setPlayerStorageValue(cid, storage, os.time()+exausted) doSendMagicEffect(getCreaturePosition(cid), math.random(28,30)) return true end  
     
    agora poderá outras outfits quando quiser.
  11. Vodkart's post in (Resolvido)ajuda com enchanting was marked as the answer   
    function onUse(cid, item, frompos, item2, topos) local gems = {2146, 2147, 2149, 2150} local egems = {7759, 7760, 7761, 7762} local altars = {{7508, 7509, 7510, 7511}, {7504, 7505, 7506, 7507}, {7516, 7517, 7518, 7519}, {7512, 7513, 7514, 7515}} local weapons = {7406, 2454, 7415, 8905, 2342, 2138, 10221, 10218, 10220, 10219, 8908, 8906, 8907, 8909, 7766, 7747, 7857, 7872, 7772, 7753, 7863, 7878, 7775, 7756, 7866, 7881, 7364, 7839, 7840, 7850, 7838} local eweapons = {{7766, 7747, 7857, 7872}, {7772, 7753, 7863, 7878}, {7775, 7756, 7866, 7881}, {8907, 8906, 8909, 8908}, {2343, 2343, 2343, 2343}, {10220, 10218, 10219, 10221}, {10220, 10218, 10219, 10221}, {10220, 10218, 10219, 10221}, {10220, 10218, 10219, 10221}, {10220, 10218, 10219, 10221}, {8907, 8906, 8909, 8908}, {8907, 8906, 8909, 8908}, {8907, 8906, 8909, 8908}, {8907, 8906, 8909, 8908}, {7766, 7747, 7857, 7872}, {7766, 7747, 7857, 7872}, {7766, 7747, 7857, 7872}, {7766, 7747, 7857, 7872}, {7772, 7753, 7863, 7878}, {7772, 7753, 7863, 7878}, {7772, 7753, 7863, 7878}, {7772, 7753, 7863, 7878}, {7775, 7756, 7866, 7881}, {7775, 7756, 7866, 7881}, {7775, 7756, 7866, 7881}, {7775, 7756, 7866, 7881}, {7839, 7840, 7850, 7838}, {7839, 7840, 7850, 7838}, {7839, 7840, 7850, 7838}, {7839, 7840, 7850, 7838}, {7839, 7840, 7850, 7838}} local type = item.type if type == 0 then type = 1 end local mana = 3000 * type local soul = 40 * type if isInArray(gems, item.itemid) == TRUE then for aa=1, #gems do if item.itemid == gems[aa] then a=aa end end if isInArray(altars[a], item2.itemid)== TRUE then if getPlayerMana(cid) >= mana and getPlayerSoul(cid) >= soul then doTransformItem(item.uid, egems[a]) doPlayerAddMana(cid,-mana) doPlayerAddSoul(cid,-soul) doSendMagicEffect(frompos,39) else doPlayerSendCancel(cid,"You dont have mana or soul points.") end end elseif isInArray(egems, item.itemid)== TRUE then for bb=1, #egems do if item.itemid == egems[bb] then b=bb end end if isInArray(weapons, item2.itemid)== TRUE then for cc=1, #weapons do if item2.itemid == weapons[cc] then c=cc end end doRemoveItem(item.uid, 1) doRemoveItem(item2.uid) doPlayerAddItem(cid, eweapons[c][b], 1) doSendMagicEffect(frompos,39) doRemoveItem(item.uid,1) else doPlayerSendCancel(cid,"You can't enchanted this.") end end return true end  
  12. Vodkart's post in (Resolvido)Ganhar o item do baú apenas se tiver X quantia, do Item X na Bag. was marked as the answer   
    local items = {{2173,1},{2494,1},{2148,15}} local itemRequired, amountRequired = 2160, 30 -- ID do item necessário para pegar o baú e a quantidade. local storage, days = 897458, 30 function onUse(cid, item, frompos, item2, topos) if getPlayerItemCount(cid, itemRequired, amountRequired) <= 0 then doPlayerSendCancel(cid, "Você não possui "..amountRequired.."x "..getItemInfo(itemRequired).name.." volte mais tarde.") return true elseif getPlayerStorageValue(cid, storage) >= os.time() then doPlayerSendCancel(cid, "voce ja pegou seus itens dentro de 30 dias, aguarde.") return true end local bag = doPlayerAddItem(cid, 1988, 1) for i = 1, table.maxn(items) do local item_id, amount = items[i][1], items[i][2] if isItemStackable(item_id) or amount == 1 then doAddContainerItem(bag, item_id, amount) else for i = 1, amount do doAddContainerItem(bag, 1) end end end setPlayerStorageValue(cid, storage, os.time() + days * 24 * 60 * 60) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"You have found a backpack.") return true end  
  13. Vodkart's post in (Resolvido)Script Teleport Por Tempo was marked as the answer   
    local quests = { ["vipquest"] = { min_level = 500, enter_pos = {x = 1285, y = 191, z = 7}, area = {fromPos = {x = 1263, y = 245, z = 7}, toPos = {x = 1525, y = 143, z = 7}}, time_to_finish = {15, "min"}, time_to_make_again = {15, "min"} -- }, -- ["dragon"] = { -- min_level = 10, -- enter_pos = {x = 1, y = 1, z = 1}, -- area = {fromPos = {x = 1, y = 1, z = 1}, toPos = {x = 1, y = 1, z = 1}}, -- time_to_finish = {10, "min"}, -- time_to_make_again = {1, "hour"} } } local time_storage = 87871 -- só modifique se necessário function onSay(cid, words, param, channel) local param, p, check = param:lower(), getPlayerPosition(cid), false local npos = {x = 200, y = 200, z = 7} if not param or param == "" then local str, n = '~~ [Available Quests] ~~\n\n', 1 for quest, info in pairs(quests) do str = str .. n .. " - " .. Fupper(quest) .. " (Level: "..info.min_level..")\n" n = n + 1 end doShowTextDialog(cid, 1955, str) return true end local t = quests[param] if p.x ~= npos.x or p.y ~= npos.y or p.z ~= npos.z then return doPlayerSendCancel(cid, "position errada: voce precisa estar dentro da quest para usar este comando.") end if not t then return doPlayerSendCancel(cid, "Quest not found.") end if getPlayerLevel(cid) < t.min_level then return doPlayerSendCancel(cid, "Only players level "..t.min_level.." or higher can go the "..param.." quest.") end if isInRange(p, t.area.fromPos, t.area.toPos) then return doPlayerSendCancel(cid, "You are already inside the "..param.." quest area.") end for quest, info in pairs(quests) do if isInRange(p, info.area.fromPos, info.area.toPos) then check = true end end if check then return doPlayerSendCancel(cid, "You cannot go to another quest inside a quest.") end local stor = getPlayerStorageValue(cid, time_storage) if stor > os.time() then return doPlayerSendCancel(cid, "Voce so podera entrar novamente na quest "..os.date("%d %B %Y %X", stor)..".") end doSendMagicEffect(p, CONST_ME_POFF) local destination = t.enter_pos doTeleportThing(cid, destination) doSendMagicEffect(destination, CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Good luck in "..param.." quest! You have "..getStrTime(t.time_to_finish).." to finish or you will be kicked.") setPlayerStorageValue(cid, time_storage, mathtime(t.time_to_make_again) + os.time()) addEvent(function() if isPlayer(cid) then if isInRange(getPlayerPosition(cid), t.area.fromPos, t.area.toPos) then doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) local temple = getTownTemplePosition(getPlayerTown(cid)) doTeleportThing(cid, temple) doSendMagicEffect(temple, CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Your time is over!") end end end, mathtime(t.time_to_finish) * 1000) return true end function mathtime(table) -- by dwarfer local unit = {"sec", "min", "hour", "day"} for i, v in pairs(unit) do if v == table[2] then return table[1]*(60^(v == unit[4] and 2 or i-1))*(v == unit[4] and 24 or 1) end end return error("Bad declaration in mathtime function.") end function getStrTime(table) -- by dwarfer local unit = {["sec"] = "second",["min"] = "minute",["hour"] = "hour",["day"] = "day"} return tostring(table[1].." "..unit[table[2]]..(table[1] > 1 and "s" or "")) end function Fupper(str) return (str:gsub("^%l", string.upper)) end  
  14. local tab = { [9] = 35, -- [vocationID] = número da cor do texto animado [10] = 66, [11] = 180, [12] = 210 } function ariseText(cid) local texts = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."}; if not isCreature(cid) or not tab[getPlayerVocation(cid)] then return LUA_ERROR end doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], tab[getPlayerVocation(cid)]) addEvent(ariseText, 600, cid) end function onLogin(cid) if tab[getPlayerVocation(cid)] then ariseText(cid) end return true end  
  15. Vodkart's post in (Resolvido)barqueiro com destino aleatorio was marked as the answer   
    Data/NPC

    Barqueiro John.xml
    <?xml version="1.0"?> <npc name="Barqueiro John" script="data/npc/scripts/johnb.lua" walkinterval="50000" floorchange="0"> <health now="100" max="100"/> <look type="129" head="95" body="116" legs="121" feet="115" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. You can {travel} with me!"/> </parameters> </npc>  
    Data/Npc/script
     
    johnb.lua
    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 AddRandomTravel(cid, message, keywords, parameters, node) -- by vodka if(not npcHandler:isFocused(cid)) then return false end if (isPlayerPremiumCallback == nil or isPlayerPremiumCallback(cid) == true or parameters.premium == false) then if(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then npcHandler:say('You must reach level ' .. parameters.level .. ' to travel.', cid) elseif not doPlayerRemoveMoney(cid, parameters.cost) then npcHandler:say('Sorry You need '..parameters.cost..' gps to travel!', cid) else local random = {x=1746, y=1218, z=6} local chance = 10 -- 10% de cair nessa ilha if chance <= math.random(1,100) then npcHandler:say('tchau, boa viagem!', cid) doTeleportThing(cid, parameters.destination) else npcHandler:say('parece que se perdemos por conta dos ventos, nao sei onde estamos!', cid) doTeleportThing(cid, random) end doSendMagicEffect(getPlayerPosition(cid), 10) npcHandler:resetNpc() end else npcHandler:say('I can only allow premium players to travel.', cid) end npcHandler:resetNpc() return true end local citys = { {"baiak city", cost = 10000, destination = {x=119, y=51, z=6}, level = 2, premium = true}, {"jugle sland", cost = 10000, destination = {x=143, y=170, z=6}, level = 2, premium = true}, {"frozen sland", cost = 10000, destination = {x=307, y=136, z=6}, level = 2, premium = true}, {"dwarven city", cost = 10000, destination = {x=235, y=512, z=6}, level = 2, premium = true}, {"aslan city", cost = 10000, destination = {x=994, y=1029, z=6}, level = 2, premium = true}, {"travel", text = "Eu posso te levar para {baiak city}, {jugle sland}, {frozen sland}, {dwarven city} e {aslan city} por um pequeno custo!"} } for i = 1, #citys do local get = citys[i] if get.cost ~= nil and get.cost > 0 then local node = keywordHandler:addKeyword({get[1]}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Voce quer viajar para " .. get[1] .. " por "..get.cost.." gps?"}) node:addChildKeyword({"yes"}, AddRandomTravel, {cost = get.cost, destination = get.destination, level = get.level, premium = get.premium}) node:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Ok, then.", reset = true}) else keywordHandler:addKeyword({get[1]}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = get.text}) end end citys = nil npcHandler:addModule(FocusModule:new())  
  16. Vodkart's post in (Resolvido)Ajuda simples de sistema de PET was marked as the answer   
    CREATURESCRIPT
     
     
    mortepet.lua
    function isPetMonster(cid)     return getCreatureMaster(cid) == 0 and false or isPlayer(getCreatureMaster(cid)) end function onDeath(cid, corpse, deathList)     if not isPetMonster(cid) then         return true     end     local waittime = 60 -- Tempo de exhaustion em segundos     local strtime = 6660666 -- Storage, nunca usar a mesma em outra Script do mesmo tipo. Ex: mesmo creaturescript, mesmo action e etc...     local master = getCreatureMaster(cid)     doPlayerSendTextMessage(master, MESSAGE_EVENT_ADVANCE, "Your pet is dead.")     exhaustion.set(master, strtime, waittime)     return true end
    TAG
    <event type="death" name="MortePet" event="script" value="mortepet.lua"/>
    No arquivo XML dos monstros que serão pets:
     
           <script>                <event name="MortePet"/>        </script>  
  17. Vodkart's post in Alavanca Que Cria items. was marked as the answer   
    function getItemsFromList(items) local str = "" if table.maxn(items) > 0 then for i = 1, table.maxn(items) do str = str .. items[i][2] .. " " .. getItemNameById(items[i][1]) if i ~= table.maxn(items) then str = str .. ", " end end end return str end function doRemoveItemsFromList(cid, items) local count = 0 if table.maxn(items) > 0 then for i = 1, table.maxn(items) do if getPlayerItemCount(cid, items[i][1]) >= items[i][2] then count = count + 1 end end end if count == table.maxn(items) then for i = 1, table.maxn(items) do doPlayerRemoveItem(cid, items[i][1], items[i][2]) end else return false end return true end local items = {{15992, 5}, {15993, 5}, {15994, 5}, {15995, 5}, {15996, 5}} local item_give = 13515 function onUse(cid, item, frompos, item2, topos) if not doRemoveItemsFromList(cid, items) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Voce não tem " .. getItemsFromList(items) .. ".") return true end doPlayerAddItem(cid, item_give) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Voce ganhou 1x " .. getItemNameById(item_give) .. ".") return true end  
  18. Vodkart's post in (Resolvido)Ajuste nesse sistema de hunt exclusiva was marked as the answer   
    já está pronto, entra discord que te passo e ensino a instalar
  19. Vodkart's post in (Resolvido)Mostrar Level em que deu Reborn was marked as the answer   
    entendi, o reborn ele desloga o char... usa assim o npc:
     
    local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('???') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) local rstorage = 149501 if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Olá! Se voce está pronto, diga "reborn".') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Hey!.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 4 then selfSay('Desculpe, mas voce já é rebornado.') focus = 0 talk_start = 0 elseif msgcontains(msg, 'reborn') and (getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30023) ~= 4) or (getPlayerLevel(cid) > 600 and getPlayerStorageValue(cid,30023) ~= 4) then selfSay('Apenas level 200 até 600 podem rebornar.') focus = 0 talk_start = 0 elseif msgcontains(msg, 'reborn') then selfSay('Realmente quer isto?') talk_state = 2 --_GOKU_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 8 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,10,9) talk_state = 0 --_VEGETA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 23 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,25,24) talk_state = 0 --_PICCOLO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 36 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,42,37) talk_state = 0 --_C17_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 49 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,50,50) talk_state = 0 --_GOHAN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 63 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,62,64) talk_state = 0 --_TRUNKS_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 75 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,74,76) talk_state = 0 --_CELL_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 87 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,81,88) talk_state = 0 --_FREEZA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 101 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,88,102) talk_state = 0 --_MAJIN BOO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 117 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,98,118) talk_state = 0 --_BROLY_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 131 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,113,132) talk_state = 0 --_C18_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 144 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,50,145) talk_state = 0 --_UUB_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 156 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,128,157) talk_state = 0 --_GOTEN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 170 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,142,171) talk_state = 0 --_CHIBI TRUNKS_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 184 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,151,185) talk_state = 0 --_COOLER_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 197 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,153,198) talk_state = 0 --_DENDE_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 210 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,169,211) talk_state = 0 --_TSUFUL_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 222 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,180,223) talk_state = 0 --_BARDOCK_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 235 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,194,236) talk_state = 0 --_KURIRIN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 248 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,205,249) talk_state = 0 --_PAN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 260 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,212,261) talk_state = 0 --_KAIO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 272 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,221,273) talk_state = 0 --_VIDEL_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 284 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,227,285) talk_state = 0 --_JANEMBA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 296 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,234,297) talk_state = 0 --_TENSHINHAN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 308 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,246,309) talk_state = 0 --_JENK_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 320 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,257,321) talk_state = 0 --_RADITZ_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 332 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,265,333) talk_state = 0 --_C16_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 344 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,277,345) talk_state = 0 --_TURLES_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 356 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,285,357) talk_state = 0 --_BULMA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 368 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,296,369) talk_state = 0 --_SHENRON_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 380 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,302,381) talk_state = 0 --_VEGETTO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 392 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,308,393) talk_state = 0 --_TAPION_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 404 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,321,405) talk_state = 0 --_KAME_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 417 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,335,418) talk_state = 0 --_KING VEGETA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 429 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,347,430) talk_state = 0 --_KAGOME_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 441 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,357,442) talk_state = 0 --_ZAIKO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 453 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,368,454) talk_state = 0 --_LORD CHILLED_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 465 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,375,466) talk_state = 0 --_C8_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 482 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,517,483) talk_state = 0 --_Goku Black_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 534 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,592,535) talk_state = 0 --_Golden Freeza_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 544 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,88,545) talk_state = 0 --_Bills_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 554 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,502,555) talk_state = 0 --_Zamasu_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 564 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,607,565) talk_state = 0 --_Whiss_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 574 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,617,575) talk_state = 0 --_Vados_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 584 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,624,585) talk_state = 0 --_Vegetto Black_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 594 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,630,595) talk_state = 0 --_Blue Gogeta_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 604 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,640,605) talk_state = 0 --_Vegetto Blue_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 614 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,308,615) talk_state = 0 --_Zeno_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 624 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,641,625) talk_state = 0 --_Goku Black Evo_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 634 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,651,635) talk_state = 0 elseif msgcontains(msg, 'yes') and talk_state == 2 then selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Voce deve estar na ultima transformação.') elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Adeus!') focus = 0 talk_start = 0 end end end function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Próximo por favor...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Adeus!') focus = 0 end end end  
  20. Vodkart's post in (Resolvido)Mostrar Level em que deu Reborn was marked as the answer   
    entendi, o reborn ele desloga o char... usa assim o npc:
     
    local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('???') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) local rstorage = 149501 if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Olá! Se voce está pronto, diga "reborn".') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Hey!.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 4 then selfSay('Desculpe, mas voce já é rebornado.') focus = 0 talk_start = 0 elseif msgcontains(msg, 'reborn') and (getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30023) ~= 4) or (getPlayerLevel(cid) > 600 and getPlayerStorageValue(cid,30023) ~= 4) then selfSay('Apenas level 200 até 600 podem rebornar.') focus = 0 talk_start = 0 elseif msgcontains(msg, 'reborn') then selfSay('Realmente quer isto?') talk_state = 2 --_GOKU_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 8 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,10,9) talk_state = 0 --_VEGETA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 23 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,25,24) talk_state = 0 --_PICCOLO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 36 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,42,37) talk_state = 0 --_C17_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 49 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,50,50) talk_state = 0 --_GOHAN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 63 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,62,64) talk_state = 0 --_TRUNKS_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 75 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,74,76) talk_state = 0 --_CELL_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 87 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,81,88) talk_state = 0 --_FREEZA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 101 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,88,102) talk_state = 0 --_MAJIN BOO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 117 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,98,118) talk_state = 0 --_BROLY_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 131 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,113,132) talk_state = 0 --_C18_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 144 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,50,145) talk_state = 0 --_UUB_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 156 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,128,157) talk_state = 0 --_GOTEN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 170 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,142,171) talk_state = 0 --_CHIBI TRUNKS_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 184 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,151,185) talk_state = 0 --_COOLER_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 197 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,153,198) talk_state = 0 --_DENDE_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 210 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,169,211) talk_state = 0 --_TSUFUL_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 222 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,180,223) talk_state = 0 --_BARDOCK_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 235 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,194,236) talk_state = 0 --_KURIRIN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 248 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,205,249) talk_state = 0 --_PAN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 260 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,212,261) talk_state = 0 --_KAIO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 272 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,221,273) talk_state = 0 --_VIDEL_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 284 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,227,285) talk_state = 0 --_JANEMBA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 296 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,234,297) talk_state = 0 --_TENSHINHAN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 308 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,246,309) talk_state = 0 --_JENK_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 320 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,257,321) talk_state = 0 --_RADITZ_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 332 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,265,333) talk_state = 0 --_C16_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 344 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,277,345) talk_state = 0 --_TURLES_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 356 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,285,357) talk_state = 0 --_BULMA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 368 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,296,369) talk_state = 0 --_SHENRON_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 380 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,302,381) talk_state = 0 --_VEGETTO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 392 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,308,393) talk_state = 0 --_TAPION_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 404 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,321,405) talk_state = 0 --_KAME_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 417 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,335,418) talk_state = 0 --_KING VEGETA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 429 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,347,430) talk_state = 0 --_KAGOME_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 441 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,357,442) talk_state = 0 --_ZAIKO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 453 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,368,454) talk_state = 0 --_LORD CHILLED_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 465 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,375,466) talk_state = 0 --_C8_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 482 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,517,483) talk_state = 0 --_Goku Black_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 534 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,592,535) talk_state = 0 --_Golden Freeza_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 544 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,88,545) talk_state = 0 --_Bills_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 554 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,502,555) talk_state = 0 --_Zamasu_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 564 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,607,565) talk_state = 0 --_Whiss_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 574 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,617,575) talk_state = 0 --_Vados_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 584 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,624,585) talk_state = 0 --_Vegetto Black_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 594 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,630,595) talk_state = 0 --_Blue Gogeta_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 604 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,640,605) talk_state = 0 --_Vegetto Blue_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 614 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,308,615) talk_state = 0 --_Zeno_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 624 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,641,625) talk_state = 0 --_Goku Black Evo_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 634 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) doReborn(cid,1,651,635) talk_state = 0 elseif msgcontains(msg, 'yes') and talk_state == 2 then selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Voce deve estar na ultima transformação.') elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Adeus!') focus = 0 talk_start = 0 end end end function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Próximo por favor...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Adeus!') focus = 0 end end end  
  21. Vodkart's post in (Resolvido)Ajuda nesse script de slot, por favor !! was marked as the answer   
    Tente trocar essa função:
     
    local function getper() local n = 1 for i=1,10 do n = n+math.random(0,10) if n < 8*i then break end end return n end  
    por
     
    local function getper() local min, max = 1, 10 return math.random(min, max) end  
    máximo está 10%
  22. Vodkart's post in (Resolvido)[AJUDA] Aceitar outra vocação was marked as the answer   
    local magias = { [1] = "zesshou hachimon", [2] = "jukai kousan", [3] = "mugen shiki", [4] = "yahumuki", [5] = "zesshou hachimon", [6] = "jukai kousan", [7] = "mugen shiki", [8] = "yahumuki", [9] = "zesshou hachimon", [10] = "jukai kousan", [11] = "mugen shiki", [12] = "yahumuki" } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerGroupId(cid) > 2 and getPlayerGroupId(cid) < 5 then return true end local voc = getPlayerVocation(cid) local gem = gems.id[voc] if item.itemid == gem then if getPlayerLevel(cid) < 350 then doCreatureSay(cid,"É necessário level 350 ou maior para absorver uma gema espiritual!",TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(cid), 2) return true elseif getPlayerStorageValue(cid,21202) > 0 then doCreatureSay(cid,"Você ainda possui uma gema espiritual absorvida!",TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(cid), 2) return true end setPlayerStorageValue(cid, 21202,1) setPlayerStorageValue(cid, gems.storage[voc], 1) doUseGem(cid, item) doCreatureSay(cid,"Você absorveu uma gema espiritual ("..magias[voc]..")!",TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid),65) return true else doCreatureSay(cid,"Ops!! Crystal errado, procure da sua vocação!",TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(cid), 2) return true end return true end  
  23. Vodkart's post in (Resolvido)Top Effect Problema só top loga was marked as the answer   
    local config = { effect = 30, -- Efeito que vai usar storage = 998899, -- Storage que o player precisa ter tempo = 30, -- Tempo em segundos 1200 - 20 minutos text = '--[[TOP #1]]--' } local PremiumEfect = CreatureEvent("PremiumEfect") function PremiumEfect.onLogin(player) player:registerEvent("PremiumEfect") local resultId = db.storeQuery("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (resultId ~= false) then local pid = result.getDataString(resultId, "id") local name = result.getDataString(resultId, "name") local namereal = player:getName() if namereal == name then SendEffect(player:getId()) end result.free(resultId) end return true end function SendEffect(cid) local player = Player(cid) if not player then return end player:getPosition():sendMagicEffect(config.effect) player:say(config.text, TALKTYPE_MONSTER_SAY) addEvent(SendEffect, config.tempo*1000, player:getId()) return true end PremiumEfect:register()  
  24. Vodkart's post in EFEITO VIP was marked as the answer   
    nem tem a função no código para tal...
    local time = 5 local random = math.random(1, 255) local info = { [1] = {effect = 29, storage = 13712, message = "VIP", color = 130}, [2] = {effect = 30, storage = 13714, message = "DONATE", color = 50} } function effect(cid) if (isPlayer(cid)) then for i = 1, #info do if getPlayerStorageValue(cid, info[i].storage) >= 1 then doSendMagicEffect(getCreaturePosition(cid), info[i].effect) doSendAnimatedText(getCreaturePosition(cid), info[i].message, info[i].color) end end addEvent(effect, time * 1000, cid) end end function onLogin(cid) for i = 1, #info do if getPlayerStorageValue(cid, info[i].storage) >= 1 then doSendMagicEffect(getCreaturePosition(cid), info[i].effect) doSendAnimatedText(getCreaturePosition(cid), info[i].message, info[i].color) effect(cid) end end return true end  
  25. Vodkart's post in [Pedido] invasão de monstros was marked as the answer   
    https://tibiaking.com/forums/topic/94479-raid-automatica-mod-raid-automatica-edit-brunds/

Informação Importante

Confirmação de Termo