Ir para conteúdo

leandrozera

Artesão
  • Total de itens

    110
  • Registro em

  • Última visita

Histórico de Reputação

  1. Upvote
    leandrozera recebeu reputação de emos em Auto borders 8.60 remeres   
    alguém que tenha feito todas as auto bordes do 8.60 , e tiver editado para mapear poderia disponibilizar os arquivos? versão do meu items.otb é 3.20.49-8.60
  2. Upvote
    leandrozera deu reputação a Bruno em Npc que teletransporta por storage help-me   
    Tenta assim:
     
     
  3. Upvote
    leandrozera deu reputação a Bruno em Essa configuração de frags está correta ?   
    @@leandrozera,
     
    Esta correto, deixe padronizado, com horas:
     
     
     
    Com dias:
     
     

    Tópico movido para dúvidas / pedidos resolvidos.
  4. Upvote
    leandrozera deu reputação a zipter98 em mudar esse sistema de onThink para onTime   
    local monsters = {"Demon", "Frost Dragon", "Hydra", "Dragon Lord", "Dragon"} local time_min, max = 25, 60 local premios, gold = {{2160, 10}, {2157, 5}}, 10000 function winMonsterEvent() local max_sto, winner = 0, 0 local monster = getGlobalStorageValue(1919211) for _, pid in pairs(getPlayersOnline()) do local sto = getPlayerStorageValue(pid, 1814210) if sto > max_sto then max_sto = sto winner = pid end end if isPlayer(winner) then local artigo = getPlayerSex(winner) == 0 and "A jogadora" or "O jogador" doBroadcastMessage(artigo.." "..getCreatureName(winner).." matou "..getPlayerStorageValue(winner, 1814210).." "..monster.."s e venceu o evento, parabens!") for _, prize in pairs(premios) do doPlayerAddItem(winner, prize[1], prize[2]) end doPlayerAddMoney(winner, gold) else doBroadcastMessage("O evento terminou e nao houve nenhum vencedor.") end setGlobalStorageValue(1919211, 0) end function onTime() local random = math.random(1, #monsters) local time = math.random(time_min, max) for _, pid in pairs(getPlayersOnline()) do doPlayerSetStorageValue(pid, 1814210, 0) end setGlobalStorageValue(1919211, monsters[random]) doBroadcastMessage("O evento comecou e vai durar "..time.." minuto. O monstro sorteado foi "..monsters[random].."! Quem matar mais deles ate o fim sera o vencedor!") addEvent(winMonsterEvent, time*1000*60) return true end Tags:
    <globalevent name="Evento1" time="13:00" event="script" value="nome_do_arquivo.lua"/> <globalevent name="Evento2" time="17:00" event="script" value="nome_do_arquivo.lua"/> <globalevent name="Evento3" time="23:00" event="script" value="nome_do_arquivo.lua"/>
  5. Upvote
    leandrozera deu reputação a Bruno em ajuda com script de spell   
    Tenta assim:
     
     
  6. Upvote
    leandrozera deu reputação a hiaben27 em qual função desse script?   
    Esse é um frame killer, geralmente é usado para prevenir ataques hackers.
     
    Nessa parte percebemos a sua real função:
     
     
    Geralmente é um script java. Não entendo muito bem, também não sei me expressar muito bem, mas creio que você tenha entendido,
     
    Abraço !
  7. Upvote
    leandrozera recebeu reputação de AdilsonHacker em [Resolvido] Como por acentos em scripts .lua?   
    isso mesmo amigo vlw
  8. Upvote
    leandrozera deu reputação a AdilsonHacker em [Resolvido] Como por acentos em scripts .lua?   
    Adiciona isto no começo do script, acima de tudo.
     
    <?xml version="1.0" encoding="ISO-8859-1"?>
  9. Upvote
    leandrozera recebeu reputação de othereality em Sobre como funciona as versões do TFS   
    se você entende de programação c++ , as versões só vai ser útil para vc para usar como base.
  10. Upvote
    leandrozera deu reputação a Vodkart em help comando em talkactions!   
    function onSay(cid, words, param) local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["noblewoman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={336} } local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={335}, ["wayfarer"]={366} } local msg = {"Command requires GOOD param!", "You dont have Addon Doll!", "Bad param! exemple: !addon first,mage", "Full Addon Set sucesfully added!"} local x = string.explode(param:lower(), ",") if(getPlayerItemCount(cid, 9693) > 0) then if param ~= "" then if (x[1] == "first" or x[1] == "second") and maleOutfits[x[2]] and femaleOutfits[x[2]] then doPlayerRemoveItem(cid, 9693, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4]) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) doPlayerAddOutfit(cid, getPlayerSex(cid) == 0 and femaleOutfits[x[2]][1] or maleOutfits[x[2]][1], x[1] == "first" and 1 or 2) else doPlayerSendTextMessage(cid, 27, msg[3]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2]) end return true end
  11. Upvote
    leandrozera deu reputação a Vodkart em Duvida sobre posicionamento do mostro   
    fiz um movements para mudar a direção dos monstro de acordo com o item.actionid do piso onde eles estão... já que era uma área pré programada para treiners...
  12. Upvote
    leandrozera recebeu reputação de Vodkart em Trade OFF 8.60   
    e pq o script ja tem função de ver quantidade de cap.. ai essa função vai ficar desnecessária
    :getDataInt("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.")
  13. Upvote
    leandrozera deu reputação a Vodkart em Trade OFF 8.60   
    local config = {
    levelRequiredToAdd = 20,
    maxOffersPerPlayer = 30,
    SendOffersOnlyInPZ = true,
    blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933}
    }
    function onSay(cid, words, param, channel)
    if(param == 'help') then
    doPlayerPopupFYI(cid, "#######Commands#######\n---------------------------------\n!market add, itemName, itemPrice, itemCount \nexample: !market add, plate armor, 500, 1 \n---------------------------------\n!market buy, AuctionID \nexample: !market buy, 1943 \n---------------------------------\n!market remove, AuctionID - example: !market remove, 1943 \n!market receber - Use this command to get money for sold items.\n---------------------------------")
    return true
    end
    local t = string.explode(param, ",")
    if(t[1] == "add") then
    if((not t[2]) or (not t[3]) or (not t[4])) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
    return true
    end
    if(not tonumber(t[3]) or (not tonumber(t[4]))) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.")
    return true
    end
    if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.")
    return true
    end
    local item = getItemIdByName(t[2])
    if(not item) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")
    return true
    end
    if(getPlayerLevel(cid) < config.levelRequiredToAdd) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.")
    return true
    end
    if(isInArray(config.blocked_items, item)) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.")
    return true
    end
    if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item(s).")
    return true
    end
    local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";")
    if(check:getID() == -1) then
    elseif(check:getRows(true) >= config.maxOffersPerPlayer) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")")
    return true
    end
    if(config.SendOffersOnlyInPZ) then
    if(not getTilePzInfo(getPlayerPosition(cid))) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.")
    return true
    end
    end
    if(tonumber(t[4]) < 1 or (tonumber(t[3]) < 1)) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.")
    return true
    end
    local itemcount, costgp = math.floor(t[4]), math.floor(t[3])
    doPlayerRemoveItem(cid, item, itemcount)
    db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")")
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. itemcount .." " .. t[2] .." for " .. costgp .. " gps to offerts database.")
    end
    if(t[1] == "buy") then
    if(not tonumber(t[2])) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
    return true
    end
    local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";")
    if(buy:getID() ~= -1) then
    if(getPlayerMoney(cid) < buy:getDataInt("cost")) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.")
    buy:free()
    return true
    end
    if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.")
    buy:free()
    return true
    end
    if(getPlayerFreeCap(cid) < getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")))then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You try to buy a " .. buy:getDataString("item_name") .. ". It weight " .. getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.")
    buy:free()
    return true
    end
    local item,amount = buy:getDataString("item_id"), buy:getDataInt("count")
    local parcel = doCreateItemEx(ITEM_PARCEL)
    if isItemStackable(item) or amount == 1 then
    doAddContainerItem(parcel, item, amount)
    else
    for i = 1, amount do
    doAddContainerItem(parcel, item, 1)
    end
    end
    local carta = doAddContainerItem(parcel, 1952)
    local texto = "[ Item Market ] - "..os.date("%d/%m/%Y ", os.time()).."\n(Buyer) "..getCreatureName(cid).." bought "..amount.."x "..getItemNameById(item).."."
    doItemSetAttribute(carta, "writer", "Item Market (ID:"..t[2]..")")
    doItemSetAttribute(carta, "text", texto)
    doPlayerSendMailByName(getCreatureName(cid), parcel, getPlayerTown(cid))
    doPlayerRemoveMoney(cid, buy:getDataInt("cost"))
    db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";")
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You bought " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!")
    db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";")
    buy:free()
    else
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
    end
    end
    if(t[1] == "remove") then
    if((not tonumber(t[2]))) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
    return true
    end
    if(config.SendOffersOnlyInPZ) then
    if(not getTilePzInfo(getPlayerPosition(cid))) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you remove offerts from database.")
    return true
    end
    end
    local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";")
    if(delete:getID() ~= -1) then
    if(getPlayerGUID(cid) == delete:getDataInt("player")) then
    db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";")
    if(isItemStackable(delete:getDataString("item_id"))) then
    doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count"))
    else
    for i = 1, delete:getDataInt("count") do
    doPlayerAddItem(cid, delete:getDataString("item_id"), 1)
    end
    end
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.")
    else
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!")
    end
    delete:free()
    else
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
    end
    end
    if(t[1] == "receber") then
    local balance = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";")
    if(balance:getDataInt("auction_balance") < 1) then
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have money on your auction balance.")
    balance:free()
    return true
    end
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got " .. balance:getDataInt("auction_balance") .. " gps from auction system!")
    doPlayerAddMoney(cid, balance:getDataInt("auction_balance"))
    db.executeQuery("UPDATE `players` SET `auction_balance` = '0' WHERE `id` = " .. getPlayerGUID(cid) .. ";")
    balance:free()
    end
    return true
    end
  14. Upvote
    leandrozera deu reputação a Vodkart em Trade OFF 8.60   
    local config = { levelRequiredToAdd = 20, maxOffersPerPlayer = 30, SendOffersOnlyInPZ = true, blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933} } function onSay(cid, words, param, channel) if(param == 'help') then doPlayerPopupFYI(cid, "#######Commands#######\n---------------------------------\n!market add, itemName, itemPrice, itemCount \nexample: !market add, plate armor, 500, 1 \n---------------------------------\n!market buy, AuctionID \nexample: !market buy, 1943 \n---------------------------------\n!market remove, AuctionID - example: !market remove, 1943 \n!market receber - Use this command to get money for sold items.\n---------------------------------") return true end local t = string.explode(param, ",") if(t[1] == "add") then if((not t[2]) or (not t[3]) or (not t[4])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end if(not tonumber(t[3]) or (not tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.") return true end if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.") return true end local item = getItemIdByName(t[2]) if(not item) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end if(getPlayerLevel(cid) < config.levelRequiredToAdd) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.") return true end if(isInArray(config.blocked_items, item)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.") return true end if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item(s).") return true end local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";") if(check:getID() == -1) then elseif(check:getRows(true) >= config.maxOffersPerPlayer) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.") return true end end if(tonumber(t[4]) < 1 or (tonumber(t[3]) < 1)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.") return true end local itemcount, costgp = math.floor(t[4]), math.floor(t[3]) doPlayerRemoveItem(cid, item, itemcount) db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. itemcount .." " .. t[2] .." for " .. costgp .. " gps to offerts database.") end if(t[1] == "buy") then if(not tonumber(t[2])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(buy:getID() ~= -1) then if(getPlayerMoney(cid) < buy:getDataInt("cost")) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.") buy:free() return true end if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.") buy:free() return true end if(getPlayerFreeCap(cid) < getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")))then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You try to buy a " .. buy:getDataString("item_name") .. ". It weight " .. getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.") buy:free() return true end local item,amount = buy:getDataString("item_id"), buy:getDataInt("count") local parcel = doCreateItemEx(ITEM_PARCEL) if isItemStackable(item) or amount == 1 then doAddContainerItem(parcel, item, amount) else for i = 1, amount do doAddContainerItem(parcel, item, 1) end end local carta = doAddContainerItem(parcel, 1952) doItemSetAttribute(carta, "description","[Trade Off]- "..os.date("%d/%m/%Y ", os.time()).."\n","(Buyer) "..getCreatureName(cid).." bought "..amount.."x "..getItemNameById(item)..".") doPlayerSendMailByName(getCreatureName(cid), parcel, getPlayerTown(cid)) doPlayerRemoveMoney(cid, buy:getDataInt("cost")) db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You bought " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!") db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";") buy:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "remove") then if((not tonumber(t[2]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you remove offerts from database.") return true end end local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(delete:getID() ~= -1) then if(getPlayerGUID(cid) == delete:getDataInt("player")) then db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") if(isItemStackable(delete:getDataString("item_id"))) then doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count")) else for i = 1, delete:getDataInt("count") do doPlayerAddItem(cid, delete:getDataString("item_id"), 1) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!") end delete:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "receber") then local balance = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";") if(balance:getDataInt("auction_balance") < 1) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have money on your auction balance.") balance:free() return true end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got " .. balance:getDataInt("auction_balance") .. " gps from auction system!") doPlayerAddMoney(cid, balance:getDataInt("auction_balance")) db.executeQuery("UPDATE `players` SET `auction_balance` = '0' WHERE `id` = " .. getPlayerGUID(cid) .. ";") balance:free() end return true end
  15. Upvote
    leandrozera deu reputação a Bruno em Erro script de tp   
    Tenta assim:
    local level = 50 -- level para passar function onStepIn(cid, item, position, fromPosition) for i = 2700, 3200 do local pos = getThingfromPos(i) if not isPlayer(getTopCreature(pos).uid) and getPlayerLevel(cid) >= level then doTeleportThing(cid, pos) doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid) doSendMagicEffect(position, CONST_ME_TELEPORT) doSendMagicEffect(pos, CONST_ME_TELEPORT) return true end if getPlayerLevel(cid) < level then doCreatureSay(cid, 'You need level ' .. level .. ' to access the Trainers.', TALKTYPE_ORANGE_1, false, cid) else doCreatureSay(cid, 'All training slots are taken.', TALKTYPE_ORANGE_1, false, cid) end doTeleportThing(cid, fromPosition, true) doSendMagicEffect(fromPosition, CONST_ME_TELEPORT) end return true end
  16. Upvote
    leandrozera deu reputação a Bruno em Erro script de tp   
    @@leandrozera,
    Tente assim:
    local level = 50 -- level para passar function onStepIn(cid, item, position, fromPosition) for i = 2700, 3900 do local pos = getThingfromPos(i) if not isPlayer(getTopCreature(pos).uid) and getPlayerLevel(cid) >= level then doTeleportThing(cid, pos) doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid) doSendMagicEffect(position, CONST_ME_TELEPORT) doSendMagicEffect(pos, CONST_ME_TELEPORT) return true end if getPlayerLevel(cid) < level then doCreatureSay(cid, 'You need level ' .. level .. ' to access this area.', TALKTYPE_ORANGE_1, false, cid) else doCreatureSay(cid, 'All training slots are taken.', TALKTYPE_ORANGE_1, false, cid) end doTeleportThing(cid, fromPosition, true) doSendMagicEffect(fromPosition, CONST_ME_TELEPORT) end return true end
  17. Upvote
    leandrozera deu reputação a Bruno em Alavanca de food help!   
    Tenta assim:
    function onUse(cid, item, fromPosition, itemEx, toPosition) local size = 40 if (getPlayerFood(cid) + size > MAX_FOOD) then doPlayerSendCancel(cid, "You are full.") return true end doPlayerFeed(cid, size) doSendMagicEffect(fromPosition, CONST_ME_MAGIC_GREEN) return true end
  18. Upvote
    leandrozera deu reputação a zetto em Bug no war sytem   
    Entendi, não é bug no War system, é bug na talkaction de frags.
    Troque tudo que tem no arquivo da pasta talkactions/scripts/frags por esse.
     
     
    function onSay(cid, words, param, channel) if(not getBooleanFromString(getConfigValue('useFragHandler'))) then return false end local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `k`.`war` = 0 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = { name = result:getDataString("name"), level = result:getDataInt("level"), date = result:getDataInt("date") } if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } if(getBooleanFromString(getConfigValue('advancedFragList'))) then local result = "Frags gained today: " .. size.day .. "." if(size.day > 0) then for _, content in ipairs(contents.day) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end result = result .. "\nFrags gained this week: " .. (size.day + size.week) .. "." if(size.week > 0) then for _, content in ipairs(contents.week) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end result = result .. "\nFrags gained this month: " .. (size.day + size.week + size.month) .. "." if(size.month > 0) then for _, content in ipairs(contents.month) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then result = result .. "\nYour " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd) end doPlayerPopupFYI(cid, result) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.") if(size.day > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Last frag at " .. os.date("%d %B %Y %X", contents.day[1].date) .. " on level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").") end local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd)) end end return true end
  19. Upvote
    leandrozera deu reputação a Vodkart em help addon doll   
    já existe
     
    function onSay(cid, words, param) local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["noblewoman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={336} } local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={335}, ["wayfarer"]={366} } local msg = {"Command requires GOOD param!", "You dont have Addon Doll!", "Bad param!", "Full Addon Set sucesfully added!"} local x = string.explode(param, ",") if(getPlayerItemCount(cid, 8982) > 0) then if param ~= "" then if maleOutfits[x[1]:lower()] and femaleOutfits[x[1]:lower()] then if (x[2] == '1' or x[2] == '2') then doPlayerRemoveItem(cid, 8982, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4]) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) if(getPlayerSex(cid) == 0)then doPlayerAddOutfit(cid, femaleOutfits[x[1]:lower()][1], x[2]) else doPlayerAddOutfit(cid, maleOutfits[x[1]:lower()][1], x[2]) end else doPlayerSendTextMessage(cid, 27, msg[3]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[3]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2]) end return true end exemplo: !addon knight, 1
  20. Upvote
    leandrozera deu reputação a Administrador em Auto borders 8.60 remeres   
    Resolvido:
     
    Deixe o script assim:
    <brush name="sand by daniel" type="ground" server_lookid="10441" z-order="1200"> <item id="10441" chance="789"/> <item id="10442" chance="778"/> <item id="10443" chance="767"/> <item id="10444" chance="756"/> <item id="10445" chance="745"/> <item id="10446" chance="734"/> <item id="10447" chance="723"/> <item id="10448" chance="712"/> <border align="outer" to="none" id="798"/> </brush> <brush name="sand by dani" type="ground" server_lookid="10616" z-order="1200"> <item id="10616" chance="789"/> <item id="10617" chance="778"/> <item id="10618" chance="767"/> <item id="10619" chance="756"/> <item id="10620" chance="745"/> <item id="10621" chance="734"/> <item id="10622" chance="723"/> <item id="10623" chance="712"/> <border align="outer" to="none" id="799"/> </brush> Não esqueça de ativar o auto-border
  21. Upvote
    leandrozera deu reputação a Administrador em Auto borders 8.60 remeres   
    Estou com o tempo apertado, vou fazendo aos poucos e você vai instalando. Beleza?
    Segue abaixo o primeiro item.
     
    data/860/grounds.xml
    <brush name="sand by daniel" type="ground" server_lookid="10441" z-order="1200"> <item id="10441" chance="789"/> <item id="10442" chance="778"/> <item id="10443" chance="767"/> <item id="10444" chance="756"/> <item id="10445" chance="745"/> <item id="10446" chance="734"/> <item id="10447" chance="723"/> <item id="10448" chance="712"/> </brush> data/860/borders.xml
    <border id="798" group="1"> -- border by daniel -- <borderitem edge="n" item="10456"/> <borderitem edge="e" item="10459"/> <borderitem edge="s" item="10457"/> <borderitem edge="w" item="10458"/> <borderitem edge="cnw" item="10462"/> <borderitem edge="cne" item="10463"/> <borderitem edge="csw" item="10461"/> <borderitem edge="cse" item="10460"/> <borderitem edge="dnw" item="10465"/> <borderitem edge="dne" item="10464"/> <borderitem edge="dsw" item="10467"/> <borderitem edge="dse" item="10466"/> </border> Feito isso, vá em data/860/tilesets.xml. Aperte ctrl + f e procure por Nature.
    Antes de:
    <brush name="sea"/> Adicione:
    <brush name="sand by daniel"/> Você pode alterar o nome, mas terá que mudar em grounds.xml também.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...