Ir para conteúdo

Rusherzin

Membro
  • Registro em

  • Última visita

Tudo que Rusherzin postou

  1. Acho que entendi, seria assim: function removeEmptyChest(pos, itemid) local item = getTileItemById(pos, itemid).uid if getItemWeightById(itemid) - getItemWeight(item) == 0 then return item ~= 0 and doRemoveItem(item, 1) end end function onUse(cid, item, frompos, item2, topos) local bau = item.uid local pos = getThingPos(bau) addEvent(removeEmptyChest, 10000, pos, item.itemid) end Se o cara abrir o baú e tirar o item antes desses 10s, o baú vai ser removido.
  2. Tenta assim: function removeGroundItem(pos, itemid) local item = getTileItemById(pos, itemid).uid return item ~= 0 and doRemoveItem(item, 1) end function onUse(cid, item, frompos, item2, topos) local bau = item.uid local pos = getThingPos(bau) if getItemWeightById(item.itemid) - getItemWeight(bau) == 0 then addEvent(removeGroundItem, 10000, pos, item.itemid) return true end end
  3. @7983959 Fiz do tamanho de um exori mas, não cheguei a testar, mas tenta assim: local config = { itemid = 2180, -- id da bomba duration = 10, -- duration antes de ser removida actionid = 13245, -- actionid que sera setado na bomba (pro movements) effect = 3, -- efeito que sai ao colocar a bomba msg = "The bomb has been planted" -- mensagem que sai ao ser colocado a bomba } function onCastSpell(cid, var) local position = getCreaturePosition(cid) local posx = {-3, -2, -1, 0, 1, 2, 3} local posy = {{-1, 0, 1}, {-2, -1, 0, 1, 2}, {-3, -2, -1, 0, 1, 2, 3}, {-3, -2, -1, 0, 1, 2, 3}, {-3, -2, -1, 0, 1, 2, 3}, {-2, -1, 0, 1, 2}, {-1, 0, 1}} for i=1, #posx do for j=1, #posy[i] do local posbomb = {x=position.x+posx[i], y=position.y+posy[i][j], z=position.z} local item = doCreateItem(config.itemid, 1, posbomb) setItemAid(item, config.actionid) doItemSetAttribute(item, 'ref', getCreatureName(cid)) doSendMagicEffect(posbomb, config.effect) addEvent(removeBomba, config.duration * 1000, posbomb, config.itemid) end end doCreatureSay(cid, config.msg, 20) return true end
  4. Rusherzin postou uma resposta no tópico em Suporte Tibia OTServer
    @gutalo Poderia postar se deu algum erro? Eu só percebi uma vírgula que ele esqueceu de colocar. local req = { {i=10576, q=1}, -- i = id do item, q=quantidade {i=2503, q=1}, -- i = id do item, q=quantidade {i=2476, q=1} -- i = id do item, q=quantidade } local win = {i=13497, q=1} -- i = id do item, q = quantidade que vai receber function onUse(cid, item, frompos, item2, topos) if getPlayerItemCount(cid, req[1].i) >= req[1].q and getPlayerItemCount(cid, req[2].i) >= req[2].q and getPlayerItemCount(cid, req[3].i) >= req[3].q then doPlayerRemoveItem(cid, req[1].i, req[1].q) doPlayerRemoveItem(cid, req[2].i, req[2].q) doPlayerRemoveItem(cid, req[3].i, req[3].q) doPlayerAddItem(cid, win.i, win.q) doPlayerSendTextMessage(cid, 20, "Voce recebeu "..win.q.."x "..win.i..".") else doPlayerSendTextMessage(cid, 20, "Voce precisa de "..req[1].q.."x "..req[1].i..", "..req[2].q.."x "..req[2].i..", "..req[3].q.."x "..req[3].i..".") end return true end
  5. Tive uma ideia, tu pode checar se o peso do item está maior do que o peso original, usando getItemWeight(bau) para pegar o peso do baú (virá mais pesado se tiver algo dentro) e o peso do item pelo id com getItemWeightById(item.itemid). function onUse(cid, item, frompos, item2, topos) local bau = item.uid if getItemWeightById(item.itemid) - getItemWeight(bau) == 0 then doRemoveItem(bau, 1) return true end end
  6. Aqui funcionou numa boa, deve ter algum problema com a função de getContainerSize na sua base.
  7. Tenta fazer assim: function onUse(cid, item, frompos, item2, topos) local bau = item.uid if getContainerSize(bau) == 0 then doRemoveItem(bau, 1) end return true end
  8. Tenta usar getThingfromPos ao invés de getThingfromPosition. Se não der, tenta adicionar a stackpos = 1 na variável que contém a posição.
  9. Pode tentar aumentar o limite de memória do php. Vai em /xampp/php/ abre o arquivo php.ini, procura por isso: memory_limit=128M Mude por isso (acho que essa quantidade de memória deve bastar): memory_limit=256M
  10. Tenta mudar aquela função isWalkable por essa aqui: function isWalkable(pos) local tile = getThingfromPos(pos) if hasProperty(tile.uid, 0) == true or hasProperty(tile.uid, 3) == true then return false end return true end E depois troca essa parte: if isWalkable(pos, true, false, true) then Por: if isWalkable(pos) then
  11. Entendi, esse gesior parece estar com alguns bugs, não sei como resolver.
  12. <?php # Account Maker Config $config['site']['serverPath'] = "C:\Users\Andre\Desktop\otserver/"; $config['site']['useServerConfigCache'] = false; $config['site']['worlds'] = array(0 => 'FortitWar'); $towns_list[0] = array(1 => 'Venore'); $config['site']['outfit_images_url'] = '/outfit.php'; $config['site']['item_images_url'] = 'http://item-images.ots.me/960/'; $config['site']['item_images_extension'] = '.gif'; $config['site']['flag_images_url'] = 'http://flag-images.ots.me/'; $config['site']['flag_images_extension'] = '.png'; $config['site']['players_group_id_block'] = 3; $config['site']['limitDeath'] = 5; $config['site']['levelVideo'] = 150; # PAGE: donate.php $config['site']['usePagseguro'] = true; //true show / false hide $config['site']['usePaypal'] = false; //true show / false hide $config['site']['useDeposit'] = true; //true show / false hide $config['site']['useZaypay'] = false; //true show / false hide $config['site']['useContenidopago'] = false; //true show / false hide $config['site']['useOnebip'] = false; //true show / false hide # Pagseguro config By IVENSPONTES $config['pagSeguro']['email'] = "[email protected]"; //Email Pagseguro $config['pagSeguro']['token'] = "B462B6CE61784785B9BE5929716ADDB9"; // TOKEN $config['pagSeguro']['urlRedirect'] = 'http://tibia.com/?subtopic=donate&action=final'; //turn off redirect and notifications in pagseguro.com.br $config['pagSeguro']['urlNotification'] = 'http://tibia.com/retpagseguro.php'; //your return location $config['pagSeguro']['productName'] = 'Premium Points'; $config['pagSeguro']['productValue'] = 1.00; // 1.50 = R$ 1,50 etc... $config['pagSeguro']['doublePoints'] = false; ## Double points - true is on / false is off $config['pagSeguro']['host'] = 'localhost'; ## YOUR HOST $config['pagSeguro']['database'] = 'baiak860'; ## DATABASE $config['pagSeguro']['databaseUser'] = 'root'; ## USER $config['pagSeguro']['databasePass'] = 'notile'; ## PASSWORD # Create Account Options $config['site']['one_email'] = false; $config['site']['create_account_verify_mail'] = false; $config['site']['verify_code'] = true; $config['site']['email_days_to_change'] = 3; $config['site']['newaccount_premdays'] = 0; $config['site']['send_register_email'] = false; # Create Character Options $config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample'); $config['site']['newchar_towns'][0] = array(1); $config['site']['max_players_per_account'] = 15; # Emails Config $config['site']['send_emails'] = true; $config['site']['mail_address'] = "[email protected]"; $config['site']['smtp_enabled'] = true; $config['site']['smtp_host'] = "smtp.xxxxx.com.br"; $config['site']['smtp_port'] = 587; $config['site']['smtp_auth'] = true; $config['site']['smtp_user'] = "[email protected]"; $config['site']['smtp_pass'] = "xxx"; # PAGE: whoisonline.php $config['site']['private-servlist.com_server_id'] = 1; /* Server id on 'private-servlist.com' to show Players Online Chart (whoisonline.php page), set 0 to disable Chart feature. To use this feature you must register on 'private-servlist.com' and add your server. Format: number, 0 [disable] or higher */ # PAGE: characters.php $config['site']['quests'] = array('Annihilator' => 5000,'Demon Helmet' => 2645,'Pits of Inferno' => 5550); $config['site']['show_skills_info'] = true; $config['site']['show_vip_storage'] = 1; # PAGE: accountmanagement.php $config['site']['send_mail_when_change_password'] = true; $config['site']['send_mail_when_generate_reckey'] = true; $config['site']['generate_new_reckey'] = true; $config['site']['generate_new_reckey_price'] = 500; # PAGE: guilds.php $config['site']['guild_need_level'] = 8; $config['site']['guild_need_pacc'] = false; $config['site']['guild_image_size_kb'] = 50; $config['site']['guild_description_chars_limit'] = 2000; $config['site']['guild_description_lines_limit'] = 6; $config['site']['guild_motd_chars_limit'] = 250; # PAGE: adminpanel.php $config['site']['access_admin_panel'] = 3; $config['site']['access_tickers'] = 3; $config['site']['access_admin_painel'] = 3; $config['site']['access_staff_painel'] = 3; # PAGE: latestnews.php $config['site']['news_limit'] = 6; # PAGE: killstatistics.php $config['site']['last_deaths_limit'] = 40; # PAGE: team.php $config['site']['groups_support'] = array(2, 3, 4, 5, 6, 7); # PAGE: highscores.php $config['site']['groups_hidden'] = array(4, 5, 6); $config['site']['accounts_hidden'] = array(1); # PAGE: shopsystem.php $config['site']['shop_system'] = true; $config['site']['shopguild_system'] = true; # PAGE: lostaccount.php $config['site']['email_lai_sec_interval'] = 180; # Layout Config $config['site']['layout'] = 'tibiarl'; $config['site']['vdarkborder'] = '#505050'; $config['site']['darkborder'] = '#D4C0A1'; $config['site']['lightborder'] = '#F1E0C6'; $config['site']['download_page'] = false; $config['site']['serverinfo_page'] = true; $config['site']['shop_categories'] = array( "Sorcerer e Druid" => array("id" => 1, "description" => "Itens vips para Sorcerer e Druid.", "new" => 0, "enabled" => true), "Knight" => array("id" => 2, "description" => "Itens vips para Knight.","new" => 0, "enabled" => true), "Paladin" => array("id" => 3, "description" => "Itens vips para Paladin.","new" => 0, "enabled" => true), "Addons e Mounts" => array("id" => 4, "description" => "Addons e Mountarias","new" => 0, "enabled" => true), "UpgradeRunes" => array("id" => 5, "description" => "Melhore seus itens com as runes de upgrades.","new" => 0, "enabled" => true), "Vip Days e Extras" => array("id" => 6, "description" => "Vips days e Extras.","new" => 0, "enabled" => true)); ?>
  13. É, não tem a parte de categorias. Bota isso aqui dentro do config.php só para ver se funciona, depois tu edita as categorias como quiser. $config['site']['shop_categories'] = array( "Sorcerer e Druid" => array("id" => 1, "description" => "Itens vips para Sorcerer e Druid.", "new" => 0, "enabled" => true), "Knight" => array("id" => 2, "description" => "Itens vips para Knight.","new" => 0, "enabled" => true), "Paladin" => array("id" => 3, "description" => "Itens vips para Paladin.","new" => 0, "enabled" => true), "Addons e Mounts" => array("id" => 4, "description" => "Addons e Mountarias","new" => 0, "enabled" => true), "UpgradeRunes" => array("id" => 5, "description" => "Melhore seus itens com as runes de upgrades.","new" => 0, "enabled" => true), "Vip Days e Extras" => array("id" => 6, "description" => "Vips days e Extras.","new" => 0, "enabled" => true));
  14. Quantas categorias tem no array $config["site"]["shop_categories"]? Se tiver só uma ou estiver vazio, esse pode ser o problema. (fica no config.php)
  15. Posta o que tem nas linhas 250~252 do arquivo shopsystem.php.
  16. Tenta executar isso na aba SQL do phpmyadmin: ALTER TABLE z_shop_offer ADD `offer_category` int(11) DEFAULT NULL;
  17. Okay, vou fazer aqui. Edit: talkactions/scripts/changeworld.lua function onSay(cid, words, param) if param == "" then return true end local nparam = string.explode(param, ",") if (not nparam[1] or not nparam[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Param required.") return true end local ponline = false local worldid = tonumber(nparam[1]) local pname = tostring(nparam[2]) for _, k in ipairs(getPlayersOnline()) do if getCreatureName(k) == pname then playeronline = true end end local pid = getCreatureByName(pname) if playeronline then doRemoveCreature(pid) end addEvent(db.executeQuery, 500, "UPDATE `players` SET `world_id` = "..worldid.." WHERE `name` = '"..pname.."';") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O personagem ["..pname.."] foi transferido para o mundo "..worldid..".") end talkactions.xml <talkaction words="/mundo" access="5" event="script" value="changeworld.lua"/> Exeplicação do comando: /mundo x, y [Onde x é o número do mundo e y é o nome do jogador. Exemplos: -> /mundo 1, Rusherzin -> /mundo 0, Hietffer
  18. Está usando mysql? Se sim, acho que sei uma maneira de fazer.
  19. Não sei se entendi direito, mas testa assim: function Player:flyUp() if self:isFlying() then if self:canFlyUp() then local pos = self:getPosition() for x=-1,1 do for y=-1,1 do local pose = {x=pos.x+x,y=pos.y+y,z=pos.z} local tile = Tile(pose) local itemfloor = tile:getItemById(456) if itemfloor then itemfloor:remove() end end end pos.z = pos.z-1 pos:createFlyFloor() self:teleportTo(pos) pos:sendMagicEffect(CONST_ME_TELEPORT) return true end return false else self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You are not flying.") end end
  20. Sim, creio que seja nesse, mas tu salvou o arquivo com aquela informação ali de encoding (da imagem que botei no post)? Se sim, tenta botar isso na primeira linha do arquivo: <?php header('Content-Type: text/html; charset=utf-8'); ?>
  21. Está salvando como utf-8? Como na imagem:
  22. Qual programa está usando para editar o arquivo? Pode estar salvando com um encoding diferente.
  23. Provavelmente tem que botar o charset adequado no index. <meta charset="UTF-8">
  24. Faltava um end. 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 if(msgcontains(msg, 'castle') or msgcontains(msg, 'castelo')) then if os.date("%A") == "Saturday" then if (os.date("%X") >= "17:00:00") and (os.date("%X") <= "18:00:00") then pos = {x=849, y=995, z=7} doTeleportThing(cid,pos) talkState[cid] = 0 else selfSay('Desculpe, mas eu só posso teleporta-lo para o Castle aos Sabados entre as 17:00 e 18:00 horas.', cid) end end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  25. Ele estava tentando indexar com um índice que não estava na lista. Ex: config['rat'] Então coloquei uma checagem if not config[getCreatureName(target):lower()] then return true end Se ele não conseguir indexar (ou seja, não achar o monstro na lista), ele retorna verdadeiro para a morte ser concluída sem exibir nenhuma mensagem de task. Sobre o erro, esqueceu de botar monster antes de tit. Ficaria assim: function onKill(cid, target) local config = { ['troll'] = {amount = 10, storage = 21900, startstorage = 45553, startvalue = 1, tit = "Criaturas Humanoides"}, ['rotworm'] = {amount = 26, storage = 21901, startstorage = 45551, startvalue = 2}, ['dragon lord'] = {amount = 25, storage = 21902, startstorage = 45551, startvalue = 4} } if isPlayer(target) and isMonster(target) then return true end if not config[getCreatureName(target):lower()] then return true end local monster = config[getCreatureName(target):lower()] if (getPlayerStorageValue(cid, monster.storage)+1) < monster.amount and getPlayerStorageValue(cid, monster.startstorage) >= monster.startvalue then setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, '[Sistema de Sincronização]: '..(getPlayerStorageValue(cid, monster.storage)+1)..' de '..monster.amount..' '..getCreatureName(target)..'s mortos.') end if (getPlayerStorageValue(cid, monster.storage)+1) == monster.amount then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Concluido ! Você matou '..(getPlayerStorageValue(cid, monster.storage)+1)..' '..getCreatureName(target)..'s e completou a missão '..monster.tit..'.') setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1) end return true end

Informação Importante

Confirmação de Termo