Ir para conteúdo

diff

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    diff deu reputação a Natanael Beckman em DEV C++ Compilando TFS no Windows   
    DEV C++,  aprenda a compila uma source TFS!
     
    Downloads(Baixe de acordo as configurações do seu windows):
    DEV C++ CONFIGURADO PARA 32BITS
    DEV C++ CONFIGURADO PARA 64BITS
    REV 3884 TFS 0.4
     
    Certo, feitos os downloads, extrai DEV C++ no Disco C e REV 3884 em Documentos.
    ======================================
    Abra o DEV C++:
    ======================================

    ======================================
    Abra a Source:
    ======================================

    ======================================
    Localize a pasta da Source e abra o arquivo TheForgottenServer.dev, Documentos> trunk.r3884> dev-cpp> TheForgottenServer.dev:
    ======================================

    =============================================================

    ======================================
    Aguarde carregar todos os arquivos:
    ======================================

    ======================================
    Vamos adicionar o parâmetro -D__CONSOLE__ no teclado digita ALT + P, clique em parameters e adicione o parâmetro... Feito? clique em OK:
    ======================================

    ======================================
    Vamos compilar Source, no teclado digite CTRL+F9 e aguarde finalizar o processo:
    ======================================

    ======================================
    Se der tudo certo em Log vai estar como mostra a imagem abaixo:
    ======================================

    ======================================
    Verifique na pasta Documentos> trunk.r3884> dev-cpp você vai encontrar o arquivo TheForgottenServer.exe e pronto meu parabéns você compilou!
    ======================================

    ===========================================
    Só isso galera tutorial rápido resumido e útil!
    Créditos Natanael Beckman!    
    ===========================================     
     
    Caso você adquira uma source com apenas os arquivos .cpp e .h e não sabe como compilar o projeto, abaixo vamos explicar:
    Na pasta onde está localizado os arquivos .cpp e .h crie uma pasta chamada dev-cpp, e dentro dela adicione uma imagem icone.
     

     
    Abra o DEV-C++, clique em  File> New> Project:
     

     
    Logo em seguida selecione Empty Project, em name terá o nome Project1 altere utilize o nome quer quiser, após isso clique em OK e em seguida selecione a pasta dev-cpp que criamos:
     

     
    Agora selecione a opção Win32GUI caso use source OTX ou TFS selecione Win32Console ao lado << Browse selecione a imagem do icone que está na pasta Dev-Cpp.
     

     
    No mesmo menu na aba Parameters em C++ compiler adicione os seguintes parâmetros:
    -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D__GROUND_CACHE__ -D__USE_SQLITE__ -D__USE_MYSQL__ -D__CONSOLE__ -D__WAR_SYSTEM__ E em Linker adicione as seguintes libs:
    -lboost_filesystem -lboost_thread -lboost_system -lboost_regex -lsqlite3 -lwsock32 -llua5.1 -lws2_32 -leay32 -lmysql -lxml2 -lgmp -lz -s   No mesmo Menu na aba Build Option escreva na segunda coluna horizontal escreva Obj e dê OK.     Na lateral terá o nome do seu projeto o meu no caso é The Forgotten Server, clique com o botão direito do mouse em cima do nome e clique na opção Add Project:      Selecione na pasta da sua source todos os arquivos .cpp e .h após isso salva o projeto e já pode compilar CTRL+F9:         OpenSSL 0.9.8   1º baixe http://devpaks.org/details.php?devpak=73 2° abra Dev-Cpp > Tools > Packager Manager > Install > Seleciona o arquivo baixado e instala, fecha abre e testa!
      Clica aqui \/
  2. Gostei
    diff deu reputação a Natanael Beckman em ShopGuild TFS 1.0   
    Shop Guild TFS 1.0
    Bom, vamos ao sistema:

    Em talkactions.xml, adicione a tag abaixo:
          <talkaction words="!guildpoints" separator=" " script="guildpoints.lua"/> Na pasta talkactions/scripts faça um .lua com o nome guildpoints e dentro dele adicione os coder abaixo: local config = {         executeInterval = 24,         minimumLevel = 80,         membersNeeded = 10,         minimumDifferentIps = 6,         pointAmount = 9 } local function getValidAccounts(guild)         local resultId = db.storeQuery('SELECT a.`id` FROM `accounts` a, `guild_membership` m, `players` p WHERE m.`guild_id` = ' ..guild:getId() .. ' AND p.`id` = m.`player_id` AND p.`level` > ' ..  config.minimumLevel .. ' and a.`id` = p.`account_id` AND a.`guild_points_stats` = 0 GROUP BY a.`id`;')         if resultId == false then                 return {}         end         local accounts = {}         repeat                 table.insert(accounts, result.getDataInt(resultId, 'id'))         until not result.next(resultId)         result.free(resultId)         return accounts end function onSay(cid, words, param)         local player = Player(cid)         local guild = player:getGuild()         if not guild or player:getGuildLevel() ~= GUILDLEVEL_LEADER then                 player:getPosition():sendMagicEffect(CONST_ME_POFF)                 player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Only guild leader can request points.')                 return false         end         local resultId = db.storeQuery('SELECT `last_execute_points` FROM `guilds` WHERE id = ' .. guild:getId())         if resultId == false then                 player:getPosition():sendMagicEffect(CONST_ME_POFF)                 player:sendCancelMessage('Error while running database query.')                 return false         end         local lastExecution = result.getDataInt(resultId, 'last_execute_points')         result.free(resultId)         if lastExecution >= os.time() then                 player:getPosition():sendMagicEffect(CONST_ME_POFF)                 player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'The command can only be run once every ' ..config.executeInterval .. ' hours.')                 return false         end         local members = guild:getMembersOnline()         for i = #members, 1, -1 do                 if members[i]:getLevel() < config.minimumLevel then                         table.remove(members, i)                 end         end         if #members < config.membersNeeded then                 player:getPosition():sendMagicEffect(CONST_ME_POFF)                 player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Only ' .. #members .. ' guild members online, you need ' ..config.membersNeeded .. ' guild members with level ' .. config.minimumLevel .. ' or higher.')                 return false         end         local ipDictionary, ipCount = {}, 0         for i = 1, #members do                 local ip = members[i]:getIp()                 if not ipDictionary[ip] then                         ipDictionary[ip] = true                         ipCount = ipCount + 1                 end         end         if ipCount < config.minimumDifferentIps then                 player:getPosition():sendMagicEffect(CONST_ME_POFF)                 player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Only ' .. ipCount .. ' members are valid, you need ' ..config.minimumDifferentIps .. ' players with different ip addresses.')                 return false         end         local validAccounts = getValidAccounts(guild)         db.query('UPDATE `guilds` SET `last_execute_points` = ' .. (os.time() + config.executeInterval * 3600) .. ' WHERE `guilds`.`id` = ' .. guild:getId() .. ';')         player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, #validAccounts .. ' guild members received points.')         if #validAccounts > 0 then                 db.query('UPDATE `accounts` SET `guild_points` = `guild_points` + ' .. config.pointAmount .. ', `guild_points_stats` = ' .. os.time() .. ' WHERE `id` IN (' .. table.concat(validAccounts, ',') .. ');')                 for i = 1, #members do                         local member = members[i]                         if isInArray(validAccounts, member:getAccountId()) then                                 member:sendTextMessage(MESSAGE_INFO_DESCR, 'You received ' .. config.pointAmount .. ' guild points.')                         end                 end         end         return false end No coder acima bem no inicio tem as linhas seguintes para configurar:

    executeInterval = 24, ( Intervalo para execução do comando, ae está de 24 em 24hrs)
    membersNeeded = 10, (Quantos players é preciso está online para poder executar o comando.)
    minimumDifferentIps = 6, (Quantos IPS diferentes são necessários para executar o comando no exemplo ae tem 6.)
    minimumLevel = 80, (Aqui adicione o level minimo, é necessário que todos os player da guild tenha o level pedido para o lider executar o comando.)
    pointAmount = 9, (Aqui é a quantidade de pontos para adicionar em cada player da guild.)
     
    Em data/globalevents/scripts crie um arquivo chamado shopguild.lua e adicione o code a seguir:
    -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 18 -- 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.storeQuery("SELECT * FROM z_ots_guildcomunication")     if(result_plr ~= false) then         repeat             local id = tonumber(result.getDataInt(result_plr, "id"))             local action = tostring(result.getDataString(result_plr, "action"))             local delete = tonumber(result.getDataInt(result_plr, "delete_it"))             local cid = getPlayerByName(tostring(result.getDataString(result_plr, "name")))             if(cid) then                 local itemtogive_id = tonumber(result.getDataInt(result_plr, "param1"))                 local itemtogive_count = tonumber(result.getDataInt(result_plr, "param2"))                 local container_id = tonumber(result.getDataInt(result_plr, "param3"))                 local container_count = tonumber(result.getDataInt(result_plr, "param4"))                 local add_item_type = tostring(result.getDataString(result_plr, "param5"))                 local add_item_name = tostring(result.getDataString(result_plr, "param6"))                 local received_item = 0                 local full_weight = 0                 if(add_item_type == 'container') then                     container_weight = getItemWeight(container_id, 1)                     if(isItemRune(itemtogive_id)) then                         items_weight = container_count * getItemWeight(itemtogive_id, 1)                     else                         items_weight = container_count * getItemWeight(itemtogive_id, itemtogive_count)                     end                     full_weight = items_weight + container_weight                 else                     full_weight = getItemWeight(itemtogive_id, itemtogive_count)                     if(isItemRune(itemtogive_id)) then                         full_weight = getItemWeight(itemtogive_id, 1)                     else                         full_weight = getItemWeight(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(type(received_item) == "number" and received_item == RETURNVALUE_NOERROR) then                         doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.')                         db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")                         db.query("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         until not result.next(result_plr)         result.free(result_plr)     end     return true end Em data/globalevents/globalevents.xml adicione a seguinte tag:
    <globalevent name="shopguild" interval="300" event="script" value="shopguild.lua"/> Certo, a parte do servidor é esta, ta feita, vamos adicionar a database o coder a seguir:
                      ALTER TABLE `accounts` ADD `guild_points` INTEGER(11) NOT NULL DEFAULT 0;                   ALTER TABLE `accounts` ADD `guild_points_stats` INT NOT NULL DEFAULT '0';                   ALTER TABLE `guilds` ADD `last_execute_points` INT NOT NULL DEFAULT '0';                   CREATE TABLE `z_shopguild_offer` (                         `id` int(11) NOT NULL auto_increment,                         `points` int(11) NOT NULL default '0',                         `itemid1` int(11) NOT NULL default '0',                         `count1` int(11) NOT NULL default '0',                         `itemid2` int(11) NOT NULL default '0',                         `count2` int(11) NOT NULL default '0',                         `offer_type` varchar(255) default NULL,                         `offer_description` text NOT NULL,                         `offer_name` varchar(255) NOT NULL,                         `pid` INT(11) NOT NULL DEFAULT '0',                   PRIMARY KEY (`id`))                   CREATE TABLE `z_shopguild_history_item` (                         `id` int(11) NOT NULL auto_increment,                         `to_name` varchar(255) NOT NULL default '0',                         `to_account` int(11) NOT NULL default '0',                         `from_nick` varchar(255) NOT NULL,                         `from_account` int(11) NOT NULL default '0',                         `price` int(11) NOT NULL default '0',                         `offer_id` int(11) NOT NULL default '0',                         `trans_state` varchar(255) NOT NULL,                         `trans_start` int(11) NOT NULL default '0',                         `trans_real` int(11) NOT NULL default '0',                   PRIMARY KEY (`id`))                   CREATE TABLE `z_shopguild_history_pacc` (                         `id` int(11) NOT NULL auto_increment,                         `to_name` varchar(255) NOT NULL default '0',                         `to_account` int(11) NOT NULL default '0',                         `from_nick` varchar(255) NOT NULL,                         `from_account` int(11) NOT NULL default '0',                         `price` int(11) NOT NULL default '0',                         `pacc_days` int(11) NOT NULL default '0',                         `trans_state` varchar(255) NOT NULL,                         `trans_start` int(11) NOT NULL default '0',                         `trans_real` int(11) NOT NULL default '0',                   PRIMARY KEY (`id`)) CREATE TABLE IF NOT EXISTS `z_ots_guildcomunication` (   `id` int(11) NOT NULL AUTO_INCREMENT,   `name` varchar(255) NOT NULL,   `type` varchar(255) NOT NULL,   `action` varchar(255) NOT NULL,   `param1` varchar(255) NOT NULL,   `param2` varchar(255) NOT NULL,   `param3` varchar(255) NOT NULL,   `param4` varchar(255) NOT NULL,   `param5` varchar(255) NOT NULL,   `param6` varchar(255) NOT NULL,   `param7` varchar(255) NOT NULL,   `delete_it` int(2) NOT NULL DEFAULT '1',   PRIMARY KEY (`id`) ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=13107; Olha estamos quase finalizando tudo, só precisamos terminar a parte de web.
    O meu GuildShop eu copiei meu shopsystem.php e fiz umas modificações, simples você pode fazer o mesmo é menos trabalhoso.
    Copie o shopsystem.php renomeie para shopguild.php, após abra-o e modifique como manda a seguir:

    shop_system para shopguild_system
    premium_points para guild_points
    premium points para guild points
    z_shop_offer para z_shopguild_offer
    shopsystem para shopguild
    z_shop_history_pacc para z_shopguild_history_pacc
    z_shop_history_item para z_shopguild_history_item
    z_ots_comunication para z_ots_guildcomunication
     
    Ou utilize este já pronto:
    shopguild.php
     
    O shopguildadmin.php está no link abaixo, basta fazer o mesmo procedimento:
    shopguildadmin.php
     
    Em index.php add:
    case "shopguild";    $topic = "Shop Guild";    $subtopic = "shopguild";    include("shopguild.php"); break; case "shopguildadmin";    $topic = "ShopGuild Admin";    $subtopic = "shopguildadmin";    include("shopguildadmin.php"); break; Vá em config.php adicione:
    $config['site']['shopguild_system'] = 1; $config['site']['access_adminguild_panel'] = 9; Vá em layouts.php adicione abaixo de buypoints:
                                    <a href='?subtopic=shopguild'>                                         <div id='submenu_shopguild' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)'onMouseOut='MouseOutSubmenuItem(this)'>                                                 <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>                                                 <div id='ActiveSubmenuItemIcon_shopguild' class='ActiveSubmenuItemIcon'style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>                                                 <div class='SubmenuitemLabel'>Shop Guild</div>                                                 <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>                                         </div>                                 </a> Em layouts.php add depois do shopadmin:
    if($group_id_of_acc_logged >= $config['site']['access_adminguild_panel'])   echo "<a href='?subtopic=shopadmin'>                                    <div id='submenu_shopguildadmin' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)'onMouseOut='MouseOutSubmenuItem(this)'>                                           <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>                                           <div id='ActiveSubmenuItemIcon_shopguildadmin' class='ActiveSubmenuItemIcon'style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div>                                           <div class='SubmenuitemLabel'><font color=red>! ShopGuild Admin !</font></div>                                          <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div>                                    </div>                             </a>"; Em shopsystem.php procure por:
          elseif($action == 'show_history') {                 if(!$logged) {                         $main_content .= 'Please login first.';                 } else{                         $items_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';');                         if(is_object($items_history_received)) {                                 foreach($items_history_received as $item_received) {                                         if($account_logged->getId() == $item_received['to_account'])                                                 $char_color = 'green';                                         else                                                 $char_color = 'red';                                                 $items_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$item_received['to_name'].'</font></td><td>';                                         if($account_logged->getId() == $item_received['from_account'])                                                 $items_received_text .= '<i>Your account</i>';                                         else                                                 $items_received_text .= $item_received['from_nick'];                                                                                                 $items_received_text .= '</td><td>'.$item_received['offer_id'].'</td><td>'.$item_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>';                                                                                                                                                                                                         if($item_received['trans_real'] > 0)                                                 $items_received_text .= '<td>'.date("j F Y, H:i:s",$item_received['trans_real']).'</td>';                                         else                                                 $items_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>';                                                 $items_received_text .= '</tr>';                                 }                         }                         $paccs_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';');                         if(is_object($paccs_history_received)) {                                 foreach($paccs_history_received as $pacc_received) {                                         if($account_logged->getId() == $pacc_received['to_account'])                                                 $char_color = 'green';                                         else                                                 $char_color = 'red';                                                 $paccs_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$pacc_received['to_name'].'</font></td><td>';                                         if($account_logged->getId() == $pacc_received['from_account'])                                                 $paccs_received_text .= '<i>Your account</i>';                                         else                                                 $paccs_received_text .= $pacc_received['from_nick'];                                                 $paccs_received_text .= '</td><td>'.$pacc_received['pacc_days'].' days</td><td>'.$pacc_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $pacc_received['trans_real']).'</td></tr>';                                 }                         }                         $main_content .= '<center><h1>Transactions History</h1></center>';                         if(!empty($items_received_text))                                 $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="6"><font color="white" size="4"><b>&nbsp;Item Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Cost</b></td><td><b>Bought on page</b></td><td><b>Received on '.$config['server']['serverName'].'</b></td></tr>'.$items_received_text.'</table><br />';                         if(!empty($paccs_received_text))                                 $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="5"><font color="white" size="4"><b>&nbsp;Pacc Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Duration</b></td><td><b>Cost</b></td><td><b>Added:</b></td></tr>'.$paccs_received_text.'</table><br />';                         if(empty($paccs_received_text) && empty($items_received_text))                                 $main_content .= 'You did not buy/receive any items or PACC.';                 }         } Troque por:
            elseif($action == 'show_history') {                 if(!$logged) {                         $main_content .= 'Please login first.';                 } else{                         $items_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';');                         if(is_object($items_history_received)) {                                 foreach($items_history_received as $item_received) {                                         if($account_logged->getId() == $item_received['to_account'])                                                 $char_color = 'green';                                         else                                                 $char_color = 'red';                                                 $items_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$item_received['to_name'].'</font></td><td>';                                         if($account_logged->getId() == $item_received['from_account'])                                                 $items_received_text .= '<i>Your account</i>';                                         else                                                 $items_received_text .= $item_received['from_nick'];                                                                                                 $items_received_text .= '</td><td>'.$item_received['offer_id'].'</td><td>'.$item_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>';                                                                                                                                                                                                         if($item_received['trans_real'] > 0)                                                 $items_received_text .= '<td>'.date("j F Y, H:i:s",$item_received['trans_real']).'</td>';                                         else                                                 $items_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>';                                                 $items_received_text .= '</tr>';                                 }                         }                         $itemsguild_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shopguild_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';');                         if(is_object($itemsguild_history_received)) {                                 foreach($itemsguild_history_received as $itemguild_received) {                                         if($account_logged->getId() == $itemguild_received['to_account'])                                                 $char_color = 'green';                                         else                                                 $char_color = 'red';                                                 $itemsguild_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$itemguild_received['to_name'].'</font></td><td>';                                         if($account_logged->getId() == $itemguild_received['from_account'])                                                 $itemsguild_received_text .= '<i>Your account</i>';                                         else                                                 $itemsguild_received_text .= $itemguild_received['from_nick'];                                                                                                 $itemsguild_received_text .= '</td><td>'.$itemguild_received['offer_id'].'</td><td>'.$itemguild_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $itemguild_received['trans_start']).'</td>';                                                                                                                                                                                                         if($itemguild_received['trans_real'] > 0)                                                 $itemsguild_received_text .= '<td>'.date("j F Y, H:i:s",$itemguild_received['trans_real']).'</td>';                                         else                                                 $itemsguild_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>';                                                 $itemsguild_received_text .= '</tr>';                                 }                         }                         $paccs_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';');                         if(is_object($paccs_history_received)) {                                 foreach($paccs_history_received as $pacc_received) {                                         if($account_logged->getId() == $pacc_received['to_account'])                                                 $char_color = 'green';                                         else                                                 $char_color = 'red';                                                 $paccs_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$pacc_received['to_name'].'</font></td><td>';                                         if($account_logged->getId() == $pacc_received['from_account'])                                                 $paccs_received_text .= '<i>Your account</i>';                                         else                                                 $paccs_received_text .= $pacc_received['from_nick'];                                                 $paccs_received_text .= '</td><td>'.$pacc_received['pacc_days'].' days</td><td>'.$pacc_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $pacc_received['trans_real']).'</td></tr>';                                 }                         }                         $paccsguild_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shopguild_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';');                         if(is_object($paccsguild_history_received)) {                                 foreach($paccsguild_history_received as $paccguild_received) {                                         if($account_logged->getId() == $paccguild_received['to_account'])                                                 $char_color = 'green';                                         else                                                 $char_color = 'red';                                                 $paccsguild_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$paccguild_received['to_name'].'</font></td><td>';                                         if($account_logged->getId() == $paccguild_received['from_account'])                                                 $paccsguild_received_text .= '<i>Your account</i>';                                         else                                                 $paccsguild_received_text .= $paccguild_received['from_nick'];                                                 $paccsguild_received_text .= '</td><td>'.$paccguild_received['pacc_days'].' days</td><td>'.$paccguild_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $paccguild_received['trans_real']).'</td></tr>';                                 }                         }                         $main_content .= '<center><h1>Transactions History</h1></center>';                         if(!empty($items_received_text))                                 $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="6"><font color="white" size="4"><b>&nbsp;ShopServer Item Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Cost</b></td><td><b>Bought on page</b></td><td><b>Received on '.$config['server']['serverName'].'</b></td></tr>'.$items_received_text.'</table><br />';                         if(!empty($itemsguild_received_text))                                 $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="6"><font color="white" size="4"><b>&nbsp;ShopGuild Item Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Cost</b></td><td><b>Bought on page</b></td><td><b>Received on '.$config['server']['serverName'].'</b></td></tr>'.$itemsguild_received_text.'</table><br />';                         if(!empty($paccs_received_text))                                 $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="5"><font color="white" size="4"><b>&nbsp;ShopServer VIP Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Duration</b></td><td><b>Cost</b></td><td><b>Added:</b></td></tr>'.$paccs_received_text.'</table><br />';                         if(!empty($paccsguild_received_text))                                 $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="5"><font color="white" size="4"><b>&nbsp;ShopGuild VIP Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Duration</b></td><td><b>Cost</b></td><td><b>Added:</b></td></tr>'.$paccsguild_received_text.'</table><br />';                         if(empty($paccs_received_text) && empty($items_received_text))                                 $main_content .= 'You did not buy/receive any items or PACC.';                         if(empty($paccsguild_received_text) && empty($itemsguild_received_text))                                 $main_content .= 'You did not buy/receive any items or PACC.';                 }         } Finalmente terminamos!
    Bom todo esse processo é feito só para facilitar tudo pra você e o player e pra diferenciar o Shop System do Shop Guild, porque um sustenta as despesas do server e o outro atrai player, porque pra ter player é preciso ter player.

    Galera acredito que não esteja faltando nada, espero que gostem e tudo que eu poder fazer para nossas melhoras estarei postando, me desculpem meu erros de português mais o que importa aqui é o script está correto, abraços!


    Créditos:
    Natanael Beckman
     
    Não proíbo ninguém de copia o tópico só peço que onde você adicione os créditos mencionados.

Informação Importante

Confirmação de Termo