Ir para conteúdo

Darcio Antonio

Membro
  • Registro em

  • Última visita

Tudo que Darcio Antonio postou

  1. mods/EventoDoubleXP.xml:6: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xBA 0x20 0x73 0x74 HH_STORAGE = 2327 -- n║ storage, tenha certeza de colocar uma nÒo us ^ [15:53:37.948] > Loading EventoDoubleXP.xml...[Error - ScriptManager::loadFromXml] Cannot load mod mods/EventoDoubleXP.xml [15:53:37.949] Line: 6, Info: Input is not proper UTF-8, indicate encoding ! [15:53:37.949] Bytes: 0xBA 0x20 0x73 0x74
  2. ok Vo testar aqui Hugão se pa deu bom. De bom
  3. como faço para somente o ultimo cara que matar o player ou der o ultimo hit ou bater mais pegar a frag um exemplo: tem 20 caar batendo em 1 ai so o ultimo que atacou pega a frag pq ta foda 1 cara mata 5 pega a fregs tambem ta chato isso..
  4. 8.60 distro 0.4 não funciona
  5. Galera peguei esse script --######################################### ABOUT ################# -- Advanced Auction House #### -- code by josejunior23 #### -- the function add_depot_item(guid, item, count) as made by magus from otserv.com.br #### -- any other code in this file as made by me. #### -- ... and thanks to the TFS, they make it more easy :) #### --######################################### CONFIG ################################################################ local max_days, bad_items, able_items, max_offer, max_items, main_file, item_show, access_need =-- # J # 2, -- 1º - <MAX DAYS> - when player add an offer, his offer will stay for X days, in this case 2. # O # {"gold coin", "crystal coin", "platinum coin", "worm"}, -- 2º - <IGNORED ITEMS> - put here all items that you dont want players put for sale. # S # {able_runes = false, able_potions = true}, -- 3º - <ABLE/DISABLE RUNES/POTIONS> - choose if you want to player sell runes/pots # E # 40000000, -- 4º - <MAX OFFER> - max offer that players may ask for his item's, in this case 40 000 000 golds (40kk). # J # 5, -- 5º - <MAX ITEMS PER PLAYER> - max items that each player can put for sale, in this case 5. # R # 'houseItems.txt', -- 6º - <###MAIN FILE###> - this is the name of the MAIN FILE, where the script save the offers.. # 2 # 2160, -- 7º - <DUUUH, NOTHING ESPECIAL> - this show a crystal coin (itemid: 2160) when player say ex: !auction-list [param # 3 # 3 -- 8º - <ACCESS> - this is the access You need to use command !auction-clean #### --########################################################################################################################## -- ########## LIB FUNCTIONS ########### function load_table(file) local t = { } for m in io.lines(file) do local d, i, c, a, s = m:match '(%S+)%s+(%S+)%s+(%S+)%s+(%S+)%s+(%S+)' table.insert(t, {date = d, item = i, cost = c, ammount = a, seller = s }) end return t end function save_table(file, text) local f = io.open(file,"w") f:write(text) f:close() end function add_new_line(file, arr) local tab = load_table(file) table.insert(tab, {date = arr.d, item = arr.i, cost = arr.c, ammount = arr.a, seller = arr.s }) save_table(file, covert_table(tab)) end function del_line_by_id(file, id) local tab = load_table(file) table.remove (tab, id) save_table(file, covert_table(tab)) end function covert_table(tab) local t = "" for i in pairs(tab) do t = t .. "" .. tab[i].date .. " " .. tab[i].item .. " " .. tab[i].cost .. " " .. tab[i].ammount .. " " .. tab[i].seller .. "\n" end return t end function get_ramdom_thing(tab) return tab[math.random(1, #tab)] end function list_items(tab, str) local i = 0 if(str == nil) then str = "" end for id in pairs(tab) do i = i + 1 if(tab[id].x) then i = tab[id].x end str = str .. "\n " .. i .. "# " .. tab[id].ammount .. "x " .. getItemNameById(tab[id].item) .. " " .. tab[id].cost .. " " .. getPlayerNameByGUID(tab[id].seller) end local txt = { "`!auction-buy id´\n-> to buy an item.", "`!auction-sell item, ammount, price´\n-> to sell an item.", "`!auction-info id´\n-> to see more information about id offer.", "`!auction-list´\n-> to see a complete list with offers.", "`!auction-find name´\n-> to find offers by name.", "`!auction-withdraw´\n-> to get your money from our house.", "`!auction-del id´\n-> to delete an offer made by You."} return str .. "\n\nTip: " .. get_ramdom_thing(txt) end function get_info(file, id) -- id == line local tab, list = load_table(file), nil for i = 1, #tab do if(i == id)then list = {date = tab[i].date, item = tab[i].item, cost = tab[i].cost, ammount = tab[i].ammount, seller = tab[i].seller} break end end return list end function add_depot_item(guid, item, count)-- by Magus local item,count = type(item)=="table" and item or {item},type(count)=="table" and count or {(count or 1)} for k,v in ipairs(item) do local ls = db.getResult("SELECT `sid` FROM `player_depotitems` WHERE `player_id` = "..guid.." ORDER BY `sid` DESC LIMIT 1") return db.executeQuery("INSERT INTO `player_depotitems` (`player_id`, `sid`, `pid`, `itemtype`, `count`, `attributes`) VALUES ("..guid..", "..(ls:getDataInt("sid")+1)..", 101, "..v..", "..count[k]..", '"..(count[k] > 1 and string.format("%x",count[k]) or '').."')") or false end end function add_day (days) local d, m, y = tonumber(os.date("%d")) + days, tonumber(os.date("%m")), tonumber(os.date("%y")) while d > 30 do d = 01 m = m + 1 end while m > 12 do d = 01 m = 01 y = y + 1 end return m .. "/" .. d .. "/" .. y end function clean_offers(file, m) local l, t = 0, os.date("%m/%d/%y") if m then t = m end for e in io.lines(file) do l = l + 1 local d, i, c, a, s = e:match '(%S+)%s+(%S+)%s+(%S+)%s+(%S+)%s+(%S+)' if(d == t) then del_line_by_id(file, l) l = l - 1 local p = getPlayerByName(getPlayerNameByGUID(s)) if(isCreature(p)) then doPlayerAddItem(p, i, a) doPlayerSendTextMessage(p, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: we could not sell Your ' .. a .. 'x of `' .. getItemNameById(i) .. '´ in our house, take it back.') else local s, i, a = tonumber(s),tonumber(i),tonumber(a) add_depot_item(s, i, a) end end end end function get_player_offers(g, file)-- g = player guid local o, x = {}, 0 for l in io.lines(file) do x = x + 1 local d, i, c, a, s = l:match '(%S+)%s+(%S+)%s+(%S+)%s+(%S+)%s+(%S+)' if(tonumber(s) == g) then table.insert(o, {date = d, item = i, cost = c, ammount = a, seller = s , x = x}) end end return o end function find_offers_by_name(name, file) -- this funciton find offers with item name local o, x = {}, 0 for l in io.lines(file) do x = x + 1 local d, i, c, a, s = l:match '(%S+)%s+(%S+)%s+(%S+)%s+(%S+)%s+(%S+)' if(getItemNameById(tonumber(i)) == name) then table.insert(o, {date = d, item = i, cost = c, ammount = a, seller = s , x = x}) end end return o end -- ########## LIB FUNCTIONS ############ -- ########## onSay FUNCTION ########### function onSay(cid, words, param, channel) if(words == "!auction-sell") then local t = string.explode(param, ",") if not t[2] or not t[3] or not param or (isNumber(t[1])) or not(isNumber(t[2])) or not (isNumber(t[3])) or (tonumber(t[2]) <= 0) or (tonumber(t[2]) > 100) or (tonumber(t[3]) <= 0) or (tonumber(t[2]) > 1) and not (isItemStackable(getItemIdByName(t[1]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: type the name of an item with ammount and offer: `!auction-sell carrion worm fang, 100, 3650´.\n Tip: `!auction-sell´ is the command, `carrion worm fang´ is the item, `100´ is the ammount, `3650´ is the price you want for it.') return true end if(isItemContainer(getItemIdByName(t[1]))) or not (isItemMovable(getItemIdByName(t[1]))) or (isInArray(bad_items, t[1])) or (isItemFluidContainer(getItemIdByName(t[1]))) and (able_items.able_potions == false) or (isItemRune(getItemIdByName(t[1]))) and (able_items.able_runes == false) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: we do not accept those kind of items.') return true end if(max_items ~= 0) and (#get_player_offers(getPlayerGUID(cid), main_file) >= max_items) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: You already have too many items in our house. You have a total of `' .. #get_player_offers(getPlayerGUID(cid), main_file) .. '´ items in our house and still can put more `' .. max_items - #get_player_offers(getPlayerGUID(cid), main_file) .. '´ items.') return true end if(tonumber(t[3]) > max_offer) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: sorry, this price is too much. the limit is: `' .. max_offer .. '´ golds.') return true end if(doPlayerRemoveItem(cid, getItemIdByName(t[1]), t[2])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: we have added your ' .. t[2] .. 'x `' .. t[1] .. '´ as offer to our house.\n say `!auction-info ' .. #load_table(main_file) + 1 .. '´ to see more information about your offer.\nYou have a total of `' .. #get_player_offers(getPlayerGUID(cid), main_file)+1 .. '´ items in our house and still can put more `' .. (max_items == 0 and "NO LIMIT" or max_items - #get_player_offers(getPlayerGUID(cid), main_file) - 1) .. '´ items.') add_new_line(main_file, {d = add_day (max_days), i = getItemIdByName(t[1]), c = tonumber(t[3]), a = tonumber(t[2]), s = getPlayerGUID(cid)}) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: could not find item `' .. t[1] .. '´ in your backpacks/slots.') end elseif(words == "!auction-buy") then if not (isNumber(param)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: ID. Offer should be a number.') return true end local f = get_info(main_file, tonumber(param)) if not f then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: could not find results for ID. `' .. tonumber(param) .. '´.') return true end if(doPlayerRemoveMoney(cid, f.cost) == true) then del_line_by_id(main_file, tonumber(param)) doPlayerAddItem(cid, f.item, f.ammount, false) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: You brought ' .. f.ammount .. 'x of `' .. getItemNameById(f.item) .. '´ for `' .. f.cost .. '´ golds from our house.') local pid = getPlayerByName(getPlayerNameByGUID(f.seller)) if not (isCreature(pid)) then db.executeQuery("UPDATE `players` SET `balance` = `balance` + '" .. f.cost .. "' WHERE `name` = '" .. getPlayerNameByGUID(f.seller) .. "';") return true end doPlayerAddMoney(pid, f.cost) doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: we sold Your ' .. f.ammount .. 'x of `' .. getItemNameById(f.item) .. '´ in our house, heres Yours `' .. f.cost .. '´ golds.') end elseif(words == "!auction-list") then if(param == '') then local tab = load_table(main_file) if(#tab > 20) then doShowTextDialog(cid, item_show, list_items(tab, " #-> ADVANCED AUCTION HOUSE <-#\n\n Total of `" .. #tab .. "´ items in our stock.\n\n ID. Item Gold Seller")) else doPlayerPopupFYI(cid, list_items(tab, " #-> ADVANCED AUCTION HOUSE <-#\n\n Total of `" .. #tab .. "´ items in our stock.\n\n ID. Item Gold Seller")) end else if(isNumber(param)) or not (isPlayer(getPlayerByName(param))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: could not find a player online with name: `' .. param .. '´. \n Tip: remember, You can only look for offers from a player that is online. but You still can see their offers from `!auction-list´.') return true end local offers = get_player_offers(getPlayerGUID(getPlayerByName(param)), main_file) doShowTextDialog(cid, item_show, list_items(offers, " #-> ADVANCED AUCTION HOUSE <-#\n\n " .. string.upper(param) .. ", \n as a total of `" .. #offers .. "´ items in our stock.\n\n ID. Item Gold Seller")) end elseif(words == "!auction-info") then if not (isNumber(param)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: ID. Offer should be a number.') return true end local f = get_info(main_file, tonumber(param)) if not f then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: could not find results for ID. `' .. tonumber(param) .. '´.') return true end local txt = " #-> ADVANCED AUCTION HOUSE <-#\n Showing Offer ID. " .. tonumber(param) .. "#\n\n - Expire Date: " .. f.date .. "\n - Item: x" .. f.ammount .. " " .. getItemNameById(f.item) .. "\n - Cost: " .. f.cost .. " golds\n - Seller: " .. getPlayerNameByGUID(f.seller) .. "" doShowTextDialog(cid, f.item, txt) elseif(words == "!auction-del") then if not (isNumber(param)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: ID. Offer should be a number.') return true end local f = get_info(main_file, tonumber(param)) if not f then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: could not find results for ID. `' .. tonumber(param) .. '´.') return true end if(tonumber(f.seller) == getPlayerGUID(cid)) then del_line_by_id(main_file, tonumber(param)) doPlayerAddItem(cid, f.item, f.ammount, false) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: we removed your offer from our house, take back x' .. f.ammount .. ' of `' .. getItemNameById(f.item) .. '´.') else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: You may not remove offer ID. `' .. tonumber(param) .. '´. reason: it does not belongs to You.') end elseif(words == "!auction-find") then if(isNumber(param)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: could not find results for item `' .. tonumber(param) .. '´, make sure the name is right.') return true end local tab = find_offers_by_name(param, main_file) if(#tab == 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: could not find results for item `' .. param .. '´.') return true end doShowTextDialog(cid, getItemIdByName(param), list_items(tab, " #-> ADVANCED AUCTION HOUSE <-#\n\n Total of `" .. #tab .. "´ `" .. param .. "´ in our stock.\n\n ID. Item Gold Seller")) elseif(words == "!auction-cmd") or(words == "!auction") then local stuff = {{"`!auction-buy id´", "to buy an item by offer id\n\n"}, {"`!auction-sell itemname, ammount, price´", "to sell an item\n\n"}, {"`!auction-info id´", "to see more information about offer id\n\n"}, {"`!auction-list´", "to see a complete list with offers\n\n"}, {"`!auction-del id´", "to delete an offer made by you\n\n"}, {"`!auction-find name´", "to find offers by name\n\n"}, {"`!auction-withdraw´", "to get your money from our house\n\n"}, {"`!auction-balance´", "to see your current balance in our house\n\n"}} local txt = " > ADVANCED AUCTION HOUSE <\n\n" for i = 1, #stuff do txt = txt .. " " .. i .. ". - " .. stuff[i][1] .. "\n > " .. stuff[i][2] end -- ^ dont ask why, I just made in this way =) doPlayerPopupFYI(cid, txt .. "\n >Code by josejunior23<") -- ^ Do not remove s2 elseif(words == "!auction-withdraw") then local total_money = getPlayerBalance(cid) if(total_money <= 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: Your balance is `0´. ') return true end doPlayerAddMoney(cid, total_money) doPlayerSetBalance(cid, 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: You withdraw `' .. total_money .. '´ golds from our house. Your balance is now `0´.') elseif(words == "!auction-balance") then local total_money = getPlayerBalance(cid) if(total_money <= 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: Your balance is `0´. ') return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: Your balance is `' .. total_money .. '´golds, You can withdraw that money at anytime, type `!aution-withdraw´ to get all Your money from our house.') elseif(words == "!auction-clean") then if not (getPlayerAccess(cid) >= access_need) then doPlayerSendCancel(cid, '<this is not a valid command>') return false end if not (param) then clean_offers(main_file) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: all offers with date: ' .. os.date("%m/%d/%y") .. ' as been reseted.\n Remember, the scripts ignore offers with less/more days.') return true end if(isNumber(param)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: this is not a valid date, date format should be like in this example: ' .. os.date("%m/%d/%y") .. ' (month/day/year) . ') return true end clean_offers(main_file, param) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[AUCTION-HOUSE]: all offers with date: ' .. param .. ' as been reseted.\n Remember, the scripts ignore offers with less/more days.') end return true end -- ########## onSay FUNCTION ########### -- ########## onTimer FUNCTION ########## function onTimer(cid, interval, lastExecution) clean_offers(main_file) return true end -- ########## onTimer FUNCTION ########## Funciona tudo ok mas quando coloco um item para a venda e o personagem nao esta online, quando logo ele nao recebo o dinheiro. e da esse erro aqui. [13:46:03.606] > Loading ADVANCED-AUCTION-HOUSE.xml...[Warning - Event::loadScript] Event onTime not found (mods/scripts/AAH.lua) se alguém poder me ajudar da um alo ai pfv.
  6. Darcio Antonio postou uma resposta no tópico em Suporte Tibia OTServer
    Esse aqui ? que fica erm Creaturescripts ? local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) local loss = getConfigValue('deathLostPercent') registerCreatureEvent(cid, "TiraBattle") if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) registerCreatureEvent(cid, "ExpVip") end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doCreatureSetStorage(cid, 5412, os.time()) doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "TiraBattle") registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "hmup") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "TiraBattle") registerCreatureEvent(cid, "PriceItem") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "BossReward") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "TiraBattle") end registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") return true end
  7. Darcio Antonio postou uma resposta no tópico em Suporte Tibia OTServer
    Galera toda X que um jogador loga no meu jogo aparece essa msg da distro [0:34:29.827] [Lua Error] [0:34:29.827] [string "LuaInterface::loadBuffer"]:12: unexpected symbol near '<' [0:34:30.041] Neto logou. onde sera que pode ser esse erro ?
  8. Ola agora estadando isso quando acidiona os itens [23:13:47.414] [Error - NpcScript Interface] [23:13:47.414] data/npc/scripts/auction.lua:onCreatureSay [23:13:47.414] Description: [23:13:47.414] data/lib/Npc_Shop.lua:68: attempt to call field 'executeQuery' (a nil value) [23:13:47.414] stack traceback: [23:13:47.414] data/lib/Npc_Shop.lua:68: in function 'doAddItemShop' [23:13:47.414] data/npc/scripts/auction.lua:84: in function 'callback' [23:13:47.414] data/npc/lib/npcsystem/npchandler.lua:390: in function 'onCreatureSay' [23:13:47.414] data/npc/scripts/auction.lua:7: in function <data/npc/scripts/auction.lua:7> ele puxa os itemas mas nao fica o item pra venda.
  9. Darcio Antonio postou uma resposta no tópico em Suporte Tibia OTServer
    Estou com um script de barra de espera mas ele nao mostra a magia de determinada vocação mostra sempre todas as magias queria que quando fosse tal vocation ele mostrase so as magias da vocation mesmo local spelllist = { ['Death Strike'] = {id = 87, words = 'exori mort', exhaustion = 2000, premium = true, type = 'Instant', icon = 'deathstrike', mana = 20, level = 16, soul = 0, group = {[1] = 2000}, vocations = {1, 5}}, ['Flame Strike'] = {id = 89, words = 'exori flam', exhaustion = 2000, premium = true, type = 'Instant', icon = 'flamestrike', mana = 20, level = 14, soul = 0, group = {[1] = 2000}, vocations = {1, 2, 5, 6}}, ['Strong Flame Strike'] = {id = 150, words = 'exori gran flam', exhaustion = 8000, premium = true, type = 'Instant', icon = 'strongflamestrike', mana = 60, level = 70, soul = 0, group = {[1] = 2000, [4] = 8000}, vocations = {1, 5}}, ['Ultimate Flame Strike'] = {id = 154, words = 'exori max flam', exhaustion = 30000, premium = true, type = 'Instant', icon = 'ultimateflamestrike', mana = 100, level = 90, soul = 0, group = {[1] = 4000}, vocations = {1, 5}}, } local spells = {} local lado = 'vertical' local sbw -- window widget local sbb -- button ./\ widget local spellBarWindow -- UIWindow local exhsaustionTotal = 1100 local hideLevel = false -- os que nao tem level, vai mostrar? true = nao, false = sim function init() sbb = modules.client_topmenu.addRightGameToggleButton('sbb', 'Spell Bar' , 'SpellBar.png', toggle) sbw = g_ui.displayUI('SpellBar') sbw:move(10,50) g_mouse.bindPress(sbw, function() createMenu() end, MouseRightButton) sbw:hide() connect(g_game, 'onTalk', mensagemEnviada) connect(g_game, { onGameEnd = function() sbw:hide() sbb:setOn(false) end }) connect(LocalPlayer, { onLevelChange = onLevelChange }) for inst,values in pairs(spelllist) do if values.type == 'Instant' then -- depois vou fazer mais tipos.. if g_game.getProtocolVersion() >= 950 then -- Vocation is only send in newer clients if table.find(values.vocations, g_game.getLocalPlayer():getVocation()) then local inside = {instantName = inst, words = values.words, lvl = values.level, mana = values.mana, prem = values.premium, groups = values.group,icon = values.icon, vocations = values.vocations,exhaustion = values.exhaustion} table.insert(spells,inside) end else local inside = {instantName = inst, words = values.words, lvl = values.level, mana = values.mana, prem = values.premium, groups = values.group,icon = values.icon, vocations = values.vocations,exhaustion = values.exhaustion} table.insert(spells,inside) end end end table.sort(spells, function(a, b) return (a.lvl < b.lvl) end) end function onLevelChange(localPlayer, value, percent) getSpells(spells) end function mensagemEnviada(name, level, mode, text, channelId, pos) if not g_game.isOnline() then return end if g_game.getLocalPlayer():getName() ~= name then return end for i = 1,#spells do if spells[i].words:lower() == text:lower() then startDownDelay(i) break end end end function terminate() sbw:destroy() sbb:destroy() disconnect(g_game, { onGameEnd = function() sbw:hide() sbb:setOn(false) end }) disconnect(g_game, 'onTalk', mensagemEnviada) disconnect(LocalPlayer, { onLevelChange = onLevelChange }) end function toggle() if sbb:isOn() then sbw:hide() sbb:setOn(false) else sbw:show() getSpells(spells) sbb:setOn(true) level = g_game.getLocalPlayer():getLevel() end end function createMenu() local menu = g_ui.createWidget('PopupMenu') if lado == 'horizontal' then menu:addOption('Set Vertical', function() lado = 'vertical' getSpells(spells) end) else menu:addOption('Set Horizontal',function() lado = 'horizontal' getSpells(spells) end) end if hideLevel == false then menu:addOption('No Level Hide',function() hideLevel = true getSpells(spells) end) else menu:addOption('No Level Show',function() hideLevel = false getSpells(spells) end) end menu:display() end function destruirSpells() for i = 1,100 do if sbw:recursiveGetChildById('spell'..i) == nil then break end sbw:recursiveGetChildById('spell'..i):destroy() sbw:recursiveGetChildById('progress'..i):destroy() end end function getSpells(tabela) destruirSpells() spellBarWindow = sbw:recursiveGetChildById('mainWindow') local player = g_game.getLocalPlayer() local valor = #tabela local width = 38 local height = 38 if not player then return end for i = 1,#tabela do if (tabela[i].lvl > player:getLevel()) and hideLevel == true then valor = i - 1 break end if i == #tabela then valor = i end icon = g_ui.createWidget('SpellButton',spellBarWindow) progress = g_ui.createWidget('SpellProgressSpell',spellBarWindow) --icon: icon:setId('spell'..i) local spicon = Spells.getClientId(tabela[i].instantName) icon:setImageSource('/images/game/spells/defaultspells') icon:setImageClip((((spicon -1)%12)*32) .. ' ' .. ((math.ceil(spicon/12)-1)*32) .. ' 32 32') icon:setVisible(true) icon.words = tabela[i].words icon.instantName = tabela[i].instantName icon.lvl = tabela[i].lvl icon.mana = tabela[i].mana icon.exhaustion = tabela[i].exhaustion icon.exhaustionNeeded = 0 icon:setTooltip(tabela[i].words) if lado == 'horizontal' then icon:setMarginTop(3) height = 38 width = (i) * 32 + 2*(i) icon:setMarginLeft((i) * 32 + 2*(i) - 32) else icon:setMarginLeft(3) icon:setMarginTop((i) * 32 + 2*(i) - 32) width = 38 height = (i) * 32 + 2*(i) end --progress: progress:setId('progress'..i) progress:setVisible(true) progress:setPercent(100) progress:setMarginLeft(icon:getMarginLeft()) progress:setMarginTop(icon:getMarginTop()) if player:getLevel() < icon.lvl then progress:setText('L'..icon.lvl) progress:setColor('red') progress:setPercent(0) end if progress:getPercent() == 100 then progress:setText('OK') elseif icon.lvl < player:getLevel() then progress:setText(progress:getPercent()) end progress:setPhantom(true) icon.onClick = function() useSpell(i) end end sbw:setHeight(height) sbw:setWidth(width) spellBarWindow:setSize(sbw:getSize()) end function useSpell(i) local spell = sbw:recursiveGetChildById('spell'..i) if not spell then return end local progress = sbw:recursiveGetChildById('progress'..i) local player = g_game.getLocalPlayer() if not player then return end if progress:getPercent() < 100 then return modules.game_textmessage.displayFailureMessage('Wait your delay!') end g_game.talk(spell.words) end function startDownDelay(i) -- aqui vai ficar on onTalk, pra descer só realmente quando a spell sair local spell = sbw:recursiveGetChildById('spell'..i) if not spell then return end local progress = sbw:recursiveGetChildById('progress'..i) progress:setPercent(0) progress:setText('0%') progress:setColor('red') spell.exhaustionNeeded = 0 scheduleEvent(function() spellTimeleft(i) end,100) end function spellTimeleft(i) local spell = sbw:recursiveGetChildById('spell'..i) if not spell then return end local progress = sbw:recursiveGetChildById('progress'..i) spell.exhaustionNeeded = spell.exhaustionNeeded + 100 if spell.exhaustionNeeded < spell.exhaustion then progress:setPercent(math.ceil(((spell.exhaustionNeeded) * 100)/spell.exhaustion)) progress:setText(progress:getPercent()) progress:setColor('red') else progress:setPercent(100) progress:setText('OK') progress:setColor('green') spell.exhaustionNeeded = 0 return true end scheduleEvent(function() spellTimeleft(i) end,100) end
  10. porem se eu falar a magia que demora 6 segundos meu amigo tambem nao pode usala pq o CD e global.
  11. Galera so achei essas cores aqui pra msg, existe mais alguma ? MESSAGE_STATUS_CONSOLE_BLUE MESSAGE_STATUS_CONSOLE_RED MESSAGE_STATUS_CONSOLE_ORANGE
  12. Explicação 1293 -- ID do item que é muito facil de ser minerado 5944 -- ID do item que é facil de ser minerado 6536 -- ID do item que é mais ou menos facil de ser minerado 2145 -- ID do item que é dificil de ser minerado 2154 -- ID do item que é muito dificil de ser minerado 10 -- Chance que a pick irá quebrar 200 -- Aqui é a chance de não minerar nada (coloque um numero, quanoo maior o numero, mais chance de não minerar nada, coloque apenas numeros acima de 103, por exemplo: 104,105,...115,...230,... etc) Agora vá até data/action/ e abra o arquivo actions.xml e adicione isso: 1356 -- Aqui é o ID da pedra que será minerada (Aonde você dara use para minerar) mineracao.lua -- aqui é o nome do arquivo que nós criamos ~~º Bonus º~ Você não tem aonde guardar a sua Pick? Seus problemas acabaram, chego a Magic Bag, basta apenas falar okos e sua pick vai para um compartimento magico, agora você quer tira ela de lá, simples fale dokos e pronto ela ja esta com você, simples não? Só tem uma coisa, você presisa ter no minimo 300 de mana e quando você guarda você gasta metade da mana que você tem, e quando você tira você gasta toda a sua mana... Vamos lá Abra apasta do seu OT e va até data/talckactions/scripts, copie qualquer arquivo de la e renomei para minera.lua, abra o arquivo e apague tudo que estiver la dentro e cole isso: 300 -- Aqui é a quantidade de mana que ele tera que ter Agora va até data/talkactions/, abra o arquivo talkactions.xml e adicione isso: minera.lua -- nome do arquivo que nós criamos O tutorial fica por aqui, espero que tenham gostado, postem duvidas sugestões ou criticas construtivas. Creditos: D@rK Espero que gostem... Atenciosamente,
  13. Barra de Magias ou cooldown alguem tem ai pra ver quanto tempo falta pra fazer tal magia ou ate mesmo clicar no icone e sair a magia.
  14. Bacana porem nao gasta mana nao gasta soul e nao treina ml Resolve so o esquema de treinar ml que o resto ja fiz
  15. Existe algum script que de pra runar, sem colocar as runas na mão do personagem? Uso a base do 8.60 Outra pergunta onde fica o diretorio do value="conjureRune" <- Onde posso alterar mexer na script conjureRune
  16. E ai mano vodkard tem solução ?
  17. Não man ja foi aq
  18. não foi uma outfit q eu fiz manja mas tranquilo vlw mans
  19. não man e junto mesmo eu que tava achando que éra daquele jeito ...
  20. alguem ai compila e criptografa client ? eu pago.
  21. e pra ganhar um addon ? tipo addon 1 addon 2 etc?
  22. Galera eu tenho uma outfit com addon 1 e addon 2. Como faço pra quando usar 1 item ganhar o addon 1 e quando eu usar outro tipo de item ganhar o addon 2 ( OBS: Colocar pra ganhar só a Outfit eu já sei agora preciso dos addons. ) Tenho essa script que utilizo pra ganhar só o outfit local itemID = 12849 -- ID do ITEM local lookOut = { [0] = {lookType = 664}, -- Female [1] = {lookType = 665}, -- Male } function onUse(cid, item, fromPosition, itemEx, toPosition) getInfo = lookOut[getPlayerSex(cid)] if getInfo then if canPlayerWearOutfit(cid, getInfo.lookType, 1) == FALSE then doPlayerAddOutfit(cid, getInfo.lookType, 1) else doPlayerSendCancel(cid, "Você já tem o addon referente para essa outfit.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns, você desbloqueou o addon natalino.") doSendMagicEffect(getCreaturePosition(cid), 12) doRemoveItem(item.uid) end return true end e meu XML esta assim. <outfit id="8"> <list gender="0" lookType="664" name="Nomade"/> <list gender="1" lookType="665" name="Nomade"/> </outfit> Agora não sei se no XML, tenho que colocar os addons também porque e a primeira X que estou mexendo com isso. ( Ainda não adicionei o addon female porem ja deixei no xml. 664) No meu OB esta assim Já achei o erro era a versão do meu OB Usei essa e ele mostro adons e monts etc. ObjectBuilder_0_4_3

Informação Importante

Confirmação de Termo