Ir para conteúdo

Tricoder

Héroi
  • Registro em

  • Última visita

Tudo que Tricoder postou

  1. Tricoder postou uma resposta no tópico em Suporte Bots
    Também estou procurando.
  2. Descrição Como funciona? O admin do site terá a opção de gerar um código de cupom que da x quantidade de points. Ele apenas coloca a quantidade de points que deseja gerar e então, surgirá a key para o player usar e obter os points. _______________________________________ Coupon System Execute no MySQL query: SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; CREATE TABLE IF NOT EXISTS `__cornex_redeem` ( `id` int(11) NOT NULL AUTO_INCREMENT, `points` int(11) NOT NULL, `used_by` int(11) NOT NULL DEFAULT '0', `time` int(11) NOT NULL, `code` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; Crie um arquivo chamado admincoupon.php dentro do diretório /pages/ <?php if(!defined('INITIALIZED')) exit; if($group_id_of_acc_logged >= $config['site']['access_admin_panel']){ function serialKey() { $chars = array_merge(range(0, 9), range('A', 'Z')); $serial = ''; $max = count($chars)-1; for($i=0;$i<20;$i++){ $serial .= (!($i % 5) && $i ? '-' : '').$chars[rand(0, $max)]; } return $serial; } if (isset($_POST['points'])) { $error = false; $points = $_POST['points']; if (empty($points)) { $error[] = "<font color='red'>Field cannot be empty</font>"; } if (!is_numeric($points)) { $error[] = "<font color='red'>Must be a number value</font>"; } if (!empty($error)) { foreach ($error as $err) { $main_content .=''.$err.'<br>'; } } if (empty($error)) { // Success $key = serialKey(); $SQL->query('INSERT INTO `__cornex_redeem` (`code`, `points`, `used_by`, `time`, `ip`) VALUES ('.$SQL->quote($key).','.$points.', 0, 0, 0)'); echo '<p><b>Key generated</b><font color="red">: '.$key.'</font></p>'; } } $main_content .= ' <form class="ui form" action="" method="POST"> <div class="six wide field"> <label>Points</label> <input type="text" name="points" placeholder="Amount of points for this code"> </div> <input class="ui submit button" type="submit" value="Create code"> </form>'; } else { $main_content .= ' <div class="ui warning message"> <div class="header"> You dont have permission to do that! </div> </div> '; } Salve o arquivo. Agora crie um arquivo chamado redeem.php novamente dentro do diretório /pages/ <?php if(!defined('INITIALIZED')) exit; if($logged){ if(isset($_POST['code'])) { $code = $SQL->quote($_POST['code']); $query = $SQL->query('SELECT * FROM `__cornex_redeem` WHERE `code` = '.$code.' LIMIT 1;'); // Key exist in database if ($query->rowCount() >= 1) { // $query = $query[0]; $result = $query->fetchAll(PDO::FETCH_ASSOC)[0]; if ($result['used_by'] > 0) { $error[] = 'Key has already been used'; } if (!empty($error)) { foreach ($error as $err) { echo $err.'<br>'; } } if (empty($error)) { $time = time(); $code = $result['code']; $points = $result['points']; $querys = sprintf('UPDATE `__cornex_redeem` SET `time`='.time().', `used_by`='.$account_logged->getId().' WHERE `code`="'.$result['code'].'" '); $SQL->query($querys); $account_logged->setPremiumPoints($account_logged->getPremiumPoints() + $points); $account_logged->save(); echo 'Amount of '.$points.' points has been added to your account!'; } } else { echo 'Key is not valid'; } } $accid = $account_logged->getID(); $main_content .= ' <form action="" method="POST"> <input type="text" name="code"> <input type="submit" value="Redeem"> </form>'; } else { $main_content .= ' <div class="ui warning message"> <div class="header"> You dont have permission to do that! </div> </div> '; } Salve o arquivo. Abra layouts/tibiarl/layout.php Para admins gerar cupons <?PHP if($group_id_of_acc_logged >= $config['site']['access_admin_panel']){ ?> <a href="?subtopic=admincoupon"> <div id="submenu_admincoupon" 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_admincoupon" class="ActiveSubmenuItemIcon" style="background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);"></div> <div id="ActiveSubmenuItemLabel_admincoupon" class="SubmenuitemLabel">Coupons</div> <div class="RightChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> </div> </a> <?php } ?> Para players obter points através de cupons <a href="?subtopic=redeem"> <div id="submenu_redeem" 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_redeem" class="ActiveSubmenuItemIcon" style="background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);"></div> <div id="ActiveSubmenuItemLabel_redeem" class="SubmenuitemLabel">Redeem a coupon</div> <div class="RightChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> </div> </a> ___________________________________ Créditos Cornex raf ___________________________________ OBS. IRIA POSTAR PRA ZNOTE AAC MAS NÃO SEI SE JÁ HÁ AQUI, ENTÃO PRA EVITAR, NÃO POSTEI. CASO NÃO TENHA, ME AVISE E EU EDITO O POST.
  3. Que gesior é esse homi?? Tem algo além disso do Shop que está bugado? Tu baixou daqui?
  4. Script auto 200 refillammo Créditos Elfbot Brasil
  5. Tricoder postou uma resposta no tópico em ElfBot NG
    Script auto 200 listas "Auto Trade" | sayin 'Trade' MENSAGEM | wait $rand.[2*60*1000].[3*60*1000] Créditos Elfbot Brasil
  6. Tricoder postou uma resposta no tópico em ElfBot NG
    Script auto 200 setoutfitcolor '$name' $self.color1 $self.color2 $self.color3 $self.color4 3 Créditos Elfbot Brasil
  7. Script auto 1 dropitems 284 0 Créditos Elfbot Brasil
  8. Script auto 10 if [$mostshotcount.'enemy' >= 5] { set $shotfriend $mostshot.'enemy' | mwallcover $shotenemy.id | wait 1990 } Créditos Elfbot Brasil
  9. Script auto 100 dontlist | setcaption '$name l Exp para upar: $exptnl l Exp/Hora: $exph l Tempo Restante : $formattime.$timetnl l Exp ganha nessa seção: $expgained l Tempo Jogado: $formattime.$deltatime' Créditos Elfbot Brasil
  10. Script auto 100 if [$target.isplayer && $target.isonscreen && $target.hppc <= 1] savescreen Créditos Elfbot Brasil
  11. Tricoder postou uma resposta no tópico em ElfBot NG
    Script auto 200 attack target | paralyze target | wait 300 Créditos Elfbot Brasil
  12. Script auto 100 if [$mppc <= 75] { while [$mppc < 90] { if [$lastmsg.content ? 'sudden death runes'] { end } gmana self | wait 1500 } } Créditos Elfbot Brasil
  13. Script auto 100 if [$playersaround.10 == 0 && $monstersaround.1 >= 1] { istargeting say 'Exori Gran' } | if [$playersaround.10 >= 1] { istargeting say 'Exori Hur'} Créditos Elfbot Brasil
  14. Script auto 100 if [$mp >= 20] istargeting say 'NOME DA MAGIA AQUI' Créditos Elfbot Brasil
  15. Script auto 100 if [$mcount."$m.distance <= 7" >= 3] {useoncreature 3161 self | wait 900} Créditos Elfbot Brasil
  16. Script auto 100 isnottargeting {if [$followed.name != 'yourfriendname'] follow 'yourfriendname'} Créditos Elfbot Brasil
  17. Script auto 100 if [$target.hp < X && $target.haslookinfo] sd target Créditos Elfbot Brasil
  18. Script auto 100 ifplayerattacking {if [$fileisline.'safelistpk.txt'.'$pk.name' == 0 && $pk.name != $name && $target != $pk] attack $pk.id} ou auto 1 listas 'Revidar Player' | seticontext 'Revidar' Player' | isnottargeting {if ?$attacker.isplayer] {attack $attacker.name | wait 5} Créditos Elfbot Brasil
  19. Video Script { reachgrounditem dp | wait 1000 | end } { opengrounditem 3500 | opengrounditem 3499 | opengrounditem 3498 | opengrounditem 3497 | end } wait [$rand.500.1300] { openitemnew IDPACKPACK 1 'Locker' | end } {set $deposit 1 | wait 7000 | set $deposit 0} ---------------------- auto 1 dontlist | if [$deposit == 1] { moveitems ID 'NOME DA BACKPACK' | moveitems ID² 'NOME DA BACKPACK' | moveitems ID³ 'NOME DA BACKPACK' | end } Créditos Elfbot Brasil
  20. Tricoder postou uma resposta no tópico em ElfBot NG
    Usar magia quanto a mana estiver acima de 20 auto 200 mphigher 20 say 'utevo lux' Anti-Idle (anti disconnect) auto 1 listas 'Anti-Idle' | turnw | wait 1 | turnn | wait 1 | turne | wait 1 | turns Comer food auto 200 eatfood | wait 20000 Reconectar-se auto 1000 if [$ss != 1] {if [$sstime != 0] set $ss 1} | if [$connected != 1 && $ss == 1] {wait (20 * 60 * 1000) | reconnect | wait 2000 | openbpitem | set $ss 0} | if [$connected != 1 && $ss != 1] {reconnect | wait 2000 | openbpitem}
  21. Tricoder postou uma resposta no tópico em Suporte Tibia OTServer
    Tira print do seu gesior e posta o código aqui, por favor
  22. Disponha! Poderia marcar como melhor resposta só para o tópico ser considerado como resolvido, por favor?
  23. Vou tentar te ajudar... Antes de tudo, faça backup de todos os arquivos do seu shop. Em globalevents.xml verifique se há isso no arquivo: <globalevent name="shop" interval="30" script="shop.lua"/> Em data/lib/000-constant.lua ou data/lib/constant.lua, verifique se há: InitShopComunication = 0 Por último, substitua seu Shop.lua por esse: -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end
  24. Tricoder postou uma resposta no tópico em Formação de Equipe
    Tem skype?
  25. Verifique se há dois arquivos donate.php em seu htdocs.

Informação Importante

Confirmação de Termo