Ir para conteúdo

Natanael Beckman

Membro
  • Registro em

  • Última visita

Tudo que Natanael Beckman postou

  1. Mano quando você for abrir seu vertrigo com o botão direito do mouse seleciona a opção executar como administrador veja se resolve seu problema.
  2. Mano você ta usando linux mesmo? Vertrigo né windows não?
  3. http://127.0.0.1/phpmyadmin
  4. Pontos principais e difíceis de manter sempre: - Online - Suporte - Sem Bugs - Sem Lag Isso é o essencial! ------------------------------------------------ Quest novas acho legal... Itens no Shop, pode ser desde que não traga tanto desequilíbrio no PVP e naturalmente sempre traz. 8.60 o PVP que presta encerra nesta versão. 10.41 cheio de inovações atrai muita gente. Global+custom desde que não vire um Globaiak. EXP por stages de Easy a Very Hard é sucesso!
  5. [21:0:56.856] [Error - Test Interface] [21:0:56.857] domodlib('PotionExpBloodConfigs') [21:0:56.858] if getPlayerStorageValue(cid, 43891) > os.time() then [21:0:56.858] return doPlayerSendCancel(cid, "Voce ja esta sob efeito da pot ion.") [21:0:56.859] end [21:0:56.860] function onUse(cid, item, fromPosition, itemEx, toPosition) [21:0:56.861] local cfg = {} [21:0:56.861] cfg.refuel = 42 * 60 * 1000 [21:0:56.862] local config = { [21:0:56.863] storage = 43891, [21:0:56.863] hours = 24 [21:0:56.864] } [21:0:56.865] if getPlayerStorageValue(cid, config.storage) >= os.time() then [21:0:56.866] return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but you have wait "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,c onfig.storage)).."to use exp potion again.") [21:0:56.866] end [21:0:56.867] if(getPlayerStamina(cid) >= cfg.refuel) then [21:0:56.867] doPlayerSendCancel(cid, "Voce ja esta sob efeito da poti on.") [21:0:56.868] else [21:0:56.869] doPlayerSetStamina(cid, cfg.refuel) [21:0:56.870] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORAN GE, "Voce usou a pot.") [21:0:56.870] setPlayerStorageValue(cid, config.storage, os.time()+con fig.hours*3600) [21:0:56.871] end [21:0:56.871] return true [21:0:56.872] end [21:0:56.873] if configs.removeonuse == yes then [21:0:56.874] doRemoveItem(item.uid, 1) [21:0:56.874] end [21:0:56.875] for i = configs.time*60, 1, -1 do [21:0:56.876] local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) [21:0:56.877] if #a < 4 then [21:0:56.877] a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) [21:0:56.878] end [21:0:56.878] if i == configs.time*60 then [21:0:56.879] creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "O ef eito da exp potion acabou.") [21:0:56.880] end [21:0:56.880] creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, " O efeito da exp potion termina em "..a..".") [21:0:56.881] end [21:0:56.882] doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlaye rExtraExpRate(cid)/100)) [21:0:56.882] creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, ci d, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) [21:0:56.883] doPlayerSendTextMessage(cid, 25, "Voce vai receber o dobro de exp durante meia hora.") [21:0:56.883] doPlayerSetStorageValue(cid, 43891, os.time()+120) [21:0:56.884] setPlayerStorageValue(cid, 62165, os.time()) [21:0:56.885] creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 6 2165, 0) [21:0:56.885] return TRUE [21:0:56.887] Description: [21:0:56.890] (luaGetCreatureStorage) Creature not found [21:0:56.891] [Error - Test Interface] [21:0:56.892] domodlib('PotionExpBloodConfigs') [21:0:56.893] if getPlayerStorageValue(cid, 43891) > os.time() then [21:0:56.893] return doPlayerSendCancel(cid, "Voce ja esta sob efeito da pot ion.") [21:0:56.894] end [21:0:56.895] function onUse(cid, item, fromPosition, itemEx, toPosition) [21:0:56.896] local cfg = {} [21:0:56.897] cfg.refuel = 42 * 60 * 1000 [21:0:56.897] local config = { [21:0:56.898] storage = 43891, [21:0:56.899] hours = 24 [21:0:56.899] } [21:0:56.900] if getPlayerStorageValue(cid, config.storage) >= os.time() then [21:0:56.900] return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but you have wait "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,c onfig.storage)).."to use exp potion again.") [21:0:56.901] end [21:0:56.902] if(getPlayerStamina(cid) >= cfg.refuel) then [21:0:56.902] doPlayerSendCancel(cid, "Voce ja esta sob efeito da poti on.") [21:0:56.903] else [21:0:56.904] doPlayerSetStamina(cid, cfg.refuel) [21:0:56.904] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORAN GE, "Voce usou a pot.") [21:0:56.905] setPlayerStorageValue(cid, config.storage, os.time()+con fig.hours*3600) [21:0:56.905] end [21:0:56.906] return true [21:0:56.906] end [21:0:56.908] if configs.removeonuse == yes then [21:0:56.909] doRemoveItem(item.uid, 1) [21:0:56.910] end [21:0:56.911] for i = configs.time*60, 1, -1 do [21:0:56.912] local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) [21:0:56.913] if #a < 4 then [21:0:56.913] a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) [21:0:56.914] end [21:0:56.915] if i == configs.time*60 then [21:0:56.915] creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "O ef eito da exp potion acabou.") [21:0:56.916] end [21:0:56.917] creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, " O efeito da exp potion termina em "..a..".") [21:0:56.918] end [21:0:56.919] doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlaye rExtraExpRate(cid)/100)) [21:0:56.920] creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, ci d, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) [21:0:56.921] doPlayerSendTextMessage(cid, 25, "Voce vai receber o dobro de exp durante meia hora.") [21:0:56.922] doPlayerSetStorageValue(cid, 43891, os.time()+120) [21:0:56.922] setPlayerStorageValue(cid, 62165, os.time()) [21:0:56.923] creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 6 2165, 0) [21:0:56.924] return TRUE [21:0:56.925] Description: [21:0:56.926] [string "LuaInterface::loadBuffer"]:2: attempt to compare number w ith boolean [21:0:56.927] [Error - Event::checkScript] Cannot load script (domodlib('PotionE xpBloodConfigs') [21:0:56.927] if getPlayerStorageValue(cid, 43891) > os.time() then [21:0:56.928] return doPlayerSendCancel(cid, "Voce ja esta sob efeito da pot ion.") [21:0:56.929] end [21:0:56.930] function onUse(cid, item, fromPosition, itemEx, toPosition) [21:0:56.930] local cfg = {} [21:0:56.931] cfg.refuel = 42 * 60 * 1000 [21:0:56.932] local config = { [21:0:56.932] storage = 43891, [21:0:56.933] hours = 24 [21:0:56.934] } [21:0:56.935] if getPlayerStorageValue(cid, config.storage) >= os.time() then [21:0:56.935] return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but you have wait "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,c onfig.storage)).."to use exp potion again.") [21:0:56.936] end [21:0:56.937] if(getPlayerStamina(cid) >= cfg.refuel) then [21:0:56.938] doPlayerSendCancel(cid, "Voce ja esta sob efeito da poti on.") [21:0:56.938] else [21:0:56.939] doPlayerSetStamina(cid, cfg.refuel) [21:0:56.940] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORAN GE, "Voce usou a pot.") [21:0:56.940] setPlayerStorageValue(cid, config.storage, os.time()+con fig.hours*3600) [21:0:56.941] end [21:0:56.942] return true [21:0:56.942] end [21:0:56.944] if configs.removeonuse == yes then [21:0:56.944] doRemoveItem(item.uid, 1) [21:0:56.945] end [21:0:56.946] for i = configs.time*60, 1, -1 do [21:0:56.947] local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) [21:0:56.948] if #a < 4 then [21:0:56.949] a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) [21:0:56.949] end [21:0:56.950] if i == configs.time*60 then [21:0:56.951] creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "O ef eito da exp potion acabou.") [21:0:56.953] end [21:0:56.954] creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, " O efeito da exp potion termina em "..a..".") [21:0:56.954] end [21:0:56.956] doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlaye rExtraExpRate(cid)/100)) [21:0:56.957] creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, ci d, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) [21:0:56.958] doPlayerSendTextMessage(cid, 25, "Voce vai receber o dobro de exp durante meia hora.") [21:0:56.959] doPlayerSetStorageValue(cid, 43891, os.time()+120) [21:0:56.960] setPlayerStorageValue(cid, 62165, os.time()) [21:0:56.960] creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 6 2165, 0)
  6. Essa mod abaixo é de um double EXP potion, preciso de uma alteração pra ser utilizada apenas uma vez por dia: <?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionBloodSystem" enabled="yes" author="MatheusMkalo" forum="XTibia.com"> <!-- Configs and Functions --> <config name="PotionExpBloodConfigs"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES addrate = 100, -- Exp que vai adicionar em % removeonuse = yes } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotionblood.lua --> <action itemid="12702" event="script"><![CDATA[ domodlib('PotionExpBloodConfigs') if getPlayerStorageValue(cid, 43891) > os.time() then return doPlayerSendCancel(cid, "Voce ja esta sob efeito da potion.") end if configs.removeonuse == yes then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "O efeito da exp potion acabou.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "O efeito da exp potion termina em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 25, "Voce vai receber o dobro de exp durante meia hora.") doPlayerSetStorageValue(cid, 43891, os.time()+120) setPlayerStorageValue(cid, 62165, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 62165, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotionBlood" event="script"><![CDATA[ domodlib('PotionExpBloodConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 62165) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 62165))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 62165))) * 1000 , cid, 62165, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 62165))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 62165))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62165)))*1000, cid, "O efeito da exp potion acabou.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62165)))-i)*1000, cid, "O efeito da exp potion vai acabar em "..a..".") end end return TRUE ]]></creaturescript> </mod>
  7. apt-get install libboost1.42-dev libboost-system1.42-dev libboost-filesystem1.42-dev libboost-date-time1.42-dev libboost-regex1.42-dev libboost-thread1.42-dev libgmp3-dev liblua5.1-0 liblua5.1-0-dev liblua50 liblua50-dev liblualib50 liblualib50-dev lua50 lua5.1 libsqlite0-dev libsqlite3-dev sqlite3 libmysql++-dev libmysqlclient-dev mysql-client-5.1 mysql-server-5.1 mysql-common libxml2-dev libxml++2.6-dev cpp gcc g++ make automake autoconf pkg-config subversion liblua5.1-sql-mysql-dev liblua5.1-sql-sqlite3-dev zlib1g-dev zlib1g libcrypto++-dev libcrypto++8
  8. Obrigado Bondx!
  9. Va em: htdocs/classes/account.php: public $data = array('name' => null, Adicione: public $data = array('name' => null, 'guild_points' => null, Em: public static $fields = array('id', Adicione: public static $fields = array('id', 'guild_points', Procure por: public function setPremiumPoints($value){$this->data['premium_points'] = $value;} public function getPremiumPoints(){return $this->data['premium_points'];} Adicione abaixo: public function setGuildPoints($value){$this->data['guild_points'] = $value;} public function getGuildPoints(){return $this->data['guild_points'];} Obrigado Luan pela assistência REp+
  10. Obrigado Galera
  11. 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.
  12. Mano eu Utilizo 64bits e compilo com o 64bits uso normal... Já que falou que não presta, pra mim é novidade.
  13. Vai na database em accounts em cima /\ clica em o nome SQL bota o code la, executa ver se adicionou e testa novamente! ALTER TABLE `accounts` ADD `premium_points` int(11) NOT NULL DEFAULT '0'; EDIT---------------------- É achei bem estranho instalar o site e não conter a coluna premium_points... Então o erro é no shopadmin.php, não esta enviando a quantidade de pontos para a coluna premium_points da acc destinada. Troque de shopadmin.php e faça novos testes, até onde sei o erro não está em outro lugar além disso, é claro se tudo estiver instalado corretamente. E se não conseguir ajustar, por enquanto adiciona os pontos manualmente inserindo a quantidade de pontos na coluna premium_points.
  14. Verifique na database, tabela accounts... Veja se existe a coluna premium_points.
  15. Verifique se está enviado por acc ou character name, tenta das duas forma e veja se chega...
  16. Pode ser a parte de globalevents verifique se fez a instalação correta de tudo mesmo passo a passo!

Informação Importante

Confirmação de Termo