Ir para conteúdo

irvanovitch

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Obrigado
    irvanovitch deu reputação a Danyel Varejao em Save player and House   
    Fala galerinha do TK, aqui vai um script muito útil para vários servidores. O script serve para salvar o player e a house do mesmo, utilizando o comando !save.
    O script foi testado em OTXServer 2.
    local Configs = { Exhausted = 180, Storage_Exhausted = 5000001, Messages = { SALVED = "You character has been salved.", EXHAUST = "You need wait %d seconds to save again.", }, } local function doSavePlayerAndHouse(cid) doPlayerSave(cid) if getHouseByPlayerGUID(getPlayerGUID(cid)) then doSaveHouse(getHouseByPlayerGUID(getPlayerGUID(cid))) end return true end function onSay(cid, words, param) if getPlayerStorageValue(cid, Configs.Storage_Exhausted) >= os.time() then doPlayerSendCancel(cid, string.format(Configs.Messages.EXHAUST, getPlayerStorageValue(cid, Configs.Storage_Exhausted) - os.time())) return true end doSavePlayerAndHouse(cid) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, Configs.Messages.SALVED) setPlayerStorageValue(cid, Configs.Storage_Exhausted, os.time() + Configs.Exhausted) return true end Tag do talkactions.xml
    <talkaction words="/save;!save" event="script" value="SavePlayers.lua"/>  
  2. Gostei
    irvanovitch deu reputação a Danyel Varejao em Premium points Transfer Document   
    Olá @SilentKill pelo que eu entendi do sistema é o seguinte, funciona como uma troca de PONTOS por ITEMS usando o trade. correto?
     
    Aqui vai os scripts!
     
    1º Em data/npc/scripts adicione um arquivo chamado NamekJin Seller.lua e cole isso dentro:
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 greetCallback(cid) talkState[cid] = 0 return true end function creatureSayCallback(cid, type, msg) if (not npcHandler:isFocused(cid)) then return false end if talkState[cid] == nil or talkState[cid] == 0 then Count_Points = tonumber(msg) if isInArray(Points_Trade.Points, Count_Points) then npcHandler:say("Do you want to buy a premium points transfer document that will transfer ".. Count_Points .." premium points, right?", cid) talkState[cid] = 1 else npcHandler:say("Escolha um numero entre ".. table.concat(Points_Trade.Points, ', ') ..".", cid) talkState[cid] = 0 end elseif talkState[cid] == 1 then if msgcontains(msg, 'yes') then local Document = doCreateItemEx(Points_Trade.Document_ItemID) doItemSetAttribute(Document, "name", "".. Count_Points .." premium points transfer document") doItemSetAttribute(Document, "points", Count_Points) doPlayerAddItemEx(cid, Document) npcHandler:say("Você obteve um documento que vale ".. Count_Points .." premium points, use ele no trade com alguem.", cid) talkState[cid] = 0 else npcHandler:say("Ok, volte mais tarde.", cid) talkState[cid] = 0 end end return true end npcHandler:setMessage(MESSAGE_GREET, "Ola |PLAYERNAME|. Eu vendo alguns utensílios e Premium Points transfers para você transferir pontos para outros jogadores, lembre-se para comprar use '10,ppt' para 10 pontos.") npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) 2º Em data/lib adicione um arquivo chamado Points_Trade.lua e cole isso dentro:
    Points_Trade = { Document_ItemID = 1954, Points = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}, } function DocumentPoints(Item) return tonumber(getItemAttribute(Item.uid, "points")) end function getPlayerPoints(cid) local AccountID = getPlayerAccountId(cid) local Points = 0 local Result = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = ".. AccountID .."") if Result:getID() ~= -1 then Points = Result:getDataInt("premium_points") end return tonumber(Points) end function doPlayerAddPoints(cid, Points) local AccountID = getPlayerAccountId(cid) local Result = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = '".. AccountID .."'") if Result:getID() ~= -1 then db.executeQuery("UPDATE `accounts` SET `premium_points` = " .. getPlayerPoints(cid) + Points .. " WHERE `id` = " .. AccountID .. ";") end return true end function doPlayerRemovePoints(cid, Points) local AccountID = getPlayerAccountId(cid) local Result = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = '".. AccountID .."'") if Result:getID() ~= -1 then db.executeQuery("UPDATE `accounts` SET `premium_points` = " .. getPlayerPoints(cid) - Points .. " WHERE `id` = " .. AccountID .. ";") end return true end 3º Em data/creaturescripts/scripts adicione um arquivo chamado Points_Trade.lua e cole isso dentro:
    function onTradeAccept(cid, target, item, targetItem) if isPlayer(cid) and isPlayer(target) then if item.itemid == Points_Trade.Document_ItemID then doPlayerSendTextMessage(target, MESSAGE_STATUS_WARNING, "Você recebeu ".. DocumentPoints(item) .." premium points.") doPlayerAddPoints(target, DocumentPoints(item)) doPlayerRemovePoints(cid, DocumentPoints(item)) addEvent(doPlayerRemoveItem, 1, target, Points_Trade.Document_ItemID, 1) elseif targetItem.itemid == Points_Trade.Document_ItemID then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você recebeu ".. DocumentPoints(targetItem) .." premium points.") doPlayerAddPoints(cid, DocumentPoints(targetItem)) doPlayerRemovePoints(target, DocumentPoints(targetItem)) addEvent(doPlayerRemoveItem, 1, cid, Points_Trade.Document_ItemID, 1) end end return true end function onTradeRequest(cid, target, item) if item.itemid == Points_Trade.Document_ItemID then if getPlayerPoints(cid) < DocumentPoints(item) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você não tem ".. DocumentPoints(item) .." para realizar uma troca.") return false end end return true end 4º Em data/creaturescripts/scripts/login.lua adicione isso dps de qualquer linha que contenha registerCreatureEvent
    registerCreatureEvent(cid, "Points_Trade_Request") registerCreatureEvent(cid, "Points_Trade")  
    5º Em data/creaturescripts/creaturescripts.xml adicione uma tag:
    <event type="traderequest" name="Points_Trade_Request" event="script" value="Points_Trade.lua"/> <event type="tradeaccept" name="Points_Trade" event="script" value="Points_Trade.lua"/> 6º Em data/npc adicione um arquivo chamado NamekJin Seller.xml e coloque isso dentro:
    <?xml version="1.0" encoding="UTF-8"?> <npc name="NamekJin Seller" script="NamekJin Seller.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="138" head="97" body="59" legs="45" feet="102" addons="2"/> </npc>  
    Se te ajudou marque como melhor resposta!, obrigado.
  3. Gostei
    irvanovitch deu reputação a Danyel Varejao em [System] Auto Loot Perfect   
    ~~~~~ * Auto Loot System 100% * ~~~~~ TFS 0.4 / TFS 0.3.7
    Fala galerinha do Tibiaking, então, várias pessoas estão tendo problema com o sistema de autoloot, aqui vai um sistema que eu editei para melhorar o uso do mesmo. Sem muita enrolação vamos ao que interessa.
     
    1° - Acesse a pasta data/lib e crie um arquivo chamado Auto_Loot.lua, coloque isso dentro do arquivo:
     
     
    2° - Abra a pasta data/actions/scripts e crie um arquivo chamado Auto_Loot_Boost.lua, dentro dele adicione:
     
     
    3° - Abra a pasta data/creaturescripts/scripts e crie um arquivo chamado Auto_Loot.lua, dentro dele adicione:
     
     
    4° - Abra a pasta data/talkactions/scripts e crie um arquivo chamado Auto_Loot.lua, dentro dele adicione:
     
     
    5° - Em data/actions/actions.xml adicione a seguinte tag:
     
    <!-- Auto Loot --> <action itemid="7443" event="script" value="Auto_Loot_Boost.lua"/> Altere o numero 7443 caso queira mudar o id do item do seu auto loot boost.
     
    6° - Em data/creaturescripts/creaturescripts.xml adicione a seguinte tag:
     
    <!-- Auto Loot --> <event type="login" name="Auto_Loot_Login" event="script" value="Auto_Loot.lua"/> <event type="kill" name="Auto_Loot_Kill" event="script" value="Auto_Loot.lua"/> 7° - Em data/talkactions/talkactions.xml adicione a seguinte tag:
     
    <!-- Auto Loot --> <talkaction access="0-4" words="/autoloot;!autoloot" event="script" value="Auto_Loot.lua"/>  
    Créditos
    50% Killua(Vitor Bertolucci)
    50% Danyel Varejão
     
  4. Gostei
    irvanovitch deu reputação a Pedriinz em ANTI MC [EVENTOS]   
    @Fir3element, sua logica está correta, porém estou certo de que não seria o suficiente para barrar a entrada de novos jogadores caso seja um evento em uma sala ou algo do gênero. Precisamos de uma checagem mais "avançada" aqui.
     
    @Tópico
     
    Creio que uma das melhores formas de se realizar isso, é realizando uma checagem de quem está participando do evento em questão.
    Qual evento que é? Enfim, você pode setar em uma tabela o cid de cada personagem que entrar no evento, e junto com este CID o IP do mesmo. Ao tentar entrar outro personagem com o mesmo ip deverá ter uma checagem dentro desta tabela para verificar se já existe algum jogador com este IP dentro do evento. 
     
    Como fazer:
    Primeiro você deve declarar uma tabela global onde ficará salvo os dados dos jogadores que entrarão no Evento. Aconselho fazer isso em uma lib. (Estarei assumindo aqui que você utiliza a versão 0.4 ou similar.)
     
    Crie ou coloque uma lib qualquer a seguinte declaração:
    CHECK_MC = { players_cache = { --[getPlayerGUID(cid)] = {ip = getPlayerIp(cid)} }, }  
    Após feito isso, você deve adicionar nesta tabela todos os jogadores que entrarem no evento em questão. Entra no arquivo de entrada do evento e adicione o seguinte código:
    CHECK_MC.players_cache[getPlayerGUID(cid)] = {ip = getPlayerIp(cid)} PS: Caso o evento seja um teleport que vai aparecer para os jogadores entrar ou um tile, você pode adicionar esta linha no código do arquivo no movements, mas ou menos assim: 
     
    function onStepIn(cid, item, position, fromPosition, toPosition) if not isPlayer(cid) then return true end doTeleportThing(cid, posiçãoDoEvento) CHECK_MC.players_cache[getPlayerGUID(cid)] = {ip = getPlayerIp(cid)} return true end Feito isso, nossa tabela já está adicionando o CID e o IP de cada jogador que entrou dentro do evento.
    Agora devemos adicionar no mesmo script da entrada do evento, uma checagem para ver se dentro da tabela, já não existe um jogador com o mesmo IP. faremos da seguinte forma:
     
    for k, v in pairs(CHECK_MC.players_cache) do if CHECK_MC.players_cache[k].ip == getPlayerIp(cid) then doPlayerSendCancel(cid, 'Você não pode entrar com MC neste evento!') return false end end Você deve adicionar esta checagem antes da ação de teleporta o jogador para dentro do evento.
    Em resumo o script de entrada para o evento ficaria mais ou menos assim:
     
    function onStepIn(cid, item, position, fromPosition, toPosition) if not isPlayer(cid) then return true end for k, v in pairs(CHECK_MC.players_cache) do if BATTLE_ENFORCE.players_cache[k].ip == getPlayerIp(cid) then doPlayerSendCancel(cid, 'Você não pode entrar com MC neste evento!') return false end end doTeleportThing(cid, posiçãoDoEvento) CHECK_MC.players_cache[getPlayerGUID(cid)] = {ip = getPlayerIp(cid)} return true end  
    @Matk, arruma essa box code. 
     
    Abraços e boa sorte!
  5. Gostei
    irvanovitch deu reputação a Natanael Beckman em Auto-Backup Database   
    Galera esse script é um auto backup da sua database, quem gosta de prevenir vamos ao tutorial.
     
    Backup.sh
     
    Criei uma pasta em qualquer local no linux, no meu caso eu fiz uma pasta com o nome database que está localizada na pasta home.
    home/database/backup.sh Certo vamos configura o arquivo, dentro dele já vem tudo explicado mais vou dar um reforço, dentro do arquivo backup.sh contém:
    #!/bin/bash CAMINHO="/home/database/" <--- local onde vai ficar salvo os backups NOMEBACKUP="server-backup" <--- nome do backup USER="root" <--- não mexe SENHA="nitendo64" <--- senha da database BANCO="casa_blanca" <--- nome da database #Nao mexer daqui pra baixo TEMPO="$(date +'%d-%m-%Y-%H-%M')" ##### #Rodando o backup ##### if [[ -z "$USER" || -z "$SENHA" || -z "$BANCO" ]]; then     echo "Por favor preencha o usuário, senha e banco de dados nas configurações." else     mysqldump -u$USER -p$SENHA $BANCO > $CAMINHO"/"$NOMEBACKUP"-"$TEMPO".sql" fi Certo configurado né, vamos fazer um teste:
    Acessa a pasta:
    cd /home/database Da permissão pros arquivos dentro dela, no caso o backup.sh:
    chmod 777 -R * Roda o script pra um teste:
    ./backup.sh Veja na imagem do meu teste, já aparece ali a database, então ta ok deu certo as configurações:
     

     
    Tudo bem, agora vamos configura pra ficar automático, pra todos os dias o script executar o backup em um certo horário:
    crontab -e Se aparecer algo tipo seleciona alguma opção, selecione Nano, que provavelmente seja numero 2...
     

    ----------------------------------------------------------------------------------
     
    Se não aparecer vai direto pra isso:
     

     
    Digite isso dentro do nano, como você ver na imagem acima já tem adicionado:
    0 6,21 * * * sh /home/database/backup.sh ctrl+x y da ENTER No meu caso botei pro script ser executado as 06:00hrs e 21:00hrs, então todo os dias nesse horário o script vai fazer o backup pra essa pasta que configurei, caso queria mudar o horário a logica do comado é clara né.
     
    Caso queria deixar de minutos em minutos abaixo observe um exemplo de 5 em 5 minutos:
    */5 * * * * sh /home/database/backup.sh Caso queria deixar de horas em horas abaixo observe um exemplo de 1 em 1 hora:
    0 */1 * * * sh /home/database/backup.sh Qualquer duvida postem, clica em GOSTEI, valeu.
     
    Créditos total:
    Joffily Ferreira
  6. Gostei
    irvanovitch deu reputação a Natanael Beckman em Trade OFF - Shop Offline   
    Esse sistema disponibiliza uma negociação offline, onde você oferta um item e esse item é divulgado no site do server e qualquer player pode comprar o item utilizando um comando especificado.
     
    Crie uma arquivo .lua dentro da pasta data/talkactions/scripts com o nome auctionsystem.lua, dentro do mesmo adicione o code:
    local config = {         levelRequiredToAdd = 20,         maxOffersPerPlayer = 5,         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 == '') then                 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")                 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                         if(isItemStackable((buy:getDataString("item_id")))) then                                 doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count"))                         else                                 for i = 1, buy:getDataInt("count") do                                         doPlayerAddItem(cid, buy:getDataString("item_id"), 1)                                 end                         end                         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] == "withdraw") 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 Em seguida em talkactions.xml adicione a tag:
    <talkaction words="!offer" event="script" value="auctionsystem.lua"/> No banco de dados execute as querys:
    CREATE TABLE `auction_system` (   `id` int(11) NOT NULL auto_increment,   `player` int(11),   `item_id` int(11),   `item_name` varchar(255),   `count` int(11),   `cost` int(11),   `date` int(11),   PRIMARY KEY  (`id`) ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ALTER TABLE `players` ADD `auction_balance` INT( 11 ) NOT NULL DEFAULT '0'; Na pasta do seu site crie um arquivo chamado tradeoff.php, em seguida adicione o code:
    <?PHP $auctions = $SQL->query('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`, `auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name` FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC')->fetchAll(); $players = 0;             $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Instruction<b></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><center><h2>Commands</h2><b>!offer add, itemName, itemPrice, itemCount</b><br /><small>example: !offer add, plate armor, 500, 1</small><br /><br /><B>!offer buy, AuctionID</b><br /><small>example: !offer buy, 1943</small><br /><br /><b>!offer remove, AuctionID</b><br /><small>example: !offer remove, 1943</small><br /><br /><b>!offer withdraw</b><br /><small>Use this command to get money for sold items.</small></center></TR></TD></TABLE><br />';     if(empty($auctions))     {         $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is no one active Auction.</TD></TR></TABLE>';         $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vDk/">vDk</a>.</small></p>';     }     else     {     foreach($auctions as $auction) {         $players++;             if(is_int($players / 2))                 $bgcolor = $config['site']['lightborder'];             else                 $bgcolor = $config['site']['darkborder'];         $cost = round($auction['cost']/1000, 2);         $content .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$auction['id'].'</center></TD><TD><center><img src="/item_images/'.$auction['item_id'].'.gif"/></center></TD><TD><center>'.$auction['item_name'].'</center></TD><TD><center><a href="?subtopic=characters&name='.urlencode($auction['name']).'">'.$auction['name'].'</a></center></TD><TD><center>'.$auction['count'].'</center></TD><TD><center>'.$cost.'k<br /><small>'.$auction['cost'].'gp</small></center></TD><TD><center>!offer buy, '.$auction['id'].'</center></TR>';     }          $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>#</center></b></TD><TD class="white"><b><center>Item Name</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Cost</center></b></td><TD class="white"><b><center>Buy</center></b></td></TR>'.$content.'</TABLE>';     $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vdk.1553/">vDk</a>.</small></p>'; }     ?>  Em layouts.php adcione o code:
                                    <a href="?subtopic=tradeoff">                                         <div id="submenu_tradeoff" class="Submenuitem" onmouseover="MouseOverSubmenuItem(this)" onmouseout="MouseOutSubmenuItem(this)">                                                 <div class="LeftChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div>                                                 <div id="ActiveSubmenuItemIcon_tradeoff" class="ActiveSubmenuItemIcon" style="background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);"></div>                                                 <div id="ActiveSubmenuItemLabel_tradeoff" class="SubmenuitemLabel">Trade Off</div>                                                 <div class="RightChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div>                                         </div>                                 </a> Pra finalizar em index.php adicione esse code:
    case "tradeoff";    $topic = "Trade Off";    $subtopic = "tradeoff";    include("tradeoff.php"); break;
    -
    E pronto galera clica em GOSTEI e comenta no tópico.
     
  7. Gostei
    irvanovitch recebeu reputação de Natanael Beckman em GesiorACC 2019 8.60 UPDATE 29/06/2019   
    E tem como ficar melhor? Excelente trabalho! REP ++
  8. Gostei
    irvanovitch deu reputação a Natanael Beckman em GesiorACC 2019 8.60 UPDATE 29/06/2019   
    Atualização de 29/06/2019.
     
    Olá meus amigos, essa é a minha última contribuição free que faço na área de OTserver, fiz uma atualização bem completa do Gesior comparando com os que existem disponíveis, não vou falar muito pois grande parte já conhecem... Vou apenas posta algumas imagem das mudanças feitas.
    Sempre gostei de evoluir e de oferecer aos demais uma facilidade de obter um material grátis e de qualidade, nunca utilizei meu pouco conhecimento para prejudicar os demais, pelo o contrario sempre foi na intenção de ajudar e se em algum momento falhei, falhei inconscientemente.
     
    - Foi mudado algumas imagens de layout para renovar a estrutura.

     
    - Server Info + Most Power Ful Guilds na mesma estrura.

     
    - Create Account exigindo senhas com letras minusculas, maiúsculas e números, fortalecendo
    a segurança do seu cliente e dificultando futuras dores de cabeças.

     
    - Adicionado o mecanismo que identifica os valores de Premuim Points e Backup Points.
    - Algumas mudanças de layout.
    - Nome do player abaixo linkado.

     
    - Adicionado um Box de doação, com a intenção apenas de complementar
    o layout enriquecendo a pagina.

     
    - Fixado o bug edit town, e melhorado o layout.

     
    - Characters.php refeito, nesta imagem é uma visão de uma conta com access admin.

     
    - Visão normal.

     
    - Inventário completo.
    - Guilds com visão ampliada.

     
    - Detalhes...

     
    - Novo SHOP com as estrutura de layout melhorada e modernizada.
    - Sem BUGs lembre-se do CTRL + F5 para atualizar os cookies nesta pagina.

     
    - Detalhes...

     
    - Detalhes...

     
    - Detalhes...

     
    - Histórico do SHOP...

     
    DOWNLOAD SITE
    SHOP.LUA XAMPP 1.7.3 DATABASE LIMPA MYSQL DATABASE COMPLETA MYSQL   TUTORIAIS ÚTEIS E COMPATÍVEIS PARA O SITE: PAGSEGURO AUTOMATICO SHOPGUILD BACKUP_POINTS SISTEMA VIP_TIME   Créditos: Gesior.pl(WEBMaster) Felipe Monteiro(WEBMaster, WEBDesigner) Natanael Beckman(WEBNada) Nailan (WEBMaster) Ivens Pontes (WEBMaster) Marcio Porto (WEBMaster) Danyel Varejão (Programmer LUA, C++)
  9. Gostei
    irvanovitch deu reputação a Vodkart em (Resolvido)Alavanca que leva o player até a house   
    function onUse(cid, item, frompos, item2, topos) if not getHouseByPlayerGUID(getPlayerGUID(cid)) then doPlayerSendTextMessage(cid,22,"You still do not have a house, buy a talking '!buyhouse' front of her.") return true end doTeleportThing(cid, getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid)))) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end  
  10. Gostei
    irvanovitch deu reputação a Featzen em Alavanca teleport x Item   
    local config = { itemid = 2160, -- ID Do Item many = 1, -- Quantidade pos = {x=1, y=2, z=7}, -- Posição do item tepos = {x=2, y=3, z=7} -- Para onde vai ao teleportar } function onUse(cid, item, frompos, item2, topos) if getTileItemById(config.pos, config.itemid) and doRemoveItem(getTileItemById(config.pos, config.itemid).uid, config.many) then doTeleportThing(cid, config.tepos) else doPlayerSendTextMessage(cid, 20, "Voce deve colocar o item no local correto") end return true end

Informação Importante

Confirmação de Termo