Histórico de Curtidas
-
baiakuda deu reputação a Vodkart em [ACTION]PRIVATE HUNT ITEMlocal function filtrateString(str) if type(str) ~= "string" then return false end local first, last = 0, 0 local second, final = 0, #str for i = 1, #str do if string.byte(str:sub(i,i)) == string.byte('a') then first = i + 2 for t = first, #str do if string.byte(str:sub(t,t)) == string.byte(' ') then last = t - 1 break end end end if string.byte(str:sub(i,i)) == string.byte('b') then second = i + 2 end end return {str:sub(first, last), str:sub(second, final)} end function doPlayerHaveCave(cid) local count = 0 for i = 822081, 822098 do if tonumber(filtrateString(getGlobalStorageValue(i))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(i))[2]) - os.time() > 0 then count = count + 1 end end return count end function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerLevel(cid) > 800 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 800, porem nao pode usar a cave exclusiva.") return false elseif doPlayerHaveCave(cid) > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce ja possui uma cave propria.") return false end if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then doRemoveItem(item.uid) setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 1)) doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 1 horas.") else doPlayerSendCancel(cid, "Todas as caves já tem dono no momento. Tente daqui 1 hora.") end return true end
-
baiakuda deu reputação a Wakon em (Resolvido)[ACTION] OFFLINE TRAINING@baiakuda:
local statue = { [1444] = SKILL_SWORD, [1449] = SKILL_AXE, [3705] = SKILL_CLUB, [3739] = SKILL_DISTANCE, [1448] = SKILL__MAGLEVEL } function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayerPzLocked(cid) then return false end if item.actionid == 1000 then doPlayerSetOfflineTrainingSkill(cid, statue[item.itemid]) doRemoveCreature(cid) end return true end
-
baiakuda deu reputação a Wakon em (Resolvido)[ACTION] OFFLINE TRAINING@baiakuda, algum erro na distro? Tudo que eu fiz foi remover a checagem de premium "and getPlayerPremiumDays(cid) > 0".
Se não der nenhum erro na distro, verifique a actionid(tem que ser 1000) da estátua que você testou.
-
baiakuda deu reputação a
Syn Rewardem GLOBAL SAVE [REINICIAR]@baiakuda Arquivo De Restar.SH Está tentando abri o tfs Sem a permissão
-
baiakuda deu reputação a amora murder em OTX [WINDOWS / LINUX]Cara... Vou responder de maneira bem crua somente o que sei a respeito. Se alguém mais experiente puder te explicar depois, seria melhor.
OTX funciona em Linux sim. Eu pelo menos rodo meu servidor OTX em Linux.
Até onde sei (posso estar equivocado), a diferença é que o OTX nasceu a partir do TFS. É como se fosse uma linha de desenvolvimento paralela ao TFS, entende? Pegaram, fizeram algumas modificações e/ou melhorias no TFS e agora possui o TFS e o OTX, cada um passando a ser um seguimento paralelo.
-
baiakuda deu reputação a xWhiteWolf em Novo Sistema de Trainer [0.36~0.4]Olá meus caros do Tibia King, hoje vim trazer pra vocês um sistema que bolei pra um concurso em outro fórum mas acabei ficando descontente e nunca cheguei a disponibilizar.
Eu gostaria de agradecer inicialmente à três acontecimentos que sem eles não seriam possíveis a criação desse sistema.
- A otlist obrigar que os servidores utilizem anti idle
- Os mages do meu servidor reclamarem que não dava pra treinar ml nos trainers
- Ao @Storm Night, que embora tenha me irritado muito nesse tópico aqui , botou a sementinha dessa idéia na minha cabeça.
Explicação É a combinação de dois sistemas que eu ja havia feito, o primeiro escolhe entre todas as salas de treiner aquela que está vazia pra te alocar e o segundo te mantém alimentado e rodando pra simular o anti idle. (Nota: ele não impede o anti idle de fato, se vc quiser fazer isso vc vai precisar editar o script de anti idle que vc utiliza pra ignorar players com determinado storage e adicionar o storage no player quando ele entrar na sala e tirar ao sair.. mas não sei até que ponto isso pode provocar ban da OTservlist por isso decidi não ensinar isso aqui.)
Sem mais delongas, talk is cheap, show me the code.
Idéia Basicamente dá pra reduzir toda a idéia do código nessa foto aqui:
Você tem diversas salas com trainers nesse formato (pode ser em linha reta horizontal ou vertical tb, mas assim fica melhor distribuído). Você inclusive pode criar salas no meio do void de forma que a distancia de uma vc nao consiga ver a outra e vai ser uma experiencia muito amigável para o player ver que está treinando sozinho na paz. Ao entrar no tp ele te aloca na primeira sala vazia, se não houverem salas vazias ele retorna que não tem posições livres
Instalação Você precisa criar as salinhas dos trainers equidistantemente, ou seja, tendo a mesma distância A em X e mesma distância B em Y. Sério, se vc errar nessa parte é porque vc não sabe oque significa equidistante. Vai pesquisar preguiçoso!! Já aviso que não vou dar suporte quanto à isso.
Você vai precisar criar salas parecidas com isso daqui:
Perceba que não tem como ter acesso a essa sala, não tem como ser puxado pra fora do trainer, não tem dor de cabeça nenhuma e quando o player quiser sair ele só entra no tp e volta pro templo ou pra onde vc definir.
Nesse teleport da sala vc adiciona o actionid 14877 e não bota nenhuma posição nele.
Naquele tile que o player irá ficar que inclusive tem id diferente vc bota actionid 14878.
Agora seleciona a area dessa sala no rme e vai copiando e colando percebendo sempre se vc tá criando as salas com mesma distância em X. Se o ponto inicial de uma sala é 140 e vc quer que todas tenham 12 sqm de distancia vc cria em 152, 164, 178.. por aí vai.
Quando terminar as salas que quiser e tiver montado as linhas e colunas da forma que desejou, vc vai criar um tp principal pra alocar os players nessa sala:
Lembrando que ele não deve ter posição no rme, vc só bota o actionID 14876 e deixa a toPos dele 0, 0, 0. Ele não tem q te teleportar pra nenhum lugar pois a posição será decidida por script.
Se você fez tudo certo até agora vc deve ter algo +- assim:
O importante é manter a distancia certinha entre cada sala. Aí no caso eu fiz rX = 11 e rY = 8 (é a terceira ou quarta vez q eu to falando isso, se vcs errarem pqp eu vou ficar muito irritado);
Vc não bota os trainers, e ali embaixo do spawn vc tem que botar um outro obstáculo pra impedir que o player ande pra baixo e dê a sala como livre.
Feito isso só adicionar os scripts abaixo:
movements.xml
<movevent type="StepIn" actionid="14876" event="script" value="trainertp.lua"/> <movevent type="StepIn" actionid="14877" event="script" value="trainertp2.lua"/> <movevent type="StepIn" actionid="14878" event="script" value="foodtrainer.lua"/>
movements/scripts/trainertp.lua:
movements/scripts/trainertp2.lua:
movements/scripts/foodtrainer.lua:
FIM, qualquer dúvida ou comentário ou sugestão coloquem abaixo. Se gostou REP+, se não gostou REP+ pq deu trabalho e vai ser útil pra alguém, mesmo que de estudo.
Abraços do Lobo.
E ao cara do outro fórum que ficou falando que ia dar erro e quis ficar me corrigindo e mandando scripts sem noção pra "mostrar" que sabia de lua:
-
baiakuda deu reputação a Celulose em (Resolvido)!online NÃO MOSTRAR OS PLAYERS ONLINE@baiakuda
function onSay(cid, words, param, channel) local tmp = getWorldUpTime() local hours = math.ceil(tmp / 3600) - 1 local minutes = math.ceil((tmp - (3600 * hours)) / 60) if(minutes == 60) then minutes = 0 hours = hours + 1 end local showGamemasters,on,count = false,getPlayersOnline(),0 for _, cid in pairs(on) do if getPlayerAccess(cid) < 4 then count = count + 1 end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Modo: PVP] - [UpTime: " .. hours .. " hours and " .. minutes .. " minutes.] - [Players Online: " .. (showGamemasters == true and #on or count) .. "]") return TRUE end
-
baiakuda deu reputação a Nightz em [Sistema de Ticket] Atendimento - Gesior AccPara quem usa o Gesior 2012, a solução é bem simples para utilizar o sistema:
Vá até a linha que tem o código abaixo:
$account = $ots->createObject('Account'); E substitua por:
$account = new Account; -
baiakuda deu reputação a KotZletY em (Resolvido)[ERRO TFS] Player nao "entra" no outro em area pz@baiakuda
-
baiakuda deu reputação a Natanael Beckman em Trade OFF - Shop OfflineEsse 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.
-
baiakuda deu reputação a Superion em (Resolvido)Erro no mapa [remeres]O primeiro erro indica que as Houses com o nome "tal" estão bugadas.
Para resolver isso abrá o RME e vá em Edit>Other Options>Clear Invalid Houses.
Mas se mesmo assim não funcionar, póde ser também que você esqueceu de selecionar a porta de cada house, é só ir em House Palette e escolher o Select Exit e ir colocando o negócio azul no lado de fóra de cada porta da house.
Já o segundo erro póde ser que o tempo de Spawntime de cada respawn esteja muito baixo, aconselho você deixar 60 ou mais.
-
baiakuda deu reputação a ForsakenLeader em (Resolvido)[URGENTE] Teleport Automaticolocal config = { day = { {"Sunday", "12:00"}, {"Thursday", "00:11"}, -- só copiar uma linha e add mais dias. se quiser só um dia deixe só a primeia linha }, pos = {x=151, y=56, z=7}, -- Posição aonde sera criado o teleport topos = {x=284, y=516, z=5}, -- Posição pra onde o teleport ira levar o player time = 5, -- tempo que o teleport ira sumir em minutos msg_open = "Baiakuda Elemental Event iniciou corram para o templo pois o tp some daqui 5 min.", -- mensagem ao abrir o teleport msg_close = "Baiakuda Elemental Event acabou." -- mensagem ao fechar o teleport } local function DelTp() local t = getTileItemById(config.pos, 1387) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(config.pos, CONST_ME_POFF) end end function onTimer() local d, h = os.date("%A"), os.date("%H:%M") for a, b in pairs(config.day) do if d == b[1] then if h == b[2] then doCreateTeleport(1387, config.topos, config.pos) doBroadcastMessage(config.msg_open) addEvent(DelTp, config.time * 60 * 1000) addEvent(doBroadcastMessage, config.time * 60 * 1000, config.msg_close) break end end end return true end Pronto! Boa sorte.
-
baiakuda deu reputação a Lyu em (Resolvido)[URGENTE] Bug Tfstenta usar "onTime()".
-
baiakuda deu reputação a GiovaneCampos em (Resolvido)[Pedido] Fim vimfunction onLogin(cid) local temple = { x = 160, y = 54, z = 7} if vip.hasVip(cid) == true then if getPlayerStorageValue(cid,55555) ~= 1 then setPlayerStorageValue(cid,55555,1) end else if getPlayerStorageValue(cid,55555) == 1 then doTeleportThing(cid, temple) doPlayerSendTextMessage(cid, 22, "Your VIP Time over!") db.query("UPDATE `accounts` SET `vip_time` = 0 WHERE `id` = ".. getAccountIdByName(getPlayerName(cid)) ..";") setPlayerPromotionLevel(cid, 1) setPlayerStorageValue(cid, 55555, 0) end end return true end
-
baiakuda deu reputação a Adriano SwaTT em (Resolvido)[PEDIDO]Promotion por itemBom dia.
Abaixo segue o script:
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 creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid ---------- Início das Configurações ---------- local item1 = {2157, 100} -- Id e Quantidade local item2 = {2328, 100} -- Id e Quantidade local get = getItemNameById ---------- Fim das Configurações -------------- if msgcontains(msg, 'promote') or msgcontains(msg, 'promotion') then selfSay('Deseja ser promovido pagando '..item1[2]..' '..get(item1[1])..' e '..item2[2]..' '..get(item2[1])..'?', cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then if msgcontains(msg, 'sim') or msgcontains(msg, 'yes') then if getPlayerItemCount(cid, item1[1]) >= item1[2] and getPlayerItemCount(cid, item2[1]) >= item2[2] then doPlayerRemoveItem(cid, item1[1], item1[2]) doPlayerRemoveItem(cid, item2[1], item2[2]) doSendMagicEffect(getCreaturePosition(cid), 14) setPlayerPromotionLevel(cid, getPlayerPromotionLevel(cid)+1) selfSay('Parabens agora voce e um(a) '..getPlayerVocationName(getPlayerVocation(cid))..'!', cid) else selfSay('voce nao tem os items exigidos.', cid) talkState[talkUser] = 0 end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Obs: Testado e funcionando perfeitamente em 0.3.6, porém, creio que funcione com você também.
Boa sorte.