Jump to content
Close

Search the Community

Showing results for tags 'shop'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community
    • Rules
    • Portal
    • Resources
    • Commerce
    • Clubs
  • OTServers
    • Discussion
    • Support
    • Tutorial
    • Download
    • Code Development
    • Contests and Events
    • Form Team
    • Advertise your Server
  • Tibia Bots
    • Discussion
  • League of Legends's Geral
  • League of Legends's Suporte
  • Jogos Gerais's Geral
  • Nto New Season's Tópicos
  • Fakes's Fakes
  • Tibia's Geral
  • Tibia's Notícias
  • Tibia's Media
  • Tibia's Life Thread
  • Gráficos's Geral
  • Gráficos's Tutoriais
  • Gráficos's Recursos
  • Gráficos's Aprendizagem & Recursos
  • Gráficos's Galeria
  • Gráficos's Duelos & Batalhas
  • Gráficos's Suporte
  • Desenvolvimento e Programação's Geral
  • Desenvolvimento e Programação's Tutoriais
  • Desenvolvimento e Programação's Trabalhos
  • Desenvolvimento e Programação's Suporte
  • Computação's Geral
  • Computação's Dicas e Tutoriais
  • Computação's Suporte
  • Roleplaying's Roleplaying
  • Playground's (Off-topic)
  • Divulgações's Tópicos

Calendars

  • Official Calendar
  • OTServs Calendar
  • Several Calendars

Product Groups

  • Advertisements in Top
  • Advertisements In Signatures
  • Advertisements in Topics
  • Others Advertisements

Categories

  • Sales Section
    • Scripting Sales
    • Codes Sales
    • Mapping Sales
    • Websites Sales
    • Design/Sprites Sales
    • Bots Sales
  • Look Jobs
  • Looking for Freelancers
  • Team Formation

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Localization


My character


Favorite OTServ


Bot preferred


Interests

Found 65 results

  1. Eae galera, esses dias eu tive vontade de começar um server de tibia 10.90, porém, comecei no site. Fui mexendo e tals, ai vi que não funcionava o shop, pra enviar mounts e addons para os players, ai fui atrás de correção. Vi que aqui mesmo no TK, o membro Summ postou um script para tibia 10.53 desse shop, para TFS 1.x. Como o script dele não era atualizado desde janeiro(quando ele criou), eu resolvi atualizar(por eu mesmo precisar), e agora venho trazer a "atualização" pra vocês UAHUEHEUAH Bora la: Primeiro, na pasta do seu server, em creaturescripts/scripts adicione um arquivo chamado addonmount.lua e adicione o seguinte dentro: Ai está com a atualização 10.90 do tibia. Em creaturescripts.xml adicione a tag: Agora em Globalevents/scripts, substitua seu shop.lua por esse: E em globalevents.xml adicione a tag: Agora vamos para a pasta do site. Em config/config.php localize a linha Em cima dessa linha, adicione o seguinte: Agora na pasta pages, substitua seus arquivos shopadmin.php e shopsystem.php por esses: shopadmin.php shopsystem.php Agora, deixo um arquivo em .rar em anexo, extrai o conteúdo(pasta addons e mounts) para a pasta images do seu site. Quando você for adicionar alguma mount ou addon no seu shop, faça assim: Obs.: Muito importante, quando for adicionar a oferta de mount ou addon no shop, ao invés de colocar o ID do mesmo, adicione o número de storage, que está no arquivo addonmount.lua em creaturescripts do seu server. Escolha o que quiser. Obs.2: As imagens dos addons e mounts são adicionadas automaticamente no shop. images.rar Créditos: @dezon - Shopadmin Summ Scan: https://www.virustotal.com/pt/file/1a60771d653b96224740ef9d5b4b8748dc4b216bfb7b581f5706a8ea14d4aeb7/analysis/1452534742/
  2. Olá pessoinhas, Sério mesmo, procurei por tudo que é lugar a solução deste meu problema, e não encontrei. O erro é esse. Queria saber se há alguma solução para ele. E além de saer se há alguma solução, queria a solução... Desde já, Grato!
  3. Bom, eu já percebi que muitos estão tendo problemas para adicionar as imagens no store in-game do tibia e decidi pesquisar e tentar faze-lo funcionar corretamente. Depois de muito tempo pesquisando, tentando e errando, achei uma explicação na Otland, vou mostrar passo-a-passo como se faz para que funcione: Primeiro, vá até o seu config.lua e procure por coinImagesURL = "http://some.url/images/store/" Substitua ´some.url´ pelo site do seu servidor e retiro o /images , no meu caso ficará assim coinImagesURL = "http://asterion-ot.servegame.com/store/" Agora, vá até a pasta www ou htdocs e crie uma pasta chamada store com uma outra pasta chamada 64 dentro dela, veja abaixo: Dentro da pasta store: Agora, dentro da pasta 64, você tem que colocar as imagens dos produtos em formato PNG ( APENAS PNG ) e com as dimensões 64x64: Depois disso, é só criar os items no gamestore.lua normalmente e colocar os nomes das respectivas imagens como deseja. SHAZAM!!! PS: AS IMAGENS TEM QUE SER COM FUNDO TRANSPARENTE, SE NÃO FICARAM ASSIM: Créditos: Narko (otland member) Me.
  4. Quando coloco para comprar uma vocação, ou item, eu entro no personagem e aparece isso no meu open, não sou bom com tibia mas gostaria de aprender, e se pudesse me ajudar a resolver esse problema, pfv entrar em contato obs:. não sei se estou postando no local certo então pfv se puder mover o post agradicido
  5. Olá boa noite alguma boa alma poderia me ajudar se tem alguma tabela que interage com o shop para vender uma vocção vip por pontos ? agradeço
  6. Descrição: NPC Simples do tibia global que compra e vende itens de paladinos. Nome do Npc: Perac Função: Negocia alguns itens de paladinos. Vende: Arrow Bolt Bow Crossbow Spear Assassin Star Compra: Spear Perac.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 npcHandler:addModule(FocusModule:new()) Perac.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Perac" script="data/npc/scripts/Perac.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="129" head="78" body="52" legs="68" feet="114" addons="0"/> <parameters> <parameter key="module_shop" value="1" /> <parameter key="shop_buyable" value="arrow,2544,3;bolt,2543,4;bow,2456,400;crossbow,2455,500;spear,2389,10;assassin star,7368,100;" /> <parameter key="shop_sellable" value="spear,2389,3;" /> <parameter key="message_greet" value="Oh, please come in, |PLAYERNAME|. What do you need? Distance weapons? I sell lots of them."/> <parameter key="message_farewell" value="Good bye."/> <parameter key="message_walkaway" value="Good bye." /> <parameter key="message_sendtrade" value="Here you go." /> </parameters> </npc>
  7. Descrição: NPC Simples que compra e vende itens de paladinos. Nome do Npc: Dario Função: Negocia itens de paladinos. Vende: Arrow Bolt Bow Crossbow Spear Royal Spear Throwing star Earth Arrow Flaming arrow Flash Arrow Onyx arrow Piercing bolt Power Bolt Shiver Arrow Sniper arrow Compra: Bow Crossbow Dario.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 npcHandler:addModule(FocusModule:new()) Dario.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Dario" script="data/npc/scripts/Dario.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="159" head="3" body="58" legs="41" feet="115" addons="0"/> <voices> <voice text="Increase your knowledge of spells here, young paladin." interval2="100" margin="1" yell="no"/> </voices> <parameters> <parameter key="module_shop" value="1" /> <parameter key="shop_buyable" value="arrow,2544,3;bolt,2543,4;bow,2456,400;crossbow,2455,500;spear,2389,10;royal spear,7378,15;throwing star,2399,42;earth arrow,7850,5;flaming arrow,7840,5;flash arrow,7838,5;onyx arrow,7365,7;piercing bolt,7363,5;power bolt,2547,7;shiver arrow,7839,5;sniper arrow,7364,5;" /> <parameter key="shop_sellable" value="bow,2456,100;crossbow,2455,120" /> <parameter key="message_greet" value="Ashari |PLAYERNAME|. If you're a distance fighter, you might want to have a look at my wares and spells."/> <parameter key="message_farewell" value="Asha Thrazi, |PLAYERNAME|."/> <parameter key="message_walkaway" value="Asha Thrazi, |PLAYERNAME|." /> <parameter key="message_sendtrade" value="Of course, just browse through my wares." /> </parameters> </npc>
  8. Fala galera , Eu to com um problema no shop do meu site , é assim , eu vi varios tutoriais , falando das gifts e tals , eu fiz tudo certo , mas na hora q eu clico pra entra no shop no meu site , ele nao faz nada , ele só redireciona para a pagina inicial do site , oq pode ser isso ??? ja tentei de tudo q eu conheço , mas nao consigo arruma esse erro , REP+++
  9. Estou com o seguinte problema: - Eu compro algum item no SHOP do Gesior e não recebo no meu char. Informações: Servidor: TFS 1.0 versão 10.37 Site: Gesior 2015 1.0 do Victor Raful > LINK Encontrei uma possível solução em um tópico do TibiaKing: - Adicionar um script SHOP no GlobalEvents. Fiz, isso, e obtive o seguinte erro no Distro: O script que eu adicionei foi: (globalevents/scripts/shop.lua) -- ### 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 E no globalevents.xml : <globalevent name="shop" interval="30" script="shop.lua"/> ALGUÉM PODE ME AJUDAR?
  10. Salve Galera! Enquanto aprendia a configurar um Shop System a seguinte pergunta passou pela minha cabeça: Quais itens são bons para um Shop de Otserver? E por bons itens me refiro a coisas de conveniência mesmo. Coisas para aumentar o inventário (Zaoan Chess Box, por exemplo), Outfits e Mounts de uma maneira facilitada (pra quem não tem paciência de dropar milhões de itens) ou até mesmo itens decorativos (Blood Herbs). Nada de falar items editados ATK: 99999999 ML+18kk Bonus todos elementos +5000% Imagem anexada só pra ilustrar mesmo
  11. Galera,estou com um problema que estou a horas tentando arrumar mais não acho o erro,sou novo nessa parte do xampp,então vim aki pedir ajuda pra vcs. Meu poketibia tem no site a opção "shop" porém quando clico nele,volta pra pagina inicial.(OBS:estou usando website igual do pokepro) Modern acc a pasta do shop se encontra em htdocs>gifts>gifts.php <script type="text/javascript"> $(function() { $("#accordion").accordion({ autoHeight: false, navigation: true }); }); </script> <div style='position:absolute; float:left; margin-top:-65px; margin-left:520px;'> <font face="Cambria" size="5" color="#FFCC33"><b>SHOP</b></font></div> Deseja Adquirir Pontos para poder usufluir de nosso shop <div style='position:absolute; float:left; margin-top:-30px; margin-left:380px;'> <a href="#"> <img src='http://img818.imageshack.us/img818/803/bz5.png'/></a></div> <?PHP //Product Types //Categories : // //[ 1 - Account Modifications ] //1 - Premium //2 - Remove Skull (ANY) //3 - UnBan Account //4 - Change Name // //[ 2 - Items ] //5 - Items // //[ 3 - Container Fully of Items ] //6 - Bag of Items //7 - Backpack of Items // //[ 4 - Addons Items ] //8 - Addon Items // //HOWTO PUT IMAGES FOR TYPES 1-4 [ Account Modifications ] //Go to public/images/ folder and create a GIF image (Or put) //With the ID of the type [See at the top of the script] //Ex. Type (1) - Premium Account (public/images/1.gif) //Variables require("config.php"); include("config/functions.php"); require("config/config.php"); $this->load->helper("url"); $ots = POT::getInstance(); $ots->connect(POT::DB_MYSQL, connection()); $SQL = $ots->getDBHandle(); $SHOP = new shop; $ide = new IDE; $action = $this->uri->segment(4); $categories = array( 2 => '<font color="black">Shop</font>'); if ($SHOP->isInstalled()) { if ($action == '') { echo '<br><br>'; if($ide->isAdmin()) { echo "<div class='toolbar' align='center'>"; echo "<a href='".WEBSITE."/index.php/p/v/gifts/admin'>Shop Admin Panel</a>"; echo "</div>"; } echo '<div id="accordion">'; $i = 0; foreach($categories as $key=>$value) { echo '<h3><a href="#">'.$categories[$key].'</a></h3> <div>'; if($SQL->query('SELECT * FROM shop_offer WHERE category = '.$key.'')->fetch()) { echo '<table border="0" cellspacing="0" cellpadding="3" width="100%"> <tr> <td width="8%" class="black" style="text-align: center; font-weight: bold;">Picture</td> <td width="70%" class="black" style="text-align: center; font-weight: bold;">Product</td> <td width="3%" class="black" style="text-align: center; font-weight: bold;">Points</td> <td width="20%" class="black" style="text-align: center; font-weight: bold;">Action</td> </tr>'; foreach($SQL->query('SELECT * FROM shop_offer WHERE category = '.$key.'') as $item) { if (is_int($i / 2)) $bgcolor = "#ececec"; else $bgcolor = "#ffffff"; $i++; echo '<tr class="highlight" bgcolor="'.$bgcolor.'" style="text-align: center;"> <td>'; if($item['category'] == '1') $image = 'public/images/items/'.$item['type'].'.png'; else $image = 'public/images/items/'.$item['item'].'.png'; if(!file_exists($image)) echo 'NO IMAGE'; else echo '<img height="32px" width="32px" src="'.WEBSITE.'/'.$image.'"/>'; echo '</td> <td><b>'.$item['name'].'</b><br>'.$item['description'].'</td> <td>'.$item['points'].'</td> <td><button type="submit" onClick="window.location.href=\''.WEBSITE.'/index.php/p/v/gifts/buy/'.$item['id'].'\';" class="ide_button">Buy Product</button></td> </tr>'; } echo '</table></div>'; } else { alert("This category doesn't have products."); echo '</div>'; } } echo '</div>'; echo '<br><center><font style="color: #4F82CB; font-weight: bold; font-size: 12px">You have: <font color="#4EBF37">'.$SHOP->points($_SESSION['name']).'</font> premium points.</font></center>'; } elseif ($action == 'buy') { $product = $this->uri->segment(5); $productact = $this->uri->segment(6); if (!$product) { alert("You didn't have selected a product."); echo '<div align="right"><a href="'.WEBSITE.'/index.php/p/v/gifts">Go Back to Gift Shop</a></div>'; } else { echo '<div style="text-align: center; font-size: 15px; color: #4F82CB; font-weight: bold;">' . $config['server_name'] . '\'s Donator Shop</div><br><br>'; if($SQL->query('SELECT * FROM shop_offer WHERE id = '.$product.'')->fetch()) { $info = $SQL->query('SELECT * FROM shop_offer WHERE id = '.$product.'')->fetch(); if($productact == '' || !$productact) { if ($SHOP->points($_SESSION['name']) < $info['points']) { echo 'You don\'t have enough points to buy this product (<b>'.$info['points'].'</b>)'; } else { echo '<div id="accordion">'; echo '<h3><a href="#"><font color="black">Product Selected</font></a></h3> <div>'; echo '<table border="0" cellspacing="1" cellpadding="4" width="100%"> <tr> <td width="25%" class="black" style="text-align: center; font-weight: bold;">Picture</td> <td width="50%" class="black" style="text-align: center; font-weight: bold;">Product</td> <td width="25%" class="black" style="text-align: center; font-weight: bold;">Points</td> </tr>'; echo '<tr class="highlight" style="text-align: center"> <td>'; if($info['category'] == '1') $image = 'public/images/items/'.$info['type'].'.png'; else $image = 'public/images/items/'.$info['item'].'.png'; if(!file_exists($image)) echo 'NO IMAGE'; else echo '<img height="32px" width="32px" src="'.WEBSITE.'/'.$image.'"/>'; echo '</td> <td><b>'.$info['name'].'</b><br>'.$info['description'].'</td> <td>'.$info['points'].'</td> </tr>'; echo '</table></div> <h3><a href="#"><font color="black">Player Selection</font></a></h3> <div> <center><table border="0" cellspacing="7" cellpadding="4" width="50%"> <tr> <td><form method="post" action="'.WEBSITE.'/index.php/p/v/gifts/buy/'.$info['id'].'/send">'; if($info['type'] == '4') echo 'Character to Change Name:'; else echo 'Give item to player:'; echo '</td> <td><select name="my_char">'; foreach($SHOP->CharacterList($_SESSION['name']) as $row) echo '<option>'.$row['name'].'</option>'; echo '</select></td> </tr> <tr> <td>'; if($info['type'] == '4') echo 'New Name:'; else echo 'Or another player:'; echo '</td> <td><input type="text" name="other_char" size="10"/></td> </tr> <tr> <td></td> <td><button type="submit" name="submit" value="true" class="ide_button">Buy Product</td> </tr></table></center></div></div>'; echo '<div align="right"><a href="'.WEBSITE.'/index.php/p/v/gifts/">Go Back to Gift Shop</a></div>'; } } elseif ($productact == 'send') { if(!$_POST['submit']) header("Location: ".WEBSITE."/index.php/p/v/gifts"); else { if($info['type'] != '4') { if($_POST['other_char']) { if($SQL->query('SELECT * FROM players WHERE name = "'.$_POST['other_char'].'"')->fetch()) { $destination = $_POST['other_char']; $send = true; } else { alert('<b>'.$_POST['other_char'].'</b> doesn\'t exists.'); echo '<div align="right"><a href="'.WEBSITE.'/index.php/p/v/gifts/buy/'.$info['id'].'">Go Back to Gift Shop</a></div>'; $send = false; } } else { $destination = $_POST['my_char']; $send = true; } } else { $destination = $_POST['my_char']; $send = true; } if($send == true) { $errors = ''; $processed = 0; if ($info['type'] == '1') { $processed = 1; $finish = true; $SHOP->AddPremium($destination,$info['count']); } elseif ($info['type'] == '2') { $skulltime = $SQL->query('SELECT skull,skulltime FROM players WHERE name = "'.$destination.'"')->fetch(); if ($SHOP->isOnline($destination) == 1) { $errors .= 'Sorry, but <b>'.$destination.'</b> is On-Line right now.<br>'; $finish = false; } elseif ($skulltime['skull'] == '0' && $skulltime['skulltime'] == '0') { $errors .= 'Sorry, but <b>'.$destination.'</b> doesn\'t have any skull.<br>'; $finish = false; } else { $processed = 1; $finish = true; $SQL->query('UPDATE players SET skull = 0, skulltime = 0 WHERE name = "'.$destination.'"'); } } elseif ($info['type'] == '3') { if ($SHOP->isOnline($destination) == 1) { $errors .= 'Sorry, but <b>'.$destination.'</b> is On-Line right now.<br>'; $finish = false; } else { if ($SHOP->isBanned($destination)->fetch()) { $processed = 1; $finish = true; $SHOP->UnBan($destination); } else { $errors .= 'Sorry, but <b>'.$destination.'</b>\'s Account isn\'t banned at the moment.<br>'; $finish = false; } } } elseif ($info['type'] == '4') { if ($SHOP->isOnline($destination) == 1) { $errors .= 'Sorry, but <b>'.$destination.'</b> is On-Line right now.<br>'; $finish = false; } else { if ($SQL->query('SELECT * FROM players WHERE name = "'.$_POST['other_char'].'"')->fetch()) { $finish = false; $errors .= 'Sorry, but <b>'.$_POST['other_char'].'</b> already exists.<br>'; } else { if(!$_POST['other_char']) { $finish = false; $errors .= 'Sorry, but you didn\'t put a new name for your character.<br>'; } else { if (!preg_match('/[^A-Za-z]/', $_POST['other_char'])) { $processed = 1; $finish = true; $SQL->query('UPDATE players SET name = "'.$_POST['other_char'].'" WHERE name = "'.$destination.'"'); } else { $finish = false; $errors .= 'Sorry, but <b>'.$_POST['other_char'].'</b> contains invalid characters (Use only: A-Z, a-z).<br>'; } } } } } else { $finish = true; } if ($finish == true) { if ($SHOP->points($_SESSION['name']) < $info['points']) { alert('You don\'t have enough points to buy this product (<strong>'.$info['points'].'</strong>)'); echo '<div align="right"><a href="'.WEBSITE.'/index.php/p/v/gifts/buy/'.$info['id'].'">Go Back to Gift Shop</a></div>'; } else { echo '<div style="text-align: center; font-size: 15px; color: #4EBF37; font-weight: bold;">Transaction Succesfull</div><br>'; if($info['type'] == '4') echo '<center>You have changed the name of <b>'.$destination.'</b> to <b>'.$_POST['other_char'].'</b>.</center>'; elseif($info['type'] == '3') echo '<center>You have UnBanned <b>'.$destination.'</b>\'s Account.</center>'; else echo '<center>You have bought <b>'.$info['name'].'</b> and gave to <b>'.$destination.'</b>.</center>'; echo '<div align="right"><a href="'.WEBSITE.'/index.php/p/v/gifts">Go Back to Gift Shop</a></div>'; $SQL->query('UPDATE accounts SET premium_points = '.($SHOP->points($_SESSION['name']) - $info['points']).' WHERE name = "'.$_SESSION['name'].'"'); $SQL->query('INSERT INTO shop_history (`id`, `product`, `session`, `player`, `date`, `processed`) VALUES (NULL, \''.$info['id'].'\',\''.$_SESSION['name'].'\', \''.$destination.'\', \''.time().'\',\''.$processed.'\')');; } } else { alert($errors); echo '<div align="right"><a href="'.WEBSITE.'/index.php/p/v/gifts/buy/'.$info['id'].'">Go Back to Gift Shop</a></div>'; } } } } } else { header("Location: ".WEBSITE."/index.php/p/v/gifts"); } echo '<br><center><font style="color: #4F82CB; font-weight: bold; font-size: 12px">You have: <font color="#4EBF37">'.$SHOP->points($_SESSION['name']).'</font> premium points.</font></center>'; } } elseif ($action == 'history') { if ($SQL->query('SELECT * FROM shop_history WHERE session = "'.$_SESSION['name'].'" ORDER BY date DESC LIMIT 30')->fetch()) { echo '<div style="text-align: center; font-weight: bold;">Latest 30 Transactions</div> <table border="0" cellspacing="1" cellpadding="4" width="100%"> <tr> <td class="white" style="text-align: center; font-weight: bold;">Picture</td> <td class="white" style="text-align: center; font-weight: bold;">Product</td> <td class="white" style="text-align: center; font-weight: bold;">To</td> <td class="white" style="text-align: center; font-weight: bold;">Date</td> <td class="white" style="text-align: center; font-weight: bold;">Processed</td> </tr>'; foreach($SQL->query('SELECT `z`.`player` AS `destination`, `z`.`date` AS `date`, `z`.`processed` AS `processed`, `o`.`category` AS `category`,`o`.`type` AS `type`,`o`.`item` AS `item`,`o`.`name` AS `name` FROM `shop_history` z LEFT JOIN `shop_offer` o ON `z`.`product` = `o`.`id` WHERE `z`.`session` = \''.$_SESSION['name'].'\' ORDER BY `z`.`date` DESC LIMIT 30') as $hist) { echo '<tr class="highlight" style="text-align: center"><td>'; if($hist['category'] == '1') $image = 'public/images/items/'.$hist['type'].'.png'; else $image = 'public/images/items/'.$hist['item'].'.png'; if(!file_exists($image)) echo 'NO IMAGE'; else echo '<img height="32px" width="32px" src="'.WEBSITE.'/'.$image.'"/>'; echo '</td> <td>'.$hist['name'].'</td> <td>'.$hist['destination'].'</td> <td>'.date("d-m-Y - H:i a", $hist["date"]).'</td>'; if ($hist['processed'] == '1') echo '<td><img src="'.WEBSITE.'/public/images/true.gif"/></td>'; else echo '<td><img src="'.WEBSITE.'/public/images/false.gif"/></td>'; echo '</tr>'; } echo '</table>'; } else { alert('You didn\'t made any transactions'); } } elseif ($action == 'donate') { $show = $this->uri->segment(5); if ($show == 'history') { if ($SQL->query('SELECT * FROM shop_donation_history WHERE buyer = "'.$_SESSION['name'].'" ORDER BY date DESC LIMIT 30')->fetch()) { echo '<div style="text-align: center; font-weight: bold;">Latest 30 Donations</div> <table border="0" cellspacing="1" cellpadding="4" width="100%"> <tr> <td class="white" style="text-align: center; font-weight: bold;">Method</td> <td class="white" style="text-align: center; font-weight: bold;">ID/Mail</td> <td class="white" style="text-align: center; font-weight: bold;">To Account</td> <td class="white" style="text-align: center; font-weight: bold;">Points Added</td> <td class="white" style="text-align: center; font-weight: bold;">Date</td> </tr>'; foreach($SQL->query('SELECT * FROM shop_donation_history WHERE buyer = "'.$_SESSION['name'].'" ORDER BY date DESC LIMIT 30') as $hist) { echo '<tr class="highlight" style="text-align: center"> <td>'; echo ($hist['method'] == 'PayPal')?'<img src="https:// /en_US/i/logo/paypal_logo.gif" height="50px" width="100px">':($hist['method'] == 'ContenidoPago')?'<img src="http://www.contenidopago.com/img/logo_ft.jpg" height="50px" width="100px">':''; echo '</td> <td>'.$hist['receiver'].'</td> <td>'.$hist['account'].'</td> <td>'.$hist['points'].'</td> <td>'.date("d-m-Y - H:i a", $hist["date"]).'</td> </tr>'; } echo '</table>'; } else { alert('You didn\'t donated'); } } elseif (!$show || $show == '') { alert("".$config['server_name']."'s Administration <b>is not responsible</b> for <b>cases of loss of products</b>.<br><br> ".$config['server_name']."'s Administration <b>is responsible</b> for <b>cases of loss of points which have been sent to users</b>."); echo '<div id="accordion">'; foreach ($config['donations']['methods'] as $method => $active) { if ($active == true) { echo '<h3><a href="#">'.$method.'</a></h3> <div>'; if ($method == 'ContenidoPago') { alert("This brand new system consists on <b>donations by SMS</b>.<br> After donating you will receive <b>".$config['donations']['contenidopago']['Points']." Points</b>.<br><br> <b>REMEMBER:</b><br> You need to have <b>enough credit</b> to send <u>SMS</u>.<br><br> You <b>MUST</b> fill the <b>Account Name</b> and the <b>Code Received</b> fields with <u>a valid account name</u> and <u>a valid code</u>."); if(!isset($_POST['mysubmit'])) { echo '<form method="post" action="" > <fieldset style="border:0px solid #990000; width:450px; margin:auto;"> <legend style="font-weight:bold;font-size:12px;">Automatic SMS Donation</legend> <ol style="list-style:none;"> <li style="padding-bottom:5px;"><label style="width:100px;float:left;text-align:left;">Account Name:</label><input type="text" style="border:0px solid #CCCCCC;" size="30" name="name" /></li> <li style="padding-bottom:5px;"><label style="width:100px;float:left;text-align:left;">Code received:</label><input type="text" style="border:0px solid #CCCCCC;" size="30" name="codigo" /></li> </ol> <center><input type="submit" name="mysubmit" style="padding:3px;margin-bottom:10px;color:#FFFFFF;background-color:#990000;border:0px solid #000000;" value="Enviar" /></center> </fieldset> </form>'; } else { $codigo=$_POST['codigo']; $name=$_POST['name']; $QueryString = "LinkUrl=http://".urlencode($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); $QueryString .= "&codigo=" .urlencode($codigo); $QueryString .= "&idservicio=" .$config['donations']['contenidopago']['Product']; if(intval(get_cfg_var('allow_url_fopen')) && function_exists('file_get_contents')) { $result=@file_get_contents("http://contenidopago.com/codigoval.php?".$QueryString); } elseif(intval(get_cfg_var('allow_url_fopen')) && function_exists('file')) { if($content = @file("http://contenidopago.com/codigoval.php?".$QueryString)) $result=@join('', $content); } elseif(function_exists('curl_init')) { $ch = curl_init ("http://contenidopago.com/codigoval.php?".$QueryString); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_exec ($ch); if(curl_error($ch)) alert("Error processing request"); curl_close ($ch); } else { alert("It appears that your web host has disabled all functions for handling remote pages and as a result the BackLinks software will not function on your web page. Please contact your web host for more information."); } if ($result =='ok') { if(!(empty($name))) { if(!$SQL->query("SELECT * FROM accounts WHERE name = '".$name."'")->fetch()) { alert('This username does not exist: <font color="blue">'.$name.'</font>'); } else { $SQL->query("UPDATE accounts SET premium_points = premium_points + ".$config['donations']['contenidopago']['Points']." WHERE name = '".$name."'"); alert("Codigo : $codigo validado, puntos sumados correctamente"); $SQL->query("INSERT INTO shop_donation_history (`id`, `method`, `receiver`, `buyer`, `account`, `points`, `date`) VALUES (NULL, 'ContenidoPago', '".$config['donations']['contenidopago']['Product']."', '".$_SESSION['name']."', '".$name."', '".$config['donations']['contenidopago']['Points']."', '".time()."');"); } } else { alert('You did not set the user!'); } } if ($result =='no') { alert('El codigo no es valido o ya esta usado'); } } echo '<center><iframe src ="http://www.contenidopago.com/prom/microcodigo.php" width="270px" height="340px" frameborder="0"> <p>Your browser does not support iframes.</p> </iframe></center>'; } elseif ($method == 'PayPal') { echo ' <input type="image" src="https://www.paypal.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif" width="250px" border="0" alt="PayPal - The safer, easier way to pay online."><br><br>'; alert("The donation costs <b>".$config['donations']['paypal']['Amount']." ".$config['donations']['paypal']['Money']." (incl. VAT)</b>.<br> After the donation you will receive a total of <b>".$config['donations']['paypal']['Points']." points</b> automatically.<br><br> <b>REMEMBER:</b><br> You need a <u>creditcard</u> <b>or</b> a <u>PayPal account</u> with a minimun of <b>".$config['donations']['paypal']['Amount']." ".$config['donations']['paypal']['Money']."</b>.<br><br> You <b>MUST</b> fill the <b>Account Name</b> with a <u>valid one</u>."); echo ' <b><font color="blue"> <center><b>10 premium points = 7.00 EUR.</b> <center><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_donations"> <input type="hidden" name="business" value="'.$config['donations']['paypal']['Mail'].'"> <input type="hidden" name="lc" value="GB"> <input type="hidden" name="item_name" value="'.$config['donations']['paypal']['Product'].'"> <b>Account Name:</b> <input type="text" name="custom" value=""> <input type="hidden" name="item_number" value="1"> <input type="hidden" name="amount" value="'.$config['donations']['paypal']['Amount'].'"> <input type="hidden" name="currency_code" value="'.$config['donations']['paypal']['Money'].'"> <input type="hidden" name="no_note" value="0"> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="notify_url" value="'.WEBSITE.'/p/v/paypal"> <input type="hidden" name="return" value="'.WEBSITE.'"> <input type="hidden" name="rm" value="0"> <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG_global.gif:NonHosted"> <td><button type="submit" name="submit" value="add" <button class="ide_button"><font color="black">Buy Points</font></button></td> </form></center><br><br><br><br>'; echo ' <center><b>25 premium points = 12.00 EUR.</b></center> <center><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_donations"> <input type="hidden" name="business" value="'.$config1['donations']['paypal']['Mail'].'"> <input type="hidden" name="lc" value="GB"> <input type="hidden" name="item_name" value="'.$config1['donations']['paypal']['Product'].'"> <b>Account Name:</b> <input type="text" name="custom" value=""> <input type="hidden" name="item_number" value="1"> <input type="hidden" name="amount" value="'.$config1['donations']['paypal']['Amount'].'"> <input type="hidden" name="currency_code" value="'.$config1['donations']['paypal']['Money'].'"> <input type="hidden" name="no_note" value="0"> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="notify_url" value="'.WEBSITE.'/p/v/paypal"> <input type="hidden" name="return" value="'.WEBSITE.'"> <input type="hidden" name="rm" value="0"> <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG_global.gif:NonHosted"> <td><button type="submit" name="submit" value="add" <button class="ide_button"><font color="black">Buy Points</font></button></td> </form></center><br><br><br><br>'; echo ' <center><b>33 premium points = 16.00 EUR.</b></center> <center><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_donations"> <input type="hidden" name="business" value="'.$config2['donations']['paypal']['Mail'].'"> <input type="hidden" name="lc" value="GB"> <input type="hidden" name="item_name" value="'.$config2['donations']['paypal']['Product'].'"> <b>Account Name:</b> <input type="text" name="custom" value=""> <input type="hidden" name="item_number" value="1"> <input type="hidden" name="amount" value="'.$config2['donations']['paypal']['Amount'].'"> <input type="hidden" name="currency_code" value="'.$config2['donations']['paypal']['Money'].'"> <input type="hidden" name="no_note" value="0"> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="notify_url" value="'.WEBSITE.'/p/v/paypal"> <input type="hidden" name="return" value="'.WEBSITE.'"> <input type="hidden" name="rm" value="0"> <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG_global.gif:NonHosted"> <td><button type="submit" name="submit" value="add" <button class="ide_button"><font color="black">Buy Points</font></button></td> </form></center><br><br><br><br>'; echo ' <center><b>55 premium points = 25.00 EUR.</b></center> <center><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_donations"> <input type="hidden" name="business" value="'.$config3['donations']['paypal']['Mail'].'"> <input type="hidden" name="lc" value="GB"> <input type="hidden" name="item_name" value="'.$config3['donations']['paypal']['Product'].'"> <b>Account Name:</b> <input type="text" name="custom" value=""> <input type="hidden" name="item_number" value="1"> <input type="hidden" name="amount" value="'.$config3['donations']['paypal']['Amount'].'"> <input type="hidden" name="currency_code" value="'.$config3['donations']['paypal']['Money'].'"> <input type="hidden" name="no_note" value="0"> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="notify_url" value="'.WEBSITE.'/p/v/paypal"> <input type="hidden" name="return" value="'.WEBSITE.'"> <input type="hidden" name="rm" value="0"> <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG_global.gif:NonHosted"> <td><button type="submit" name="submit" value="add" <button class="ide_button"><font color="black">Buy Points</font></button></td> </form></center><br><br><br><br>'; echo ' <center><b>80 premium points = 35.00 EUR.</b></center> <center><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_donations"> <input type="hidden" name="business" value="'.$config4['donations']['paypal']['Mail'].'"> <input type="hidden" name="lc" value="GB"> <input type="hidden" name="item_name" value="'.$config4['donations']['paypal']['Product'].'"> <b>Account Name:</b> <input type="text" name="custom" value=""> <input type="hidden" name="item_number" value="1"> <input type="hidden" name="amount" value="'.$config4['donations']['paypal']['Amount'].'"> <input type="hidden" name="currency_code" value="'.$config4['donations']['paypal']['Money'].'"> <input type="hidden" name="no_note" value="0"> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="notify_url" value="'.WEBSITE.'/p/v/paypal"> <input type="hidden" name="return" value="'.WEBSITE.'"> <input type="hidden" name="rm" value="0"> <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG_global.gif:NonHosted"> <td><button type="submit" name="submit" value="add" <button class="ide_button"><font color="black">Buy Points</font></button></td> </b></font> </form></center>'; } echo '</div>'; } } echo '</div>'; } else { header("Location: ".WEBSITE."/index.php/p/v/gifts/donate"); } } elseif ($action == 'admin') { if($ide->isAdmin()) { $manage = $this->uri->segment(5); echo "<div class='toolbar' align='center'>"; echo "<a href='".WEBSITE."/index.php/p/v/gifts/admin/add/1'>Add new Product</a> | "; echo "<a href='".WEBSITE."/index.php/p/v/gifts/admin/delete'>Delete Existing Product</a> | "; echo "<a href='".WEBSITE."/index.php/p/v/gifts/admin/points'>Add/Remove Points to Player</a>"; echo "</div>"; if ($manage == '' || !$manage) { echo '<center>Welcome to Shop Admin Panel</center>'; } elseif ($manage == 'add') { $types[1] = array(1 => 'Premium Account', 2 => 'Remove Skull', 3 => 'UnBan Account', 4 => 'Change Name'); $types[2] = array(5 => 'Item'); $types[3] = array(5 => 'Item'); $types[4] = array(5 => 'Item'); $types[5] = array(5 => 'Item'); $types[6] = array(5 => 'Item'); $types[9] = array(8 => 'Addon Items'); $types[10] = array(6 => 'Bag with Items', 7 => 'Backpack with Items'); $step = $this->uri->segment(6); if ($step == '1') { echo '<form method="post" action="'.WEBSITE.'/index.php/p/v/gifts/admin/add/2">Select Category: <select name="category">'; foreach($categories as $key=>$value) { echo '<option value="'.$key.'">'.$categories[$key].'</option>'; } echo '</select> <button type="submit" class="ide_button">Select Category</form>'; } elseif ($step == '2' && $_POST['category']) { echo '<form method="post" action="'.WEBSITE.'/index.php/p/v/gifts/admin/add/3"> <input type="hidden" name="category" value="'.$_POST['category'].'"/> Select Type: <select name="type">'; foreach($types[$_POST['category']] as $key=>$value) { echo '<option value="'.$key.'">'.$types[$_POST['category']][$key].'</option>'; } echo '</select> <button type="submit" class="ide_button">Select Type</form>'; } elseif ($step == '3' && $_POST['category'] && $_POST['type']) { echo '<form method="post" action="'.WEBSITE.'/index.php/p/v/gifts/admin/add/4"> <input type="hidden" name="category" value="'.$_POST['category'].'"/> <input type="hidden" name="type" value="'.$_POST['type'].'"/> <table border="0" cellspacing="1" cellpadding="4" width="100%"> <tr> <td width="25%">Product Name:</td> <td width="25%"><input name="name" type="text" size="18" maxlength="256" /></td> <td width="50%" style="font-size: 9px; color: red; font-weight: bold;">The name of the product</td> </tr> <tr> <td width="25%">Point Cost:</td> <td width="25%"><input name="points" type="text" value="0" size="10" maxlength="11" /></td> <td width="50%" style="font-size: 9px; color: red; font-weight: bold;">Cost of the Product (Points)</td> </tr>'; if ($_POST['type'] == '1') { echo '<tr> <td width="25%">Premium Days:</td> <td width="25%"><input name="count" type="text" value="0" size="1" maxlength="3" /></td> <td width="50%" style="font-size: 9px; color: red; font-weight: bold;">Days of Premium Account</td> </tr>'; } elseif ($_POST['type'] == '5' || $_POST['type'] == '6' || $_POST['type'] == '7' || $_POST['type'] == '8') { echo '<tr> <td width="25%">Item ID:</td> <td width="25%"><input name="item" type="text" value="0" size="3" maxlength="5" /></td> <td width="50%" style="font-size: 9px; color: red; font-weight: bold;">ID of item to give</td> </tr> <tr> <td width="25%">Count:</td> <td width="25%"><input name="count" type="text" value="0" size="1" maxlength="3" /></td> <td width="50%" style="font-size: 9px; color: red; font-weight: bold;">Count of item (max. 100) (When selecting \'Backpack of Items\' or \'Bag of Items\' type, the ITEM with that count will fill the container!)</td> </tr>'; } echo '<tr> <td width="25%">Product Description:</td> <td width="25%"><textarea style="width: 120px; height: 80px;" name="description"></textarea></td> <td width="50%" style="font-size: 9px; color: red; font-weight: bold;">Description (Shown of \'Gifts\' Page)</td> </tr> </table> <br><center><button type="submit" name="done" value="true" class="ide_button">Add Product</form></center>'; } elseif ($step == '4' && $_POST['done'] == 'true') { $errors = ''; if ($_POST['points'] || $_POST['item'] || $_POST['count']) { if($_POST['points']) { if (!(!preg_match('/[^0-9]/', $_POST['points']))) $errors .= '1'; } elseif($_POST['item']) { if (!(!preg_match('/[^0-9]/', $_POST['item']))) $errors .= '2'; } elseif($_POST['count']) { if (!(!preg_match('/[^0-9]/', $_POST['count']))) $errors .= '3'; } } if ($errors == '') { echo '<div style="text-align: center; font-size: 15px; color: #4EBF37; font-weight: bold;">Product Added!</div><br> <table border="0" cellspacing="1" cellpadding="4" width="100%"> <tr class="highlight"> <td style="font-weight: bold;" width="50%">Product Name:</td> <td width="50%">'.$_POST['name'].'</td> </tr> <tr class="highlight"> <td style="font-weight: bold;" width="50%">Category:</td> <td width="50%">'.$categories[$_POST['category']].'</td> </tr> <tr class="highlight"> <td style="font-weight: bold;" width="50%">Type:</td> <td width="50%">'.$types[$_POST['category']][$_POST['type']].'</td> </tr> <tr class="highlight"> <td style="font-weight: bold;" width="50%">Point Cost:</td> <td width="50%">'.$_POST['points'].'</td> </tr>'; if($_POST['type'] == '1') { echo '<tr class="highlight"><td style="font-weight: bold;" width="50%">Premium Days:</td> <td width="50%">'.$_POST['count'].'</td> </tr>'; } elseif ($_POST['type'] == '5' || $_POST['type'] == '6' || $_POST['type'] == '7' || $_POST['type'] == '8') { echo '<tr class="highlight"><td style="font-weight: bold;" width="50%">Item ID:</td> <td width="50%">'.$_POST['item'].'</td> </tr> <tr class="highlight"><td style="font-weight: bold;" width="50%">Count:</td> <td width="50%">'.$_POST['count'].'</td> </tr>'; } echo '<tr class="highlight"><td style="font-weight: bold;" width="50%">Description:</td> <td width="50%">'.$_POST['description'].'</td> </tr></table>'; $PostItem = (!isset($_POST['item']))?'0':$_POST['item']; $PostCount = (!isset($_POST['count']))?'0':$_POST['count']; $SQL->query("INSERT INTO shop_offer (`id`, `points`, `category`, `type`, `item`, `count`, `description`, `name`) VALUES (NULL, '".$_POST['points']."', '".$_POST['category']."', '".$_POST['type']."', '".$PostItem."', '".$PostCount."', '".$_POST['description']."', '".$_POST['name']."')"); echo '<div align="right"><a href="'.WEBSITE.'/index.php/p/v/gifts/admin">Go Back to Shop Admin</a></div>'; } else { alert('Sorry but 1 or more spaces contains invalid characters.'); echo '<div align="right"><a href="'.WEBSITE.'/index.php/p/v/gifts/admin">Go Back to Shop Admin</a></div>'; } } else { header("Location: ".WEBSITE."/index.php/p/v/gifts/admin/add/1"); } } elseif ($manage == 'delete') { $product = $this->uri->segment(6); if (!$product) { echo '<div id="accordion">'; $i = 0; foreach($categories as $key=>$value) { echo '<h3><a href="#">'.$categories[$key].'</a></h3> <div>'; if($SQL->query('SELECT * FROM shop_offer WHERE category = '.$key.'')->fetch()) { echo '<table border="0" cellspacing="1" cellpadding="4" width="100%"> <tr> <td width="20%" class="white" style="text-align: center; font-weight: bold;">Picture</td> <td width="40%" class="white" style="text-align: center; font-weight: bold;">Product</td> <td width="20%" class="white" style="text-align: center; font-weight: bold;">Points</td> <td width="20%" class="white" style="text-align: center; font-weight: bold;">Action</td> </tr>'; foreach($SQL->query('SELECT * FROM shop_offer WHERE category = '.$key.'') as $item) { if (is_int($i / 2)) $bgcolor = "#ececec"; else $bgcolor = "#ffffff"; $i++; echo '<tr class="highlight" bgcolor="'.$bgcolor.'" style="text-align: center;"> <td>'; if($item['category'] == '1') $image = 'public/images/items/'.$item['type'].'.png'; else $image = 'public/images/items/'.$item['item'].'.png'; if(!file_exists($image)) echo 'NO IMAGE'; else echo '<img height="32px" width="32px" src="'.WEBSITE.'/'.$image.'"/>'; echo '</td> <td><b>'.$item['name'].'</b><br>'.$item['description'].'</td> <td>'.$item['points'].'</td> <td><button type="submit" onClick="window.location.href=\''.WEBSITE.'/index.php/p/v/gifts/admin/delete/'.$item['id'].'\';" class="ide_button">Delete Offer</button></td> </tr>'; } echo '</table></div>'; } else { alert("This category doesn't have products."); echo '</div>'; } } echo '</div>'; } else { if($SQL->query('SELECT * FROM shop_offer WHERE id = '.$product.'')->fetch()) { $SQL->query('DELETE FROM shop_offer WHERE id = '.$product.''); $SQL->query('DELETE FROM shop_history WHERE product = '.$product.''); echo '<div style="text-align: center; font-size: 15px; color: #4EBF37; font-weight: bold;">Product Deleted!</div><br> <center>The product ID <b>'.$product.'</b> has been deleted from DataBase.</center>'; echo '<div align="right"><a href="'.WEBSITE.'/index.php/p/v/gifts/admin">Go Back to Shop Admin</a></div>'; } else { header("Location: ".WEBSITE."/index.php/p/v/gifts/admin/delete"); } } } elseif ($manage == 'points') { if (!isset($_POST['submit'])) { echo '<div id="accordion"> <h3><a href="#">Add Points</a></h3> <div> <table border="0" cellspacing="1" cellpadding="4" width="100%"> <tr> <form method="post" action="'.$_SERVER['PHP_SELF'].'"> <td>Select Player:</td> <td><select name="player">'; foreach($SQL->query('SELECT * FROM players ORDER BY name DESC') as $player) { echo '<option value="'.$player['id'].'">'.$player['name'].'</option>'; } echo '</select></td> </tr><tr> <td>Or Type a Name:</td> <td><input type="text" name="other_char" size="10"/></td> </tr><tr> <td>Points to Add:</td> <td><input type="text" name="points" size="10"/></td> </tr><tr> <td></td> <td><button type="submit" name="submit" value="add" button class="ide_button">Add Points</button></td> </tr> </table></form> </div> <h3><a href="#">Remove Points</a></h3> <div> <table border="0" cellspacing="1" cellpadding="4" width="100%"> <tr> <form method="post" action="'.$_SERVER['PHP_SELF'].'"> <td>Select Player:</td> <td><select name="player">'; foreach($SQL->query('SELECT * FROM players ORDER BY name DESC') as $player) { echo '<option value="'.$player['id'].'">'.$player['name'].'</option>'; } echo '</select></td> </tr><tr> <td>Or Type a Name:</td> <td><input type="text" name="other_char" size="10"/></td> </tr><tr> <td>Points to Remove:</td> <td><input type="text" name="points" size="10"/></td> </tr><tr> <td></td> <td><button type="submit" name="submit" value="remove" class="ide_button"><button class="ide_button">Remove Points</button></td> </tr> </table></form> </div> </div>'; } else { $errors = ""; if(!isset($_POST['other_char']) || $_POST['other_char'] == '') { $destination = $_POST['player']; } else { $ID = $SQL->query('SELECT id FROM players WHERE name = "'.$_POST['other_char'].'"')->fetch(); if($ID) $destination = $ID['id']; else $errors .= "Player <b>".$_POST['other_char']."</b> doesn't exists.<br>"; } if($_POST['points'] == '0' || $_POST['points'] < '0') $errors .= "Points quantity must be higher than 0!<br>"; elseif (!(!preg_match('/[^0-9]/', $_POST['points']))) $errors .= "Point quantity must be a <b>numeric value</b>!"; if(isset($destination)) { $player = $SQL->query('SELECT name FROM players WHERE id = "'.$destination.'"')->fetch(); $account = $SHOP->getPlayerAccount($player['name'])->fetch(); if ($_POST['submit'] == 'remove') { if ($SHOP->points($account['name']) == '0' || $SHOP->points($account['name']) < '0') $errors .= "Player <b>".$player['name']."</b> doesn't have any points.<br>"; } } if ($errors == '') { $player = $SQL->query('SELECT name FROM players WHERE id = "'.$destination.'"')->fetch(); $account = $SHOP->getPlayerAccount($player['name'])->fetch(); echo '<div style="text-align: center; font-size: 15px; color: #4EBF37; font-weight: bold;">Points '; echo ($_POST['submit'] == 'add')?'added':'removed'; echo '!</div><br> <center>You have '; echo ($_POST['submit'] == 'add')?'added':'removed'; echo ' <b>'.$_POST['points'].'</b> points to <b>'.$player['name'].'</b>\'s Account.</center>'; echo '<div align="right"><a href="'.WEBSITE.'/index.php/p/v/gifts/admin/points">Go Back to Points Manage</a></div>'; if($_POST['submit'] == 'add') $SQL->query('UPDATE accounts SET premium_points = '.($SHOP->points($account['name']) + $_POST['points']).' WHERE name = "'.$account['name'].'"'); elseif($_POST['submit'] == 'remove') $SQL->query('UPDATE accounts SET premium_points = '.($SHOP->points($account['name']) - $_POST['points']).' WHERE name = "'.$account['name'].'"'); } else { alert($errors); echo '<div align="right"><a href="'.WEBSITE.'/index.php/p/v/gifts/admin/points">Go Back to Points Manage</a></div>'; } } } else { header("Location: ".WEBSITE."/index.php/p/v/gifts/admin"); } } else { header("Location: ".WEBSITE."/index.php"); } } else { header("Location: ".WEBSITE."/index.php/p/v/gifts"); } } elseif(!$SHOP->isInstalled()) { if($ide->isAdmin()) { $SHOP->install(); echo '<div style="text-align: center; font-size: 15px; color: #4EBF37; font-weight: bold;">Shop System Succesfully Installed!</div><br> <center>Your shop system has been installed succesfully!! click <a href="'.WEBSITE.'/index.php/p/v/gifts">HERE</a> to see your shop</center>'; } else { header("Location: ".WEBSITE."/index.php"); } } else { header("Location: ".WEBSITE."/index.php"); } ?>
  12. Olá amigos, :tentei colocar este topico em pedidos, mas não consegui: Venha aqui pedir na comunidade, que disponibilizem o soucer da pagina shopsystem.php igual ao dessas imagens que vou linkar. só preciso dos código em php e SQL. Facebook: www.facebook.com/mattheuszXmaydana
  13. Olá galera, eu gostaria de saber se alguém aqui sabe fazer um shop system, é igual o de um Site de ot, mas é in-game, o player me paga, via pag seguro, pay pal... E ele recebe AUTOMÁTICAMENTE "premium points, ou uma moeda diferente" e no jogo, tem baús com os itens donate, ai ele clica no baú, e se ele tiver esses points ou moedas donates, eles recebem o item, se não tiverem, eles recebem uma mensagem como: "Você não possui premium points/moedas donate para comprar este item."
  14. Olá, procurei em vários lugares para TFS 1.2 e não encontrei, um script/npc/baú/comando que adicione uma certa quantidade de pontos x todos os dias para gastar no shop do site, obrigado
  15. Galerinha da TK, preciso daquela ajudinha kkk estou com um problema na entrega dos itens do shop do site, a pessoa compra, desconta os pontos, porem não entrega ERRO SERVIDOR: Codigo shop.lua: Database SQL: JA RESOLVI, PODE FECHA TOPICO !
  16. Presciso De Ajuda Para Arrumar E Editar Um Site De WoDbo Funcional. Entre Vairas Outras Coisas (MSM) Quem Puder Ajudar
  17. Olá, gostaria de uma ajuda, queria saber se é possível modificar a cor "verde" nesta parte do site. se é possível gostaria de saber como. ficarei grato, obrigado... Para anexar um vídeo ao post, coloque o link e aperte ENTER. Arraste arquivos aqui para anexar ou escolha os arquivos... Inserir imagem ou outra mídia Imagens Enviadas Caso não tenha postado na área correta peço que mova para área correta... Obrigado...
  18. Então galera, eu pensei aqui, em uma forma de acabar com aquele negócio chato de ter que ficar mudando a imagem da oferta no shop do gesior. Pensei em editar o shopsystem.php do gesior assim: Eu percebi que pra mudar a imagem da oferta, é só ir na database do server, na tabela z_shop_offers e na coluna ID da oferta, colocar o ID de algum item do server, assim, a imagem da oferta fica igual ao item, sacou? Então, pensei em editar a parte: elseif ($data['offer_type'] == 'item') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } do shopsystem.php, editando o $data['id']; e deixá-lo como $data['item_id'], assim, ao criar uma oferta no shop, e ela for de item, o id fica igual ao id do item vendido, igualando a imagem da oferta ao item. Porém, isso não funcionou... Preciso de alguma ajuda com isso.
  19. Gente,gostaria de uma ajuda com Shop Diamond,a parte da vip e dos addons ja estão configuradas (addons só mudar os ids). Gostaria da ajuda para conseguir colocar o sistema de clan (quando coloco não funciona e da erros na distro) e a do Ditto (que já desconta os Diamonds e aparece a mensagem,só falta agora ele ir para a bag. Estou usando a basa PokexCyan,abaixo vou deixar o script...Obrigado! gymbadges = { ["Brock"] = 12505, ["Misty"] = 12506, ["Surge"] = 12507, ["Erika"] = 12508, ["Sabrina"] = 12509, ["Koga"] = 12510, ["Blaine"] = 12511, ["Kira"] = 12512 } --alterado v1.5 local diamondShop = { vip = {[30] = 10, [60] = 18, [90] = 25}, pokeAddons = { ["Arcanine"] = 13012, ["Blastoise"] = 13016, ["Charizard"] = 13005, ["Electabuzz"] = 13007, ["Girafarig"] = 13004, ["Shiny Hypno"] = 13008, ["Shiny Jolteon"] = 13009, ["Kingdra"] = 13013, ["Lapras"] = 13015, ["Shiny Nidoking"] = 13011, ["Scizor"] = 13014, ["Shiny Golem"] = 13010, ["Skarmory"] = 13017, ["Slowking"] = 13003, ["Sudowoodo"] = 13006, ["Shiny Vaporeon"] = 13009} } function onSay(cid, words, param) if param:find("86228") then doPlayerSendCancel(cid, "#getSto# " .. getPlayerStorageValue(cid, 86228)) -- Checa o clan do player elseif gymbadges[param] then doPlayerSendCancel(cid, "#getBadges# "..param.." "..getPlayerItemCount(cid, gymbadges[param])) -- Checa as badges end if words == "@buy" or words == "@tvCam" then local t = string.explode(param, ",") if param:find("VIP30") or param:find("VIP60") or param:find("VIP90") then id = param:find("VIP30") and 30 or param:find("VIP60") and 60 or param:find("VIP90") and 90 if doPlayerRemoveItem(cid, 2145, diamondShop.vip[id]) then doPlayerAddPremiumDays(cid, id) doPlayerSendCancel(cid, "@shop Done") else doPlayerSendCancel(cid, "@shop Can'tDone") end elseif param:find("Ditto") or param:find("Shiny Ditto") then id = param == "Ditto" and 15 or param:find("Shiny Ditto") and 350 if doPlayerRemoveItem(cid, 2145, id) then addPokeToPlayer(cid, pokemon, 0, nil, btype) doPlayerSendCancel(cid, "@shop Done") else doPlayerSendCancel(cid, "@shop Can'tDone") end elseif diamondShop.pokeAddons[param] then if doPlayerRemoveItem(cid, 2145, param == "Blastoise" and 7 or param == "Lapras" and 7 or 10) then doPlayerAddItem(cid, diamondShop.pokeAddons[param], 1) doPlayerSendCancel(cid, "@shop Done") else doPlayerSendCancel(cid, "@shop Can'tDone") end elseif t[1] == "onAir" then doSendAnimatedText(getThingPos(cid), "CAM ON", COLOR_ICE) doPlayerSendTextMessage(cid, 27, "Your channel is named: "..t[2].."\n Your channel is descripted: "..t[3]) local channelId = 20000 for i = 20000, 20100 do if getGlobalStorageValue(i) == "" then channelId = i break end end setTvChannelInfo(channelId, cid, t[2], t[3]) doPlayerSendCancel(cid, "@tvCamOnAir") setPlayerStorageValue(cid, storages.tvCamSys, channelId) setPlayerStorageValue(cid, 99284, 1) moveAllSpectators(cid) elseif t[1] == "Close" then doSendAnimatedText(getThingPos(cid), "CAM OFF", COLOR_FIRE2) setGlobalStorageValue(getPlayerStorageValue(cid, storages.tvCamSys), "") doPlayerSendTextMessage(cid, 27, "Your channel is offline.") doRemoveAllSpectators(cid) local stors = {99284, 99285, storages.tvCamSys} for i = 1, #stors do setPlayerStorageValue(cid, stors, 0) end elseif t[1] == "Follow" then setPlayerStorageValue(cid, storages.tvCamSys, t[2]) --doPlayerSendTextMessage(cid, 27, t[2]) elseif t[1] == "Assistir" then local storTv = getPlayerStorageValue(cid, storages.tvCamSys) if (tonumber(storTv)) and storTv <= 0 then return true end doPlayerWatchOther(cid, getPlayerByName(getPlayerStorageValue(cid, storages.tvCamSys))) doPlayerSendCancel(cid, "@tvCamAssistirThen") elseif t[1] == "StopWatch" then doPlayerStopWatching(cid) end return true end if words == "@autoLoot" then if param == "ON" then setPlayerStorageValue(cid, storages.autoLoot, 1) else setPlayerStorageValue(cid, storages.autoLoot, 0) end end for i, l in pairs(pokes) do if i == param then doPlayerSendCancel(cid, getPokedex(cid, i)) -- Checa os pokemons --doPlayerSendTextMessage(cid, 27, getPokedex(i)) end end return true end
  20. gostaria que o player pudece comprar apenas 1 ou 2 vezes o produto (no caso um personagem como o shenron).
  21. Gostaria de uma ajuda ,estou com um erro e passei horas tentando resolver ,pesquisando e nada de solucionar ao caso, gostaria de uma explicação simples e bem detalhada de como devo fazer para arrumar o bug...
  22. OLA ESTOU COM UM PROBLEMA NAO TO CONSEGUINDO COLOCAR AS FOTOS NOS ITENS DO SHOP DO GESIOR JA VI UM MONTE DE VIDEO AULA UM MONTE DE TOPICO TUTORIAIS MAIS ATÉ AGORA NAO FUNCIONOU NADA OQUE TENTEI, POR FAVOR ME AJUDA!!!
  23. Galera,to com um problema no shop do meu site,eu adiciono os items e depois compro,porém eles nao chegam,como resolver?
  24. Olá Galera, bom eu baixei varios sites para wodbo, todos veio com shop system.(Aquele que coloca a pasta "gifts") mas em todos os sites eu não conseguia abrir a pagina SHOP ou algo a ver com ela! ainda não entendi porque ao clicar no "SHOP" ele vai em ultimas noticias. se puderem me ajudem, deve ser alguma coisa que eu fiz de errado..
  25. Oi .. estou com um problema :v eu baixei um servidor de pokemon e ele veio com "Diamond Shop" quando clico para comprar alguma coisa o meu char no jogo diz isso 12:51 Senhor [265]: @buy VIP30 12:51 Senhor [265]: @buy Ditto e acaba não comprando nada.. eu queria tentar editar o diamond shop, por mais coisas como outfits para comprar e etc mas não faço ideia como edita isso alguem aí sabe como por pra funcionar? (perdão se eu estiver postando em local errado, essa é minha primeira postagem)

Open Tibia Server

Quer aprender a criar seu próprio servidor de Tibia? Então está no lugar certo, aqui você encontrará milhares de tutorias, scripts, códigos, mapas e utilitários para que você possa fazer o seu próprio servidor de Tibia partindo do zero.

Redes Sociais

Anuncie no Tibia King

Precisa de mais visibilidade em seus projetos? Quer publicidade para o seu servidor? Anuncie no Tibia King e faça sua divulgação, possuímos centenas de acessos simultâneos e milhares diários, com certeza será a sua solução! A publicação do seu anuncio é instantânea!

×
×
  • Create New...