Ir para conteúdo

Eduardo Perez

Membro
  • Registro em

  • Última visita

  1. Estou usando OTX 8.60. Gostaria de saber como eu faço para que toda vez que o jogador venda um ITEM pelo Shop do NPC ele recebá uma Storage qualquer. Para exemplificar melhor, vemos que no código abaixo o ITEM Wand of Vortex pode ser vendida do jogador para o NPC. shopModule:addSellableItem({'wand of vortex', 'vortex'}, 2190, 250, 'wand of vortex') Gostaria que assim que ele aceitasse fazer a venda de sua WAND, o jogador recebesse uma Storage XXXX. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'spellbook'}, 2175, 1222, 'spellbook') shopModule:addBuyableItem({'magic lightwand'}, 2163, 400, 'magic lightwand') shopModule:addBuyableItem({'small health'}, 8704, 20, 1, 'small health potion') shopModule:addBuyableItem({'health potion'}, 7618, 45, 1, 'health potion') shopModule:addBuyableItem({'mana potion'}, 7620, 50, 1, 'mana potion') shopModule:addBuyableItem({'strong health'}, 7588, 60, 1, 'strong health potion') shopModule:addBuyableItem({'strong mana'}, 7589, 60, 1, 'strong mana potion') shopModule:addBuyableItem({'great health'}, 7591, 80, 1, 'great health potion') shopModule:addBuyableItem({'great mana'}, 7590, 80, 1, 'great mana potion') shopModule:addBuyableItem({'great spirit'}, 8472, 150, 1, 'great spirit potion') shopModule:addBuyableItem({'ultimate health'}, 8473, 210, 1, 'ultimate health potion') shopModule:addBuyableItem({'antidote potion'}, 8474, 50, 1, 'antidote potion') shopModule:addSellableItem({'normal potion flask', 'normal flask'}, 7636, 5, 'empty small potion flask') shopModule:addSellableItem({'strong potion flask', 'strong flask'}, 7634, 10, 'empty strong potion flask') shopModule:addSellableItem({'great potion flask', 'great flask'}, 7635, 15, 'empty great potion flask') shopModule:addBuyableItemContainer({'bp blank'}, 1998, 2260, 220, 1, 'backpack of blank runes') shopModule:addBuyableItemContainer({'bp animate dead'}, 1998, 2316, 7520, 1, 'backpack of animate dead runes') shopModule:addBuyableItemContainer({'bp antidote'}, 2003, 2266, 1320, 1, 'backpack of antidote runes') shopModule:addBuyableItemContainer({'bp avalanche'}, 2002, 2274, 3620, 1, 'backpack of avalanche runes') shopModule:addBuyableItemContainer({'bp chameleon'}, 1998, 2291, 4220, 1, 'backpack of chameleon runes') shopModule:addBuyableItemContainer({'bp convince creature'}, 1998, 2290, 1620, 1, 'backpack of convince creature runes') shopModule:addBuyableItemContainer({'bp desintegrate'}, 2001, 2310, 1620, 1, 'backpack of desintegrate runes') shopModule:addBuyableItemContainer({'bp destroy field'}, 2003, 2261, 920, 1, 'backpack of destroy fields') shopModule:addBuyableItemContainer({'bp energy bomb'}, 2003, 2262, 6520, 1, 'backpack of energy bomb runes') shopModule:addBuyableItemContainer({'bp energy field'}, 1998, 2277, 2320, 1, 'backpack of energy fields') shopModule:addBuyableItemContainer({'bp energy wall'}, 2002, 2279, 6820, 1, 'backpack of energy wall runes') shopModule:addBuyableItemContainer({'bp explosion'}, 2001, 2313, 3820, 1, 'backpack of explosion runes') shopModule:addBuyableItemContainer({'bp fire bomb'}, 2000, 2305, 4720, 1, 'backpack of fire bomb runes') shopModule:addBuyableItemContainer({'bp fire field'}, 2000, 2301, 1720, 1, 'backpack of fire field runes') shopModule:addBuyableItemContainer({'bp fire wall'}, 2000, 2303, 4920, 1, 'backpack of fire wall runes') shopModule:addBuyableItemContainer({'bp fireball'}, 2000, 2302, 3020, 1, 'backpack of fire balls') shopModule:addBuyableItemContainer({'bp great fireball'}, 2000, 2304, 3620, 1, 'backpack of great fireball runes') shopModule:addBuyableItemContainer({'bp heavy magic missile'}, 2001, 2311, 2420, 1, 'backpack of heavy magic missile runes') shopModule:addBuyableItemContainer({'bp holy missile'}, 1999, 2295, 1600, 1, 'backpack of holy missile runes') shopModule:addBuyableItemContainer({'bp icicle'}, 2002, 2271, 3020, 1, 'backpack of icicle runes') shopModule:addBuyableItemContainer({'bp intense healing'}, 2003, 2265, 1920, 1, 'backpack of intense healing runes') shopModule:addBuyableItemContainer({'bp light magic missile'}, 1998, 2287, 820, 1, 'backpack of light magic missile runes') shopModule:addBuyableItemContainer({'bp magic wall'}, 1999, 2293, 7020, 1, 'backpack of magic wall runes') shopModule:addBuyableItemContainer({'bp paralyze'}, 2002, 2278, 13350, 1, 'backpack of paralyze runes') shopModule:addBuyableItemContainer({'bp poison bomb'}, 1998, 2286, 3420, 1, 'backpack of poison bomb runes') shopModule:addBuyableItemContainer({'bp poison field'}, 1998, 2285, 1320, 1, 'backpack of poison field runes') shopModule:addBuyableItemContainer({'bp poison wall'}, 1998, 2289, 4220, 1, 'backpack of poison wall runes') shopModule:addBuyableItemContainer({'bp soulfire'}, 2000, 2308, 2820, 1, 'backpack of soulfire runes') shopModule:addBuyableItemContainer({'bp stalagmite'}, 1998, 2292, 2400, 1, 'backpack of stalagmite runes') shopModule:addBuyableItemContainer({'bp stone shower'}, 1999, 2288, 3020, 1, 'backpack of stoneshower runes') shopModule:addBuyableItemContainer({'bp sudden death'}, 2003, 2268, 6520, 1, 'backpack of sudden death runes') shopModule:addBuyableItemContainer({'bp thunderstorm'}, 1999, 2315, 3020, 1, 'backpack of thunderstorm runes') shopModule:addBuyableItemContainer({'bp ultimate healing'}, 2002, 2273, 3520, 1, 'backpack of ultimate healing runes') shopModule:addBuyableItemContainer({'bp wild growth'}, 2002, 2269, 6420, 1, 'backpack of wild growth runes') shopModule:addBuyableItem({'blank rune'}, 2260, 10, 1, 'blank rune') shopModule:addBuyableItem({'animate dead'}, 2316, 375, 1, 'animate dead rune') shopModule:addBuyableItem({'antidote'}, 2266, 65, 1, 'antidote rune') shopModule:addBuyableItem({'avalanche'}, 2274, 180, 1, 'avalanche rune') shopModule:addBuyableItem({'chameleon'}, 2291, 210, 1, 'chameleon rune') shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune') shopModule:addBuyableItem({'desintegrate'}, 2310, 80, 1, 'desintegrate rune') shopModule:addBuyableItem({'destroy field'}, 2261, 45, 1, 'destroy field') shopModule:addBuyableItem({'energy bomb'}, 2262, 325, 1, 'energy bomb rune') shopModule:addBuyableItem({'energy field'}, 2277, 115, 1, 'energy field') shopModule:addBuyableItem({'energy wall'}, 2279, 340, 1, 'energy wall rune') shopModule:addBuyableItem({'explosion'}, 2313, 190, 1, 'explosion rune') shopModule:addBuyableItem({'fire bomb'}, 2305, 235, 1, 'fire bomb rune') shopModule:addBuyableItem({'fire field'}, 2301, 85, 1, 'fire field rune') shopModule:addBuyableItem({'fire wall'}, 2303, 245, 1, 'fire wall rune') shopModule:addBuyableItem({'fireball'}, 2302, 150, 1, 'fire ball') shopModule:addBuyableItem({'great fireball'}, 2304, 180, 1, 'great fireball rune') shopModule:addBuyableItem({'heavy magic missile'}, 2311, 120, 1, 'heavy magic missile rune') shopModule:addBuyableItem({'holy missile missile'}, 2295, 80, 1, 'holy missile rune') shopModule:addBuyableItem({'icicle'}, 2271, 150, 1, 'icicle rune') shopModule:addBuyableItem({'intense healing'}, 2265, 95, 1, 'intense healing rune') shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 1, 'light magic missile rune') shopModule:addBuyableItem({'magic wall'}, 2293, 200, 1, 'magic wall rune') shopModule:addBuyableItem({'paralyze'}, 2278, 250, 1, 'paralyze rune') shopModule:addBuyableItem({'poison bomb'}, 2286, 170, 1, 'poison bomb rune') shopModule:addBuyableItem({'poison field'}, 2285, 65, 1, 'poison field') shopModule:addBuyableItem({'poison wall'}, 2289, 210, 1, 'poison wall rune') shopModule:addBuyableItem({'soulfire'}, 2308, 140, 1, 'soulfire rune') shopModule:addBuyableItem({'stalagmite'}, 2292, 120, 1, 'stalagmite rune') shopModule:addBuyableItem({'stone shower'}, 2288, 150, 1, 'stoneshower rune') shopModule:addBuyableItem({'sudden death'}, 2268, 50, 1, 'sudden death rune') shopModule:addBuyableItem({'thunderstorm'}, 2315, 150, 1, 'thunderstorm rune') shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune') shopModule:addBuyableItem({'wild growth'}, 2269, 320, 1, 'wild growth rune') shopModule:addBuyableItemContainer({'bp slhp'}, 2000, 8704, 400, 1, 'backpack of small health potions') shopModule:addBuyableItemContainer({'bp hp'}, 2000, 7618, 900, 1, 'backpack of health potions') shopModule:addBuyableItemContainer({'bp mp'}, 2001, 7620, 1000, 1, 'backpack of mana potions') shopModule:addBuyableItemContainer({'bp shp'}, 2000, 7588, 2000, 1, 'backpack of strong health potions') shopModule:addBuyableItemContainer({'bp smp'}, 2001, 7589, 1600, 1, 'backpack of strong mana potions') shopModule:addBuyableItemContainer({'bp ghp'}, 2000, 7591, 3800, 1, 'backpack of great health potions') shopModule:addBuyableItemContainer({'bp gmp'}, 2001, 7590, 2400, 1, 'backpack of great mana potions') shopModule:addBuyableItemContainer({'bp gsp'}, 1999, 8472, 3800, 1, 'backpack of great spirit potions') shopModule:addBuyableItemContainer({'bp uhp'}, 2000, 8473, 6200, 1, 'backpack of ultimate health potions') shopModule:addBuyableItemContainer({'bp ap'}, 2002, 8474, 2000, 1, 'backpack of antidote potions') shopModule:addBuyableItem({'wand of vortex', 'vortex'}, 2190, 500, 'wand of vortex') shopModule:addBuyableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 1000, 1, 'wand of dragonbreath') shopModule:addBuyableItem({'wand of decay', 'decay'}, 2188, 2000, 1, 'wand of decay') shopModule:addBuyableItem({'wand of draconia', 'draconia'}, 8921, 3000, 1, 'wand of draconia') shopModule:addBuyableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 4000, 1, 'wand of cosmic energy') shopModule:addBuyableItem({'wand of inferno', 'inferno'}, 2187, 5000, 1, 'wand of inferno') shopModule:addBuyableItem({'wand of starstorm', 'starstorm'}, 8920, 6000, 1, 'wand of starstorm') shopModule:addBuyableItem({'wand of voodoo', 'voodoo'}, 8922, 7000, 1, 'wand of voodoo') shopModule:addBuyableItem({'snakebite rod', 'snakebite'}, 2182, 500, 1, 'snakebite rod') shopModule:addBuyableItem({'moonlight rod', 'moonlight'}, 2186, 1000, 1, 'moonlight rod') shopModule:addBuyableItem({'necrotic rod', 'necrotic'}, 2185, 2000, 1, 'necrotic rod') shopModule:addBuyableItem({'northwind rod', 'northwind'}, 8911, 3000, 1, 'northwind rod') shopModule:addBuyableItem({'terra rod', 'terra'}, 2181, 4000, 1, 'terra rod') shopModule:addBuyableItem({'hailstorm rod', 'hailstorm'}, 2183, 5000, 1, 'hailstorm rod') shopModule:addBuyableItem({'springsprout rod', 'springsprout'}, 8912, 6000, 1, 'springsprout rod') shopModule:addBuyableItem({'underworld rod', 'underworld'}, 8910, 7000, 1, 'underworld rod') shopModule:addSellableItem({'wand of vortex', 'vortex'}, 2190, 250, 'wand of vortex') shopModule:addSellableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 500, 'wand of dragonbreath') shopModule:addSellableItem({'wand of decay', 'decay'}, 2188, 1000, 'wand of decay') shopModule:addSellableItem({'wand of draconia', 'draconia'}, 8921, 2000, 'wand of draconia') shopModule:addSellableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 3000, 'wand of cosmic energy') shopModule:addSellableItem({'wand of inferno', 'inferno'},2187, 4000, 'wand of inferno') shopModule:addSellableItem({'wand of starstorm', 'starstorm'}, 8920, 5000, 'wand of starstorm') shopModule:addSellableItem({'wand of voodoo', 'voodoo'}, 8922, 6000, 'wand of voodoo') shopModule:addSellableItem({'snakebite rod', 'snakebite'}, 2182, 250,'snakebite rod') shopModule:addSellableItem({'moonlight rod', 'moonlight'}, 2186, 500, 'moonlight rod') shopModule:addSellableItem({'necrotic rod', 'necrotic'}, 2185, 1000, 'necrotic rod') shopModule:addSellableItem({'northwind rod', 'northwind'}, 8911, 2000, 'northwind rod') shopModule:addSellableItem({'terra rod', 'terra'}, 2181, 3000, 'terra rod') shopModule:addSellableItem({'hailstorm rod', 'hailstorm'}, 2183, 4000, 'hailstorm rod') shopModule:addSellableItem({'springsprout rod', 'springsprout'}, 8912, 5000, 'springsprout rod') shopModule:addSellableItem({'underworld rod', 'underworld'}, 8910, 6000, 'underworld rod') local items = {[1] = 2190, [2] = 2182, [5] = 2190, [6] = 2182} function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'first rod') or msgcontains(msg, 'first wand')) then if(isSorcerer(cid) or isDruid(cid)) then if(getPlayerStorageValue(cid, 30002) <= 0) then selfSay('So you ask me for a {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '} to begin your advanture?', cid) talkState[talkUser] = 1 else selfSay('What? I have already gave you one {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '}!', cid) end else selfSay('Sorry, you aren\'t a druid either a sorcerer.', cid) end elseif(msgcontains(msg, 'yes')) then if(talkState[talkUser] == 1) then doPlayerAddItem(cid, items[getPlayerVocation(cid)], 1) selfSay('Here you are young adept, take care yourself.', cid) setPlayerStorageValue(cid, 30002, 1) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser])) then selfSay('Ok then.', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Obrigado desde já pela ajuda.
  2. Olá coleguinhas, como estão??? Estou tendo um problema muito sério com meu servidor, ele simplesmente está caindo repentinamente. Então eu decidi fazer debugar ele e fazer um Core File, e quando ele voltou a cair os seguintes erros vieram a aparecer. Segue: #0 0x00000000004e59b2 in Item::canDecay (this=this@entry=0x7fa8c526bd80) at item.cpp:1712 #1 0x000000000048f95b in Game::startDecay (this=0x8982e0 <g_game>, item=item@entry=0x7fa8c526bd80) at game.cpp:5311 #2 0x00000000005c15c8 in internalConjureItem (transform=false, reagentId=0, conjureCount=<optimized out>, conjureId=<optimized out>, player= 0x7fa8ddf82750) at spells.cpp:1577 #3 ConjureSpell::ConjureItem (spell=0x7fa8eeda6c80, creature=<optimized out>) at spells.cpp:1657 #4 0x00000000005c0dc4 in ConjureSpell::castInstant (this=0x7fa8eeda6c80, player=0x7fa8ddf82750, param="") at spells.cpp:1675 #5 0x00000000005c340c in Spells::onPlayerSay (this=<optimized out>, player=player@entry=0x7fa8ddf82750, words="adori blank") at spells.cpp:74 #6 0x000000000049dda0 in Game::playerSay (this=0x8982e0 <g_game>, playerId=<optimized out>, channelId=<optimized out>, type=MSG_NPC_TO, receiver="", text="adori blank") at game.cpp:4141 #7 0x000000000047e461 in operator() (this=0x7fa87c07fc50) at /usr/include/boost/function/function_template.hpp:767 #8 operator() (this=0x7fa87c07fc40) at dispatcher.h:34 #9 Dispatcher::dispatcherThread ( this=0x895840 <Dispatcher::getInstance()::dispatcher>) at dispatcher.cpp:71 #10 0x00007fa91a71ca4a in ?? () Aqui está uma pasta com os arquivos que deram erro https://www.sendspace.com/file/tpb81v Alguém poderia me ajudar, por favor, dizendo o que poderia ser o erro ou fixando eles? Agradeço desde já
  3. local config = { loginMessage = getConfigValue('loginMessage') } local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin = getPlayerLastLoginSaved(cid) if(lastLogin > 0) then local text = "- Comandos uteis em nosso servidor:\n ------------------------------\n!aol -> Comprar AOL, 10k.\n!bless -> Comprar Bless, 100k. \n!frags -> Ver quantidade de Frags.\n!explorer -> Comprar rope e shovel por 500gps.\n!tpnoob -> Teletransportar level 50- ao templo.\nCtrl+R -> Reporte os bugs a nossa equipe ou \n- Visite tambem nossa pagina: www.elysium-ats.com." doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, text) else doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end --- REGISTRO DE EVENTO --- registerCreatureEvent(cid, "IOE") registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "deathchannel") registerCreatureEvent(cid, "WarKill") registerCreatureEvent(cid, "gv1") registerCreatureEvent(cid, "gv2") registerCreatureEvent(cid, "gv3") registerCreatureEvent(cid, "ga1") registerCreatureEvent(cid, "ga2") registerCreatureEvent(cid, "ga3") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "gate") registerCreatureEvent(cid, "death_king") registerCreatureEvent(cid, "king") registerCreatureEvent(cid, "player_combat") registerCreatureEvent(cid, "king_sinc") registerCreatureEvent(cid, "player_death_dtk") registerCreatureEvent(cid, "CityWar") registerCreatureEvent(cid, "DeathBroadCast") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "WarAttack") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "ChangeName") registerCreatureEvent(cid, "antiacc") registerCreatureEvent(cid, "PlayerAdvance") registerCreatureEvent(cid, "bonusvip") registerCreatureEvent(cid, "ExpVip") registerCreatureEvent(cid, "parceria") registerCreatureEvent(cid, "parceria_look") registerCreatureEvent(cid, "BountyHunter") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "reward") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "Castle") registerCreatureEvent(cid, "welcome") registerCreatureEvent(cid, "KillingInTheNameOf") registerCreatureEvent(cid, "ArenaKill") registerCreatureEvent(cid, "TiraBattle") registerCreatureEvent(cid, "rewardkill") registerCreatureEvent(cid, "AdvanceReward") --- REGISTRO DE EVENTO --- local guild, enemy, guildFrags, enemyFrags = getPlayerGuildId(cid) local fightingGuilds = {} local tmp = db.getResult("SELECT `guild_id`, `enemy_id`, `guild_kills`, `enemy_kills`, `frags` FROM `guild_wars` WHERE `guild_id` = "..guild.." OR `enemy_id` = "..guild.." AND `status` = 1;") if tmp:getID() ~= -1 then i = 1 repeat if tmp:getDataInt("guild_id") == guild then enemy = tmp:getDataInt("enemy_id") guildFrags = tmp:getDataInt("guild_kills") enemyFrags = tmp:getDataInt("enemy_kills") else enemy = tmp:getDataInt("guild_id") guildFrags = tmp:getDataInt("enemy_kills") enemyFrags = tmp:getDataInt("guild_kills") end local enemyName, _tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if(_tmp:getID() ~= -1) then enemyName = _tmp:getDataString("name") _tmp:free() end fightingGuilds[i] = {} fightingGuilds[i].name = enemyName fightingGuilds[i].guildFrags = guildFrags fightingGuilds[i].enemyFrags = enemyFrags fightingGuilds[i].limit = tmp:getDataInt("frags") i = i + 1 until not(tmp:next()) tmp:free() table.sort(fightingGuilds, function (a, b) return (a.name < b.name) end) local warString for k, v in pairs(fightingGuilds) do if not warString then warString = "Your guild is currently in war with the " .. v.name .. " (" .. v.guildFrags .. ":" .. v.enemyFrags .. " frags, limit ".. v.limit ..")" else warString = warString .. " and with the " .. v.name .. " (" .. v.guildFrags .. ":" .. v.enemyFrags.." frags, limit ".. v.limit .. ")" end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, warString .. ".") end if getPlayerStorageValue(cid, 48902) < 1 then setPlayerStorageValue(cid, 48902, 0) end if getPlayerStorageValue(cid, 48903) < 1 then setPlayerStorageValue(cid, 48903, 0) end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) end setPlayerStorageValue(cid, 42350, 0) setPlayerStorageValue(cid, 42352, 0) return true end Estou enfrentando o seguinte problema em minha distro: Loading creaturescripts... [Error - LuaInterface::loadFile] data/creaturescripts/scripts/login.lua:172: ' ' expected near 'end' [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/login.lua) data/creaturescripts/scripts/login.lua:172: ' ' expected near 'end' Não sei o que fazer, alguem consegue descobrir? Edit1: ele fala que está esperando ' ' antes do último END
  4. Estou usando este script de Death System, que quando um jogador mata o outro ele deveria aparecer em um Death Channel. Porém, não está aparecendo nada no Canal, e nenhum erro na distro. Utilizo OTXServer
  5. Eai manos, beleza?? Estou tendo um problema com meu Utito tempo san. Quando os jogadores usam a magia Utito tempo san, estão podendo se curar. E minha magia aparentemente não tem nada de errado, alguém pode ajudar? local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, 10000) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setCombatCondition(combat, condition) local speed = createConditionObject(CONDITION_PARALYZE) setConditionParam(speed, CONDITION_PARAM_TICKS, 10000) setConditionFormula(speed, -0.7, 56, -0.7, 56) setCombatCondition(combat, speed) local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2) setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000) setCombatCondition(combat, exhaust) function onCastSpell(cid, var) return doCombat(cid, combat, var) end <instant name="Sharpshooter" words="utito tempo san" lvl="60" mana="450" prem="0" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/sharpshooter.lua"> <vocation id="3"/> <vocation id="7"/> </instant>
  6. Alguém poderia me oferecer um sistema onde eu possa vender os Addons em meu WebSite gesior (sem ser addon doll)? Existe um sistema para 10.x, porém não consegui portar para 8.60, segue: globalevents/shop.lua -- ### 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_comunication") 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 storage = tostring(result.getDataString(result_plr, "param7")) 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 Trimera Shop.') setPlayerStorageValue(cid,storage+555884621212,1) 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 Trimera 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 ..' Trimera 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 creaturescripts/addons.lua function onLogin(cid) if getPlayerStorageValue(cid, 200+555884621212) == 1 then -- ID 200 doPlayerAddMount(cid, 6) doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- DRAPTOR setPlayerStorageValue(cid, 200+555884621212, 2) elseif getPlayerStorageValue(cid, 210+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Blazebringer doPlayerAddMount(cid, 9) setPlayerStorageValue(cid, 210+555884621212, 2) elseif getPlayerStorageValue(cid, 261+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Crystal Wolf >> 11101 Voce recebera a montaria no jogo. doPlayerAddMount(cid, 16) setPlayerStorageValue(cid, 261+555884621212, 2) elseif getPlayerStorageValue(cid, 201+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Dromedary doPlayerAddMount(cid, 20) setPlayerStorageValue(cid, 201+555884621212, 2) elseif getPlayerStorageValue(cid, 205+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Scorpion King doPlayerAddMount(cid, 21) setPlayerStorageValue(cid, 205+555884621212, 2) elseif getPlayerStorageValue(cid, 209+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Armoured War Horse doPlayerAddMount(cid, 23) setPlayerStorageValue(cid, 209+555884621212, 2) elseif getPlayerStorageValue(cid, 206+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Shadow Draptor doPlayerAddMount(cid, 24) setPlayerStorageValue(cid, 206+555884621212, 2) elseif getPlayerStorageValue(cid, 204+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Lady bug doPlayerAddMount(cid, 27) setPlayerStorageValue(cid, 204+555884621212, 2) elseif getPlayerStorageValue(cid, 202+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Ironblight doPlayerAddMount(cid, 29) setPlayerStorageValue(cid, 202+555884621212, 2) elseif getPlayerStorageValue(cid, 203+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Magma Crawler doPlayerAddMount(cid, 30) setPlayerStorageValue(cid, 203+555884621212, 2) elseif getPlayerStorageValue(cid, 207+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Crimson Ray doPlayerAddMount(cid, 33) setPlayerStorageValue(cid, 207+555884621212, 2) elseif getPlayerStorageValue(cid, 212+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Steelbeak doPlayerAddMount(cid, 34) setPlayerStorageValue(cid, 212+555884621212, 2) elseif getPlayerStorageValue(cid, 213+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Tombstinger doPlayerAddMount(cid, 36) setPlayerStorageValue(cid, 213+555884621212, 2) elseif getPlayerStorageValue(cid, 214+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Ursagrodon doPlayerAddMount(cid, 38) setPlayerStorageValue(cid, 214+555884621212, 2) elseif getPlayerStorageValue(cid, 211+555884621212) == 2 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Platesaurian doPlayerAddMount(cid, 37) setPlayerStorageValue(cid, 211+555884621212, 2) elseif getPlayerStorageValue(cid, 250+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Hellgrip doPlayerAddMount(cid, 39) setPlayerStorageValue(cid, 250+555884621212, 2) elseif getPlayerStorageValue(cid, 215+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Noble Lion doPlayerAddMount(cid, 40) setPlayerStorageValue(cid, 215+555884621212, 2) elseif getPlayerStorageValue(cid, 208+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Desert King doPlayerAddMount(cid, 41) setPlayerStorageValue(cid, 208+555884621212, 2) elseif getPlayerStorageValue(cid, 266+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Shock Head doPlayerAddMount(cid, 42) setPlayerStorageValue(cid, 266+555884621212, 2) elseif getPlayerStorageValue(cid, 216+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Walker doPlayerAddMount(cid, 43) setPlayerStorageValue(cid, 216+555884621212, 2) elseif getPlayerStorageValue(cid, 217+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Azudocus doPlayerAddMount(cid, 44) setPlayerStorageValue(cid, 217+555884621212, 2) elseif getPlayerStorageValue(cid, 218+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Carpacosaurus doPlayerAddMount(cid, 45) setPlayerStorageValue(cid, 218+555884621212, 2) elseif getPlayerStorageValue(cid, 219+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Death Crawler doPlayerAddMount(cid, 46) setPlayerStorageValue(cid, 219+555884621212, 2) elseif getPlayerStorageValue(cid, 220+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Flamesteed doPlayerAddMount(cid, 47) setPlayerStorageValue(cid, 220+555884621212, 2) elseif getPlayerStorageValue(cid, 221+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Jade Lion doPlayerAddMount(cid, 48) setPlayerStorageValue(cid, 221+555884621212, 2) elseif getPlayerStorageValue(cid, 222+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Jade Pincer doPlayerAddMount(cid, 49) setPlayerStorageValue(cid, 222+555884621212, 2) elseif getPlayerStorageValue(cid, 223+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Nethersteed doPlayerAddMount(cid, 50) setPlayerStorageValue(cid, 223+555884621212, 2) elseif getPlayerStorageValue(cid, 224+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Tempest doPlayerAddMount(cid, 51) setPlayerStorageValue(cid, 224+555884621212, 2) elseif getPlayerStorageValue(cid, 225+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Winter King doPlayerAddMount(cid, 52) setPlayerStorageValue(cid, 225+555884621212, 2) elseif getPlayerStorageValue(cid, 226+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Doombringer doPlayerAddMount(cid, 53) setPlayerStorageValue(cid, 226+555884621212, 2) elseif getPlayerStorageValue(cid, 227+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Woodland Prince doPlayerAddMount(cid, 54) setPlayerStorageValue(cid, 227+555884621212, 2) elseif getPlayerStorageValue(cid, 228+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Hailtorm Fury doPlayerAddMount(cid, 55) setPlayerStorageValue(cid, 228+555884621212, 2) elseif getPlayerStorageValue(cid, 229+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Siegebreaker doPlayerAddMount(cid, 56) setPlayerStorageValue(cid, 229+555884621212, 2) elseif getPlayerStorageValue(cid, 230+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Poisonbane doPlayerAddMount(cid, 57) setPlayerStorageValue(cid, 230+555884621212, 2) elseif getPlayerStorageValue(cid, 231+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Blackpelt doPlayerAddMount(cid, 58) setPlayerStorageValue(cid, 231+555884621212, 2) elseif getPlayerStorageValue(cid, 258+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Golden Dragonfly Voce recebera a montaria no jogo. doPlayerAddMount(cid, 59) setPlayerStorageValue(cid, 258+555884621212, 2) elseif getPlayerStorageValue(cid, 259+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Steel Bee doPlayerAddMount(cid, 60) setPlayerStorageValue(cid, 259+555884621212, 2) elseif getPlayerStorageValue(cid, 260+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Copper Fly doPlayerAddMount(cid, 61) setPlayerStorageValue(cid, 260+555884621212, 2) elseif getPlayerStorageValue(cid, 232+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Tundra Rambler doPlayerAddMount(cid, 62) setPlayerStorageValue(cid, 232+555884621212, 2) elseif getPlayerStorageValue(cid, 233+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Highland Yak doPlayerAddMount(cid, 63) setPlayerStorageValue(cid, 233+555884621212, 2) elseif getPlayerStorageValue(cid, 234+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Glacier Vagabond doPlayerAddMount(cid, 64) setPlayerStorageValue(cid, 234+555884621212, 2) elseif getPlayerStorageValue(cid, 235+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Shadow Hart REPARAR doPlayerAddMount(cid, 72) setPlayerStorageValue(cid, 235+555884621212, 2) elseif getPlayerStorageValue(cid, 236+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Black Stag REPARAR doPlayerAddMount(cid, 73) setPlayerStorageValue(cid, 236+555884621212, 2) elseif getPlayerStorageValue(cid, 237+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Emperor Deer REPARAR doPlayerAddMount(cid, 74) setPlayerStorageValue(cid, 237+555884621212, 2) elseif getPlayerStorageValue(cid, 238+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Flying Divan REPARAR doPlayerAddMount(cid, 65) setPlayerStorageValue(cid, 238+555884621212, 2) elseif getPlayerStorageValue(cid, 239+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Magic Carpet REPARAR doPlayerAddMount(cid, 66) setPlayerStorageValue(cid, 239+555884621212, 2) elseif getPlayerStorageValue(cid, 240+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Floating Kashmir REPARAR doPlayerAddMount(cid, 67) setPlayerStorageValue(cid, 240+555884621212, 2) elseif getPlayerStorageValue(cid, 241+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Ringtail Waccoon REPARAR doPlayerAddMount(cid, 68) setPlayerStorageValue(cid, 241+555884621212, 2) elseif getPlayerStorageValue(cid, 242+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Night Waccoon REPARAR doPlayerAddMount(cid, 69) setPlayerStorageValue(cid, 242+555884621212, 2) elseif getPlayerStorageValue(cid, 243+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Emerald Waccoon REPARAR doPlayerAddMount(cid, 70) setPlayerStorageValue(cid, 243+555884621212, 2) elseif getPlayerStorageValue(cid, 244+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Flitterkatzen doPlayerAddMount(cid, 75) setPlayerStorageValue(cid, 244+555884621212, 2) elseif getPlayerStorageValue(cid, 245+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Venompaw doPlayerAddMount(cid, 76) setPlayerStorageValue(cid, 245+555884621212, 2) elseif getPlayerStorageValue(cid, 246+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Batcat doPlayerAddMount(cid, 77) setPlayerStorageValue(cid, 246+555884621212, 2) elseif getPlayerStorageValue(cid, 247+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Sea Devil doPlayerAddMount(cid, 78) setPlayerStorageValue(cid, 247+555884621212, 2) elseif getPlayerStorageValue(cid, 248+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Coralripper doPlayerAddMount(cid, 79) setPlayerStorageValue(cid, 248+555884621212, 2) elseif getPlayerStorageValue(cid, 249+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Plumfish doPlayerAddMount(cid, 80) setPlayerStorageValue(cid, 249+555884621212, 2) elseif getPlayerStorageValue(cid, 251+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Manta Ray doPlayerAddMount(cid, 28) setPlayerStorageValue(cid, 251+555884621212, 2) elseif getPlayerStorageValue(cid, 252+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Gorongra Voce recebera a montaria no jogo. doPlayerAddMount(cid, 81) setPlayerStorageValue(cid, 252+555884621212, 2) elseif getPlayerStorageValue(cid, 253+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Noctungra doPlayerAddMount(cid, 82) setPlayerStorageValue(cid, 253+555884621212, 2) elseif getPlayerStorageValue(cid, 254+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Silverneck doPlayerAddMount(cid, 83) setPlayerStorageValue(cid, 254+555884621212, 2) elseif getPlayerStorageValue(cid, 255+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Slagsnare doPlayerAddMount(cid, 84) setPlayerStorageValue(cid, 255+555884621212, 2) elseif getPlayerStorageValue(cid, 256+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Nightstinger doPlayerAddMount(cid, 85) setPlayerStorageValue(cid, 256+555884621212, 2) elseif getPlayerStorageValue(cid, 257+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Razorcreep doPlayerAddMount(cid, 86) setPlayerStorageValue(cid, 257+555884621212, 2) elseif getPlayerStorageValue(cid, 262+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Rift Runner doPlayerAddMount(cid, 87) setPlayerStorageValue(cid, 262+555884621212, 2) elseif getPlayerStorageValue(cid, 263+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Nightdweller doPlayerAddMount(cid, 88) setPlayerStorageValue(cid, 263+555884621212, 2) elseif getPlayerStorageValue(cid, 264+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Frostflare doPlayerAddMount(cid, 89) setPlayerStorageValue(cid, 264+555884621212, 2) elseif getPlayerStorageValue(cid, 265+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Cinderhoof doPlayerAddMount(cid, 90) setPlayerStorageValue(cid, 265+555884621212, 2) elseif getPlayerStorageValue(cid, 268+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Mouldpincer doPlayerAddMount(cid, 91) setPlayerStorageValue(cid, 268+555884621212, 2) elseif getPlayerStorageValue(cid, 269+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Bloodcurl doPlayerAddMount(cid, 92) setPlayerStorageValue(cid, 269+555884621212, 2) elseif getPlayerStorageValue(cid, 270+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Leafscuttler doPlayerAddMount(cid, 93) setPlayerStorageValue(cid, 270+555884621212, 2) elseif getPlayerStorageValue(cid, 271+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Racing Bird doPlayerAddMount(cid, 2) setPlayerStorageValue(cid, 271+555884621212, 2) elseif getPlayerStorageValue(cid, 272+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Black Sheep doPlayerAddMount(cid, 4) setPlayerStorageValue(cid, 272+555884621212, 2) elseif getPlayerStorageValue(cid, 267+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- thornfire wolf doPlayerAddMount(cid, 100) setPlayerStorageValue(cid, 267+555884621212, 2) elseif getPlayerStorageValue(cid, 273+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Midnight Panther doPlayerAddMount(cid, 5) setPlayerStorageValue(cid, 273+555884621212, 2) elseif getPlayerStorageValue(cid, 274+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Titanica doPlayerAddMount(cid, 7) setPlayerStorageValue(cid, 274+555884621212, 2) elseif getPlayerStorageValue(cid, 275+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Tin Lizzard doPlayerAddMount(cid, 8) setPlayerStorageValue(cid, 275+555884621212, 2) elseif getPlayerStorageValue(cid, 276+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Sparkion doPlayerAddMount(cid, 94) setPlayerStorageValue(cid, 276+555884621212, 2) elseif getPlayerStorageValue(cid, 277+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Neon Sparkid doPlayerAddMount(cid, 95) setPlayerStorageValue(cid, 277+555884621212, 2) elseif getPlayerStorageValue(cid, 278+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Vortexion doPlayerAddMount(cid, 96) setPlayerStorageValue(cid, 278+555884621212, 2) elseif getPlayerStorageValue(cid, 279+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Swamp Snapper doPlayerAddMount(cid, 97) setPlayerStorageValue(cid, 279+555884621212, 2) elseif getPlayerStorageValue(cid, 280+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Mould Shell doPlayerAddMount(cid, 98) setPlayerStorageValue(cid, 280+555884621212, 2) elseif getPlayerStorageValue(cid, 281+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received mount from TrimeraTibia Shop.') -- Reed Lurker doPlayerAddMount(cid, 99) setPlayerStorageValue(cid, 281+555884621212, 2) -- Addons -- elseif getPlayerStorageValue(cid, 300+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- barbarian doPlayerAddOutfit(cid, 147, 3) doPlayerAddOutfit(cid, 143, 3) setPlayerStorageValue(cid, 300+555884621212, 2) elseif getPlayerStorageValue(cid, 301+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- warrior doPlayerAddOutfit(cid, 142, 3) doPlayerAddOutfit(cid, 134, 3) setPlayerStorageValue(cid, 301+555884621212, 2) elseif getPlayerStorageValue(cid, 302+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- assassin doPlayerAddOutfit(cid, 156, 3) doPlayerAddOutfit(cid, 152, 3) setPlayerStorageValue(cid, 302+555884621212, 2) elseif getPlayerStorageValue(cid, 303+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Insectoid doPlayerAddOutfit(cid, 466, 3) doPlayerAddOutfit(cid, 465, 3) setPlayerStorageValue(cid, 303+555884621212, 2) elseif getPlayerStorageValue(cid, 304+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Summoner --doPlayerAddOutfit(cid, 141, 3) FEMALE doPlayerAddOutfit(cid, 133, 3) setPlayerStorageValue(cid, 304+555884621212, 2) elseif getPlayerStorageValue(cid, 305+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Entrepreneur doPlayerAddOutfit(cid, 471, 3) doPlayerAddOutfit(cid, 472, 3) setPlayerStorageValue(cid, 305+555884621212, 2) elseif getPlayerStorageValue(cid, 306+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Mage doPlayerAddOutfit(cid, 138, 3) --doPlayerAddOutfit(cid, 130, 3) -- MALE setPlayerStorageValue(cid, 306+555884621212, 2) elseif getPlayerStorageValue(cid, 307+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Glooth Engineer doPlayerAddOutfit(cid, 618, 3) doPlayerAddOutfit(cid, 610, 3) setPlayerStorageValue(cid, 307+555884621212, 2) elseif getPlayerStorageValue(cid, 308+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Champion doPlayerAddOutfit(cid, 633, 3) doPlayerAddOutfit(cid, 632, 3) setPlayerStorageValue(cid, 308+555884621212, 2) elseif getPlayerStorageValue(cid, 309+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Conjurer doPlayerAddOutfit(cid, 635, 3) doPlayerAddOutfit(cid, 634, 3) setPlayerStorageValue(cid, 309+555884621212, 2) elseif getPlayerStorageValue(cid, 310+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Beastmaster doPlayerAddOutfit(cid, 637, 3) doPlayerAddOutfit(cid, 636, 3) setPlayerStorageValue(cid, 310+555884621212, 2) elseif getPlayerStorageValue(cid, 311+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Chaos Acolyte Addon doPlayerAddOutfit(cid, 665, 3) doPlayerAddOutfit(cid, 664, 3) setPlayerStorageValue(cid, 311+555884621212, 2) elseif getPlayerStorageValue(cid, 312+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Death HeraldAddon doPlayerAddOutfit(cid, 667, 3) doPlayerAddOutfit(cid, 666, 3) setPlayerStorageValue(cid, 312+555884621212, 2) elseif getPlayerStorageValue(cid, 313+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Ranger doPlayerAddOutfit(cid, 684, 3) doPlayerAddOutfit(cid, 683, 3) setPlayerStorageValue(cid, 313+555884621212, 2) elseif getPlayerStorageValue(cid, 314+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Ceremonial Garb doPlayerAddOutfit(cid, 695, 3) doPlayerAddOutfit(cid, 694, 3) setPlayerStorageValue(cid, 314+555884621212, 2) elseif getPlayerStorageValue(cid, 315+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Marionette's Puppeteer doPlayerAddOutfit(cid, 697, 3) doPlayerAddOutfit(cid, 696, 3) setPlayerStorageValue(cid, 315+555884621212, 2) elseif getPlayerStorageValue(cid, 316+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Spirit Caller doPlayerAddOutfit(cid, 699, 3) doPlayerAddOutfit(cid, 698, 3) setPlayerStorageValue(cid, 316+555884621212, 2) elseif getPlayerStorageValue(cid, 317+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Evoker doPlayerAddOutfit(cid, 725, 3) doPlayerAddOutfit(cid, 724, 3) setPlayerStorageValue(cid, 317+555884621212, 2) elseif getPlayerStorageValue(cid, 318+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Seaweaver doPlayerAddOutfit(cid, 733, 3) doPlayerAddOutfit(cid, 732, 3) setPlayerStorageValue(cid, 318+555884621212, 2) elseif getPlayerStorageValue(cid, 319+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Elementalist doPlayerAddOutfit(cid, 433, 3) doPlayerAddOutfit(cid, 432, 3) setPlayerStorageValue(cid, 319+555884621212, 2) elseif getPlayerStorageValue(cid, 320+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Deepling doPlayerAddOutfit(cid, 464, 3) doPlayerAddOutfit(cid, 463, 3) setPlayerStorageValue(cid, 320+555884621212, 2) elseif getPlayerStorageValue(cid, 322+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Druid doPlayerAddOutfit(cid, 148, 3) doPlayerAddOutfit(cid, 144, 3) setPlayerStorageValue(cid, 322+555884621212, 2) elseif getPlayerStorageValue(cid, 323+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Brotherhood doPlayerAddOutfit(cid, 279, 3) doPlayerAddOutfit(cid, 278, 3) setPlayerStorageValue(cid, 323+555884621212, 2) elseif getPlayerStorageValue(cid, 324+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Dream Warden doPlayerAddOutfit(cid, 578, 3) doPlayerAddOutfit(cid, 577, 3) setPlayerStorageValue(cid, 324+555884621212, 2) elseif getPlayerStorageValue(cid, 325+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Hunter doPlayerAddOutfit(cid, 137, 3) doPlayerAddOutfit(cid, 129, 3) setPlayerStorageValue(cid, 325+555884621212, 2) elseif getPlayerStorageValue(cid, 326+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Nobleman doPlayerAddOutfit(cid, 140, 3) doPlayerAddOutfit(cid, 132, 3) setPlayerStorageValue(cid, 326+555884621212, 2) elseif getPlayerStorageValue(cid, 327+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Norsewoman/Norseman doPlayerAddOutfit(cid, 140, 3) doPlayerAddOutfit(cid, 251, 3) setPlayerStorageValue(cid, 327+555884621212, 2) elseif getPlayerStorageValue(cid, 329+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Recruiter doPlayerAddOutfit(cid, 746, 3) doPlayerAddOutfit(cid, 745, 3) setPlayerStorageValue(cid, 329+555884621212, 2) elseif getPlayerStorageValue(cid, 330+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Sea Dog Outfits doPlayerAddOutfit(cid, 750, 3) doPlayerAddOutfit(cid, 749, 3) setPlayerStorageValue(cid, 330+555884621212, 2) elseif getPlayerStorageValue(cid, 331+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Royal Pumpkin doPlayerAddOutfit(cid, 760, 3) doPlayerAddOutfit(cid, 759, 3) setPlayerStorageValue(cid, 331+555884621212, 2) elseif getPlayerStorageValue(cid, 332+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Rift Warrior doPlayerAddOutfit(cid, 846, 3) doPlayerAddOutfit(cid, 845, 3) setPlayerStorageValue(cid, 332+555884621212, 2) elseif getPlayerStorageValue(cid, 333+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Winter Warden doPlayerAddOutfit(cid, 853, 3) doPlayerAddOutfit(cid, 852, 3) setPlayerStorageValue(cid, 333+555884621212, 2) elseif getPlayerStorageValue(cid, 334+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Philosopher doPlayerAddOutfit(cid, 874, 3) doPlayerAddOutfit(cid, 873, 3) setPlayerStorageValue(cid, 334+555884621212, 2) elseif getPlayerStorageValue(cid, 335+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Nightmare doPlayerAddOutfit(cid, 268, 3) doPlayerAddOutfit(cid, 269, 3) setPlayerStorageValue(cid, 335+555884621212, 2) elseif getPlayerStorageValue(cid, 336+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Wayfarer doPlayerAddOutfit(cid, 366, 3) doPlayerAddOutfit(cid, 367, 3) setPlayerStorageValue(cid, 336+555884621212, 2) elseif getPlayerStorageValue(cid, 337+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Crystal Warlord doPlayerAddOutfit(cid, 512, 3) doPlayerAddOutfit(cid, 513, 3) setPlayerStorageValue(cid, 337+555884621212, 2) elseif getPlayerStorageValue(cid, 338+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Soil Guardian doPlayerAddOutfit(cid, 514, 3) doPlayerAddOutfit(cid, 516, 3) setPlayerStorageValue(cid, 338+555884621212, 2) elseif getPlayerStorageValue(cid, 339+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Cave Explorer doPlayerAddOutfit(cid, 574, 3) doPlayerAddOutfit(cid, 575, 3) setPlayerStorageValue(cid, 339+555884621212, 2) elseif getPlayerStorageValue(cid, 340+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- Pirate doPlayerAddOutfit(cid, 151, 3) doPlayerAddOutfit(cid, 155, 3) setPlayerStorageValue(cid, 340+555884621212, 2) elseif getPlayerStorageValue(cid, 341+555884621212) == 1 then doPlayerSendTextMessage(cid, 18, 'You received addon full from TrimeraTibia Shop.') -- New Outfit doPlayerAddOutfit(cid, 884, 3) doPlayerAddOutfit(cid, 885, 3) setPlayerStorageValue(cid, 341+555884621212, 2) end return TRUE end
  7. Fala galera, beleza? Estou precisando colocar novas categorias em meu WebSite Gesior, para que fique parecido com este: Por padrão existe apenas as categorias Items, Mounts e Addons. Queria adicionar pelo menos mais duas categorias - Custom e News. Segue os códigos, Shopsystem.php <?php if(!defined('INITIALIZED')) exit; if($config['site']['shop_system']) { if($logged) { $user_premium_points = $account_logged->getCustomField('premium_points'); } else { $user_premium_points = 'Login first'; } function getItemByID($id) { $id = (int) $id; $SQL = $GLOBALS['SQL']; $data = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_offer').' WHERE '.$SQL->fieldName('id').' = '.$SQL->quote($id).';')->fetch(); if($data['offer_type'] == 'item') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif($data['offer_type'] == 'mount') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif($data['offer_type'] == 'addon') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif($data['offer_type'] == 'premmium') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif($data['offer_type'] == 'custom') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } return $offer; } function getOfferArray() { $offer_list = $GLOBALS['SQL']->query('SELECT * FROM '.$GLOBALS['SQL']->tableName('z_shop_offer').';'); $i_item = 0; $i_mount = 0; $i_addon = 0; $i_container = 0; while($data = $offer_list->fetch()) { if($data['offer_type'] == 'item') { $offer_array['item'][$i_item]['id'] = $data['id']; $offer_array['item'][$i_item]['item_id'] = $data['itemid1']; $offer_array['item'][$i_item]['item_count'] = $data['count1']; $offer_array['item'][$i_item]['points'] = $data['points']; $offer_array['item'][$i_item]['description'] = $data['offer_description']; $offer_array['item'][$i_item]['name'] = $data['offer_name']; $i_item++; } elseif($data['offer_type'] == 'mount') { $offer_array['mount'][$i_mount]['id'] = $data['id']; $offer_array['mount'][$i_mount]['container_id'] = $data['itemid1']; $offer_array['mount'][$i_mount]['container_count'] = $data['count1']; $offer_array['mount'][$i_mount]['item_id'] = $data['itemid1']; $offer_array['mount'][$i_mount]['item_count'] = $data['count2']; $offer_array['mount'][$i_mount]['points'] = $data['points']; $offer_array['mount'][$i_mount]['description'] = $data['offer_description']; $offer_array['mount'][$i_mount]['name'] = $data['offer_name']; $i_mount++; } elseif($data['offer_type'] == 'addon') { $offer_array['addon'][$i_addon]['id'] = $data['id']; $offer_array['addon'][$i_addon]['container_id'] = $data['itemid1']; $offer_array['addon'][$i_addon]['container_count'] = $data['count1']; $offer_array['addon'][$i_addon]['item_id'] = $data['itemid1']; $offer_array['addon'][$i_addon]['item_count'] = $data['count2']; $offer_array['addon'][$i_addon]['points'] = $data['points']; $offer_array['addon'][$i_addon]['description'] = $data['offer_description']; $offer_array['addon'][$i_addon]['name'] = $data['offer_name']; $i_addon++; } elseif($data['offer_type'] == 'container') { $offer_array['container'][$i_container]['id'] = $data['id']; $offer_array['container'][$i_container]['container_id'] = $data['itemid1']; $offer_array['container'][$i_container]['container_count'] = $data['count1']; $offer_array['container'][$i_container]['item_id'] = $data['itemid2']; $offer_array['container'][$i_container]['item_count'] = $data['count2']; $offer_array['container'][$i_container]['points'] = $data['points']; $offer_array['container'][$i_container]['description'] = $data['offer_description']; $offer_array['container'][$i_container]['name'] = $data['offer_name']; $i_container++; } elseif($data['offer_type'] == 'custom') { $offer_array['container'][$i_container]['id'] = $data['id']; $offer_array['container'][$i_container]['container_id'] = $data['itemid1']; $offer_array['container'][$i_container]['container_count'] = $data['count1']; $offer_array['container'][$i_container]['item_id'] = $data['itemid2']; $offer_array['container'][$i_container]['item_count'] = $data['count2']; $offer_array['container'][$i_container]['points'] = $data['points']; $offer_array['container'][$i_container]['description'] = $data['offer_description']; $offer_array['container'][$i_container]['name'] = $data['offer_name']; $i_custom++; } } return $offer_array; } if(($action == '') or ($action == 'item') or ($action == 'mount') or ($action == 'addon') or ($action == 'container')) { unset($_SESSION['viewed_confirmation_page']); $offer_list = getOfferArray(); if(empty($action)) { if(count($offer_list['item']) > 0) $action = 'item'; elseif(count($offer_list['mount']) > 0) $action = 'mount'; elseif(count($offer_list['addon']) > 0) $action = 'addon'; elseif(count($offer_list['container']) > 0) $action = 'container'; elseif(count($offer_list['custom']) > 0) $action = 'custom'; } function selectcolor($value) { if($GLOBALS['action'] == $value) return '#505050; color: #FFFFFF'; else return '#303030; color: #aaaaaa'; } if((count($offer_list['item']) > 0) or (count($offer_list['mount']) > 0) or (count($offer_list['addon']) > 0) or (count($offer_list['container']) > 0) or (count($offer_list['custom']) > 0)) { $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white colspan="2"><B>Choose a categorie: </B>'; if(count($offer_list['container']) > 0) $main_content .= '<a href="?subtopic=shopsystem&action=container" style="padding: 5px 5px 7px 5px; margin: 5px 1px 0px 1px; background-color: '.selectcolor('container').';">Container<img src="images/items/7.gif"/></a>'; if(count($offer_list['item']) > 0) $main_content .= '<a href="?subtopic=shopsystem&action=item" style="padding: 5px 5px 7px 5px; margin: 5px 1px 0px 1px; background-color: '.selectcolor('item').';">Items<img src="images/items/2160.gif"/></a>'; if(count($offer_list['mount']) > 0) $main_content .= '<a href="?subtopic=shopsystem&action=mount" style="padding: 5px 5px 7px 5px; margin: 5px 1px 0px 1px; background-color: '.selectcolor('mount').';">Mounts<img src="images/mount.gif"/></a>'; if(count($offer_list['addon']) > 0) $main_content .= '<a href="?subtopic=shopsystem&action=addon" style="padding: 5px 5px 7px 5px; margin: 5px 1px 0px 1px; background-color: '.selectcolor('addon').';">Addons<img src="images/addon.gif"/></a>'; $main_content .= '</TD></TR></TD></TR></table><table BORDER=0 CELLPaDDING="4" CELLSPaCING="1" style="width:100%;font-weight:bold;text-align:center;"><tr style="background:#505050;"><td colspan="3" style="height:px;"></td></tr></table>'; } //show list of custom offers if((count($offer_list['custom']) > 0) and ($action == 'custom')) { $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="8%" align="center" class="white"><b>Points</b></td><td width="9%" align="center" class="white"><b>Picture</b></td><td width="350" align="left" class="white"><b>Description</b></td><td width="250" align="center" class="white"><b>Select product</b></td></tr>'; foreach($offer_list['custom'] as $custom) { if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'"><td align="center"><b>'.$custom['points'].'</b></td><td align="center"><img src="' . $config['site']['item_images_url'] . $custom['item_id'] . $config['site']['item_images_extension'] . '"></td><td><b>'.htmlspecialchars($custom['name']).'</b> ('.$custom['points'].' points)<br />'.htmlspecialchars($item['description']).'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method="POST" name="itemform_'.$custom['id'].'"><input type="hidden" name="buy_id" value="'.$custom['id'].'"><div class="navibutton"><a href="" onClick="itemform_'.$custom['id'].'.submit();return false;">BUY</a></div></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table>'; } if((count($offer_list['item']) > 0) and ($action == 'item')) { $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="8%" align="center" class="white"><b>Points</b></td><td width="9%" align="center" class="white"><b>Picture</b></td><td width="350" align="left" class="white"><b>Description</b></td><td width="250" align="center" class="white"><b>Select product</b></td></tr>'; foreach($offer_list['item'] as $item) { if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'"><td align="center"><b>'.$item['points'].'</b></td><td align="center"><img src="' . $config['site']['item_images_url'] . $item['item_id'] . $config['site']['item_images_extension'] . '"></td><td><b>'.htmlspecialchars($item['name']).'</b> ('.$item['points'].' points)<br />'.htmlspecialchars($item['description']).'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method="POST" name="itemform_'.$item['id'].'"><input type="hidden" name="buy_id" value="'.$item['id'].'"><div class="navibutton"><a href="" onClick="itemform_'.$item['id'].'.submit();return false;">BUY</a></div></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table>'; } //show list of mount offers if((count($offer_list['mount']) > 0) and ($action == 'mount')) { $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="8%" align="center" class="white"><b>Points</b></td><td width="9%" align="center" class="white"><b>Picture</b></td><td width="350" align="left" class="white"><b>Description</b></td><td width="250" align="center" class="white"><b>Select product</b></td></tr>'; foreach($offer_list['mount'] as $mount) { if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'"><td align="center"><b>'.$mount['points'].'</b></td><td align="center"><img src="' . $config['site']['mounts_images_url'] . $mount['item_id'] . $config['site']['item_images_extension'] . '"></td><td><b>'.htmlspecialchars($mount['name']).'</b> ('.$mount['points'].' points)<br />'.htmlspecialchars($mount['description']).'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method="POST" name="itemform_'.$mount['id'].'"><input type="hidden" name="buy_id" value="'.$mount['id'].'"><div class="navibutton"><a href="" onClick="itemform_'.$mount['id'].'.submit();return false;">BUY</a></div></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table>'; } //show list of addon offers if((count($offer_list['addon']) > 0) and ($action == 'addon')) { $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="8%" align="center" class="white"><b>Points</b></td><td width="9%" align="center" class="white"><b>Picture</b></td><td width="350" align="left" class="white"><b>Description</b></td><td width="250" align="center" class="white"><b>Select product</b></td></tr>'; foreach($offer_list['addon'] as $addon) { if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'"><td align="center"><b>'.$addon['points'].'</b></td><td align="center"><img src="' . $config['site']['addons_images_url'] . $addon['item_id'] . $config['site']['item_images_extension'] . '"></td><td><b>'.htmlspecialchars($addon['name']).'</b> ('.$addon['points'].' points)<br />'.htmlspecialchars($addon['description']).'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method="POST" name="itemform_'.$addon['id'].'"><input type="hidden" name="buy_id" value="'.$addon['id'].'"><div class="navibutton"><a href="" onClick="itemform_'.$addon['id'].'.submit();return false;">BUY</a></div></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table>'; } //show list of containers offers if((count($offer_list['container']) > 0) and ($action == 'container')) { if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="8%" align="center" class="white"><b>Points</b></td><td width="9%" align="center" class="white"><b>Picture</b></td><td width="350" align="left" class="white"><b>Description</b></td><td width="250" align="center" class="white"><b>Select product</b></td></tr>'; foreach($offer_list['container'] as $container) { $main_content .= '<tr bgcolor="'.$bgcolor.'"><td align="center"><b>'.$container['points'].'</b></td><td align="center"><img src="' . $config['site']['item_images_url'] . $container['item_id'] . $config['site']['item_images_extension'] . '"></td><td><b>'.htmlspecialchars($container['name']).'</b> ('.$container['points'].' points)<br />'.htmlspecialchars($container['description']).'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method="POST" name="contform_'.$container['id'].'"><input type="hidden" name="buy_id" value="'.$container['id'].'"><div class="navibutton"><a href="" onClick="contform_'.$container['id'].'.submit();return false;">BUY</a></div></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table>'; } //Finish container if((count($offer_list['item']) > 0) or (count($offer_list['mount']) > 0) or (count($offer_list['addon']) > 0) or (count($offer_list['container']) > 0)) { $main_content .= '<table BORDER=0 CELLPaDDING="4" CELLSPaCING="1" style="width:100%;font-weight:bold;text-align:center;"> <tr style="background:#505050;"> <td colspan="3" style="height:px;"></td> </tr> </table>'; } } if($action == 'select_player') { unset($_SESSION['viewed_confirmation_page']); if(!$logged) { $errormessage .= 'Please login first.'; } else { $buy_id = (int) $_REQUEST['buy_id']; if(empty($buy_id)) { $errormessage .= 'Please <a href="?subtopic=shopsystem">select item</a> first.'; } else { $buy_offer = getItemByID($buy_id); if(isset($buy_offer['id'])) //item exist in database { if($user_premium_points >= $buy_offer['points']) { $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"><td colspan="2" class="white"><b>Selected Offer</b></td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="100"><b>Name:</b></td><td width="550">'.htmlspecialchars($buy_offer['name']).'</td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td width="100"><b>Description:</b></td><td width="550">'.htmlspecialchars($buy_offer['description']).'</td></tr> </table><br /> <form action="?subtopic=shopsystem&action=confirm_transaction" method="POST"><input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"><td colspan="2" class="white"><b>Give item to player from your account</b></td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="110"><b>Name:</b></td><td width="550"><select name="buy_name">'; $players_from_logged_acc = $account_logged->getPlayersList(); if(count($players_from_logged_acc) > 0) { foreach($players_from_logged_acc as $player) { $main_content .= '<option>'.htmlspecialchars($player->getName()).'</option>'; } } else { $main_content .= 'You don\'t have any character on your account.'; } $main_content .= '</select>&nbsp;<input type="submit" value="Give"></td></tr> </table> </form><br /><form action="?subtopic=shopsystem&action=confirm_transaction" method="POST"><input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"><td colspan="2" class="white"><b>Give item to other player</b></td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="110"><b>To player:</b></td><td width="550"><input type="text" name="buy_name"> - name of player</td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td width="110"><b>From:</b></td><td width="550"><input type="text" name="buy_from">&nbsp;<input type="submit" value="Give"> - your nick, \'empty\' = Anonymous</td></tr> </table><br /> </form>'; } else { $errormessage .= 'For this item you need <b>'.$buy_offer['points'].'</b> points. You have only <b>'.$user_premium_points.'</b> premium points. Please <a href="?subtopic=shopsystem">select other item</a> or buy premium points.'; } } else { $errormessage .= 'Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="?subtopic=shopsystem">select item</a> again.'; } } } if(!empty($errormessage)) { $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Informations</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.$errormessage.'</b></TD></TR> </table>'; } } elseif($action == 'confirm_transaction') { if(!$logged) { $errormessage .= 'Please login first.'; } else { $buy_id = (int) $_POST['buy_id']; $buy_name = trim($_POST['buy_name']); $buy_from = trim($_POST['buy_from']); if(empty($buy_from)) { $buy_from = 'Anonymous'; } if(empty($buy_id)) { $errormessage .= 'Please <a href="?subtopic=shopsystem">select item</a> first.'; } else { if(!check_name($buy_from)) { $errormessage .= 'Invalid nick ("from player") format. Please <a href="?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a> or contact with administrator.'; } else { $buy_offer = getItemByID($buy_id); if(isset($buy_offer['id'])) //item exist in database { if($user_premium_points >= $buy_offer['points']) { if(check_name($buy_name)) { $buy_player = new Player(); $buy_player->find($buy_name); if($buy_player->isLoaded()) { $buy_player_account = $buy_player->getAccount(); if($_SESSION['viewed_confirmation_page'] == 'yes' && $_POST['buy_confirmed'] == 'yes') { if($buy_offer['type'] == 'item') { $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' ('.$SQL->fieldName('id').','.$SQL->fieldName('name').','.$SQL->fieldName('type').','.$SQL->fieldName('action').','.$SQL->fieldName('param1').','.$SQL->fieldName('param2').','.$SQL->fieldName('param3').','.$SQL->fieldName('param4').','.$SQL->fieldName('param5').','.$SQL->fieldName('param6').','.$SQL->fieldName('param7').','.$SQL->fieldName('delete_it').') VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote('login').', '.$SQL->quote('give_item').', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', '.$SQL->quote('').', '.$SQL->quote('').', '.$SQL->quote('item').', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote($buy_offer['id']).', '.$SQL->quote(1).');'; $SQL->query($sql); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' ('.$SQL->fieldName('id').','.$SQL->fieldName('to_name').','.$SQL->fieldName('to_account').','.$SQL->fieldName('from_nick').','.$SQL->fieldName('from_account').','.$SQL->fieldName('price').','.$SQL->fieldName('offer_id').','.$SQL->fieldName('trans_state').','.$SQL->fieldName('trans_start').','.$SQL->fieldName('trans_real').') VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote('wait').', '.$SQL->quote(time()).', '.$SQL->quote(0).');'; $SQL->query($save_transaction); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Item added!</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.htmlspecialchars($buy_offer['name']).'</b> added to player <b>'.htmlspecialchars($buy_player->getName()).'</b> items (he will get this items after relog) for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a></TD></TR> </table>'; } elseif($buy_offer['type'] == 'mount') { $account_id = $buy_player->getCustomField('id'); $on = $SQL->query('SELECT * FROM '.$SQL->tableName('players_online').' WHERE '.$SQL->fieldName('player_id').' = '.$account_id.';')->fetch(); if ($on == false) { $SQL->query('INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES ('.$account_id.', '.$SQL->quote($buy_offer['item_id']).', 1);'); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Mount was added!</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.htmlspecialchars($buy_offer['name']).'</b> added to player <b>'.htmlspecialchars($buy_player->getName()).'</b> mounts (he will get this mounts after relog) for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a></TD></TR> </table>'; } else { $errormessage .= '<b>'.htmlspecialchars($buy_player->getName()).' has to be offline!</b>'; } } elseif($buy_offer['type'] == 'addon') { $account_id = $buy_player->getCustomField('id'); $on = $SQL->query('SELECT * FROM '.$SQL->tableName('players_online').' WHERE '.$SQL->fieldName('player_id').' = '.$account_id.';')->fetch(); if ($on == false) { $SQL->query('INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES ('.$account_id.', '.$SQL->quote($buy_offer['item_id']).', 1);'); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Addon was added!</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.htmlspecialchars($buy_offer['name']).'</b> added to player <b>'.htmlspecialchars($buy_player->getName()).'</b> addons (he will get this addons after relog) for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a></TD></TR> </table>'; } else { $errormessage .= '<b>'.htmlspecialchars($buy_player->getName()).' has to be offline!</b>'; } } elseif($buy_offer['type'] == 'container') { $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' ('.$SQL->fieldName('id').','.$SQL->fieldName('name').','.$SQL->fieldName('type').','.$SQL->fieldName('action').','.$SQL->fieldName('param1').','.$SQL->fieldName('param2').','.$SQL->fieldName('param3').','.$SQL->fieldName('param4').','.$SQL->fieldName('param5').','.$SQL->fieldName('param6').','.$SQL->fieldName('param7').','.$SQL->fieldName('delete_it').') VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote('login').', '.$SQL->quote('give_item').', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', '.$SQL->quote($buy_offer['container_id']).', '.$SQL->quote($buy_offer['container_count']).', '.$SQL->quote('container').', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote($buy_offer['id']).', '.$SQL->quote(1).');'; $SQL->query($sql); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' ('.$SQL->fieldName('id').','.$SQL->fieldName('to_name').','.$SQL->fieldName('to_account').','.$SQL->fieldName('from_nick').','.$SQL->fieldName('from_account').','.$SQL->fieldName('price').','.$SQL->fieldName('offer_id').','.$SQL->fieldName('trans_state').','.$SQL->fieldName('trans_start').','.$SQL->fieldName('trans_real').') VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote('wait').', '.$SQL->quote(time()).', '.$SQL->quote(0).');'; $SQL->query($save_transaction); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Container of items added!</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.htmlspecialchars($buy_offer['name']).'</b> added to player <b>'.htmlspecialchars($buy_player->getName()).'</b> items (he will get this container with items after relog) for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a></TD></TR> </table>'; } } else { $set_session = TRUE; $_SESSION['viewed_confirmation_page'] = 'yes'; $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"><td colspan="3" class="white"><b>Confirm Transaction</b></td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="100"><b>Name:</b></td><td width="550" colspan="2">'. htmlspecialchars($buy_offer['name']).'</td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td width="100"><b>Description:</b></td><td width="550" colspan="2">'. htmlspecialchars($buy_offer['description']).'</td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="100"><b>Cost:</b></td><td width="550" colspan="2"><b>'. htmlspecialchars($buy_offer['points']).' premium points</b> from your account</td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td width="100"><b>For Player:</b></td><td width="550" colspan="2"><font color="red">'.htmlspecialchars($buy_player->getName()).'</font></td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="100"><b>From:</b></td><td width="550" colspan="2"><font color="red">'.htmlspecialchars($buy_from).'</font></td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td colspan="3"></td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td width="100"><b>Transaction?</b></td><td width="275" align="left"> <form action="?subtopic=shopsystem&action=confirm_transaction" method="POST"><input type="hidden" name="buy_confirmed" value="yes"><input type="hidden" name="buy_id" value="'.$buy_id.'"><input type="hidden" name="buy_from" value="'.htmlspecialchars($buy_from).'"><input type="hidden" name="buy_name" value="'.htmlspecialchars($buy_name).'"><input type="submit" value="Accept"></form></td> <td align="right"><form action="?subtopic=shopsystem" method="POST"><input type="submit" value="Cancel"></form></td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td colspan="3"></td></tr> </table> '; } } else { $errormessage .= 'Player with name <b>'.htmlspecialchars($buy_name).'</b> doesn\'t exist. Please <a href="?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a>.'; } } else { $errormessage .= 'Invalid name format. Please <a href="?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a> or contact with administrator.'; } } else { $errormessage .= 'For this item you need <b>'.$buy_offer['points'].'</b> points. You have only <b>'.$user_premium_points.'</b> premium points. Please <a href="?subtopic=shopsystem">select other item</a> or buy premium points.'; } } else { $errormessage .= 'Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="?subtopic=shopsystem">select item</a> again.'; } } } } if(!empty($errormessage)) { $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Informations</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.$errormessage.'</b></TD></TR> </table>'; } if(!$set_session) { unset($_SESSION['viewed_confirmation_page']); } } elseif($action == 'show_history') { if(!$logged) { $errormessage .= '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="'.$config['site']['lightborder'].'"><td><font color="'.$char_color.'">'.htmlspecialchars($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 .= htmlspecialchars($item_received['from_nick']); $items_received_text .= '</td><td>'.htmlspecialchars($item_received['offer_id']).'</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>'; } } $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'"></TD></TR> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><center><B>Transactions History</B></center></TD></TR> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'"></TD></TR> </table><br>'; if(!empty($items_received_text)) { $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white colspan="5"><B>Item Transactions</B></TD></TR> <tr bgcolor="'.$config['site']['darkborder'].'"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Bought on page</b></td><td><b>Received on OTS</b></td></tr> '.$items_received_text.' </table><br />'; } if(empty($items_received_text)) $errormessage .= 'You did not buy/receive any item.'; } if(!empty($errormessage)) { $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Informations</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.$errormessage.'</b></TD></TR> </table>'; } } $main_content .= '<br><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Premium Points</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b><font color="green">You have premium points: </font></b>'.$user_premium_points.'</TD></TR> </table>'; } else $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=center CLASS=white ><B>Shop Information</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><center>Shop is currently closed. [to admin: edit it in \'config/config.php\']</TD></TR> </table>'; Shopadmin.php <style type="text/css"> hr{border:0;border-bottom:1px solid #D4C0A1;padding:3px;} h1.admshop{margin:0;padding:0;} label.admshop{float:left;width:100px;} div.clear{clear:both;} p.border{border-bottom:1px solid #D4C0A1;padding:3px;} form input, form select, form button, form reset{padding:3px;} input.bt{padding:3px 20px;cursor:pointer;} .success{color:green;} .error{color:red;} .bt2{padding:5px 30px;cursor:pointer;} </style> <script type="text/javascript"> function _delete(id) { if( confirm('Confirma a exclusão do item selecionado?') ) { location.href='?subtopic=shopadmin&action=delete&id=' + id + ''; } return false; } </script> <?php if(!defined('INITIALIZED')) exit; /* * Variável SQL */ $SQL = $GLOBALS['SQL']; if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { /** * Systema By Dezon */ switch($action) { case 'list': $ofertas = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_offer').';'); $result .= '<p><a href="?subtopic=shopadmin">Shop admin</a> | <a href="?subtopic=shopadmin&action=new">Novo</a> | <a href="?subtopic=shopadmin&action=list">Listar</a> | <a href="?subtopic=shopadmin&action=points">Adicionar pontos</a></p>'; $result .= '<TABLE BGCOLOR="#D4C0A1" BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">'; $result .= '<tr bgcolor="#505050"><td class="white"><strong>Items cadastrados no \'Shop Offer\'</strong></td><tr>'; $result .= '<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="1" WIDTH="100%">'; $result .= '<TR BGCOLOR="#F1E0C6"><td><strong>ID</strong></td><td><strong>Nome da oferta</strong></td><td><strong>Imagem</strong></td><td><strong>Ações</strong></td></TR>'; while($data = $ofertas->fetch()) { $result .= '<tr BGCOLOR="#F1E0C6">'; $result .= '<td>'.$data['id'].'</td>'; $result .= '<td>'.$data['offer_name'].'</td>'; $result .= '<td align="center"><img src="./images/items/'.$data['itemid1'].$config['site']['item_images_extension'].'" /></td>'; $result .= '<td><a href="?subtopic=shopadmin&action=edit&id='.$data['id'].'">[editar]</a>&nbsp;<a href="javascript:void( _delete('.$data['id'].') );">[excluir]</a></td>'; $result .= '</tr>'; } $result .= '</table>'; $result .= '</table>'; $main_content .= $result; break; //lista as ofertas case 'edit': $main_content .= '<p><a href="?subtopic=shopadmin">Shop admin</a> | <a href="?subtopic=shopadmin&action=new">Novo</a> | <a href="?subtopic=shopadmin&action=list">Listar</a> | <a href="?subtopic=shopadmin&action=points">Adicionar pontos</a></p>'; $id = is_numeric($_GET['id']) ? $_GET['id'] : header('Location: ?subtopic=shopadmin'); $dados = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_offer').' WHERE id='.$id)->fetch(); if($dados['offer_type'] == 'item') { $dropdown = '<select name="offer_type"><option value="item" selected="selected">Item</option><option value="item">item</option></select>'; } else if($dados['offer_type'] == 'mounts') { $dropdown = '<select name="offer_type"><option value="mount" selected="selected">mount</option><option value="mount">mount</option></select>'; } else if($dados['offer_type'] == 'addons') { $dropdown = '<select name="offer_type"><option value="addon" selected="selected">addon</option></select>'; } $main_content .= <<<EOD <h1 class="admshop"><strong>Editar/Atualizar oferta</strong></h1> <form method="post" action="?subtopic=shopadmin&action=shop_edit"> <input type="hidden" name="id_offer" value="{$dados['id']}" /> <p class="border"><strong>Nome / Descrição da oferta</strong></p> <p><label class="admshop">Oferta: </label><input type="text" name="offer_name" size="50" maxlength="100" value="{$dados['offer_name']}" /></p> <p><label class="admshop">Descrição: </label><input type="text" name="offer_description" size="50" maxlength="1000" value="{$dados['offer_description']}" /></p> <p><label class="admshop">Qtde. pontos: </label><input type="text" name="points" size="5" maxlength="9" value="{$dados['points']}" /></p> <p class="border"><strong>Tipo da oferta</strong></p> <p><label class="admshop">Tipo: </label>{$dropdown}</p> <p class="border"><strong>Configuração de item normal, armor, shield, legs, etc</strong></p> <p><label class="admshop">ID Item 1: </label><input type="text" name="itemid1" size="10" value="{$dados['itemid1']}" /></p> <p><label class="admshop">Qtde. Item 1: </label><input type="text" name="count1" size="10" value="{$dados['count1']}" /></p> <p class="border"><strong>Configuração de item mounts, BP com Runas, BP com Small Stones, etc</strong></p> <p><label class="admshop">ID Item 2: </label><input type="text" name="itemid2" size="10" value="{$dados['itemid2']}" /></p> <p><label class="admshop">Qtde. Item 2: </label><input type="text" name="count2" size="10" value="{$dados['count2']}" /></p> <p class="border"><br /></p> <input type="submit" value="Salvar edição" class="bt" /> </form> <div class="clear"></div> EOD; break; //edita a oferta selecionada /******************************************************************************************/ // Ação responsável por abrir a tela de pontos /******************************************************************************************/ case 'points': $main_content .= $items_menu; $main_content .= <<<EOD <h1 class="admshop"><strong>Adicionar pontos à um Character <small><i>(Char)</i></small></strong></h1> <form method="post" action="?subtopic=shopadmin&action=points_add"> <p class="border"><strong>Entre com o nome do Char</strong></p> <p><label class="admshop">Character <small><i>(Char)</i></small>: </label><input type="text" name="char_name" size="30" maxlength="50" /></p> <p class="border"><strong>Entre a quantidade de pontos</strong></p> <p><label class="admshop">Qtde. pontos: </label><input type="text" name="char_points" size="5" maxlength="9" /></p> <p class="border"><br /></p> <input type="submit" value="Salvar" class="bt" /> </form> <div class="clear"></div> EOD; #/\ Deixe assim !!! break; case 'points_add': $player = stripslashes(ucwords(strtolower(trim($_POST['char_name'])))); $points = is_numeric($_POST['char_points']) ? $_POST['char_points'] : 0; if(strlen($player) > 0){ $data = $SQL->query("SELECT * FROM `players` WHERE `name` = '".$player."';")->fetch(); if($data['account_id']){ $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + '".$points."' WHERE `id` = '".$data['account_id']."'"); $main_content .= '<strong class="success">Pontos adicionados com sucesso à: <i>'.$player.'</i></strong><br /><br /><a href="?subtopic=shopadmin">Voltar</a>'; }else{ $main_content .= '<strong class="error">O character indicado não existe.</strong><br /><br /><a href="?subtopic=shopadmin&action=points">Voltar</a>'; } }else{ $main_content .= '<strong class="error">Preencha o nome do Character.</strong><br /><br /><a href="?subtopic=shopadmin&action=points">Voltar</a>'; } break; case 'shop_edit': $id = $_POST['id_offer']; $points = trim($_POST['points']); $itemid1 = trim($_POST['itemid1']); $count1 = trim($_POST['count1']); $itemid2 = trim($_POST['itemid2']); $count2 = trim($_POST['count2']); $offer_type = trim($_POST['offer_type']); $offer_description = trim($_POST['offer_description']); $offer_name = trim($_POST['offer_name']); if(empty($points) && empty($itemid1) && empty($offer_name)) { $main_content .= '<strong class="error">Você deve preencher pelo menos os pontos, id item 1 e o nome da oferta!</strong><p><hr /></p><a href="javascript:void(history.go(-1));">Voltar</a>'; } else { $sql_edit = sprintf( "UPDATE {$SQL->tableName('z_shop_offer')} SET points=%s, itemid1=%s, count1=%s, itemid2=%s, count2=%s, offer_type='%s', offer_description='%s', offer_name='%s' WHERE id=%s", $points, $itemid1, $count1, $itemid2, $count2, $offer_type, $offer_description, $offer_name, $id ); $SQL->query($sql_edit); $main_content .= '<strong class="success">Oferta editada com sucesso!</strong><br /><br /><a href="?subtopic=shopadmin&action=list">Voltar</a>'; } break; case 'delete': $id = is_numeric($_GET['id']) ? $_GET['id'] : header('Location: ?subtopic=shopadmin'); $SQL->query('DELETE FROM '.$SQL->tableName('z_shop_offer').' WHERE id='.$id); header('Location: ?subtopic=shopadmin&action=list'); break; //exclui items case 'shop_save': $points = trim($_POST['points']); $itemid1 = trim($_POST['itemid1']); $count1 = trim($_POST['count1']); $itemid2 = trim($_POST['itemid2']); $count2 = trim($_POST['count2']); $offer_type = trim($_POST['offer_type']); $offer_description = trim($_POST['offer_description']); $offer_name = trim($_POST['offer_name']); if(empty($points) && empty($itemid1) && empty($offer_name)) { $main_content .= '<strong class="error">Você deve preencher pelo menos os pontos, id item 1 e o nome da oferta!</strong><p><hr /></p><a href="javascript:void(history.go(-1))">Voltar</a>'; } else { $sql_save = sprintf( "INSERT INTO `z_shop_offer` (points,itemid1,count1,itemid2,count2,offer_type,offer_description,offer_name)VALUES('%s','%s','%s','%s','%s','%s','%s','%s')", (empty($points) ? 0 : $points), (empty($itemid1) ? 0 : $itemid1), (empty($count1) ? 0 : $count1), (empty($itemid2) ? 0 : $itemid2), (empty($count2) ? 0 : $count2), $offer_type, $offer_description, $offer_name ); $SQL->query($sql_save); $main_content .= '<strong class="success">Oferta salva com sucesso!</strong><br /><br /><a href="?subtopic=shopadmin">Voltar</a>'; } break; //salva a oferta no banco de dados case 'new': $main_content .= '<p><a href="?subtopic=shopadmin">Shop admin</a> | <a href="?subtopic=shopadmin&action=new">Novo</a> | <a href="?subtopic=shopadmin&action=list">Listar</a> | <a href="?subtopic=shopadmin&action=points">Adicionar pontos</a></p>'; $main_content .= <<<EOD <h1 class="admshop"><strong>Cadastrar nova oferta</strong></h1> <form method="post" action="?subtopic=shopadmin&action=shop_save"> <p class="border"><strong>Nome / Descrição da oferta</strong></p> <p><label class="admshop">Oferta: </label><input type="text" name="offer_name" size="50" maxlength="100" /></p> <p><label class="admshop">Descrição: </label><input type="text" name="offer_description" size="50" maxlength="1000" /></p> <p><label class="admshop">Qtde. pontos: </label><input type="text" name="points" size="5" maxlength="9" /></p> <p class="border"><strong>Tipo da oferta</strong></p> <p><label class="admshop">Tipo: </label><select name="offer_type"><option value="item" selected="selected">Item</option><option value="mount">Mounts</option><option value="addon">Addons</option></select></p> <p class="border"><strong>Configuração de item normal, armor, shield, legs, etc</strong></p> <p><label class="admshop">ID Item 1: </label><input type="text" name="itemid1" size="10" /></p> <p><label class="admshop">Qtde. Item 1: </label><input type="text" name="count1" size="10" /></p> <p class="border"><strong>Configuração de item mounts, BP com Runas, BP com Small Stones, etc</strong></p> <p><label class="admshop">ID Item 2: </label><input type="text" name="itemid2" size="10" /></p> <p><label class="admshop">Qtde. Item 2: </label><input type="text" name="count2" size="10" /></p> <p class="border"><br /></p> <input type="submit" value="Salvar" class="bt" /> </form> <div class="clear"></div> EOD; break; //form de cadastro para nova oferta default: //Default pois, será por padrão! $main_content .= <<<EOD <h1 class="admshop"><strong>Bem vindo ao Administrador do Shop!</strong></h1> <hr /> <center> <button type="button" class="bt2" onclick="location.href='?subtopic=shopadmin&action=new'">Novo</button> <button type="button" class="bt2" onclick="location.href='?subtopic=shopadmin&action=list'">Listar</button> <button type="button" class="bt2" onclick="location.href='?subtopic=shopadmin&action=points'">Adicionar Points</button> </center> EOD; #/\ Deixe assim !!! break; } //Fim do sistema } else { $main_content .= 'Sorry, you have not the rights to access this page.'; } /****************************************************************** * SYSTEMA DE ADMINISTRAÇÃO ONLINE DO WEBSHOP GESIOR 2012 BY DEZON * * TODOS OS DIREITOS, POR FAVOR, NÃO REMOVER ESSES CRÉDITOS * * FEITO EXCLUSIVAMENTE PARA O SITE WWW.TIBIAKING.COM * ******************************************************************/ Agradeço desde já a sua ajuda.
  8. Fala galera, beleza? Estou percebendo que meu servidor está crashando no Server Save. O problema é que não é em todos os SS, apenas em algum momento ele Salva e Crasha. Por isto, queria pedir um Server Save otimizado, que salvaria os Jogadores de pouco em Pouco (pode ser players ID impar / ID par ou algo do tipo). Agradeço desde já.
  9. Fala galera, beleza? Bom estou tendo um problema em meu highscores, ele ta dando ERROR 404 NOT FOUND - quando tento acessar a página. Desconfio que seja problema relacionado a Database, pois tentei fazer um reset nela e agora página está tendo problemas. Veja o código: <?PHP $list = $_REQUEST['list']; $page = $_REQUEST['page']; switch($list) { case "fist": $id = 0; $list_name = 'Fist Fighting'; break; case "club": $id = 1; $list_name = 'Club Fighting'; break; case "sword": $id = 2; $list_name = 'Sword Fighting'; break; case "axe": $id = 3; $list_name = 'Axe Fighting'; break; case "distance": $id = 4; $list_name = 'Distance Fighting'; break; case "shield": $id = 5; $list_name = 'Shielding'; break; case "fishing": $id = 6; $list_name = 'Fishing'; break; } if(count($config['site']['worlds']) > 1) { foreach($config['site']['worlds'] as $idd => $world_n) { if($idd == (int) $_GET['world']) { $world_id = $idd; $world_name = $world_n; } } } if(!isset($world_id)) { $world_id = 0; $world_name = $config['server']['serverName']; } $offset = $page * 100; if(isset($id)) $skills = $SQL->query('SELECT * FROM players, player_skills WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = '.$id.' AND players.account_id != 1 ORDER BY value DESC, count DESC LIMIT 101 OFFSET '.$offset); else { if($list == "magic") { $list_name = 'Magic Level'; $skills = $SQL->query('SELECT * FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND account_id != 1 ORDER BY maglevel DESC, manaspent DESC LIMIT 101 OFFSET '.$offset); } else { $skills = $SQL->query('SELECT * FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND account_id != 1 ORDER BY level DESC, experience DESC LIMIT 101 OFFSET '.$offset); $list_name = 'Experience'; $list = 'experience'; } } $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD><TD><CENTER><H2>Ranking for '.$list_name.' on '.$world_name.'</H2></CENTER><BR>'; if(count($config['site']['worlds']) > 1) { $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD> <FORM ACTION="index.php?subtopic=highscores&list='.$list.'" METHOD=get><INPUT TYPE=hidden NAME=subtopic VALUE=highscores><INPUT TYPE=hidden NAME=list VALUE=experience> <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>World Selection</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['lightborder'].'"> <TABLE BORDER=0 CELLPADDING=1><TR><TD>World: </TD><TD><SELECT SIZE="1" NAME="world"><OPTION VALUE="" SELECTED>(choose world)</OPTION>'; foreach($config['site']['worlds'] as $id => $world_n) { $main_content .= '<OPTION VALUE="'.$id.'">'.$world_n.'</OPTION>'; } $main_content .= '</SELECT> </TD><TD><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18> </TD></TR></TABLE></TABLE></FORM></TABLE><br>'; } $main_content .= '<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD WIDTH=10% CLASS=whites><B>Rank</B></TD><TD WIDTH=75% CLASS=whites><B>Name</B></TD><TD WIDTH=15% CLASS=whites><b><center>Level</center></B></TD>'; if($list == "experience") { $main_content .= '<TD CLASS=whites><b><center>Points</center></B></TD>'; } $main_content .= '</TR><TR>'; foreach($skills as $skill) { if($number_of_rows < 100) { if($list == "magic") $skill['value'] = $skill['maglevel']; if($list == "experience") $skill['value'] = $skill['level']; if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'"> <td>'.($offset + $number_of_rows).'.</td> <td>'.$flag.'<a href="index.php?subtopic=characters&name='.urlencode($skill['name']).'">'.$skill['name'].'</a>'; if(count($config['site']['worlds']) > 1) $main_content .= ', '.$config['site']['worlds'][$skill['world_id']]; $main_content .= '</small>'; $main_content .= '</td><td>'.$skill['value'].'</td>'; if($list == "experience") $main_content .= '<td>'.number_format($skill['experience'],0).'</td>'; $main_content .= '</tr>'; } else $show_link_to_next_page = TRUE; } if (!$skill){ $main_content .=' <tr bgcolor="'.$config['site']['darkborder'].'"> <td colspan="4" align="center"><i>'.$config['server']['serverName'].' no have players created on database.</i></td> </tr> ';} $main_content .= '</TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%>'; if($page > 0) $main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=highscores&list='.$list.'&world='.$world_id.'&page='.($page - 1).'" CLASS="size_xxs">Previous Page</A></TD></TR>'; if($show_link_to_next_page) $main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=highscores&list='.$list.'&world='.$world_id.'&page='.($page + 1).'" CLASS="size_xxs">Next Page</A></TD></TR>'; $main_content .= '</TABLE></TD><TD WIDTH=5%><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0></TD><TD WIDTH=15% VALIGN=top ALIGN=right> <TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1> <TR BGCOLOR="'.$config['site']['vdarkborder'].'"> <TD CLASS=whites><B>Choose a skill</B></TD></TR><TR BGCOLOR="'.$config['site']['lightborder'].'"><TD> <A HREF="index.php?subtopic=highscores&list=experience&world='.$world_id.'" CLASS="size_xs">Experience</A><BR> <A HREF="index.php?subtopic=highscores&list=magic&world='.$world_id.'" CLASS="size_xs">Magic</A><BR> <A HREF="index.php?subtopic=highscores&list=shield&world='.$world_id.'" CLASS="size_xs">Shielding</A><BR> <A HREF="index.php?subtopic=highscores&list=distance&world='.$world_id.'" CLASS="size_xs">Distance</A><BR> <A HREF="index.php?subtopic=highscores&list=club&world='.$world_id.'" CLASS="size_xs">Club</A><BR> <A HREF="index.php?subtopic=highscores&list=sword&world='.$world_id.'" CLASS="size_xs">Sword</A><BR> <A HREF="index.php?subtopic=highscores&list=axe&world='.$world_id.'" CLASS="size_xs">Axe</A><BR> <A HREF="index.php?subtopic=highscores&list=fist&world='.$world_id.'" CLASS="size_xs">Fist</A><BR> <A HREF="index.php?subtopic=highscores&list=fishing&world='.$world_id.'" CLASS="size_xs">Fishing</A><BR> </TD> </TR> </TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>'; ?>
  10. Com esse comando o texto fica limitado. Não da pra escrever muito!
  11. Minha duvida é bem simples, tenho uma função: function onUse(cid, item, fromPosition, itemEx, toPosition) e quero que em um certo momento da função, apareça um texto na posição 'toPosition' do item. algo do tipo: doSendMagicEffect(toPosition, "TEXTO")
  12. Preciso de uma entrada para Gesior igual do Global, este é o link: https://secure.tibia.com/mmorpg/free-multiplayer-online-role-playing-game.php
  13. Fala galera, tudo bem? O que eu queria é algo bem simples, uma cópia da entrada do global https://secure.tibia.com/mmorpg/free-multiplayer-online-role-playing-game.php para que possa colocar em meu Gesior.
  14. Na minha página /dntpagseguro.php esta dando problemas. A página de sadasd não está funcionando asd não consegue atender a esta solicitação no momento. HTTP ERROR 500
  15. Olá galera, estou enfrentando um erro em meu SITE ao tentar Criar Conta pelo site. O que não entendo é que o mesmo site funciona perfeitamente em um VPS, e em outro já não funciona. Como arrumar?

Informação Importante

Confirmação de Termo