Jump to content

Recommended Posts

Então galera, botei os códigos tudo certinho e copilei. porem ao usar 2 staff os danos não são somados, fica saindo cada uma o seu dano.

Alguém pra da uma solução pf 

Queria que ao usasse as duas, os danos das duas fossem somados.

Tfs 0.4

 

 

Citar

Vá em player.ccp e procure por:

 


ret = RET_CANONLYUSEONEWEAPON;
 

 

 

Você ira encontrar dois "ret = RET_CANONLYUSEONEWEAPON;", substitua por:

 


ret = RET_NOERROR;
 

 

 

 

 

Após, localize weapons.h e procure por:

 


const Weapon* getWeapon(const Item* item) const;
 

 

 

Embaixo você coloca:

 


            static int32_t getAttackLeft;
    static int32_t getAttackRigth;
    static int32_t getLeftExtraAttack;
    static int32_t getRigthExtraAttack;
 

 

 

 

 

Depois, localize weapons.ccp e procure por:

 


int32_t WeaponMelee::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const
{
int32_t attackSkill = player->getWeaponSkill(item);
int32_t attackValue = std::max((int32_t)0, (int32_t(item->getAttack() + item->getExtraAttack()) - elementDamage));
float attackFactor = player->getAttackFactor();
 

 

 

Substitua por:

 


int32_t WeaponMelee::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const
{

   int32_t getAttackLeft;
   int32_t getAttackRigth;
   int32_t getLeftExtraAttack;
int32_t getRigthExtraAttack;

   getAttackLeft = 0;
   getAttackRigth = 0;
   getLeftExtraAttack = 0;
getRigthExtraAttack = 0;

   if (getAttackLeft == 0)
   { 
       if (player->getInventoryItem(SLOT_LEFT) != NULL)
       {
       getAttackLeft = player->getInventoryItem(SLOT_LEFT)->getAttack();
       getLeftExtraAttack = player->getInventoryItem(SLOT_LEFT)->getExtraAttack();
       }
       else if (player->getInventoryItem(SLOT_LEFT) == NULL)
       {
       getAttackLeft = 0;
       getLeftExtraAttack = 0;  
       }
   }  

   if (getAttackRigth == 0)
   { 
       if (player->getInventoryItem(SLOT_RIGHT) != NULL)
       {
       getAttackRigth = player->getInventoryItem(SLOT_RIGHT)->getAttack();
       getRigthExtraAttack = player->getInventoryItem(SLOT_RIGHT)->getExtraAttack();
       }
       else if (player->getInventoryItem(SLOT_RIGHT) == NULL)
       {
       getAttackRigth = 0;
       getRigthExtraAttack = 0;  
       }
   }                                                 


   int32_t attackValue = std::max((int32_t)0, (int32_t)((getAttackLeft + getLeftExtraAttack + getAttackRigth + getRigthExtraAttack) - elementDamage));                                               

   int32_t attackSkill = player->getWeaponSkill(item);
   float attackFactor = player->getAttackFactor();
Citar

 

 

Link to post
Share on other sites

O padrão de dual wielding é exatamente esse. Por exemplo:
Se com 1 arma o player da 1 dano a cada 4 segundos, usando 2 armas dará 1 dano a cada 2 segundos, sendo cada dano respectivo à uma arma.
Para somar o dano das duas armas em um único hit você teria que modificar o código da source e toda a mecânica do dual wield.

Te ajudei? Clique em  Gostei ! 

²²²d¬¬b²²²

 

 

"She's got a smile that it seems to me...."  ♪♪

Link to post
Share on other sites
23 horas atrás, luangop disse:

O padrão de dual wielding é exatamente esse. Por exemplo:
Se com 1 arma o player da 1 dano a cada 4 segundos, usando 2 armas dará 1 dano a cada 2 segundos, sendo cada dano respectivo à uma arma.
Para somar o dano das duas armas em um único hit você teria que modificar o código da source e toda a mecânica do dual wield.

Tendi

Sera q alguem manja de fazer um script pra que nao possa usar 2 armas mesmo com id ( forçando o player usar 2 armas diferente )

Se alguem puder ajudar, fico muito grato !!!!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.


  • Similar Content

    • By Black Frost21
      ei, eu tenho um problema com o editor de itens incluído neste tópico
      Nomeadamente depois de abrir o item.otb da pasta
      data / item / new / item.otb abre normalmente, mas não funciona como esperado. ele não carrega todos os sprites e mesmo se eu adicionar um novo, ele não pode ser recuperado de forma alguma.
      data / item / item.otb não abre de todo erro: Não foi possível encontrar um plugin que pudesse lidar com a versão cliente 4294967295
    • By poncex
      Alguém pode me ajudar a resolver esse problema? É a única coisa que estou perdendo https://ibb.co/Fs9RCQ1  , as habilidades ficam desatualizadas conforme as habilidades do cliente aumentam , 
      Tentei adicionar a skill em vocation.xml assim como editei nos fontes e depois compilei, mas ainda não funciona
       
      cSkills = { ["Crafting"] = {storage = 40000, maxskill = 100, bonus = 0.0033, minskill = 10, ratetries = 1.12}, ["Dwarven Smithing"] = {storage = 40001, maxskill = 100, bonus = 0.0025, minskill = 10, ratetries = 1.13}, ["Dragon Smithing"] = {storage = 40002, maxskill = 100, bonus = 0.0025, minskill = 10, ratetries = 1.14}, ["Magic Smithing"] = {storage = 40003, maxskill = 100, bonus = 0.002, minskill = 10, ratetries = 1.15}, ["Advanced Smithing"] = {storage = 40004, maxskill = 100, bonus = 0.0015, minskill = 10, ratetries = 1.16}, ["Legendary Smithing"] = {storage = 40005, maxskill = 100, bonus = 0.0015, minskill = 10, ratetries = 1.17}, ["Ultimate Smithing"] = {storage = 40006, maxskill = 100, bonus = 0.001, minskill = 10, ratetries = 1.18}, ["Demon Smithing"] = {storage = 40007, maxskill = 100, bonus = 0.00075, minskill = 10, ratetries = 1.19}, ["Umbral Smithing"] = {storage = 40008, maxskill = 100, bonus = 0.0005, minskill = 10, ratetries = 1.2}, ["Basic Tanning"] = {storage = 40010, maxskill = 100, bonus = 0.002, minskill = 10, ratetries = 1.1}, ["Basic Smelting"] = {storage = 40011, maxskill = 100, bonus = 0.002, minskill = 10, ratetries = 1.1}, ["Advanced Smelting"] = {storage = 40012, maxskill = 100, bonus = 0.002, minskill = 10, ratetries = 1.15}, } local storageOffset = 1000 local skillRate = 10 function Player.getCSkill(self, skill) return self:getStorageValue(cSkills[skill].storage) end function Player.setCSkill(self, skill, new) return self:setStorageValue(cSkills[skill].storage, new) end function Player.addCSkill(self, skill, count) local current = self:getCSkill(skill) self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You advanced to " .. string.lower(skill) .. " level " .. current + count .. ".") return self:setCSkill(skill, current + count) end function Player.getCSkillTries(self, skill) return self:getStorageValue(cSkills[skill].storage + storageOffset) end function Player.getRequiredCTries(self, skill) local currentLevel = self:getStorageValue(cSkills[skill].storage) local requiredTries = math.floor(50 * math.pow(cSkills[skill].ratetries, currentLevel - 10) / skillRate) return requiredTries end function Player.setCTries(self, skill, value) return self:setStorageValue(cSkills[skill].storage + storageOffset, value) end function Player.addCSkillTries(self, skill, tries) local current = self:getCSkillTries(skill) if self:getCSkill(skill) >= cSkills[skill].maxskill then return false end self:setStorageValue(cSkills[skill].storage + storageOffset, current + tries) while self:getCSkillTries(skill) > self:getRequiredCTries(skill) do self:setCTries(skill, self:getCSkillTries(skill) - self:getRequiredCTries(skill)) self:addSkillTries(SKILL_CRAFTING, 30) self:addCSkill(skill, 1) end return true end function Player.getCSkillPercent(self, skill) return 100 - math.floor((self:getCSkillTries(skill) / self:getRequiredCTries(skill)) * 100) end  
       
      Estou usando esse script para tentar combinar as skills
       
    • By leonardo gazim
      Boa noite !
      quando mata as criaturas, no chat esta mostrando o loot do bixo com a id do item
      19:13 Loot of a chicken: {5890|a chicken feather}, {3492|a worm}
      alguem sabe como retirar, para nao mostar os numeros ?
       
       
       
    • By stauro
      Salve galera do TK, estou com um erro no gesior que não faço ideia de como resolver. Eu adicionei 2 itens no shop e quando clico pra selecionar um deles, seleciona apenas o primeiro item, o segundo não consigo. E mesmo com o primeiro item selecionado aparece o seguinte erro:
      You need to select a valid service you wish to purchase.
      Alguém tem ideia de onde arruma isso?


       
      Bom, fuçando aqui eu acredito que o problema está em htdocs/pages/accountmanagement/shop.php
      <?php if(!defined('INITIALIZED')) exit; $main_content .= ' <script type="text/javascript" > g_Deactivated = true; </script>'; $services_errors = array(); if (!isset($_REQUEST['ServiceCategoryID'])) header("Location: ?subtopic=accountmanagement&action=manage"); else $serviceCategoryId = $_REQUEST['ServiceCategoryID']; if (isset($_REQUEST['step'])) $step = (int) $_REQUEST['step']; else $step = 1; switch($step) { case 2: $service = "Enter payment data"; break; case 3: $service = "Confirm your order"; break; case 4: $service = "Summary"; break; default: $service = "Select service"; } //Progress Bar #js part $get_Services = $SQL->query("SELECT * FROM `z_shop_offer` WHERE `category` = '$serviceCategoryId'")->fetchAll(); $g_Services = '['; #start foreach($get_Services as $g_Ser) { $g_Services .= $g_Ser['id'].','; #repeat items } $g_Services = substr($g_Services,0,-1); #cut $g_Services .= ']'; $g_Prices = '{'; foreach($get_Services as $g_Ser) { $g_Prices .= '"'.$g_Ser['id'].'":{'; $g_Prices .= '"1":"'.$g_Ser['coins'].'"'; $g_Prices .= '},'; } $g_Prices = substr($g_Prices,0,-1); $g_Prices.= '};'; $main_content .= ' <script> $(document).ready(function() { ChangePMC(1); ChangeService(8,2); }); var g_Services = '.$g_Services.'; var g_PaymentMethodCategories = {1:1}; var g_Prices = '.$g_Prices.' var g_QF_Mounts_ServiceCategoryID = 15; var g_QF_Outfits_ServiceCategoryID = 17; function ChangeService(a_ServiceID, a_ServiceCategoryID) { // set the ServiceID for the change country form $(\'#ServiceID\').val(a_ServiceID); $(\'#ServiceID\').attr(\'name\', \'InitialServiceID\'); // activate the radio button itself and set the price $(\'#ServiceID_\' + a_ServiceID).attr(\'checked\', \'checked\'); $(\'.ServiceID_Icon_Container\').css(\'background-color\', \'\'); // handle mounts if (a_ServiceCategoryID == g_QF_Mounts_ServiceCategoryID || a_ServiceCategoryID == g_QF_Outfits_ServiceCategoryID) { $(\'.ServiceID_Icon_Animation_1\').hide(); $(\'.ServiceID_Icon_New_Animation_1\').hide(); $(\'.ServiceID_Icon_New\').show(); $(\'#ServiceID_Icon_Animation_1_\' + a_ServiceID).show(); $(\'#ServiceID_Icon_New_\' + a_ServiceID).hide(); } // handle payment methods for (var i = 0; i < g_PaymentMethodCategories.length; i++) { if (typeof g_Prices[a_ServiceID] !== \'undefined\') { if (typeof g_Prices[a_ServiceID][g_PaymentMethodCategories[i]] === \'undefined\') { // deactivate the payment method // note: the radio button can not be disabled or we will receive the wrong error message $(\'#PMCID_NotAllowed_\' + g_PaymentMethodCategories[i]).show(); } else { // activate the payment method $(\'#PMCID_NotAllowed_\' + g_PaymentMethodCategories[i]).hide(); } } } // activate and mark the selected icon $(\'.ServiceID_Icon_Selected\').css(\'background-image\', \'\'); $(\'#ServiceID_Icon_Selected_\' + a_ServiceID).css(\'background-image\', \'url(\' + JS_DIR_IMAGES + \'payment/serviceid_icon_selected.png)\'); return; } function ChangePMC(a_PaymentMethodID) { // set the PMCID for the change country form $(\'#PMCID\').val(a_PaymentMethodID); $(\'#PMCID\').attr(\'name\', \'InitialPMCID\'); // activate the radio button $(\'#PMCID_\' + a_PaymentMethodID).attr(\'checked\', \'checked\'); $(\'.PMCID_Icon_Container\').css(\'background-color\', \'\'); // handle services for (var i = 0; i < g_Services.length; i++) { if (typeof g_Prices[g_Services[i]] !== \'undefined\') { if (typeof g_Prices[g_Services[i]][a_PaymentMethodID] === \'undefined\') { // deactivate the service // note: the radio button can not be disabled or we will receive the wrong error message $(\'#ServiceID_NotAllowed_\' + g_Services[i]).show(); // set the price $(\'#PD_\' + g_Services[i]).html(\'---\'); $(\'#ServiceID_\' + g_Services[i]).val(\'0\'); } else { // activate the service // set the price $(\'#PD_\' + g_Services[i]).html(g_Prices[g_Services[i]][a_PaymentMethodID] + \' Coins\'); $(\'#ServiceID_NotAllowed_\' + g_Services[i]).hide(); } } } // activate and mark the selected icon $(\'.PMCID_Icon_Selected\').css(\'background-image\', \'\'); $(\'#PMCID_Icon_Selected_\' + a_PaymentMethodID).css(\'background-image\', \'url(\' + JS_DIR_IMAGES + \'payment/pmcid_icon_selected.png)\'); return; } // mouse over effect for payment methods function MouseOverPMCID(a_PMCID) { $(\'#PMCID_Icon_Over_\' + a_PMCID).css(\'background-image\', \'url(\' + JS_DIR_IMAGES + \'payment/pmcid_icon_over.png)\'); } // mouse out effect for payment methods function MouseOutPMCID(a_PMCID) { $(\'#PMCID_Icon_Over_\' + a_PMCID).css(\'background-image\', \'\'); } // mouse over effect for products function MouseOverServiceID(a_ServiceID, a_ServiceCategoryID) { $(\'#ServiceID_Icon_Over_\' + a_ServiceID).css(\'background-image\', \'url(\' + JS_DIR_IMAGES + \'payment/serviceid_icon_over.png)\'); if (a_ServiceCategoryID == g_QF_Mounts_ServiceCategoryID || a_ServiceCategoryID == g_QF_Outfits_ServiceCategoryID) { $(\'#ServiceID_Icon_Animation_1_\' + a_ServiceID).show(); $(\'#ServiceID_Icon_New_\' + a_ServiceID).hide(); } } // mouse out effect for products function MouseOutServiceID(a_ServiceID, a_ServiceCategoryID) { $(\'#ServiceID_Icon_Over_\' + a_ServiceID).css(\'background-image\', \'\'); // mounts have an animation if ((a_ServiceCategoryID == g_QF_Mounts_ServiceCategoryID || a_ServiceCategoryID == g_QF_Outfits_ServiceCategoryID) && ($(\'#ServiceID_\' + a_ServiceID).attr(\'checked\') != \'checked\')) { $(\'#ServiceID_Icon_Animation_1_\' + a_ServiceID).hide(); $(\'#ServiceID_Icon_New_\' + a_ServiceID).show(); } } </script>'; $main_content .= ' <div id="ProgressBar"> <div id="MainContainer"> <div id="BackgroundContainer"> <img id="BackgroundContainerLeftEnd" src="'.$layout_name.'/images/global/content/stonebar-left-end.gif" /> <div id="BackgroundContainerCenter"> <div id="BackgroundContainerCenterImage" style="background-image:url('.$layout_name.'/images/global/content/stonebar-center.gif);" /> </div> </div> <img id="BackgroundContainerRightEnd" src="'.$layout_name.'/images/global/content/stonebar-right-end.gif" /> </div> <img id="TubeLeftEnd" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-tube-left-green.gif" /> <img id="TubeRightEnd" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-tube-right-'.(($step == 4) ? 'green' : 'blue').'.gif" /> <div id="FirstStep" class="Steps" > <div class="SingleStepContainer" > <img class="StepIcon" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-icon-1-green.gif" /> <div class="StepText" style="font-weight:'.((!isset($step) || $step == 1) ? 'bold' : 'normal').';" >Select service</div> </div> </div> <div id="StepsContainer1" > <div id="StepsContainer2" > <div class="Steps" style="width:33%" > <div class="TubeContainer" > <img class="Tube" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-tube-'.((!isset($step) || $step == 1) ? 'green-blue' : 'green').'.gif" /> </div> <div class="SingleStepContainer" > <img class="StepIcon" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-icon-2-'.(($step >= 2) ? 'green' : 'blue').'.gif" /> <div class="StepText" style="font-weight:'.(($step == 2) ? 'bold' : 'normal').';" >Enter payment data</div> </div> </div> <div class="Steps" style="width:33%" > <div class="TubeContainer" >'; if ($step == 2) { $main_content .= ' <img class="Tube" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-tube-green-blue.gif" />'; }elseif ($step >= 3) { $main_content .= ' <img class="Tube" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-tube-green.gif" />'; }else{ $main_content .= ' <img class="Tube" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-tube-blue.gif" />'; } $main_content .= ' </div> <div class="SingleStepContainer" > <img class="StepIcon" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-icon-3-'.(($step >= 3) ? 'green' : 'blue').'.gif" /> <div class="StepText" style="font-weight:'.(($step == 3) ? 'bold' : 'normal').';" >Confirm your order</div> </div> </div> <div class="Steps" style="width:33%" > <div class="TubeContainer" > '; if ($step == 3) { $main_content .= ' <img class="Tube" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-tube-green-blue.gif" />'; }elseif ($step >= 4) { $main_content .= ' <img class="Tube" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-tube-green.gif" />'; }else{ $main_content .= ' <img class="Tube" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-tube-blue.gif" />'; } $main_content .= ' </div> <div class="SingleStepContainer" > <img class="StepIcon" src="'.$layout_name.'/images/global/content/progressbar/progress-bar-icon-4-'.(($step == 4) ? 'green' : 'blue').'.gif" /> <div class="StepText" style="font-weight:'.(($step == 4) ? 'bold' : 'normal').';" >Summary</div> </div> </div> </div> </div> </div> </div>'; #progress bar end if ($step == 1) { $doubleStatus = $SQL->query("SELECT `value` FROM `server_config` WHERE `config` = 'double'")->fetch(); $main_content .= ' <style> .ribbonShop-double { background:url('.$layout_name.'/images/shop/ribbon-double.png) no-repeat; width: 80px; height: 80px; position:absolute; right: -5px; top: -5px; z-index:999; } </style>'; $main_content .= ' <form method="post" action="?subtopic=accountmanagement&action=services"> <div class="TableContainer" style="position:relative;"> '.(($doubleStatus['value'] == "active") ? '<div class="ribbonShop-double"></div>' : '').' <table class="Table5" cellpadding="0" cellspacing="0"> <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <div class="Text" >'.$service.'</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer"> <table style="width:100%;" >'; #menu $main_content .= ' <tr> <td>'; $getCat = $SQL->query("SELECT * FROM `z_shop_category` WHERE `hide` = 0 ORDER BY `id` ASC")->fetchAll(); foreach($getCat as $category) { $main_content .= ' <span class="HelperDivIndicator" onMouseOver="ActivateHelperDiv($(this), \''.$category['name'].'\', \''.$category['desc'].'\', \'ProductCategoryHelperDiv_'.$category['id'].'\');" onMouseOut="$(\'#HelperDivContainer\').hide();" > <div class="InnerTableTab '.(($serviceCategoryId == $category['id']) ? 'ActiveInnerTableTab' : '').'"> <div id="ProductCategoryHelperDiv_'.$category['id'].'" class="ProductCategoryHelperDiv" ></div> <a href="?subtopic=accountmanagement&action=services&ServiceCategoryID='.$category['id'].'&step='.$step.'"> <img src="'.$layout_name.'/images/payment/products_tab_'.(($serviceCategoryId == $category['id']) ? '' : 'non').'active.png" /> <div class="InnerTableTabLabel" >'.$category['name'].'</div>'; $newCategory = $category['id']; $getNews = $SQL->query("SELECT `offer_date` FROM `z_shop_offer` WHERE `category` = '$newCategory' ORDER BY `offer_date` DESC LIMIT 1")->fetch(); if ((time() - ($config['shop']['newitemdays'] * 86400)) < $getNews['offer_date']) $main_content .= '<div class="RibbonNewProduct" style="background-image: url('.$layout_name.'/images/payment/ribbon-tab-new-product'.(($serviceCategoryId == $category['id']) ? '_active' : '').'.png);" ></div>'; $main_content .= ' </a> </div> </span>'; } $main_content .= ' </td> </tr>'; #services $main_content .= ' <tr> <td> <div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rt.gif);" ></div> </div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" style="border:1px solid #faf0d7;" > <tr> <td style="text-align: center;" align="center" > <div style="max-height: 500px; min-height: 100px; overflow-y: auto;">'; $getProducts = $SQL->query("SELECT * FROM `z_shop_offer` WHERE `category` = '$serviceCategoryId' AND `hide` = 0 ORDER BY `offer_date` DESC")->fetchAll(); if (count($getProducts) >= 1) foreach($getProducts as $product) { $main_content .= ' <div class="ServiceID_Icon_Container" id="ServiceID_Icon_Container_'.$product['id'].'"> <div class="ServiceID_Icon_Container_Background" id="" style="background-image:url('.$layout_name.'/images/payment/serviceid_icon_normal.png);" > <div class="ServiceID_Icon" id="ServiceID_Icon_'.$product['id'].'" '.(($product['category'] == 2) ? 'style="background-image:url('.$layout_name.'/images/payment/'.$product['default_image'].');"' : '').' onclick="ChangeService('.$product['id'].', '.$product['category'].');" onmouseover="MouseOverServiceID('.$product['id'].', '.$product['category'].');" onmouseout="MouseOutServiceID('.$product['id'].', '.$product['category'].');" > <div class="PermanentDeactivated" >'; if(!empty($product['offer_description'])) $main_content .= ' <span class="HelperDivIndicator" onMouseOver="ActivateHelperDiv($(this), \''.$product['offer_name'].'\', \''.$product['offer_description'].'\', \'\');" onMouseOut="$(\'#HelperDivContainer\').hide();" >'; $main_content .= ' <div class="ServiceID_HelperDiv" ></div> </span> </div> <div class="PermanentDeactivated ServiceID_Deactivated_ByChoice" id="ServiceID_NotAllowed_'.$product['id'].'" style="display: none;" > <span class="HelperDivIndicator" onMouseOver="ActivateHelperDiv($(this), \'Service Info:\', \'&lt;p&gt;The product is not available for the selected payment method!&lt;/p&gt;\', \'\');" onMouseOut="$(\'#HelperDivContainer\').hide();" > <div class="ServiceID_Deactivated" style="background-image: url('.$layout_name.'/images/payment/serviceid_deactivated.png);" ></div> </span> </div>'; if ((time() - ($config['shop']['newitemdays'] * 86400)) < $product['offer_date']) $main_content .= ' <div class="RibbonNewProduct" style="background-image: url('.$layout_name.'/images/payment/ribbon-new-product.png);"></div> <div class="PermanentDeactivated" > <span class="HelperDivIndicator" onMouseOver="ActivateHelperDiv($(this), \'New Product!\', \'We have a new product for you in store - the &lt;b&gt;'.$product['offer_name'].'&lt;/b&gt;.\', \'\');" onMouseOut="$(\'#HelperDivContainer\').hide();" > <div class="ServiceID_HelperDiv" style="z-index: 999;" ></div> </span> </div>'; if ($product['category'] == 4) { $main_content .= ' <div class="ServiceID_Icon_New" id="ServiceID_Icon_New_'.$product['id'].'" style="background-image:url('.$layout_name.'/images/shop/outfits/'.strtolower(str_replace(" ","_",$product['addon_name'])).'_male.gif); background-repeat:no-repeat; margin:5px 0;" ></div> <div class="ServiceID_Icon_New" id="ServiceID_Icon_New_'.$product['id'].'" style="background-image:url('.$layout_name.'/images/shop/outfits/'.strtolower(str_replace(" ","_",$product['addon_name'])).'_female.gif); background-repeat:no-repeat; margin:5px 60px;" ></div>'; } if ($product['category'] == 5) $main_content .= ' <div class="ServiceID_Icon_New" id="ServiceID_Icon_New_'.$product['id'].'" style="background-image:url('.$layout_name.'/images/shop/items/'.$product['itemid'].'.gif); background-repeat:no-repeat; margin:20px 45px;" ></div>'; if ($product['category'] == 3) { $main_content .= ' <div class="ServiceID_Icon_New" id="ServiceID_Icon_New_'.$product['id'].'" style="background-image:url('.$layout_name.'/images/shop/mounts/'.str_replace(" ","_",$product['offer_name']).'.gif); background-repeat:no-repeat; margin:-5px 22px;" ></div>'; } if ($product['category'] == 6) { $main_content .= ' <div class="ServiceID_Icon_New" id="ServiceID_Icon_New_'.$product['id'].'" style="background-image:url('.$layout_name.'/images/shop/points.gif); background-repeat:no-repeat; margin:20px 45px;" ></div>'; } $main_content .= ' <div class="ServiceID_Icon_Selected" id="ServiceID_Icon_Selected_'.$product['id'].'" ></div> <div class="ServiceID_Icon_Over" id="ServiceID_Icon_Over_'.$product['id'].'" ></div>'; $main_content .= ' <div class="ServiceID_Icon_Animation_1" id="ServiceID_Icon_Animation_1_'.$product['id'].'" style="background-image: url('.$layout_name.'/images/shop/items/serviceid_'.$product['id'].'_animation_1.gif);" ></div>'; $main_content .= ' <label for="ServiceID_'.$product['id'].'" > <div class="ServiceIDLabelContainer" > <div class="ServiceIDLabel" > <input type="radio" id="ServiceID_'.$product['id'].'" class="ServiceID" name="ServiceID" value="'.$product['id'].'" /> '.$product['offer_name'].' </div> </div> <div class="ServiceIDPriceContainer" ><span class="ServiceIDPrice" id="PD_'.$product['id'].'" >'.$product['coins'].' Coins</span></div> </label> </div> </div> </div>'; } else { if($serviceCategoryId == 2) $itemName = "Extra Services"; if($serviceCategoryId == 3) $itemName = "Mounts"; if($serviceCategoryId == 4) $itemName = "Outfits"; if($serviceCategoryId == 5) $itemName = "Items"; $main_content .= '<p>None <strong>'.$itemName.'</strong> has been added for sale yet .</p>'; } $main_content .= ' </div> </td> </tr> </table> </div> </div> <div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-br.gif);" ></div> </div> </div> </td> </tr>'; $main_content .= ' <tr> <td> <div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rt.gif);" ></div> </div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" style="border:1px solid #faf0d7;" > <tr> <td style="text-align: center;" align="center" > <div style="max-height: 240px; overflow-y: auto;" > <div class="PMCID_Icon_Container" id="PMCID_Icon_Container_1" > <div class="PMCID_Icon" id="PMCID_Icon_1" style="background-image:url('.$layout_name.'/images/payment/pmcid_icon_normal.png);" onclick="ChangePMC(1);" onmouseover="MouseOverPMCID(1);" onmouseout="MouseOutPMCID(1);" > <div class="PermanentDeactivated PMCID_Deactivated_ByChoice" id="PMCID_NotAllowed_1" style="display: none;"" > <span class="HelperDivIndicator" onMouseOver="ActivateHelperDiv($(this), \'Payment Method Info:\', \'&lt;p&gt;The payment method is not allowed for the selected service!&lt;/p&gt;\', \'\');" onMouseOut="$(\'#HelperDivContainer\').hide();" > <div class="PMCID_Deactivated" style="background-image: url('.$layout_name.'/images/payment/pmcid_deactivated.png);" ></div> </span> </div> <div class="PMCID_Icon_Selected" id="PMCID_Icon_Selected_1" ></div> <div class="PMCID_Icon_Over" id="PMCID_Icon_Over_1" ></div> <span style="position: absolute; left: 125px; top: 53px; z-index: 99;" > <span style="margin-left: 5px; position: absolute; margin-top: 2px;" > <span class="HelperDivIndicator" onMouseOver="ActivateHelperDiv($(this), \'Information:\', \'Tibia Coins can be used to purchase addons, mounts, items and extra services.\', \'\');" onMouseOut="$(\'#HelperDivContainer\').hide();" > <image style="border:0px;" src="'.$layout_name.'/images/global/content/info.gif" /> </span> </span> </span> <img class="PMCID_CP_Icon" src="'.$layout_name.'/images/payment/points.gif" /> <div class="PMCID_CP_Label" > <input type="radio" id="PMCID_1" name="PMCID" value="1"> <label for="PMCID_1" >Points</label> </div> </div> </div> </div> </td> </tr> </table> </div> </div> <div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-br.gif);" ></div> </div> </div> </td> </tr>'; $main_content .= ' </table> </div> </td> </tr> </table> </div>'; #next and back buttons $main_content .= ' <div class="SubmitButtonRow" > <div class="LeftButton" > <input type="hidden" name="ServiceCategoryID" value="'.$serviceCategoryId.'"> <input type="hidden" name="step" value="2"> <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_green.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_green_over.gif);" ></div> <input id="sendService" class="ButtonText" type="image" name=s"Next" alt="Next" src="'.$layout_name.'/images/global/buttons/_sbutton_next.gif" > </div> </div> </div> </form> <div class="RightButton" > <form action="?subtopic=accountmanagement&action=manage" method="post" style="padding:0px;margin:0px;" > <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_red.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_red_over.gif);" ></div> <input class="ButtonText" type="image" name="Cancel" alt="Cancel" src="'.$layout_name.'/images/global/buttons/_sbutton_cancel.gif" > </div> </div> </form> </div> </div>'; } if($step == 2) { $serviceCategoryID = (int) $_REQUEST['ServiceCategoryID']; $payment_method = (int) $_REQUEST['PMCID']; $service_id = (int) $_REQUEST['ServiceID']; if($service_id == 0) $services_errors[] = "You need to select a valid service you wish to purchase."; if($payment_method == 0) $services_errors[] = "You must select a valid payment method to purchase the service."; if(empty($services_errors)) { $shop_offer = $SQL->query("SELECT * FROM `z_shop_offer` WHERE `id` = '$service_id'")->fetch(); $service_price = $shop_offer['price']; $service_points = $shop_offer['coins']; $service_name = $shop_offer['offer_name']; if($account_logged->getPremiumPoints() < $service_points) $services_errors[] = "You need at least ".$service_points." tibia coins to purchase the ".$service_name."."; } if(empty($services_errors)) if($account_logged->getKey() == "") $services_errors[] = "Your account has not yet been registered, you need to register to buy on ".$config['server']['serverName']." Shop."; if(empty($services_errors)) { $main_content .= ' <form method="post" action="?subtopic=accountmanagement&action=services"> <div class="TableContainer" > <table class="Table5" cellpadding="0" cellspacing="0"> <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <div class="Text" >'.$service.'</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer"> <table style="width:100%;" > <tr> <td> <div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rt.gif);" ></div> </div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" style="border:1px solid #faf0d7;" > <tr><td class="LabelV">Send to my account <input type="radio" name="sendTo" value="me" checked></td></tr> <tr> <td class="LabelV">Send to my friend <input type="radio" name="sendTo" value="friend" onBlur="showSelect()"> <select name="selectFriend"> <option value="">Select a Friend</option>'; $get_friends = $SQL->query("SELECT * FROM `account_viplist` WHERE `account_id` = '".$account_logged->getID()."'")->fetchAll(); foreach($get_friends as $fID) { $friend = new Player(); $friend->loadById($fID['player_id']); $main_content .= '<option value="'.$friend->getName().'">'.$friend->getName().'</option>'; } $main_content .= ' </select> </td> </tr> </table> </div> </div> <div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-br.gif);" ></div> </div> </div> </td> </tr> <tr> <td>The friend list above is according to your vip list in-game.</td> </tr> </table> </div> </td> </tr> </table> </div> <div class="SubmitButtonRow" > <div class="LeftButton" > <input type="hidden" name="ServiceCategoryID" value="'.$serviceCategoryID.'"> <input type="hidden" name="PMCID" value="'.$payment_method.'"> <input type="hidden" name="ServiceID" value="'.$service_id.'"> <input type="hidden" name="step" value="3"> <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_green.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_green_over.gif);" ></div> <input class="ButtonText" type="image" name="Next" alt="Next" src="'.$layout_name.'/images/global/buttons/_sbutton_next.gif" > </div> </div> </div> </form> <div class="RightButton" > <form method="post" action="?subtopic=accountmanagement&action=services" > <input type="hidden" name="ServiceCategoryID" value="'.$serviceCategoryID.'" /> <input type="hidden" name="step" value="1"> <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div> <input class="ButtonText" type="image" name="Previous" alt="Previous" src="'.$layout_name.'/images/global/buttons/_sbutton_previous.gif" > </div> </div> </form> </div> </div>'; } if(!empty($services_errors)) { $main_content .= ' <div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <div class="Text" >Services Page Errors</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" > <tr> <td>'; foreach($services_errors as $service_error) $main_content .= $service_error . '<br>'; $main_content .= ' </td> </tr> </table> </div> </td> </tr> </table> </div><BR> <TABLE BORDER=0 WIDTH=100%> <TR> <TD ALIGN=center> <table border="0" cellspacing="0" cellpadding="0" > <form action="?subtopic=accountmanagement&action=services" method="post"> <input type="hidden" name="ServiceCategoryID" value="'.$serviceCategoryID.'" /> <input type="hidden" name="step" value="1"> <tr> <td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div> <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/global/buttons/_sbutton_back.gif" > </div> </div> </td> </tr> </form> </table> </TD> </TR> </TABLE>'; } } if($step == 3) { $serviceCategoryID = (int) $_REQUEST['ServiceCategoryID']; $payment_method = (int) $_REQUEST['PMCID']; $service_id = (int) $_REQUEST['ServiceID']; $sendTo = $_REQUEST['sendTo']; if($sendTo == "friend") $friend_name = $_REQUEST['selectFriend']; if($sendTo == "friend" && $_REQUEST['selectFriend'] == "") $services_errors[] = "You need to select a friend to send this service."; $service_info = $SQL->query("SELECT * FROM `z_shop_offer` WHERE `id` = '$service_id'")->fetch(); if(empty($services_errors)) { $main_content .= ' <div class="TableContainer" > <table class="Table5" cellpadding="0" cellspacing="0"> <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <div class="Text" >'.$service.'</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer"> <table style="width:100%;" > <tr> <td> <div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rt.gif);" ></div> </div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" style="border:1px solid #faf0d7;" > <tr> <td class="LabelV200" >Service</td> <td>' . $service_info['offer_name'] . '</td> </tr>'; $main_content .= ' <tr> <td class="LabelV200" >Coins</td> <td>' . $service_info['coins'] . ' Tibia Coins</td> </tr>'; $main_content .= ' </table> </div> </div> <div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-br.gif);" ></div> </div> </div> </td> </tr> <tr> <td> <div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rt.gif);" ></div> </div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" style="border:1px solid #faf0d7;" > <tr> <td class="LabelV200" >Payment Method</td> <td>Tibia Coins</td> </tr>'; if($sendTo == "friend") $main_content .= ' <tr> <td class="LabelV200" >Sendo to:</td> <td>' . $friend_name . '</td> </tr>'; $main_content .= ' </table> </div> </div> <div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-br.gif);" ></div> </div> </div> </td> </tr> <tr> <td> <div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rt.gif);" ></div> </div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" style="border:1px solid #faf0d7;" > <form method="post" action="?subtopic=accountmanagement&action=services" > <tr> <td colspan="2" > <input type="checkbox" name="RulesAccept" value="1" id="AgreementsCheckbox" /> <span> <Label for="AgreementsCheckbox" >I have read and I agree to the <a href="#" target="_blank" >' . $config['server']['serverName'] . ' Rules</a>.</label> </span> </td> </tr> </table> </div> </div> <div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-br.gif);" ></div> </div> </div> </td> </tr> </table> </div> </td> </tr> </table> </div>'; $main_content .= ' <div class="SubmitButtonRow" > <div class="LeftButton" > <input type="hidden" name="ServiceID" value="' . $service_id . '" > <input type="hidden" name="PMCID" value="' . $payment_method . '" > <input type="hidden" name="ServiceCategoryID" value="' . $serviceCategoryID . '" > <input type="hidden" name="Points" value="' . $service_info['coins'] . '" /> <input type="hidden" name="selectFriend" value="'.$friend_name.'"> <input type="hidden" name="sendTo" value="'.$sendTo.'"> <input type="hidden" name="step" value="4" > <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_green.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_green_over.gif);" ></div> <input class="ButtonText" type="image" name="BuyNow" alt="BuyNow" src="'.$layout_name.'/images/global/buttons/_sbutton_buynow.gif" > </div> </div> </div> </form> <div class="RightButton" > <form method="post" action="?subtopic=accountmanagement&action=services" > <input type="hidden" name="ServiceCategoryID" value="' . $serviceCategoryID . '" > <input type="hidden" name="ServiceID" value="' . $service_id . '" > <input type="hidden" name="PMCID" value="' . $payment_method . '" > <input type="hidden" name="step" value="2" > <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div> <input class="ButtonText" type="image" name="Previous" alt="Previous" src="'.$layout_name.'/images/global/buttons/_sbutton_previous.gif" > </div> </div> </form> </div> </div>'; } else { $main_content .= ' <div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <div class="Text" >Services Page Errors</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" > <tr> <td>'; foreach($services_errors as $service_error) $main_content .= $service_error . '<br>'; $main_content .= ' </td> </tr> </table> </div> </td> </tr> </table> </div><BR> <TABLE BORDER=0 WIDTH=100%> <TR> <TD ALIGN=center> <table border="0" cellspacing="0" cellpadding="0" > <form action="?subtopic=accountmanagement&action=services" method="post"> <input type="hidden" name="ServiceID" value="' . $service_id . '" > <input type="hidden" name="PMCID" value="' . $payment_method . '" > <input type="hidden" name="ServiceCategoryID" value="'.$serviceCategoryID.'" /> <input type="hidden" name="selectFriend" value="'.$friend_name.'"> <input type="hidden" name="sendTo" value="'.$sendTo.'"> <input type="hidden" name="step" value="2"> <tr> <td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div> <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/global/buttons/_sbutton_back.gif" > </div> </div> </td> </tr> </form> </table> </TD> </TR> </TABLE>'; } } if($step == 4) { $serviceCategoryID = (int) $_REQUEST['ServiceCategoryID']; $payment_method = (int) $_REQUEST['PMCID']; $service_id = (int) $_REQUEST['ServiceID']; $service_info = $SQL->query("SELECT * FROM `z_shop_offer` WHERE `id` = '$service_id'")->fetch(); $sendTo = $_REQUEST['sendTo']; $sendFriend = $_REQUEST['selectFriend']; $friendInfo = new Player(); $friendInfo->find($sendFriend); if($sendTo == "friend" && !$friendInfo->isLoaded()) $services_errors[] = "The friend to whom you want to send the gift does not exist."; $service_points = $service_info['coins']; $debitPoints = $account_logged->getPremiumPoints() - $service_points; $rules_accept = (int) $_REQUEST['RulesAccept']; $orderDate = time(); $account_name = $account_logged->getName(); $friend_acc = $friendInfo->getAccount()->getName(); if($account_logged->getPremiumPoints() < $service_points) $services_errors[] = "You need at least ".$service_points." tibia coins to purchase it."; if($rules_accept == 0) $services_errors[] = "You have to accept the ".$config['server']['serverName']." Rules."; if(empty($services_errors)) { if( $_SERVER['REQUEST_METHOD']=='POST' ) { $hash = md5( implode( $_POST ) ); if( isset( $_SESSION['hash'] ) && $_SESSION['hash'] == $hash ) { // Refresh! Não faz nada ou re-exibe o formulário preenchido } else { $_SESSION['hash'] = $request; if($sendTo == "friend") { $add_order = $SQL->query("INSERT INTO `z_shop_payment` (`account_name`,`service_id`,`service_category_id`,`payment_method_id`,`coins`,`status`,`date`,`gift`) VALUES ('$account_name','$service_id','$serviceCategoryID','$payment_method','$service_points','gift','$orderDate','0')"); $add_friend = $SQL->query("INSERT INTO `z_shop_payment` (`account_name`,`service_id`,`service_category_id`,`payment_method_id`,`coins`,`status`,`date`,`gift`) VALUES ('$friend_acc','$service_id','$serviceCategoryID','$payment_method','$service_points','ready','$orderDate','1')"); } else { $add_order = $SQL->query("INSERT INTO `z_shop_payment` (`account_name`,`service_id`,`service_category_id`,`payment_method_id`,`coins`,`status`,`date`,`gift`) VALUES ('$account_name','$service_id','$serviceCategoryID','$payment_method','$service_points','ready','$orderDate','0')"); } $account_logged->setPremiumPoints($debitPoints); $account_logged->save(); } } } if(empty($services_errors)) { $main_content .= ' <div class="TableContainer" > <table class="Table5" cellpadding="0" cellspacing="0"> <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <div class="Text" >'.$service.'</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer"> <table style="width:100%;" > <tr> <td> <div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rt.gif);" ></div> </div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" style="border:1px solid #faf0d7;" > <tr>'; if($sendTo == "friend") $main_content .= ' <td>Thank you for your order. The '.$service_info['offer_name'].' been sent to your friend successfully.</td>'; else $main_content .= ' <td>Thank you for your order. The '.$service_info['offer_name'].' is available for you to choose the character which will activate . Simply access your available products and activate.</td>'; $main_content .= ' </tr> </table> </div> </div> <div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-br.gif);" ></div> </div> </div> </td> </tr> </table> </div> </td> </tr> </table> </div> <TABLE width="100%"> <tr align="center"> <td> <form action="?subtopic=accountmanagement&action=manage" method="post" style="padding:0px;margin:0px;" > <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div> <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/global/buttons/_sbutton_back.gif" > </div> </div> </form> </td> </tr> </TABLE>'; } if(!empty($services_errors)) { $main_content .= ' <div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <div class="Text" >Services Page Errors</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" > <tr> <td>'; foreach($services_errors as $service_error) $main_content .= $service_error . '<br>'; $main_content .= ' </td> </tr> </table> </div> </td> </tr> </table> </div><BR> <TABLE BORDER=0 WIDTH=100%> <TR> <TD ALIGN=center> <table border="0" cellspacing="0" cellpadding="0" > <form action="?subtopic=accountmanagement&action=services" method="post"> <input type="hidden" name="ServiceID" value="' . $_REQUEST['ServiceID'] . '" /> <input type="hidden" name="PMCID" value="' . $_REQUEST['PMCID'] . '" /> <input type="hidden" name="ServiceCategoryID" value="' . $_REQUEST['ServiceCategoryID'] . '" /> <input type="hidden" name="Price" value="' . $_REQUEST['Price'] . '" /> <input type="hidden" name="selectFriend" value="'.$sendFriend.'"> <input type="hidden" name="sendTo" value="'.$sendTo.'"> <input type="hidden" name="step" value="3"> <tr> <td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div> <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/global/buttons/_sbutton_back.gif" > </div> </div> </td> </tr> </form> </table> </TD> </TR> </TABLE>'; } }  
    • By Patrick Silva
      Boa noite a todos!
       
      Gostaria muito de ajuda e orientação para estudar sources de servidores do Tibia.
      Busco um pontapé inicial para começar a compreender melhor. É possível buscar essa ajuda aqui? Quero aprender!
      Para fins de estudos para autoconhecimento e criar meu próprio servidor.
       
      Tenho pretensões de criar algo estilo survival zumbi e quero buscar no fórum por onde devo começar a estudar e qual base seria legal para usar como estudo.
       
      Desculpe se aqui não é o local correto!
×
×
  • Create New...

Important Information

Confirmação de Termo