Ir para conteúdo

Bruno Rezende

Membro
  • Registro em

  • Última visita

Tudo que Bruno Rezende postou

  1. Estou com um problema similar. Alguns players simplesmente travam (nem todos), não conseguem andar. Só normaliza depois de morrer ou relogar, o restante do servidor continua normal. Sem nenhum erro na distro
  2. Só não entendi porque deixar a mensagem que a próxima loteria vai acontecer em duas horas, se o horário é pré-estabelecido na config, e não a cada duas horas.
  3. solucionou?
  4. Não tenho experiência pra fazer essa edição no código da maneira correta, poderia me mostrar por favor? Meu código do cassino: local config = { leverid = 1945, -- id da alavanca transformedid = 1946, -- id da alavanca ao clicar nela moneyPos = {x = 121, y = 37, z = 6}, -- posicao que vai o dinheiro delay = 200, -- esse delay e o tempo que demora entre cada shuffle shuffle = 5, -- quantidade de shuffles por cada peça, lembre que a ultima peça vai rodar 3 * shuffle entao evite valores grandes) multiplier = 2, -- por quanto multiplica o dinheiro apostado effect = 27 } local pieces = { -- POSICOES DE CADA PEÇA. [1] = {x = 120, y = 36, z = 6}, [2] = {x = 120, y = 37, z = 6}, [3] = {x = 120, y = 38, z = 6} } local function shuffle(id, times, final, pos) -- funcao que rotaciona a peca local item = getTileItemById(pos, id) if item and times > 0 then doRemoveItem(item.uid) doCreateItem(id == 2638 and 2639 or 2638, 1, pos) addEvent(shuffle, config.delay, id == 2638 and 2639 or 2638, times - 1, final, pos) else local nid = id if item and id ~= final then doRemoveItem(item.uid) doCreateItem(final, 1, pos) nid = final end if times == 0 then addEvent(shuffle, config.delay * config.shuffle * #pieces + config.delay * 10, nid, -1, 2639, pos) end doSendMagicEffect(pos, math.abs(final - 2638)) end end local function premiateWinner(uid, money, eff, result) if isPlayer(uid) then if result[1] == result[2] and result[2] == result[3] then doPlayerAddMoney(uid, money * config.multiplier) doSendMagicEffect(getCreaturePosition(uid), eff) doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, "[CASSINO] You won ".. money * config.multiplier .." gold coins. Congratulations!") else doSendMagicEffect(getCreaturePosition(uid), CONST_ME_POFF) doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, "[CASSINO] You lost. Better luck next time.") end end end function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == config.leverid then local pc = getTileItemById(config.moneyPos, 2152) local cc = getTileItemById(config.moneyPos, 2160) local money = 0 if pc and pc.type > 0 then money = money + pc.type * 100 doRemoveItem(pc.uid) end if cc and cc.type > 0 then money = money + cc.type * 10000 doRemoveItem(cc.uid) end if money >= 100 then doTransformItem(item.uid, config.transformedid) local pos = fromPosition addEvent(function() local lever = getTileItemById(pos, config.transformedid) if lever and lever.uid > 0 then doTransformItem(lever.uid, config.leverid) end end, (config.delay * #pieces) * (config.shuffle + 10)) local result = {} for i = 1, #pieces do local id = 2639 result[i] = math.random(0, 1) shuffle(id, config.shuffle * i, result[i] + 2638, pieces[i]) end addEvent(premiateWinner, config.delay * #pieces * config.shuffle, cid, money, config.effect, result) else doPlayerSendCancel(cid, "You need to place your offer. The minimum offer is 1 platinum coin.") end else doPlayerSendCancel(cid, "You need to wait the turn end to bet again.") end return true end
  5. Boa noite, o meu cassino funciona perfeitamente bem, exceto por uma coisa: Como o script recria os itens ao rodar, o que eu coloquei no map editor não conta, em caso de clean as peças são removidas e, ao usar a alavanca sem nenhum item, dá o seguinte erro na console: 2022-07-04 20:43:03 - [Error - Action Interface] 2022-07-04 20:43:03 - data/actions/scripts/cassino.lua:onUse 2022-07-04 20:43:03 - Description: 2022-07-04 20:43:03 - (luaDoRemoveItem) Item not found Mas ai ele sorteia novamente. Conseguimos suprimir o erro na console? @Vodkart@xWhiteWolf
  6. Algum avanço @Vodkart? Ansioso pelo sistema. Se for deixa-lo público, poderia já disponibilizar, caso tenha alguma correção a ser feita, mais pessoas/forums podem ser envolvidos. O sistema V4 agora tá funcionando perfeitamente pra mim, mas uma mistura de V4 e V3 seria muito interessante.
  7. ainda tem essa intenção @Vodkart?
  8. Estou com um erro que acontece raramente, mas acontece: 2022-06-09 12:31:48 - [Error - Action Interface] 2022-06-09 12:31:48 - data/actions/scripts/upgrade.luanUse 2022-06-09 12:31:48 - Description: 2022-06-09 12:31:48 - data/lib/upgradesystem.lua:142: attempt to index field '?' (a nil value) 2022-06-09 12:31:48 - stack traceback: 2022-06-09 12:31:48 - data/lib/upgradesystem.lua:142: in function 'refine' 2022-06-09 12:31:48 - data/actions/scripts/upgrade.lua:17: in function <data/actions/scripts/upgrade.lua:1>
  9. nem funcionará joao, é pra OTX numa engine antiga, teste esse: https://tibiaking.com/forums/topic/96933-auto-loot-sytem-for-tfs-13-revscripts/
  10. e conseguiu mudar a cor no channel? o meu tá com a mesma coisa
  11. .Qual servidor ou website você utiliza como base? OTX 2 Qual o motivo deste tópico? Meu Gesior 2012 tem o shop admin onde coloco oferta de vários itens, porém ele tem a opção de addons/outfits, se eu seleciono a oferta simplesmente não aparece no site. Queria organizar os outfits numa aba diferente das de itens (vendo os dolls que dão outfits completos), poderiam me ajudar a arrumar ou criar uma nova categoria? Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: <!-- /****************************************************************** * SYSTEMA DE ADMINISTRAÇÃO ONLINE DO WEBSHOP GESIOR 2012 BY DEZON * * TODOS OS DIREITOS, POR FAVOR, NÃO REMOVER ESSES CRÉDITOS * * FEITO EXCLUSIVAMENTE PARA O SITE WWW.TIBIAKING.COM * ******************************************************************/ --> <style type="text/css"> hr{border:0;border-bottom:1px solid #D4C0A1;padding:3px;} h1.admshop{margin:0;padding:0;} label.admshop{float:left;width:100px;} div.clear{clear:both;} p.border{border-bottom:1px solid #D4C0A1;padding:3px;} form input, form select, form button, form reset{padding:3px;} input.bt{padding:3px 20px;cursor:pointer;} .success{color:green;} .error{color:red;} .bt2{padding:5px 30px;cursor:pointer;} </style> <script type="text/javascript"> function _delete(id) { if( confirm('Confirma a exclusão do item selecionado?') ) { location.href='?subtopic=shopadmin&action=delete&id=' + id + ''; } return false; } </script> <?php /** * Systema By Dezon */ if(!defined('INITIALIZED')) exit; /* * Variável SQL */ $SQL = $GLOBALS['SQL']; /* * Funções */ function dropdown_offer_type($selected='item') { $return = null; if($selected == 'item') { $return = '<select name="offer_type"> <option value="item" selected="selected">Item</option> <option value="container">Container</option> <option value="mount">Mounts</option> <option value="addon">Addons</option> </select>'; } else if($selected == 'container') { $return = '<select name="offer_type"> <option value="item">Item</option> <option value="container" selected="selected">Container</option> <option value="mount">Mounts</option> <option value="addon">Addons</option> </select>'; } else if($selected == 'mount') { $return = '<select name="offer_type"> <option value="item">Item</option> <option value="container">Container</option> <option value="mount" selected="selected">Mounts</option> <option value="addon">Addons</option> </select>'; } else if($selected == 'addon') { $return = '<select name="offer_type"> <option value="item">Item</option> <option value="container">Container</option> <option value="mount">Mounts</option> <option value="addon" selected="selected">Addons</option> </select>'; } else { $return = '<select name="offer_type"> <option value="item" selected="selected">Item</option> <option value="container">Container</option> <option value="mount">Mounts</option> <option value="addon">Addons</option> </select>'; } return $return; } if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { #################### # ATUALIZAÇÃO 2015 # #################### $items_menu = '<p><a href="?subtopic=shopadmin">Shop admin</a> | <a href="?subtopic=shopadmin&action=new">Nova oferta</a> | <a href="?subtopic=shopadmin&action=list">Listar ofertas</a> | <a href="?subtopic=shopadmin&action=points">Adicionar pontos</a></p><hr />'; switch($action) { /******************************************************************************************/ // Essa ação, vai listar todos os registros do que está // sendo vendido no seu shopping (as ofertas) /******************************************************************************************/ case 'list': $ofertas = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_offer').' ORDER BY id DESC;'); $result .= $items_menu; $result .= '<TABLE BGCOLOR="#D4C0A1" BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">'; $result .= '<tr bgcolor="#505050"><td class="white"><strong>Items cadastrados no \'Shop Offer\'</strong></td><tr>'; $result .= '<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="1" WIDTH="100%">'; $result .= '<TR BGCOLOR="#F1E0C6"><td><strong>ID</strong></td><td><strong>Nome da oferta</strong></td><td><strong>Imagem</strong></td><td><strong>Ações</strong></td></TR>'; while($data = $ofertas->fetch()) { $result .= '<tr BGCOLOR="#F1E0C6">'; $result .= '<td>'.$data['id'].'</td>'; $result .= '<td>'.$data['offer_name'].'</td>'; $result .= '<td align="center"><img src="./images/items/'.$data['itemid1'].$config['site']['item_images_extension'].'" /></td>'; $result .= '<td><a href="?subtopic=shopadmin&action=edit&id='.$data['id'].'">[editar]</a>&nbsp;<a href="javascript:void( _delete('.$data['id'].') );">[excluir]</a></td>'; $result .= '</tr>'; } $result .= '</table>'; $result .= '</table>'; $main_content .= $result; break; //lista as ofertas /******************************************************************************************/ // Essa ação é chamada quando abre a tela // de edição da oferta selecionada /******************************************************************************************/ case 'edit': $main_content .= $items_menu; $id = is_numeric($_GET['id']) ? $_GET['id'] : header('Location: ?subtopic=shopadmin'); // anti-inject simples by Dezon $dados = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_offer').' WHERE id='.$id)->fetch(); /* if($dados['offer_type'] == 'item') { $dropdown = '<select name="offer_type"><option value="item" selected="selected">Item</option><option value="container">Container</option></select>'; } else if($dados['offer_type'] == 'container') { $dropdown = '<select name="offer_type"><option value="item">Item</option><option value="container" selected="selected">Container</option></select>'; } */ $dropdown = dropdown_offer_type($dados['offer_type']); $main_content .= <<<EOD <h1 class="admshop"><strong>Editar/Atualizar oferta</strong></h1> <form method="post" action="?subtopic=shopadmin&action=shop_edit"> <input type="hidden" name="id_offer" value="{$dados['id']}" /> <p class="border"><strong>Nome / Descrição da oferta</strong></p> <p><label class="admshop">Oferta: </label><input type="text" name="offer_name" size="50" maxlength="100" value="{$dados['offer_name']}" /></p> <p><label class="admshop">Descrição: </label><input type="text" name="offer_description" size="50" maxlength="1000" value="{$dados['offer_description']}" /></p> <p><label class="admshop">Qtde. pontos: </label><input type="text" name="points" size="5" maxlength="9" value="{$dados['points']}" /></p> <p class="border"><strong>Tipo da oferta</strong></p> <p><label class="admshop">Tipo: </label>{$dropdown}</p> <p class="border"><strong>Configuração de item normal, armor, shield, legs, etc</strong></p> <p><label class="admshop">ID Item 1: </label><input type="text" name="itemid1" size="10" value="{$dados['itemid1']}" /></p> <p><label class="admshop">Qtde. Item 1: </label><input type="text" name="count1" size="10" value="{$dados['count1']}" /></p> <p class="border"><strong>Configuração de item container, BP com Runas, BP com Small Stones, etc</strong></p> <p><label class="admshop">ID Item 2: </label><input type="text" name="itemid2" size="10" value="{$dados['itemid2']}" /></p> <p><label class="admshop">Qtde. Item 2: </label><input type="text" name="count2" size="10" value="{$dados['count2']}" /></p> <p class="border"><br /></p> <input type="submit" value="Salvar edição" class="bt" /> </form> <div class="clear"></div> EOD; #/\ Deixe assim !!! break; //edita a oferta selecionada /******************************************************************************************/ // Ação chamada quando você for salvar a edição da oferta /******************************************************************************************/ case 'shop_edit': $id = $_POST['id_offer']; $points = trim($_POST['points']); $itemid1 = trim($_POST['itemid1']); $count1 = trim($_POST['count1']); $itemid2 = trim($_POST['itemid2']); $count2 = trim($_POST['count2']); $offer_type = trim($_POST['offer_type']); $offer_description = trim($_POST['offer_description']); $offer_name = trim($_POST['offer_name']); if(empty($points) && empty($itemid1) && empty($offer_name)) { $main_content .= '<strong class="error">Você deve preencher pelo menos os pontos, id item 1 e o nome da oferta!</strong><p><hr /></p><a href="javascript:void(history.go(-1));">Voltar</a>'; } else { $sql_edit = sprintf( "UPDATE {$SQL->tableName('z_shop_offer')} SET points=%s, itemid1=%s, count1=%s, itemid2=%s, count2=%s, offer_type='%s', offer_description='%s', offer_name='%s' WHERE id=%s", $points, $itemid1, $count1, $itemid2, $count2, $offer_type, $offer_description, $offer_name, $id ); $SQL->query($sql_edit); $main_content .= '<strong class="success">Oferta editada com sucesso!</strong><br /><br /><a href="?subtopic=shopadmin&action=list">Voltar</a>'; } break; /******************************************************************************************/ // Essa ação só é chamada caso, você queira excluir uma oferta // confirmar a exclusão no prompt e, só assim então a sua // oferta será excluída do BD /******************************************************************************************/ case 'delete': $id = is_numeric($_GET['id']) ? $_GET['id'] : header('Location: ?subtopic=shopadmin'); $SQL->query('DELETE FROM '.$SQL->tableName('z_shop_offer').' WHERE id='.$id); header('Location: ?subtopic=shopadmin&action=list'); break; //exclui items /******************************************************************************************/ // Ação que é chamada quando você salva uma nova oferta /******************************************************************************************/ case 'shop_save': $points = trim($_POST['points']); $itemid1 = trim($_POST['itemid1']); $count1 = trim($_POST['count1']); $itemid2 = trim($_POST['itemid2']); $count2 = trim($_POST['count2']); $offer_type = trim($_POST['offer_type']); $offer_description = trim($_POST['offer_description']); $offer_name = trim($_POST['offer_name']); if(empty($points) && empty($itemid1) && empty($offer_name)) { $main_content .= '<strong class="error">Você deve preencher pelo menos os pontos, id item 1 e o nome da oferta!</strong><p><hr /></p><a href="javascript:void(history.go(-1))">Voltar</a>'; } else { $sql_save = sprintf( "INSERT INTO `z_shop_offer` (points,itemid1,count1,itemid2,count2,offer_type,offer_description,offer_name)VALUES('%s','%s','%s','%s','%s','%s','%s','%s')", (empty($points) ? 0 : $points), (empty($itemid1) ? 0 : $itemid1), (empty($count1) ? 0 : $count1), (empty($itemid2) ? 0 : $itemid2), (empty($count2) ? 0 : $count2), $offer_type, $offer_description, $offer_name ); $SQL->query($sql_save); $main_content .= '<strong class="success">Oferta salva com sucesso!</strong><br /><br /><a href="?subtopic=shopadmin">Voltar</a>'; } break; //salva a oferta no banco de dados /******************************************************************************************/ // Essa ação é chamada na tela de nova oferta, // é nela que o formulário de cadastro é // gerado e exibido na tela /******************************************************************************************/ case 'new': $main_content .= $items_menu; $dropdown = dropdown_offer_type(null); $main_content .= <<<EOD <h1 class="admshop"><strong>Cadastrar nova oferta</strong></h1> <form method="post" action="?subtopic=shopadmin&action=shop_save"> <p class="border"><strong>Nome / Descrição da oferta</strong></p> <p><label class="admshop">Oferta: </label><input type="text" name="offer_name" size="50" maxlength="100" /></p> <p><label class="admshop">Descrição: </label><input type="text" name="offer_description" size="50" maxlength="1000" /></p> <p><label class="admshop">Qtde. pontos: </label><input type="text" name="points" size="5" maxlength="9" /></p> <p class="border"><strong>Tipo da oferta</strong></p> <p><label class="admshop">Tipo: </label>{$dropdown} <p class="border"><strong>Configuração de item normal, armor, shield, legs, etc</strong></p> <p><label class="admshop">ID Item 1: </label><input type="text" name="itemid1" size="10" /></p> <p><label class="admshop">Qtde. Item 1: </label><input type="text" name="count1" size="10" /></p> <p class="border"><strong>Configuração de item container, BP com Runas, BP com Small Stones, etc</strong></p> <p><label class="admshop">ID Item 2: </label><input type="text" name="itemid2" size="10" /></p> <p><label class="admshop">Qtde. Item 2: </label><input type="text" name="count2" size="10" /></p> <p class="border"><br /></p> <input type="submit" value="Salvar" class="bt" /> </form> <div class="clear"></div> EOD; #/\ Deixe assim !!! break; //form de cadastro para nova oferta /******************************************************************************************/ // Ação responsável por abrir a tela de pontos /******************************************************************************************/ case 'points': $main_content .= $items_menu; $main_content .= <<<EOD <h1 class="admshop"><strong>Adicionar pontos à um Character <small><i>(Char)</i></small></strong></h1> <form method="post" action="?subtopic=shopadmin&action=points_add"> <p class="border"><strong>Entre com o nome do Char</strong></p> <p><label class="admshop">Character <small><i>(Char)</i></small>: </label><input type="text" name="char_name" size="30" maxlength="50" /></p> <p class="border"><strong>Entre a quantidade de pontos</strong></p> <p><label class="admshop">Qtde. pontos: </label><input type="text" name="char_points" size="5" maxlength="9" /></p> <p class="border"><br /></p> <input type="submit" value="Salvar" class="bt" /> </form> <div class="clear"></div> EOD; #/\ Deixe assim !!! break; case 'points_add': $player = stripslashes(ucwords(strtolower(trim($_POST['char_name'])))); $points = is_numeric($_POST['char_points']) ? $_POST['char_points'] : 0; if(strlen($player) > 0){ $data = $SQL->query("SELECT * FROM players WHERE name = ".$SQL->quote($player))->fetch(); if($data['account_id']){ $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + '".$points."' WHERE `id` = '".$data['account_id']."'"); $SQL->query("UPDATE `accounts` SET `backup_points` = `backup_points` + '".$points."' WHERE `id` = '".$data['account_id']."'"); $main_content .= '<strong class="success">Pontos adicionados com sucesso à: <i>'.$player.'</i>. Obrigado pelo apoio ao servidor!</strong><br /><br /><a href="?subtopic=shopadmin">Voltar</a>'; }else{ $main_content .= '<strong class="error">O character indicado não existe.</strong><br /><br /><a href="?subtopic=shopadmin&action=points">Voltar</a>'; } }else{ $main_content .= '<strong class="error">Preencha o nome do Character.</strong><br /><br /><a href="?subtopic=shopadmin&action=points">Voltar</a>'; } break; /******************************************************************************************/ // Por padrão, essa ação é chamada e exibe somente // os botões para cada ação do sistema /******************************************************************************************/ default: $main_content .= <<<EOD <h1 class="admshop" align="center"><strong>Bem vindo ao Administrador do Shop!</strong></h1> <hr /> <center> <button type="button" class="bt2" onclick="location.href='?subtopic=shopadmin&action=new'">Nova oferta</button> <button type="button" class="bt2" onclick="location.href='?subtopic=shopadmin&action=list'">Listar ofertas</button> <button type="button" class="bt2" onclick="location.href='?subtopic=shopadmin&action=points'">Adicionar pontos</button> <p>&nbsp;</p> <small><i>Sistema desenvolvido por Dezon para o TibiaKing.com<br />© 2015</i></small> </center> EOD; #/\ Deixe assim !!! break; } //Fim do sistema } else { // Caso o usuário tente usar o administrador e esse, // não tiver acesso, será exibido na tela essa mensagem: $main_content .= 'Sorry, you have not the rights to access this page.'; } /****************************************************************** * SYSTEMA DE ADMINISTRAÇÃO ONLINE DO WEBSHOP GESIOR 2012 BY DEZON * * TODOS OS DIREITOS, POR FAVOR, NÃO REMOVER ESSES CRÉDITOS * * FEITO EXCLUSIVAMENTE PARA O SITE WWW.TIBIAKING.COM * ******************************************************************/ Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  12. Aparentemente funcionou bem no meu servidor (OTX 2, protocolo 7.72), fiquei apenas com uma dúvida: se um player pegar a bandeira e, mesmo que não morra, após 1 ou 2 minutos ele perde a bandeira automaticamente, como tirar isso ou aumentar esse tempo?
  13. aqui deu o mesmo problema, resolveu?
  14. Mesmo problema aqui
  15. O link está quebrado, alguém tem a correção?
  16. Bruno Rezende postou uma resposta no tópico em Sprites
    alguem tem?
  17. Sim, inclusive funciona. Como eu falei, acontece esporadicamente.
  18. O "peso" eu falo por muitas pessoas consultarem simultaneamente um arquivo externo no disco, não o tamanho em si. O erro te mandei acima.
  19. [Error - TalkAction Interface] 2022-01-30 15:27:54 - local cid = 268570304 2022-01-30 15:27:54 - local words = "!autoloot" 2022-01-30 15:27:54 - local param = "wand of inferno" 2022-01-30 15:27:54 - local channel = 65534 2022-01-30 15:27:54 - domodlib('Loot_func') 2022-01-30 15:27:54 - if isVIP(cid) == false then 2022-01-30 15:27:54 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Only VIP players can use auto loot.") 2022-01-30 15:27:54 - return true 2022-01-30 15:27:54 - end 2022-01-30 15:27:54 - local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free 2022-01-30 15:27:54 - if not param or param == "" then 2022-01-30 15:27:54 - ShowItemsTabble(cid) return true 2022-01-30 15:27:54 - elseif tonumber(param) then 2022-01-30 15:27:54 - doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true 2022-01-30 15:27:54 - elseif isInArray({"clean","limpar", "clear"}, param) then 2022-01-30 15:27:54 - if existsAutoloot(cid) then doCleanAutoloot(cid) end 2022-01-30 15:27:54 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true 2022-01-30 15:27:54 - elseif isInArray({"start","stop","on","off"}, param) then 2022-01-30 15:27:54 - setPlayerStorageValue(cid, info.Storages[1], getPlayerStorageValue(cid, info.Storages[1]) <= 0 and 1 or 0) 2022-01-30 15:27:54 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot "..(getPlayerStorageValue(cid, info.Storages[1]) > 0 and "Stopped" or "Started")..".") return true 2022-01-30 15:27:54 - elseif isInArray({"warn","aviso"}, param) then 2022-01-30 15:27:54 - setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0) 2022-01-30 15:27:54 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Backpack Warn "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "disabled" or "Activated")..".") return true 2022-01-30 15:27:54 - elseif isInArray({"mensagem","message","mensagen","msg"}, param) then 2022-01-30 15:27:54 - setPlayerStorageValue(cid, info.Storages[6], getPlayerStorageValue(cid, info.Storages[6]) <= 0 and 1 or 0) 2022-01-30 15:27:54 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message "..(getPlayerStorageValue(cid, info.Storages[6]) > 0 and "disabled" or "Activated")..".") return true 2022-01-30 15:27:54 - elseif isInArray({"cor","color","type"}, param) then 2022-01-30 15:27:54 - setPlayerStorageValue(cid, info.Storages[5], getPlayerColorLootMessage(cid) == #Color_Loot and 0 or getPlayerColorLootMessage(cid)+1) 2022-01-30 15:27:54 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message Color Changed to "..Color_Loot[getPlayerColorLootMessage(cid)][2]..".") return true 2022-01-30 15:27:54 - elseif isInArray({"money","gold","gps","dinheiro"}, param) then 2022-01-30 15:27:54 - setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0) 2022-01-30 15:27:54 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Colleting only Crystal Coin is "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true 2022-01-30 15:27:54 - elseif isInArray({"deposito","bank","gbank","deposit","autodeposit"}, param) then 2022-01-30 15:27:54 - setPlayerStorageValue(cid, info.Storages[4], getPlayerStorageValue(cid, info.Storages[4]) <= 0 and 1 or 0) 2022-01-30 15:27:54 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Automatic Gold Bank "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "disabled")..".") return true 2022-01-30 15:27:54 - end 2022-01-30 15:27:54 - local item = ExistItemByName(tostring(param)) 2022-01-30 15:27:54 - if not item then 2022-01-30 15:27:54 - doPlayerSendCancel(cid, "This item does not exist.") return true 2022-01-30 15:27:54 - end 2022-01-30 15:27:54 - local item = getItemIdByName(tostring(param)) 2022-01-30 15:27:54 - local var = isInTable(cid, item) 2022-01-30 15:27:54 - if isInArray(info.Money_ids, item) then 2022-01-30 15:27:54 - doPlayerSendTextMessage(cid, MESSAGE_FIRST, "Enter !autoloot money to add money in your list!") return true 2022-01-30 15:27:54 - elseif isInArray(info.BlockItemsList, item) then 2022-01-30 15:27:54 - doPlayerSendCancel(cid, "You can not add this item in the list!") return true 2022-01-30 15:27:54 - elseif not var and #getItensFromAutoloot(cid) >= slots then 2022-01-30 15:27:54 - doPlayerSendCancel(cid, "You have reached the maximum number of "..slots.." slots from auto loot.") return true 2022-01-30 15:27:54 - elseif getPlayerStorageValue(cid, info.Storages[7]) - os.time() > 0 then 2022-01-30 15:27:54 - doPlayerSendCancel(cid, "wait a second to use this command again") return true 2022-01-30 15:27:54 - end 2022-01-30 15:27:54 - if not var then 2022-01-30 15:27:54 - doAddItemFromAutoloot(cid, item) 2022-01-30 15:27:54 - else 2022-01-30 15:27:54 - doremoveItemFromAutoloot(cid, item) 2022-01-30 15:27:54 - end 2022-01-30 15:27:54 - setPlayerStorageValue(cid, info.Storages[7], os.time()+info.Talkaction_delay) 2022-01-30 15:27:54 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,not var and "You added the item "..param.." in the list" or "You removed the item "..param.." from the list, please wait 5 seconds to save the directory.") 2022-01-30 15:27:54 - return true 2022-01-30 15:27:54 - Description: 2022-01-30 15:27:54 - [string "info = {..."]:60: attempt to index local 'file' (a nil value) 2022-01-30 15:28:26 - 2022-01-30 15:28:26 - [Error - TalkAction Interface] 2022-01-30 15:28:26 - local cid = 268570304 2022-01-30 15:28:26 - local words = "!autoloot" 2022-01-30 15:28:26 - local param = "wand of inferno" 2022-01-30 15:28:26 - local channel = 65534 2022-01-30 15:28:26 - domodlib('Loot_func') 2022-01-30 15:28:26 - if isVIP(cid) == false then 2022-01-30 15:28:26 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Only VIP players can use auto loot.") 2022-01-30 15:28:26 - return true 2022-01-30 15:28:26 - end 2022-01-30 15:28:26 - local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free 2022-01-30 15:28:26 - if not param or param == "" then 2022-01-30 15:28:26 - ShowItemsTabble(cid) return true 2022-01-30 15:28:26 - elseif tonumber(param) then 2022-01-30 15:28:26 - doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true 2022-01-30 15:28:26 - elseif isInArray({"clean","limpar", "clear"}, param) then 2022-01-30 15:28:26 - if existsAutoloot(cid) then doCleanAutoloot(cid) end 2022-01-30 15:28:26 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true 2022-01-30 15:28:26 - elseif isInArray({"start","stop","on","off"}, param) then 2022-01-30 15:28:26 - setPlayerStorageValue(cid, info.Storages[1], getPlayerStorageValue(cid, info.Storages[1]) <= 0 and 1 or 0) 2022-01-30 15:28:26 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot "..(getPlayerStorageValue(cid, info.Storages[1]) > 0 and "Stopped" or "Started")..".") return true 2022-01-30 15:28:26 - elseif isInArray({"warn","aviso"}, param) then 2022-01-30 15:28:26 - setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0) 2022-01-30 15:28:26 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Backpack Warn "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "disabled" or "Activated")..".") return true 2022-01-30 15:28:26 - elseif isInArray({"mensagem","message","mensagen","msg"}, param) then 2022-01-30 15:28:26 - setPlayerStorageValue(cid, info.Storages[6], getPlayerStorageValue(cid, info.Storages[6]) <= 0 and 1 or 0) 2022-01-30 15:28:26 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message "..(getPlayerStorageValue(cid, info.Storages[6]) > 0 and "disabled" or "Activated")..".") return true 2022-01-30 15:28:26 - elseif isInArray({"cor","color","type"}, param) then 2022-01-30 15:28:26 - setPlayerStorageValue(cid, info.Storages[5], getPlayerColorLootMessage(cid) == #Color_Loot and 0 or getPlayerColorLootMessage(cid)+1) 2022-01-30 15:28:26 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message Color Changed to "..Color_Loot[getPlayerColorLootMessage(cid)][2]..".") return true 2022-01-30 15:28:26 - elseif isInArray({"money","gold","gps","dinheiro"}, param) then 2022-01-30 15:28:26 - setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0) 2022-01-30 15:28:26 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Colleting only Crystal Coin is "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true 2022-01-30 15:28:26 - elseif isInArray({"deposito","bank","gbank","deposit","autodeposit"}, param) then 2022-01-30 15:28:26 - setPlayerStorageValue(cid, info.Storages[4], getPlayerStorageValue(cid, info.Storages[4]) <= 0 and 1 or 0) 2022-01-30 15:28:26 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Automatic Gold Bank "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "disabled")..".") return true 2022-01-30 15:28:26 - end 2022-01-30 15:28:26 - local item = ExistItemByName(tostring(param)) 2022-01-30 15:28:26 - if not item then 2022-01-30 15:28:26 - doPlayerSendCancel(cid, "This item does not exist.") return true 2022-01-30 15:28:26 - end 2022-01-30 15:28:26 - local item = getItemIdByName(tostring(param)) 2022-01-30 15:28:26 - local var = isInTable(cid, item) 2022-01-30 15:28:26 - if isInArray(info.Money_ids, item) then 2022-01-30 15:28:26 - doPlayerSendTextMessage(cid, MESSAGE_FIRST, "Enter !autoloot money to add money in your list!") return true 2022-01-30 15:28:26 - elseif isInArray(info.BlockItemsList, item) then 2022-01-30 15:28:26 - doPlayerSendCancel(cid, "You can not add this item in the list!") return true 2022-01-30 15:28:26 - elseif not var and #getItensFromAutoloot(cid) >= slots then 2022-01-30 15:28:26 - doPlayerSendCancel(cid, "You have reached the maximum number of "..slots.." slots from auto loot.") return true 2022-01-30 15:28:26 - elseif getPlayerStorageValue(cid, info.Storages[7]) - os.time() > 0 then 2022-01-30 15:28:26 - doPlayerSendCancel(cid, "wait a second to use this command again") return true 2022-01-30 15:28:26 - end 2022-01-30 15:28:26 - if not var then 2022-01-30 15:28:26 - doAddItemFromAutoloot(cid, item) 2022-01-30 15:28:26 - else 2022-01-30 15:28:26 - doremoveItemFromAutoloot(cid, item) 2022-01-30 15:28:26 - end 2022-01-30 15:28:26 - setPlayerStorageValue(cid, info.Storages[7], os.time()+info.Talkaction_delay) 2022-01-30 15:28:26 - doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,not var and "You added the item "..param.." in the list" or "You removed the item "..param.." from the list, please wait 5 seconds to save the directory.") 2022-01-30 15:28:26 - return true 2022-01-30 15:28:26 - Description: 2022-01-30 15:28:26 - [string "info = {..."]:60: attempt to index local 'file' (a nil value) Meu mod de autoloot atual @Vodkart <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Perfect Auto Loot" version="2.0" author="Vodkart" contact="none.com" enabled="yes"> <config name="Loot_func"><![CDATA[ info = { directory = "data/logs/autoloot", Warn_Bp_Slots = 5, -- quando tiver 5 ou menos slots na BP vai avisar o jogador Talkaction_delay = 1, -- em segundos // delay para remover e adicionar item BlockMonsters = {}, BlockItemsList = {2148,2152}, Money_ids = {2160}, -- id das moedas do ot Max_Slots = {free = 20, premium = 20}, Storages = {988801, 988802, 988803, 988804, 988805, 988806, 988807} } Color_Loot = { [0] = {MESSAGE_EVENT_ORANGE, "Orange"}, [1] = {MESSAGE_STATUS_CONSOLE_BLUE, "Blue"}, [2] = {MESSAGE_INFO_DESCR, "Green"}, [3] = {MESSAGE_STATUS_CONSOLE_RED, "Red"}, [4] = {MESSAGE_STATUS_SMALL, "White"} } function getPlayerColorLootMessage(cid) return getPlayerStorageValue(cid, info.Storages[5]) <= 0 and 0 or getPlayerStorageValue(cid, info.Storages[5]) end function isInTable(cid, item) for _,i in pairs(getItensFromAutoloot(cid)) do if tonumber(i) == tonumber(item) then return true end end -- return false end function doremoveItemFromAutoloot(cid, itemid) local file, fileContent = io.open(info.directory.."/"..getCreatureName(cid)..".txt", 'r'),{} for line in file:lines() do if line ~= "" and tonumber(line) ~= tonumber(itemid) then fileContent[#fileContent + 1] = line end end io.close(file) file = io.open(info.directory.."/"..getCreatureName(cid)..".txt", 'w') for index, value in ipairs(fileContent) do file:write(value..'\n') end io.close(file) end function existsAutoloot(cid) local f = io.open(info.directory.."/"..getCreatureName(cid)..".txt", "rb") if f then f:close() end return f ~= nil end function doCreateLootUserName(cid, itemid) newFile = io.open(info.directory.."/"..getCreatureName(cid)..".txt", "w+" ) newFile:write(itemid) newFile:close() end function doAddItemFromAutoloot(cid, itemid) if not existsAutoloot(cid) then doCreateLootUserName(cid, itemid) return true end local file = io.open(info.directory.."/"..getCreatureName(cid)..".txt", "a+") file:write('\n'..itemid) file:close() end function getItensFromAutoloot(cid) if not existsAutoloot(cid) then return {} end lines = {} for line in io.lines(info.directory.."/"..getCreatureName(cid)..".txt") do if line ~= "" then lines[#lines + 1] = tonumber(line) end end return lines end function doCleanAutoloot(cid) return os.remove(info.directory.."/"..getCreatureName(cid)..".txt") end function ShowItemsTabble(cid) local auto_list = getItensFromAutoloot(cid) local n,str = 0,"[+] Auto Loot Commands [+]\n\n!autoloot item name --> To add ou Remove item from list.\n!autoloot money --> To collect gold automatically.\n!autoloot clear --> To clear the list.\n!autoloot on/off --> To enable or disable the collecting of items in the system.\n!autoloot message --> To enable or disable message from Collect items.\n!autoloot color --> To change Color message in Auto Loot Collect.\n!autoloot warn --> To enable or disable message warning of "..info.Warn_Bp_Slots.." or less slots in the backpack.\n!autoloot deposit --> To enable or disable automatic money deposit at the bank.\n\n[+] Auto Loot Info [+]\n\nSystem: "..(getPlayerStorageValue(cid, info.Storages[1]) <= 0 and "Activated" or "Disabled")..".\nGold Collecting: "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "Disabled")..".\nMessage: "..(getPlayerStorageValue(cid, info.Storages[6]) <= 0 and "Activated" or "Disabled")..".\nColor Message: "..Color_Loot[getPlayerColorLootMessage(cid)][2]..".\nWarn Backpack: "..(getPlayerStorageValue(cid, info.Storages[3]) <= 0 and "Activated" or "Disabled")..".\nAutomatic Gold Deposit: "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "Disabled")..".\nTotal Bank Balance: ["..getPlayerBalance(cid).."]\nMaximum Slots: ["..#auto_list.."/"..(isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free).."]\n\n[+] Auto Loot Slots [+]\n\n" if #auto_list > 0 then for i = 1, #auto_list do n = n + 1 str = str.."Slot "..n.." - "..getItemNameById(auto_list[i]).."\n" end end doShowTextDialog(cid, 1961, str) end function getContainerItems(container, array, haveCap) array = array or {} haveCap = haveCap or false if not isContainer(container.uid) or getContainerSize(container.uid) == 0 then array[#array +1] = container else local size = getContainerSize(container.uid) haveCap = (getContainerCap(container.uid) -size) > 0 for slot = 0, (size -1) do local item = getContainerItem(container.uid, slot) if item.itemid > 1 then getContainerItems(item, array, haveCap) end end end return #array >= 1 and array, haveCap end function getContainerItemsById(container, itemid) local founds = {} local items = not container.uid and container or getContainerItems(container) for index, item in pairs(items) do if item.itemid == itemid then founds[#founds +1] = item end end return #founds >= 1 and founds end function AutomaticDeposit(cid, item, n) if isInArray(info.Money_ids, item) and getPlayerStorageValue(cid, info.Storages[4]) > 0 then local deposit = item == tonumber(2160) and (n*10000) or tonumber(item) == 2152 and (n*100) or (n) doPlayerDepositMoney(cid, deposit) end return true end function getAllContainerFree(cid) -- by vodka local containers,soma = {},0 for i = CONST_SLOT_FIRST, CONST_SLOT_LAST do local sitem = getPlayerSlotItem(cid, i) if sitem.uid > 0 then if isContainer(sitem.uid) then table.insert(containers, sitem.uid) soma = soma + getContainerSlotsFree(sitem.uid) end end end while #containers > 0 do for k = (getContainerSize(containers[1]) - 1), 0, -1 do local tmp = getContainerItem(containers[1], k) if isContainer(tmp.uid) then table.insert(containers, tmp.uid) soma = soma + getContainerSlotsFree(tmp.uid) end end table.remove(containers, 1) end return soma end function getContainerSlotsFree(container) -- by vodka return getContainerCap(container)-getContainerSize(container) end function doPlayerAddItemStackable(cid, itemid, count) local container = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) if container.itemid > 1 then local items = getContainerItemsById(container, itemid) if not items then return doPlayerAddItem(cid, itemid, count) else local piles = #items for index, item in pairs(items) do if item.type < 100 then local sum = item.type + count local result = doTransformItem(item.uid, itemid, sum) if sum <= 100 then return result else return doPlayerAddItem(cid, itemid, sum - 100) end else piles = piles - 1 if piles == 0 then return doPlayerAddItem(cid, itemid, count) end end end end end return false end function corpseRetireItems(cid, pos) local check, slots = false, 0 for i = 0, 255 do pos.stackpos = i if getThingFromPos(pos).uid > 0 and isContainer(getThingFromPos(pos).uid) then corpse = getThingFromPos(pos) check = true break end end if check == true then local str, id_list = "", getItensFromAutoloot(cid) for _, item in pairs(getContainerItems(corpse)) do local id = item.itemid if #id_list > 0 and isInArray(id_list, id) or getPlayerStorageValue(cid, info.Storages[2]) > 0 and isInArray(info.Money_ids, id) then local amount = isItemStackable(id) and item.type or 1 local total_cap = getItemWeightById(id, amount) slots = getAllContainerFree(cid) if slots > 0 and getPlayerFreeCap(cid) >= total_cap then str = str.." " .. getItemInfoLoot(id, amount) if isItemStackable(id) then doPlayerAddItemStackable(cid, id, amount) AutomaticDeposit(cid, id, amount) else doPlayerAddItem(cid, id, getItemInfo(id).charges or 1) end doRemoveItem(item.uid) end end end if str ~= "" and getPlayerStorageValue(cid, info.Storages[6]) <= 0 then doPlayerSendTextMessage(cid, Color_Loot[getPlayerColorLootMessage(cid)][1],"[Auto Loot Collect]:"..string.sub(str, 1, -1)..".") end if getPlayerStorageValue(cid, info.Storages[3]) <= 0 and slots > 0 and slots <= info.Warn_Bp_Slots then doPlayerSendTextMessage(cid,18, "[Auto Loot Warn] You only have "..slots.." slots free in your backpack!") end end end function ExistItemByName(name) -- by vodka local items = io.open("data/items/items.xml", "r"):read("*all") local get = items:lower():match('name="' .. name:lower() ..'"') if get == nil or get == "" then return false end return true end function getItemInfoLoot(id, amount) local info = getItemInfo(id) return isItemStackable(id) and amount.." "..(amount > 1 and info.plural or info.name).."," or info.article.." " .. info.name .."," end ]]></config> <event type="login" name="LootLogin" event="script"><![CDATA[ domodlib('Loot_func') function onLogin(cid) registerCreatureEvent(cid, "LootEventKIll") if isPremium(cid) and getPlayerStorageValue(cid, 853608) <= 0 then setPlayerStorageValue(cid, 853608, 1) elseif getPlayerStorageValue(cid, 853608) > 0 and not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Auto Loot] You premium is Over, Start a new list!") setPlayerStorageValue(cid, 853608, -1) doCleanAutoloot(cid) end return true end]]></event> <event type="kill" name="LootEventKIll" event="script"><![CDATA[ domodlib('Loot_func') function onKill(cid, target, lastHit) if isVIP(cid) == false then return true end if isPlayer(cid) and getPlayerStorageValue(cid, info.Storages[1]) <= 0 and isMonster(target) and not isInArray(info.BlockMonsters, getCreatureName(target):lower()) then addEvent(corpseRetireItems, 0, cid ,getThingPos(target)) end return true end]]></event> <talkaction words="!autoloot;/autoloot" event="buffer"><![CDATA[ domodlib('Loot_func') if isVIP(cid) == false then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Only VIP players can use auto loot.") return true end local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free if not param or param == "" then ShowItemsTabble(cid) return true elseif tonumber(param) then doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true elseif isInArray({"clean","limpar", "clear"}, param) then if existsAutoloot(cid) then doCleanAutoloot(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true elseif isInArray({"start","stop","on","off"}, param) then setPlayerStorageValue(cid, info.Storages[1], getPlayerStorageValue(cid, info.Storages[1]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot "..(getPlayerStorageValue(cid, info.Storages[1]) > 0 and "Stopped" or "Started")..".") return true elseif isInArray({"warn","aviso"}, param) then setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Backpack Warn "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "disabled" or "Activated")..".") return true elseif isInArray({"mensagem","message","mensagen","msg"}, param) then setPlayerStorageValue(cid, info.Storages[6], getPlayerStorageValue(cid, info.Storages[6]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message "..(getPlayerStorageValue(cid, info.Storages[6]) > 0 and "disabled" or "Activated")..".") return true elseif isInArray({"cor","color","type"}, param) then setPlayerStorageValue(cid, info.Storages[5], getPlayerColorLootMessage(cid) == #Color_Loot and 0 or getPlayerColorLootMessage(cid)+1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message Color Changed to "..Color_Loot[getPlayerColorLootMessage(cid)][2]..".") return true elseif isInArray({"money","gold","gps","dinheiro"}, param) then setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Colleting only Crystal Coin is "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true elseif isInArray({"deposito","bank","gbank","deposit","autodeposit"}, param) then setPlayerStorageValue(cid, info.Storages[4], getPlayerStorageValue(cid, info.Storages[4]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Automatic Gold Bank "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "disabled")..".") return true end local item = ExistItemByName(tostring(param)) if not item then doPlayerSendCancel(cid, "This item does not exist.") return true end local item = getItemIdByName(tostring(param)) local var = isInTable(cid, item) if isInArray(info.Money_ids, item) then doPlayerSendTextMessage(cid, MESSAGE_FIRST, "Enter !autoloot money to add money in your list!") return true elseif isInArray(info.BlockItemsList, item) then doPlayerSendCancel(cid, "You can not add this item in the list!") return true elseif not var and #getItensFromAutoloot(cid) >= slots then doPlayerSendCancel(cid, "You have reached the maximum number of "..slots.." slots from auto loot.") return true elseif getPlayerStorageValue(cid, info.Storages[7]) - os.time() > 0 then doPlayerSendCancel(cid, "wait a second to use this command again") return true end if not var then doAddItemFromAutoloot(cid, item) else doremoveItemFromAutoloot(cid, item) end setPlayerStorageValue(cid, info.Storages[7], os.time()+info.Talkaction_delay) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,not var and "You added the item "..param.." in the list" or "You removed the item "..param.." from the list, please wait 5 seconds to save the directory.") return true]]></talkaction> </mod>

Informação Importante

Confirmação de Termo