Ir para conteúdo

lamina

Membro
  • Registro em

  • Última visita

Tudo que lamina postou

  1. lamina postou uma resposta no tópico em Scripts tfs 0.4 (OLD)
    Tem como fazer pra quando o player dar use no item, adicionar a mount ?
  2. Olá Alguem pode atualiza esse script pra min para tfs 1.0 ? Tipo não consegui fazer ele entregar o addon pro player, ele pega os itens mais n entrega os addons =x http://pastebin.com/nws8xHmK local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 npcHandler:setMessage(MESSAGE_GREET, "Olá |PLAYERNAME|. Você pode me ajudar? Se voce me ajudar, vou te recompensar com lindos addons! Basta dizer {addons} ou {ajuda} se você não sabe o que fazer.") function playerBuyAddonNPC(cid, message, keywords, parameters, node) local player = Player(cid) if(not npcHandler:isFocused(cid)) then return false end if (parameters.confirm ~= true) and (parameters.decline ~= true) then if(getPlayerPremiumDays(cid) == 0) and (parameters.premium == true) then npcHandler:say('Desculpe, mas este addon e apenas para jogadores premium!', cid) npcHandler:resetNpc() return true end if (getPlayerStorageValue(cid, parameters.storageID) ~= -1) then npcHandler:say('Voce ja tem esse addon!', cid) npcHandler:resetNpc() return true end local itemsTable = parameters.items local items_list = '' if table.maxn(itemsTable) > 0 then for i = 1, table.maxn(itemsTable) do local item = itemsTable[i] items_list = items_list .. item[2] .. ' ' .. getItemName(item[1]) if i ~= table.maxn(itemsTable) then items_list = items_list .. ', ' end end end local text = '' if (parameters.cost > 0) and table.maxn(parameters.items) then text = items_list .. ' and ' .. parameters.cost .. ' gp' elseif (parameters.cost > 0) then text = parameters.cost .. ' gp' elseif table.maxn(parameters.items) then text = items_list end npcHandler:say('Trouxeste-me ' .. text .. ' por ' .. keywords[1] .. '?', cid) return true elseif (parameters.confirm == true) then local addonNode = node:getParent() local addoninfo = addonNode:getParameters() local items_number = 0 if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] if (player:getItemCount(item[1]) >= item[2]) then items_number = items_number + 1 end end end if(player:getMoney(cid) >= addoninfo.cost) and (items_number == table.maxn(addoninfo.items)) then player:removeMoney(cid, addoninfo.cost) if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] player:removeItem(item[1],item[2]) end end player:addOutfitAddon(addoninfo.outfit_male, addoninfo.addon) player:addOutfitAddon(addoninfo.outfit_female, addoninfo.addon) player:setStorageValue(addoninfo.storageID,1) npcHandler:say('Aqui esta.', cid) else npcHandler:say('Voce nao tem os items necessarios ou dinheiro!', cid) end npcHandler:resetNpc() return true elseif (parameters.decline == true) then npcHandler:say('Este nao lhe interessa? Experimente outro!', cid) npcHandler:resetNpc() return true end return false end local noNode = KeywordNode:new({'no'}, playerBuyAddonNPC, {decline = true}) local yesNode = KeywordNode:new({'yes'}, playerBuyAddonNPC, {confirm = true}) -- citizen (done) local outfit_node = keywordHandler:addKeyword({'first citizen addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5878,100}}, outfit_female = 136, outfit_male = 128, addon = 1, storageID = 10021}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second citizen addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5890,100}, {5902,50}, {2480,1}}, outfit_female = 136, outfit_male = 128, addon = 2, storageID = 10022}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- hunter (done) local outfit_node = keywordHandler:addKeyword({'first hunter addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5876,100}, {5948,100}, {5891,5}, {5887,1}, {5889,1}, {5888,1}}, outfit_female = 137, outfit_male = 129, addon = 1, storageID = 10071}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second hunter addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5875,1}}, outfit_female = 137, outfit_male = 129, addon = 2, storageID = 10072}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- mage (done) local outfit_node = keywordHandler:addKeyword({'first mage addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{2182,1}, {2186,1}, {2185,1}, {8911,1}, {2181,1}, {2183,1}, {2190,1}, {2191,1}, {2188,1}, {8921,1}, {2189,1}, {2187,1}, {2392,30}}, outfit_female = 138, outfit_male = 130, addon = 1, storageID = 10023}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second mage addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5903,1}}, outfit_female = 138, outfit_male = 130, addon = 2, storageID = 10024}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- knight (done) local outfit_node = keywordHandler:addKeyword({'first knight addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5880,100}, {5892,1}}, outfit_female = 139, outfit_male = 131, addon = 1, storageID = 10073}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second knight addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5893,100}, {5885,1}, {5887,1}}, outfit_female = 139, outfit_male = 131, addon = 2, storageID = 10074}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Nobleman (done) local outfit_node = keywordHandler:addKeyword({'first nobleman addon'}, playerBuyAddonNPC, {premium = false, items = {{0000,0000}}, cost = 150000, outfit_female = 140, outfit_male = 132, addon = 1, storageID = 10075}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second nobleman addon'}, playerBuyAddonNPC, {premium = false, items = {{0000,0000}}, cost = 150000, outfit_female = 140, outfit_male = 132, addon = 2, storageID = 10076}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Summoner (done) local outfit_node = keywordHandler:addKeyword({'first summoner addon'}, playerBuyAddonNPC, {premium = false, items = {{5958,1}}, cost = 0, outfit_female = 141, outfit_male = 133, addon = 1, storageID = 10075}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second summoner addon'}, playerBuyAddonNPC, {premium = false, items = {{5894,70}, {5911,20}, {5883,40}, {5922,35}, {5886,10}, {5881,60}, {5882,40}, {5904,15}, {5905,30}}, cost = 0, outfit_female = 141, outfit_male = 133, addon = 2, storageID = 10076}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- barbarian (done) local outfit_node = keywordHandler:addKeyword({'first barbarian addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5884,1}, {5911,10}, {5886,10}}, outfit_female = 147, outfit_male = 143, addon = 1, storageID = 10025}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second barbarian addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5880,100}, {5892,1}, {5893,50}, {5876,5}}, outfit_female = 147, outfit_male = 143, addon = 2, storageID = 10026}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- druid (done) local outfit_node = keywordHandler:addKeyword({'first druid addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5896,50}, {5897,50}}, outfit_female = 148, outfit_male = 144, addon = 1, storageID = 10027}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second druid addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5906,100}, {5940,1}}, outfit_female = 148, outfit_male = 144, addon = 2, storageID = 10028}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- nobleman (done) local outfit_node = keywordHandler:addKeyword({'first nobleman addon'}, playerBuyAddonNPC, {premium = false, cost = 150000, items = {}, outfit_female = 140, outfit_male = 132, addon = 1, storageID = 10029}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second nobleman addon'}, playerBuyAddonNPC, {premium = false, cost = 150000, items = {}, outfit_female = 140, outfit_male = 132, addon = 2, storageID = 10030}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- oriental (done) local outfit_node = keywordHandler:addKeyword({'first oriental addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5945,1}}, outfit_female = 150, outfit_male = 146, addon = 1, storageID = 10031}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second oriental addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5883,100}, {5895,100}, {5891,1}, {5912,100}}, outfit_female = 150, outfit_male = 146, addon = 2, storageID = 10032}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Pirate (done) local outfit_node = keywordHandler:addKeyword({'first pirate addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6098,100}, {6126,100}, {6097,100}}, outfit_female = 155, outfit_male = 151, addon = 1, storageID = 10031}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second pirate addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6101,1}, {6102,1}, {6100,1}, {6099,1}}, outfit_female = 155, outfit_male = 151, addon = 2, storageID = 10032}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- warrior (done) local outfit_node = keywordHandler:addKeyword({'first warrior addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5925,15}, {5899,50}, {5884,1}, {5919,1}}, outfit_female = 142, outfit_male = 134, addon = 1, storageID = 10033}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second warrior addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5880,100}, {5887,1}}, outfit_female = 142, outfit_male = 134, addon = 2, storageID = 10034}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- wizard (done) local outfit_node = keywordHandler:addKeyword({'first wizard addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{2536,1}, {2492,1}, {2488,1}, {2123,1}}, outfit_female = 149, outfit_male = 145, addon = 1, storageID = 10035}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second wizard addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5922,50}}, outfit_female = 149, outfit_male = 145, addon = 2, storageID = 10036}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- assassin (done) local outfit_node = keywordHandler:addKeyword({'first assassin addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5912,50}, {5910,50}, {5911,50}, {5913,50}, {5914,50}, {5909,50}}, outfit_female = 156, outfit_male = 152, addon = 1, storageID = 10037}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second assassin addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5804,1}, {5930,10}}, outfit_female = 156, outfit_male = 152, addon = 2, storageID = 10038}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- shaman (done) local outfit_node = keywordHandler:addKeyword({'first shaman addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5810,1}, {3955,1}, {5015,1}}, outfit_female = 158, outfit_male = 154, addon = 1, storageID = 10039}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second shaman addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{3966,5}, {3967,5}}, outfit_female = 158, outfit_male = 154, addon = 2, storageID = 10040}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- jester (done)(custom) local outfit_node = keywordHandler:addKeyword({'first jester addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{7957,1}}, outfit_female = 270, outfit_male = 273, addon = 1, storageID = 10041}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second jester addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{7958,1}}, outfit_female = 270, outfit_male = 273, addon = 2, storageID = 10042}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- nightmare (done)(custom) local outfit_node = keywordHandler:addKeyword({'first nightmare addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6500,1500}}, outfit_female = 269, outfit_male = 268, addon = 1, storageID = 10043}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second nightmare addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6500,1500}}, outfit_female = 269, outfit_male = 268, addon = 2, storageID = 10044}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- yalaharian (done)(custom) local outfit_node = keywordHandler:addKeyword({'first yalaharian addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{9955,1}}, outfit_female = 324, outfit_male = 325, addon = 1, storageID = 10045}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second yalaharian addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{10309,1}}, outfit_female = 324, outfit_male = 325, addon = 2, storageID = 10046}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Warmaster (done) local outfit_node = keywordHandler:addKeyword({'first warmaster addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{11328,1}}, outfit_female = 335, outfit_male = 336, addon = 1, storageID = 10047}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second warmaster addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{11231,1}}, outfit_female = 335, outfit_male = 336, addon = 2, storageID = 10048}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Wayfarer (done) local outfit_node = keywordHandler:addKeyword({'first wayfarer addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{12657,1}}, outfit_female = 366, outfit_male = 367, addon = 1, storageID = 10049}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second wayfarer addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{12656,1}}, outfit_female = 366, outfit_male = 367, addon = 2, storageID = 10050}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Afflicted (done) local outfit_node = keywordHandler:addKeyword({'first afflicted addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{13545,1}, {13543,1}, {13541,1}, {13540,1}, {13542,1}, {13544,1}}, outfit_female = 431, outfit_male = 430, addon = 1, storageID = 10051}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second afflicted addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{13926,1}}, outfit_female = 431, outfit_male = 430, addon = 2, storageID = 10052}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Deepling (done)(custom) local outfit_node = keywordHandler:addKeyword({'first deepling addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{15435,1}, {15436,1}, {15434,1}}, outfit_female = 464, outfit_male = 463, addon = 1, storageID = 10053}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second deepling addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{15432,1}}, outfit_female = 464, outfit_male = 463, addon = 2, storageID = 10054}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Insectoid (done)(custom) local outfit_node = keywordHandler:addKeyword({'first insectoid addon'}, playerBuyAddonNPC, {premium = false, cost = 50000, items = {}, outfit_female = 466, outfit_male = 465, addon = 1, storageID = 10055}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second insectoid addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 466, outfit_male = 465, addon = 2, storageID = 10056}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Crystal Warlord (done)(custom) local outfit_node = keywordHandler:addKeyword({'first crystal warlord addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{18521,1}}, outfit_female = 513, outfit_male = 512, addon = 1, storageID = 10057}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second crystal warlord addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{18522,1}}, outfit_female = 513, outfit_male = 512, addon = 2, storageID = 10058}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Soil Guardian (done)(custom) local outfit_node = keywordHandler:addKeyword({'first soil guardian addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{18518,1}}, outfit_female = 514, outfit_male = 516, addon = 1, storageID = 10059}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second soil guardian addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{18519,1}}, outfit_female = 514, outfit_male = 516, addon = 2, storageID = 10060}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Cave Explorer (done)(custom) local outfit_node = keywordHandler:addKeyword({'first cave explorer addon'}, playerBuyAddonNPC, {premium = true, cost = 200000, items = {}, outfit_female = 575, outfit_male = 574, addon = 1, storageID = 10067}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second cave explorer addon'}, playerBuyAddonNPC, {premium = true, cost = 300000, items = {}, outfit_female = 575, outfit_male = 574, addon = 2, storageID = 10068}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Dream Warden (done)(custom) local outfit_node = keywordHandler:addKeyword({'first dream warden addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{22609,1}}, outfit_female = 578, outfit_male = 577, addon = 1, storageID = 10069}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second dream warden addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{22610,1}}, outfit_female = 578, outfit_male = 577, addon = 2, storageID = 10070}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) keywordHandler:addKeyword({'addons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Posso te dar citizen, hunter, mage, knight, nobleman, Summoner, warrior, barbarian, druid, wizard, oriental, pirate, assassin, shaman, nighmare, jester, yalaharian, warmaster, wayfarer, afflicted, deepling, insectoid, crystal warlord, soil guardian, cave explorer e dream warden addons.'}) keywordHandler:addKeyword({'ajuda'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Para ter ajuda com addons fale {help addon}.'}) keywordHandler:addKeyword({'help addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Para comprar o primeiro addon fale \'first NAME addon\', Para o segundo addon fale \'second NAME addon\'.'}) npcHandler:addModule(FocusModule:new())
  3. Se esse code não funcionar usem esse: Em /events/scripts/player.lua: Substitua: function Player:onGainExperience(target, exp, rawExp) return exp end Por: function Player:onGainExperience(target, exp, rawExp) if self:getStorageValue(STORAGE) >= 1 then local EXTRA_EXP_RATE = 0.5 --+50% exp rate local stamina = 1 if getConfigInfo('staminaSystem') == 'yes' then stamina = (self:getPremiumDays() > 0 and self:getStamina() > 2400) and 1.5 or 0.5 end return rawExp*getConfigInfo('rateExp')*stamina*(1+EXTRA_EXP_RATE) end return exp end e abra o events.xml e altere: <event class="Player" method="onGainExperience" enabled="0" /> Para: <event class="Player" method="onGainExperience" enabled="1" />
  4. Acho que você está muito estressada D= Acho que esse aqui, que encontrei em outro tópico do luanluciano funciona: local rate = 50 --- porcentagem que irá ganhar a mais. function onKill(cid, target, lastHit) if hasVip(cid) then local monster = Monster(target) if not monster then return true end for id, damage in pairs(monster:getDamageMap()) do local player = Player(id) if player then local experience = damage.total / monster:getType():getHealth() * monster:getType():getExperience() local expFormula = (((experience * Game.getExperienceStage(player:getLevel())) / 100) * rate) player:addExperience(math.floor(expFormula), true) end end end return true end
  5. Exp extra não ta funcionando não..
  6. Tem que atualizar os code tudo =x Quer ajuda pra atualiza?[Acho que conseguiu ] ai você atualiza no tópico !
  7. Não, não está atualizado. Se tivesse atualizado estaria com os nomes que tem aqui: Arquivo: compat.lua function pushThing(thing) local t = {uid = 0, itemid = 0, type = 0, actionid = 0} if thing ~= nil then if thing:isItem() then t.uid = thing:getUniqueId() t.itemid = thing:getId() if ItemType(t.itemid):hasSubType() then t.type = thing:getSubType() end t.actionid = thing:getActionId() elseif thing:isCreature() then t.uid = thing:getId() t.itemid = 1 if thing:isPlayer() then t.type = 1 elseif thing:isMonster() then t.type = 2 else t.type = 3 end end end return t end -- still used in some actions function isPlayer(cid) return Player(cid) ~= nil end function isMonster(cid) return Monster(cid) ~= nil end function getCreaturePosition(cid) local c = Creature(cid) return c ~= nil and c:getPosition() or false end function doRemoveCreature(cid) local c = Creature(cid) return c ~= nil and c:remove() or false end function doCreatureSay(cid, text, type, ...) local c = Creature(cid) return c ~= nil and c:say(text, type, ...) or false end function getPlayerByName(name) local p = Player(name) return p ~= nil and p:getId() or false end function getIPByPlayerName(name) local p = Player(name) return p ~= nil and p:getIp() or false end function getPlayerGUID(cid) local p = Player(cid) return p ~= nil and p:getGuid() or false end function getPlayerName(cid) local p = Player(cid) return p ~= nil and p:getName() or false end function getPlayerPosition(cid) local p = Player(cid) return p ~= nil and p:getPosition() or false end function getPlayerAccess(cid) local player = Player(cid) if player == nil then return false end return player:getGroup():getAccess() and 1 or 0 end function getPlayerMaxMana(cid) local p = Player(cid) return p ~= nil and p:getMaxMana() or false end function getPlayerVocation(cid) local p = Player(cid) return p ~= nil and p:getVocation():getId() or false end function getPlayerSex(cid) local p = Player(cid) return p ~= nil and p:getSex() or false end function getPlayerStorageValue(cid, key) local p = Player(cid) return p ~= nil and p:getStorageValue(key) or false end function getPlayerGroupId(cid) local p = Player(cid) return p ~= nil and p:getGroup():getId() or false end function getPlayerLookDir(cid) local p = Player(cid) return p ~= nil and p:getDirection() or false end function getPlayerLight(cid) local p = Player(cid) return p ~= nil and p:getLight() or false end function getPlayerDepotItems(cid, depotId) local p = Player(cid) return p ~= nil and p:getDepotItems(depotId) or false end function getPlayerSkullType(cid) local p = Player(cid) return p ~= nil and p:getSkull() or false end function getPlayerLossPercent(cid) local p = Player(cid) return p ~= nil and p:getDeathPenalty() or false end function getPlayerMount(cid, mountId) local p = Player(cid) return p ~= nil and p:hasMount(mountId) or false end function getPlayerPremiumDays(cid) local p = Player(cid) return p ~= nil and p:getPremiumDays() or false end function getPlayerBlessing(cid, blessing) local p = Player(cid) return p ~= nil and p:hasBlessing(blessing) or false end function getPlayerGuildId(cid) local player = Player(cid) if player == nil then return false end local guild = player:getGuild() if guild == nil then return false end return guild:getId() end function getPlayerGuildLevel(cid) local p = Player(cid) return p ~= nil and p:getGuildLevel() or false end function getPlayerGuildName(cid) local player = Player(cid) if player == nil then return false end local guild = player:getGuild() if guild == nil then return false end return guild:getName() end function getPlayerGuildRank(cid) local player = Player(cid) if player == nil then return false end local guild = player:getGuild() if guild == nil then return false end local rank = guild:getRankByLevel(player:getGuildLevel()) return rank ~= nil and rank.name or false end function getPlayerGuildNick(cid) local p = Player(cid) return p ~= nil and p:getGuildNick() or false end function getPlayerMasterPos(cid) local p = Player(cid) return p ~= nil and p:getTown():getTemplePosition() or false end function getPlayerItemCount(cid, itemId, ...) local p = Player(cid) return p ~= nil and p:getItemCount(itemId, ...) or false end function getPlayerSlotItem(cid, slot) local player = Player(cid) if player == nil then return pushThing(nil) end return pushThing(player:getSlotItem(slot)) end function getPlayerItemById(cid, deepSearch, itemId, ...) local player = Player(cid) if player == nil then return pushThing(nil) end return pushThing(player:getItemById(itemId, deepSearch, ...)) end function getPlayerFood(cid) local player = Player(cid) if player == nil then return false end local c = player:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) return c ~= nil and math.floor(c:getTicks() / 1000) or 0 end function canPlayerLearnInstantSpell(cid, name) local p = Player(cid) return p ~= nil and p:canLearnSpell(name) or false end function getPlayerLearnedInstantSpell(cid, name) local p = Player(cid) return p ~= nil and p:hasLearnedSpell(name) or false end function isPremium(cid) local p = Player(cid) return p ~= nil and p:isPremium() or false end function getPlayersByIPAddress(ip, mask) if mask == nil then mask = 0xFFFFFFFF end local masked = bit.band(ip, mask) local result = {} for _, player in ipairs(Game.getPlayers()) do if bit.band(player:getIp(), mask) == masked then result[#result + 1] = player:getId() end end return result end function getPlayersByAccountNumber(accountNumber) local result = {} for _, player in ipairs(Game.getPlayers()) do if player:getAccountId() == accountNumber then result[#result + 1] = player:getId() end end return result end function getPlayerGUIDByName(name) local player = Player(name) if player ~= nil then return player:getGuid() end local resultId = db.storeQuery("SELECT `id` FROM `players` WHERE `name` = " .. db.escapeString(name)) if resultId ~= false then local guid = result.getDataInt(resultId, "id") result.free(resultId) return guid end return 0 end function getAccountNumberByPlayerName(name) local player = Player(name) if player ~= nil then return player:getAccountId() end local resultId = db.storeQuery("SELECT `account_id` FROM `players` WHERE `name` = " .. db.escapeString(name)) if resultId ~= false then local accountId = result.getDataInt(resultId, "account_id") result.free(resultId) return accountId end return 0 end function setPlayerStorageValue(cid, key, value) local p = Player(cid) return p ~= nil and p:setStorageValue(key, value) or false end function doPlayerAddItemEx(cid, uid, ...) local p = Player(cid) return p ~= nil and p:addItemEx(Item(uid), ...) or false end function canPlayerWearOutfit(cid, lookType, addons) local p = Player(cid) return p ~= nil and p:hasOutfit(lookType, addons) or false end function doPlayerAddManaSpent(cid, mana) local p = Player(cid) return p ~= nil and p:addManaSpent(mana * configManager.getNumber(configKeys.RATE_MAGIC)) or false end function doPlayerJoinParty(cid, leaderId) local player = Player(cid) if player == nil then return false end if player:getParty() ~= nil then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are already in a party.") return true end local leader = Player(leaderId) if leader == nil then return false end local party = leader:getParty() if party == nil or party:getLeader() ~= leader then return true end for _, invitee in ipairs(party:getInvitees()) do if player ~= invitee then return true end end party:addMember(player) return true end function getPartyMembers(cid) local player = Player(cid) if player == nil then return false end local party = player:getParty() if party == nil then return false end local result = {party:getLeader():getId()} for _, member in ipairs(party:getMembers()) do result[#result + 1] = member:getId() end return result end function getMonsterTargetList(cid) local monster = Monster(cid) if monster == nil then return false end local result = {} for _, creature in ipairs(monster:getTargetList()) do if monster:isTarget(creature) then result[#result + 1] = creature:getId() end end return result end function getMonsterFriendList(cid) local monster = Monster(cid) if monster == nil then return false end local z = monster:getPosition().z local result = {} for _, creature in ipairs(monster:getFriendList()) do if not creature:isRemoved() and creature:getPosition().z == z then result[#result + 1] = creature:getId() end end return result end function doSetMonsterTarget(cid, target) local monster = Monster(cid) if monster == nil then return false end if monster:getMaster() ~= nil then return true end local target = Creature(cid) if target == nil then return false end monster:selectTarget(target) return true end function doMonsterChangeTarget(cid) local monster = Monster(cid) if monster == nil then return false end if monster:getMaster() ~= nil then return true end monster:searchTarget(1) return true end function doConvinceCreature(cid, target) local creature = Creature(cid) if creature == nil then return false end local targetCreature = Creature(target) if targetCreature == nil then return false end targetCreature:setMaster(creature) return true end function getTownId(townName) local t = Town(townName) return t ~= nil and t:getId() or false end function getTownName(townId) local t = Town(townId) return t ~= nil and t:getName() or false end function getTownTemplePosition(townId) local t = Town(townId) return t ~= nil and t:getTemplePosition() or false end function doSetItemActionId(uid, actionId) local i = Item(uid) return i ~= nil and i:setActionId(actionId) or false end function doTransformItem(uid, newItemId, ...) local i = Item(uid) return i ~= nil and i:transform(newItemId, ...) or false end function doChangeTypeItem(uid, newType) local i = Item(uid) return i ~= nil and i:transform(i:getId(), newType) or false end function doRemoveItem(uid, ...) local i = Item(uid) return i ~= nil and i:remove(...) or false end function getContainerCap(uid) local c = Container(uid) return c ~= nil and c:getCapacity() or false end function getContainerItem(uid, slot) local container = Container(uid) if container == nil then return pushThing(nil) end return pushThing(container:getItem(slot)) end function doAddContainerItemEx(uid, virtualId) local container = Container(uid) if container == nil then return false end local res = container:addItemEx(Item(virtualId)) if res == nil then return false end return res end function doSendMagicEffect(pos, magicEffect, ...) return Position(pos):sendMagicEffect(magicEffect, ...) end function doSendDistanceShoot(fromPos, toPos, distanceEffect, ...) return Position(fromPos):sendDistanceEffect(toPos, distanceEffect, ...) end function isSightClear(fromPos, toPos, floorCheck) return Position(fromPos):isSightClear(toPos, floorCheck) end function getPromotedVocation(vocationId) local vocation = Vocation(vocationId) if vocation == nil then return 0 end local promotedVocation = vocation:getPromotion() if promotedVocation == nil then return 0 end return promotedVocation:getId() end function getGuildId(guildName) local resultId = db.storeQuery("SELECT `id` FROM `guilds` WHERE `name` = " .. db.escapeString(guildName)) if resultId == false then return false end local guildId = result.getDataInt(resultId, "id") result.free(resultId) return guildId end function getHouseName(houseId) local h = House(houseId) return h ~= nil and h:getName() or false end function getHouseOwner(houseId) local h = House(houseId) return h ~= nil and h:getOwnerGuid() or false end function getHouseEntry(houseId) local h = House(houseId) return h ~= nil and h:getExitPosition() or false end function getHouseTown(houseId) local h = House(houseId) if h == nil then return false end local t = h:getTown() return t ~= nil and t:getId() or false end function getHouseTilesSize(houseId) local h = House(houseId) return h ~= nil and h:getTileCount() or false end function isItemStackable(itemId) return ItemType(itemId):isStackable() end function isItemRune(itemId) return ItemType(itemId):isRune() end function isItemDoor(itemId) return ItemType(itemId):isDoor() end function isItemContainer(itemId) return ItemType(itemId):isContainer() end function isItemFluidContainer(itemId) return ItemType(itemId):isFluidContainer() end function isItemMovable(itemId) return ItemType(itemId):isMovable() end function isCorpse(uid) local i = Item(uid) return i ~= nil and ItemType(i:getId()):isCorpse() or false end isItemMoveable = isItemMovable isMoveable = isMovable function getItemName(itemId) return ItemType(itemId):getName() end function getItemWeight(itemId, ...) return ItemType(itemId):getWeight(...) end function getItemDescriptions(itemId) local itemType = ItemType(itemId) return { name = itemType:getName(), plural = itemType:getPluralName(), article = itemType:getArticle(), description = itemType:getDescription() } end function getItemIdByName(name) local id = ItemType(name):getId() if id == 0 then return false end return id end function getItemWeightByUID(uid, ...) local item = Item(uid) if item == nil then return false end local itemType = ItemType(item:getId()) return itemType:isStackable() and itemType:getWeight(item:getCount(), ...) or itemType:getWeight(1, ...) end function getItemRWInfo(uid) local item = Item(uid) if item == nil then return false end local rwFlags = 0 local itemType = ItemType(item:getId()) if itemType:isReadable() then rwFlags = bit.bor(rwFlags, 1) end if itemType:isWritable() then rwFlags = bit.bor(rwFlags, 2) end return rwFlags end function doSetItemText(uid, text) local item = Item(uid) if item == nil then return false end if text ~= "" then item:setAttribute(ITEM_ATTRIBUTE_TEXT, text) else item:removeAttribute(ITEM_ATTRIBUTE_TEXT) end return true end function doSetItemSpecialDescription(uid, desc) local item = Item(uid) if item == nil then return false end if desc ~= "" then item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, desc) else item:removeAttribute(ITEM_ATTRIBUTE_DESCRIPTION) end return true end function doDecayItem(uid) local i = Item(uid) return i ~= nil and i:decay() or false end function setHouseOwner(id, guid) local h = House(id) return h ~= nil and h:setOwnerGuid(guid) or false end function getHouseRent(id) local h = House(id) return h ~= nil and h:getRent() or nil end function getHouseAccessList(id, listId) local h = House(id) return h ~= nil and h:getAccessList(listId) or nil end function setHouseAccessList(id, listId, listText) local h = House(id) return h ~= nil and h:setAccessList(listId, listText) or false end function getHouseByPlayerGUID(playerGUID) for _, house in ipairs(Game.getHouses()) do if house:getOwnerGuid() == playerGUID then return house:getId() end end return nil end function getTileHouseInfo(pos) local t = Tile(pos) if t == nil then return false end local h = t:getHouse() return h ~= nil and h:getId() or false end function getTilePzInfo(position) local t = Tile(position) if t == nil then return false end return t:hasFlag(TILESTATE_PROTECTIONZONE) end function getTileInfo(position) local t = Tile(position) if t == nil then return false end local ret = pushThing(t:getGround()) ret.protection = t:hasFlag(TILESTATE_PROTECTIONZONE) ret.nopz = ret.protection ret.nologout = t:hasFlag(TILESTATE_NOLOGOUT) ret.refresh = t:hasFlag(TILESTATE_REFRESH) ret.house = t:hasFlag(TILESTATE_HOUSE) ret.bed = t:hasFlag(TILESTATE_BED) ret.depot = t:hasFlag(TILESTATE_DEPOT) ret.things = t:getThingCount() ret.creatures = t:getCreatureCount() ret.items = t:getItemCount() ret.topItems = t:getTopItemCount() ret.downItems = t:getDownItemCount() return ret end function getTileItemByType(position, itemType) local t = Tile(position) if t == nil then return pushThing(nil) end return pushThing(t:getItemByType(itemType)) end function getTileItemById(position, itemId, ...) local t = Tile(position) if t == nil then return pushThing(nil) end return pushThing(t:getItemById(itemId, ...)) end function getTileThingByPos(position) local t = Tile(position) if t == nil then if position.stackpos == -1 then return -1 end return pushThing(nil) end if position.stackpos == -1 then return t:getThingCount() end return pushThing(t:getThing(position.stackpos)) end function getTileThingByTopOrder(position, topOrder) local t = Tile(position) if t == nil then return pushThing(nil) end return pushThing(t:getItemByTopOrder(topOrder)) end function getTopCreature(position) local t = Tile(position) if t == nil then return pushThing(nil) end return pushThing(t:getTopCreature()) end function queryTileAddThing(thing, position, ...) local t = Tile(position) return t ~= nil and t:queryAdd(thing, ...) or false end function doTeleportThing(uid, dest, pushMovement) if type(uid) == "userdata" then if uid:isCreature() then return uid:teleportTo(dest, pushMovement or false) else return uid:moveTo(dest) end else if uid >= 0x10000000 then local creature = Creature(uid) if creature ~= nil then return creature:teleportTo(dest, pushMovement or false) end else local item = Item(uid) if item ~= nil then return item:moveTo(dest) end end end return false end function getThingPos(uid) local thing if uid >= 0x10000000 then thing = Creature(uid) else thing = Item(uid) end if thing == nil then return false end local stackpos = 0 local tile = thing:getTile() if tile ~= nil then stackpos = tile:getThingIndex(thing) end local position = thing:getPosition() position.stackpos = stackpos return position end function doRelocate(fromPos, toPos) if fromPos == toPos then return false end local fromTile = Tile(fromPos) if fromTile == nil then return false end if Tile(toPos) == nil then return false end for i = fromTile:getThingCount() - 1, 0, -1 do local thing = fromTile:getThing(i) if thing ~= nil then if thing:isItem() then if ItemType(thing:getId()):isMovable() then thing:moveTo(toPos) end elseif thing:isCreature() then thing:teleportTo(toPos) end end end return true end function getThing(uid) return uid >= 0x10000000 and pushThing(Creature(uid)) or pushThing(Item(uid)) end function getConfigInfo(info) if type(info) ~= "string" then return nil end dofile('config.lua') return _G[info] end function getWorldCreatures(type) if type == 0 then return Game.getPlayerCount() elseif type == 1 then return Game.getMonsterCount() elseif type == 2 then return Game.getNpcCount() end return Game.getPlayerCount() + Game.getMonsterCount() + Game.getNpcCount() end function targetPositionToVariant(position) local variant = Variant(position) variant.type = VARIANT_TARGETPOSITION return variant end function doCreateTeleport(itemId, destination, position) local item = Game.createItem(itemId, 1, position) if not item:isTeleport() then item:remove() return false end item:setDestination(destination) return item:getUniqueId() end function getSpectators(centerPos, rangex, rangey, multifloor, onlyPlayers) local result = Game.getSpectators(centerPos, multifloor, onlyPlayers or false, rangex, rangex, rangey, rangey) if #result == 0 then return nil end for index, spectator in ipairs(result) do result[index] = spectator:getId() end return result end function broadcastMessage(message, messageType) Game.broadcastMessage(message, messageType) print("> Broadcasted message: \"" .. message .. "\".") end
  8. Ta atualizado com as ultimas atualizações do forgottenserver? @Edit Olha o erro, quando fui entrar no meu char; Acho que é por que não adicionou a tabela vip_time ! Executem o comando: ALTER TABLE `accounts` ADD `vip_time` INT( 15 ) NOT NULL; Erro ao usar o item 16101: actions/scripts/ vip.lua: function onUse(cid, item) local player = Player(cid) if hasVip(cid) == false then player:sendTextMessage(MESSAGE_INFO_DESCR,"Agora voce e um player VIP.") doPlayerAddVip(cid, 2592000) -- 30 dias tempo em segudos. doRemoveItem(item.uid, 1) else player:sendTextMessage(MESSAGE_INFO_DESCR,"Voce ja e VIP so poderá renovar daqui 30 dias.") end return TRUE end movements/scripts/vip.lua function onStepIn(cid, item, position, fromPosition) local config = { msgDenied = "Você não e vip ,Compre =D.", msgWelcome = "Seja Bem Vindo a Area vip." } local player = Player(cid) if hasVip(cid) == false then doTeleportThing(cid, fromPosition, true) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return TRUE end player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome) return TRUE end Ta, mais não da pra acessar unique id.. e to com os dias vip na account. D= Adicionando dias absurdos, '1409619163' e não ta adicionando 30
  9. Não usei hospedagem paga de site, usei no dedicado debian 7, nginx. Pesquisem é bom
  10. Ao usar o item some ?
  11. Funciona com Znote AAC?
  12. Tem como fazer isso para Znote aac ?
  13. Se eu fosse você colocava Windows 7 Ultimate 64x
  14. load.compat.php: <?php if(!defined('INITIALIZED')) exit; // DEFINE VARIABLES FOR SCRIPTS AND LAYOUTS (no more notices 'undefinied variable'!) if(!isset($_REQUEST['subtopic']) || empty($_REQUEST['subtopic']) || is_array($_REQUEST['subtopic'])) { $_REQUEST['subtopic'] = "latestnews"; } else $_REQUEST['subtopic'] = (string) $_REQUEST['subtopic']; if(Functions::isValidFolderName($_REQUEST['subtopic'])) { if(Website::fileExists("pages/" . $_REQUEST['subtopic'] . ".php")) { $subtopic = $_REQUEST['subtopic']; } else new Error_Critic('CRITICAL ERROR', 'Cannot load page <b>' . htmlspecialchars($_REQUEST['subtopic']) . '</b>, file does not exist.'); } else new Error_Critic('CRITICAL ERROR', 'Cannot load page <b>' . htmlspecialchars($_REQUEST['subtopic']) . '</b>, invalid file name [contains illegal characters].'); // action that page should execute if(isset($_REQUEST['action'])) $action = (string) $_REQUEST['action']; else $action = ''; $logged = false; $account_logged = new Account(); $group_id_of_acc_logged = 0; // with ONLY_PAGE option we want disable useless SQL queries if(!ONLY_PAGE) { // logged boolean value: true/false $logged = Visitor::isLogged(); // Account object with account of logged player or empty Account $account_logged = Visitor::getAccount(); // group of acc. logged if(Visitor::isLogged()) $group_id_of_acc_logged = Visitor::getAccount()->getPageAccess(); } $layout_name = './layouts/' . Website::getWebsiteConfig()->getValue('layout'); $title = ucwords($subtopic) . ' - ' . Website::getServerConfig()->getValue('serverName'); $topic = $subtopic; $passwordency = Website::getServerConfig()->getValue('passwordType'); if($passwordency == 'plain') $passwordency = ''; $news_content = ''; $vocation_name = array(); foreach(Website::getVocations() as $vocation) { $vocation_name[$vocation->getId()] = $vocation->getName(); } $layout_ini = parse_ini_file($layout_name.'/layout_config.ini'); foreach($layout_ini as $key => $value) $config['site'][$key] = $value; //###################### FUNCTIONS ###################### function microtime_float() { return microtime(true); } function isPremium($premdays, $lastday) { return Functions::isPremium($premdays, $lastday); } function saveconfig_ini($config) { new Error_Critic('', 'function <i>saveconfig_ini</i> is deprecated. Do not use it.'); } function password_ency($password, $account = null) { new Error_Critic('', 'function <i>password_ency</i> is deprecated. Do not use it.'); } function check_name($name) { $name = (string) $name; $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- [ ] '"); if($temp != strlen($name)) return false; if(strlen($name) > 25) return false; return true; } function check_account_name($name) { $name = (string) $name; $temp = strspn("$name", "QWERTYUIOPASDFGHJKLZXCVBNM0123456789"); if ($temp != strlen($name)) return false; if(strlen($name) < 1) return false; if(strlen($name) > 32) return false; return true; } function check_name_new_char($name) { $name = (string) $name; $name_to_check = strtolower($name); //first word can't be: $first_words_blocked = array('gm ','cm ', 'god ','tutor ', "'", '-'); //names blocked: $names_blocked = array('gm','cm', 'god', 'tutor'); //name can't contain: $words_blocked = array('gamemaster', 'game master', 'game-master', "game'master", '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor'); foreach($first_words_blocked as $word) if($word == substr($name_to_check, 0, strlen($word))) return false; if(substr($name_to_check, -1) == "'" || substr($name_to_check, -1) == "-") return false; if(substr($name_to_check, 1, 1) == ' ') return false; if(substr($name_to_check, -2, 1) == " ") return false; foreach($names_blocked as $word) if($word == $name_to_check) return false; for($i = 0; $i < strlen($name_to_check); $i++) if($name_to_check[$i-1] == ' ' && $name_to_check[$i+1] == ' ') return false; foreach($words_blocked as $word) if (!(strpos($name_to_check, $word) === false)) return false; for($i = 0; $i < strlen($name_to_check); $i++) if($name_to_check[$i] == $name_to_check[($i+1)] && $name_to_check[$i] == $name_to_check[($i+2)]) return false; for($i = 0; $i < strlen($name_to_check); $i++) if($name_to_check[$i-1] == ' ' && $name_to_check[$i+1] == ' ') return false; $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- '"); if ($temp != strlen($name)) return false; if(strlen($name) < 1) return false; if(strlen($name) > 25) return false; return true; } function check_rank_name($name) { $name = (string) $name; $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789-[ ] "); if($temp != strlen($name)) return false; if(strlen($name) < 1) return false; if(strlen($name) > 60) return false; return true; } function check_guild_name($name) { $name = (string) $name; $words_blocked = array('--', "''","' ", " '", '- ', ' -', "-'", "'-", ' '); $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789-' "); if($temp != strlen($name)) return false; if(strlen($name) < 1) return false; if(strlen($name) > 60) return false; foreach($words_blocked as $word) if (!(strpos($name, $word) === false)) return false; return true; } function check_password($pass) { $pass = (string) $pass; $temp = strspn("$pass", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890"); if($temp != strlen($pass)) return false; if(strlen($pass) > 40) return false; return true; } function check_mail($email) { $email = (string) $email; $ok = "/[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}/"; return (preg_match($ok, $email))? true: false; } function items_on_player($characterid, $pid) { new Error_Critic('', 'function <i>items_on_player</i> is deprecated. Do not use it. It used too many queries!'); } function getReason($reasonId) { return Functions::getBanReasonName($reasonId); } //################### DISPLAY FUNCTIONS ##################### //return shorter text (news ticker) function short_text($text, $chars_limit) { if(strlen($text) > $chars_limit) return substr($text, 0, strrpos(substr($text, 0, $chars_limit), " ")).'...'; else return $text; } //return text to news msg function news_place() { return ''; } //set monster of week function logo_monster() { new Error_Critic('', 'function <i>logo_monster</i> is deprecated. Do not use it!'); } // we don't want to count AJAX scripts/guild images as page views, we also don't need status if(!ONLY_PAGE) { // STATUS CHECKER $statustimeout = 1; foreach(explode("*", str_replace(" ", "", $config['server']['statusTimeout'])) as $status_var) if($status_var > 0) $statustimeout = $statustimeout * $status_var; $statustimeout = $statustimeout / 1000; $config['status'] = parse_ini_file('cache/DONT_EDIT_serverstatus.txt'); if($config['status']['serverStatus_lastCheck']+$statustimeout < time()) { $config['status']['serverStatus_checkInterval'] = $statustimeout+3; $config['status']['serverStatus_lastCheck'] = time(); $statusInfo = new ServerStatus($config['server']['ip'], $config['server']['statusProtocolPort'], 1); if($statusInfo->isOnline()) { $config['status']['serverStatus_online'] = 1; $config['status']['serverStatus_players'] = $statusInfo->getPlayersCount(); $config['status']['serverStatus_playersMax'] = $statusInfo->getPlayersMaxCount(); $h = floor($statusInfo->getUptime() / 3600); $m = floor(($statusInfo->getUptime() - $h*3600) / 60); $config['status']['serverStatus_uptime'] = $h.'h '.$m.'m'; $config['status']['serverStatus_monsters'] = $statusInfo->getMonsters(); } else { $config['status']['serverStatus_online'] = 0; $config['status']['serverStatus_players'] = 0; $config['status']['serverStatus_playersMax'] = 0; } $file = fopen("cache/DONT_EDIT_serverstatus.txt", "w"); $file_data = ''; foreach($config['status'] as $param => $data) { $file_data .= $param.' = "'.str_replace('"', '', $data).'" '; } rewind($file); fwrite($file, $file_data); fclose($file); } //PAGE VIEWS COUNTER $views_counter = "cache/DONT_EDIT_usercounter.txt"; // checking if the file exists if (file_exists($views_counter)) { $actie = fopen($views_counter, "r+"); $page_views = fgets($actie, 9); $page_views++; rewind($actie); fputs($actie, $page_views, 9); fclose($actie); } else { // the file doesn't exist, creating a new one with value 1 $actie = fopen($views_counter, "w"); $page_views = 1; fputs($actie, $page_views, 9); fclose($actie); } }
  15. Linha 62: $layout_ini = parse_ini_file($layout_name.'/layout_config.ini'); 63: foreach($layout_ini as $key => $value) 249: $config['status'] = parse_ini_file('cache/DONT_EDIT_serverstatus.txt');
  16. Acho que entendi, vou testar.. 5 min Olha no que deu: Warning: parse_ini_file() has been disabled for security reasons in /home/anticagl/public_html/system/load.compat.php on line 62 Warning: Invalid argument supplied for foreach() in /home/anticagl/public_html/system/load.compat.php on line 63 Warning: parse_ini_file() has been disabled for security reasons in /home/anticagl/public_html/system/load.compat.php on line 249 Me explica melhor ai, que não entendi n =/
  17. Acho que não é bem isso n, por que na hora de instalar o gesior, não localizou o arquivo vocations.xml, system/compart.lua Tipo isso: Warning: parse_ini_file() has been disabled for security reasons in /home/anticagl/public_html/system/load.compat.php on line 62 Warning: Invalid argument supplied for foreach() in /home/anticagl/public_html/system/load.compat.php on line 63 Warning: parse_ini_file() has been disabled for security reasons in /home/anticagl/public_html/system/load.compat.php on line 249
  18. Só eu criar um arquivo .lua na hospedagem então ? hum..
  19. Olá To com uma dúvida, nunca usei hospedagem de sites sempre usei xampp e to com uma dúvida.. Como faço pra ligar os pontos e por server online ?? Na hora de instalar o gesior o que boto em: $config['site']['serverPath'] = "..";
  20. lamina postou uma resposta no tópico em Suporte OTServer Derivados
    Parece meio triste '-', bota algo mais animado 'divertido' 'legal' 'bom de se ver'

Informação Importante

Confirmação de Termo