athermillard 17 Postado Janeiro 17, 2012 Share Postado Janeiro 17, 2012 Através desse sistema você poderá vender storages em seu "shop system". Noob say: Mais pra q isso? Bem, com esse sistema você poderá por exemplo criar uma nova área em seu mapa e fazer com que somente entrem pessoas que tiverem essa "storage" assim sendo obtida através de uma compra do seu site "Gesior" Vá em htdocs/shopsystem.php e logo depois procure por essa linha: elseif ($data['offer_type'] == 'changename') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } Substitua-a por essa: elseif ($data['offer_type'] == 'changename') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif ($data['offer_type'] == 'storage') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } Agora procure essa outra: $i_changename = 0; Substitua por esta: $i_changename = 0; $i_storage = 0; Procure essa: elseif ($data['offer_type'] == 'changename') { $offer_array['changename'][$i_changename]['id'] = $data['id']; $offer_array['changename'][$i_changename]['points'] = $data['points']; $offer_array['changename'][$i_changename]['description'] = $data['offer_description']; $offer_array['changename'][$i_changename]['name'] = $data['offer_name']; $i_changename++; } Substitua: elseif ($data['offer_type'] == 'changename') { $offer_array['changename'][$i_changename]['id'] = $data['id']; $offer_array['changename'][$i_changename]['points'] = $data['points']; $offer_array['changename'][$i_changename]['description'] = $data['offer_description']; $offer_array['changename'][$i_changename]['name'] = $data['offer_name']; $i_changename++; } elseif ($data['offer_type'] == 'storage') { $offer_array['storage'][$i_storage]['id'] = $data['id']; $offer_array['storage'][$i_storage]['points'] = $data['points']; $offer_array['storage'][$i_storage]['item_id'] = $data['itemid1']; $offer_array['storage'][$i_storage]['description'] = $data['offer_description']; $offer_array['storage'][$i_storage]['name'] = $data['offer_name']; $i_storage++; } Procure: 0 or count($offer_list['unban']) > 0 Substitua: 0 or count($offer_list['unban']) > 0 or count($offer_list['storage']) > 0 Procure: $main_content .= '<form action="index.php?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$changename['id'].'"><input type="submit" value="Buy '.$changename['name'].'"><br><b>for '.$changename['points'].' points</b></form>'; } Substitua: $main_content .= '<form action="index.php?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$changename['id'].'"><input type="submit" value="Buy '.$changename['name'].'"><br><b>for '.$changename['points'].' points</b></form>'; } //Storage by: Ather if(count($offer_list['storage']) > 0) foreach($offer_list['storage'] as $storage) { $main_content .= '<tr bgcolor="gray"><td align="center">Storage</td><td><b>'.$storage['name'].'</b> ('.$storage['points'].' points)<br />'.$storage['description'].'</td><td align="center">'; if(!$logged) $main_content .= '<b>Entre Primeiro</b>'; else $main_content .= '<form action="index.php?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$storage['id'].'"><input type="submit" value="Buy '.$storage['name'].'"><br><b>for '.$storage['points'].' points</b></form>'; } Procure: $main_content .= '<center><b>You don\'t have any bans in your account!</b><br><br><a href="index.php?subtopic=shopsystem">Go back</a><br>'; } } Substitua: $main_content .= '<center><b>You don\'t have any bans in your account!</b><br><br><a href="index.php?subtopic=shopsystem">Go back</a><br>'; } } //Storage by: Ather elseif($buy_offer['type'] == 'storage') { $my_acc_id = $buy_player->getCustomField('id'); $datadata = $SQL->query('SELECT * FROM '.$SQL->tableName('player_storage').' WHERE player_id = '.$my_acc_id.';')->fetch(); if($datadata['player_id'] == $my_acc_id) { if($SQL->query('UPDATE player_storage SET value=1 WHERE `key` = '.$SQL->quote($buy_offer['item_id']).' AND player_id='.$my_acc_id.';')) { } else { $SQL->query('UPDATE player_storage SET value=1 WHERE `key` = '.$SQL->quote($buy_offer['item_id']).' AND player_id='.$my_acc_id.';'); } $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<center><h2>Storage enviada!</h2><b>Você recebeu sua storage por '.$buy_offer['points'].' pontos</b> da sua account. <br>Agora você possui <b>'.$user_premium_points.' pontos</b>.<br><br><a href="index.php?subtopic=shopsystem">Voltar para o Shop</a><br>'; } else { $main_content .= '<center><b>Erro</b><br><br><a href="index.php?subtopic=shopsystem">Go back</a><br>'; } } Pronto agora vamos ao painel de adiministração: em htdocs/shopadmin procure: <td><font color="white">Changename</td> Substitua: <td><font color="white">Changename</td><td><font color="white">Storage</td> Procure: <td align="center"><input type="radio" name="offer_type" value="changename" onClick="this.form.submit()"></td> Substitua: <td align="center"><input type="radio" name="offer_type" value="changename" onClick="this.form.submit()"></td> <td align="center"><input type="radio" name="offer_type" value="storage" onClick="this.form.submit()"></td> Procure: <td><input type="text" name="shop_count1" maxlenght="7" style="width: 70px" ></td></tr>'; } Substitua: <td><input type="text" name="shop_count1" maxlenght="7" style="width: 70px" ></td></tr>'; } //Storage by: Ather if($_REQUEST['offer_type'] == 'storage'){ $main_content .= '<tr><td align="center"><b>Storage:</b></td> <td><input type="text" name="shop_itemid1" maxlenght="7" style="width: 70px" ></td></tr>'; } //Fim Procure: <tr><td align="center" ><b>Count Item:</b></td> <td>'.$shop_count1.'</td></tr><br>'; } Substitua: <tr><td align="center" ><b>Count Item:</b></td> <td>'.$shop_count1.'</td></tr><br>'; } if ($shop_offer_type == 'storage'){ $main_content .= '<tr><td align="center" ><b>Storage:</b></td> <td>'.$shop_itemid1.'</td></tr><br>'; } Procure: <td><input type="text" name="shop_count1" maxlenght="7" value="'.$shop['count1'].'" style="width: 70px" ></td></tr>'; } Substitua: <td><input type="text" name="shop_count1" maxlenght="7" value="'.$shop['count1'].'" style="width: 70px" ></td></tr>'; } // Storage by: Ather if($shop['offer_type'] == 'storage'){ $main_content .= '<tr><td align="center"><b>Storage:</b></td> <td><input type="text" name="shop_itemid1" maxlenght="7" value="'.$shop['itemid1'].'" style="width: 70px" ></td></tr>'; } //fim Ufa acabou Espero que funcione ^^ com vocês também! Tá com duvidas? Pergunte Link para o comentário https://xtibia.com/forum/topic/178305-tutorial-vendendo-storage-shop-system-gesior/ Compartilhar em outros sites More sharing options...
Piabeta Kun 359 Postado Janeiro 18, 2012 Share Postado Janeiro 18, 2012 muito util e ja vi alguns usuarios pedindo isso! muito bom ajudará muitos Link para o comentário https://xtibia.com/forum/topic/178305-tutorial-vendendo-storage-shop-system-gesior/#findComment-1179067 Compartilhar em outros sites More sharing options...
Lordfire 309 Postado Fevereiro 9, 2012 Share Postado Fevereiro 9, 2012 Pode modificar o tópico colorindo o texto? Coloque uma cor no "Procure: ", uma cor no "Substitua: ", etc Link para o comentário https://xtibia.com/forum/topic/178305-tutorial-vendendo-storage-shop-system-gesior/#findComment-1198060 Compartilhar em outros sites More sharing options...
Gabriel Couto 293 Postado Abril 15, 2012 Share Postado Abril 15, 2012 Aprovado, Parabéns, Continue Assim! Mostrou um bom conteúdo, que, com certeza, deverá ajudar muita gente. Movido para a Seção Correta! Link para o comentário https://xtibia.com/forum/topic/178305-tutorial-vendendo-storage-shop-system-gesior/#findComment-1241056 Compartilhar em outros sites More sharing options...
DaviBrunelli 1 Postado Abril 22, 2012 Share Postado Abril 22, 2012 aqui nao funciona da varios ero davibrunelli@hotmail.com add ai e da uma ajudinha pf Link para o comentário https://xtibia.com/forum/topic/178305-tutorial-vendendo-storage-shop-system-gesior/#findComment-1246980 Compartilhar em outros sites More sharing options...
Rajas 5 Postado Maio 26, 2012 Share Postado Maio 26, 2012 eh com o value? Link para o comentário https://xtibia.com/forum/topic/178305-tutorial-vendendo-storage-shop-system-gesior/#findComment-1266058 Compartilhar em outros sites More sharing options...
lopez65 0 Postado Junho 26, 2012 Share Postado Junho 26, 2012 (editado) Uh, amigo, agora quando eu faço uma venda em Adicionar offert, eu recebo tudo, faz até mesmo me adicionado, mas quando vou para a loja, Esta página fica em branco sem qualquer oferta, eu segui todos os passos como você explicar isso para você em sua mensagem, você pode me ajudar? Editado Junho 26, 2012 por lopez65 Link para o comentário https://xtibia.com/forum/topic/178305-tutorial-vendendo-storage-shop-system-gesior/#findComment-1284938 Compartilhar em outros sites More sharing options...
Xtudomuito 2 Postado Julho 15, 2015 Share Postado Julho 15, 2015 Eo o script que pohe no globalevents poderia desponibilizar. Link para o comentário https://xtibia.com/forum/topic/178305-tutorial-vendendo-storage-shop-system-gesior/#findComment-1660872 Compartilhar em outros sites More sharing options...
Posts Recomendados