Ir para conteúdo

Pifafa

Membro
  • Registro em

  • Última visita

Tudo que Pifafa postou

  1. Reiniciei o ot volto ao normal... Estranho.
  2. Estou com um problema nas portas das casas. Em alguns lugares, mesmo alterando o modelo de porta pelo Remere's, ela não é atualizada no servidor. E praticamente nenhuma delas está abrindo, apresentando a mensagem You cannot use this object. PS: Já tentei deletar as casas e adicionar elas de novo, mas o problema persiste. Seguem prints do servidor e do Remere's
  3. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    Acabei tirando vou testar.... Vlw amigo!
  4. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    Pessoal notei que essa script sempre salva o player quando o mesmo está encima do pisinho, gostaria de sabe se tem problema tira esse save ou não? ( Pos desconfio que isso faz sobrecarrega o servidor... dando lags) Script é esse: local config = { maxLevel = getConfigInfo('maximumDoorLevel') } local increasingItems = {[416] = 417, [426] = 425, [446] = 447, [3216] = 3217, [3202] = 3215, [11059] = 11060} local decreasingItems = {[417] = 416, [425] = 426, [447] = 446, [3217] = 3216, [3215] = 3202, [11060] = 11059} local depots = {2589, 2590, 2591, 2592} local checkCreature = {isPlayer, isMonster, isNpc} local function pushBack(cid, position, fromPosition, displayMessage) doTeleportThing(cid, fromPosition, false) doSendMagicEffect(position, CONST_ME_MAGIC_BLUE) if(displayMessage) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.") end end function onStepIn(cid, item, position, fromPosition) if(not increasingItems[item.itemid]) then return false end if(not isPlayerGhost(cid)) then doTransformItem(item.uid, increasingItems[item.itemid]) if (isPlayer(cid)) then doPlayerSave(cid, true) print("Player ".. getPlayerName(cid) .." salvo. Hora: " .. os.date("%X", os.time())) end end if(item.actionid >= 194 and item.actionid <= 196) then local f = checkCreature[item.actionid - 193] if(f(cid)) then pushBack(cid, position, fromPosition, false) end return true end if(item.actionid >= 191 and item.actionid <= 193) then local f = checkCreature[item.actionid - 190] if(not f(cid)) then pushBack(cid, position, fromPosition, false) end return true end if(not isPlayer(cid)) then return true end if(item.actionid == 189 and not isPremium(cid)) then pushBack(cid, position, fromPosition, true) return true end local gender = item.actionid - 186 if(isInArray({PLAYERSEX_FEMALE, PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender)) then if(gender ~= getPlayerSex(cid)) then pushBack(cid, position, fromPosition, true) end return true end local skull = item.actionid - 180 if(skull >= SKULL_NONE and skull <= SKULL_BLACK) then if(skull ~= getCreatureSkullType(cid)) then pushBack(cid, position, fromPosition, true) end return true end local group = item.actionid - 150 if(group >= 0 and group < 30) then if(group > getPlayerGroupId(cid)) then pushBack(cid, position, fromPosition, true) end return true end local vocation = item.actionid - 100 if(vocation >= 0 and vocation < 50) then local playerVocationInfo = getVocationInfo(getPlayerVocation(cid)) if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then pushBack(cid, position, fromPosition, true) end return true end if(item.actionid >= 1000 and item.actionid <= config.maxLevel) then if(getPlayerLevel(cid) < item.actionid - 1000) then pushBack(cid, position, fromPosition, true) end return true end if(item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) <= 0) then pushBack(cid, position, fromPosition, true) return true end if(getTileInfo(position).protection) then local depotPos, depot = getCreatureLookPosition(cid), {} depotPos.stackpos = STACKPOS_GROUND while(true) do if(not getTileInfo(depotPos).depot) then break end depotPos.stackpos = depotPos.stackpos + 1 depot = getThingFromPos(depotPos) if(depot.uid == 0) then break end if(isInArray(depots, depot.itemid)) then local depotItems = getPlayerDepotItems(cid, getDepotId(depot.uid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Your depot contains " .. depotItems .. " item" .. (depotItems > 1 and "s" or "") .. ".") break end end return true end return false end function onStepOut(cid, item, position, fromPosition) if(not decreasingItems[item.itemid]) then return false end if(not isPlayerGhost(cid)) then doTransformItem(item.uid, decreasingItems[item.itemid]) return true end return false end
  5. Pifafa postou uma resposta no tópico em Scripts tfs 0.4 (OLD)
    Aqui aparece o seguinte erro.
  6. Pifafa postou uma resposta no tópico em Scripts tfs 0.4 (OLD)
    obrigado pela contribuição você é de mais!
  7. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    Tenho o mostro guard, está perfeito o mostro kkk <?xml version="1.0" encoding="UTF-8"?> <monster name="Guard" nameDescription="a guard" race="blood" experience="0" speed="220" manacost="0"> <health now="240000" max="240000"/> <look type="57" corpse="6080"/> <targetchange interval="10000" chance="1"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" skill="30" attack="70"/> </attacks> <defenses armor="20" defense="22"> <defense name="healing" interval="1000" chance="17" min="30" max="50"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="1000" chance="10" speedchange="300" duration="3000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <elements> <element holyPercent="50"/> <element deathPercent="50"/> <element physicalPercent="-15"/> </elements> <immunities> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> </voices> </monster> Aqui está ele.
  8. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    Olá pessoal, por algum motivo meu EVENTO WOE funciona quase 100% a não ser de um coisa. Quando tento fazer que player possa sumona o guardinha o mesmo não funciona. Script: dofile("./_woe.lua") local delays = 60 local guards_price = 30000 --30k function onUse(cid, item, fromPosition, itemEx, toPosition) Woe.getInfo() if item.actionid == Castle.banderas then if Woe.isTime() then if Woe.isStarted() then if infoLua[2] == getPlayerGuildId(cid) then doTeleportThing(cid, Castle.guildEntry, false) else doPlayerSendCancel(cid, "You are not member of ".. Woe.guildName() ..".") end end else if infoLua[2] == getPlayerGuildId(cid) then doTeleportThing(cid, Castle.guildEntry, false) else doPlayerSendCancel(cid, "You are not member of ".. Woe.guildName() ..".") end end elseif (item.uid == 3134) then if not Woe.isStarted() or (infoLua[2] ~= getPlayerGuildId(cid)) or (getPlayerGuildLevel(cid) ~= GUILDLEVEL_LEADER) then return true end if (getPlayerMoney(cid) < guards_price) then return doPlayerSendCancel(cid, "Not enough money.") end local varDelay = getGlobalStorageValue(24503) if (varDelay < 0) or ((os.time() - varDelay) >= delays) then if Woe.check() then Woe.summon() doPlayerRemoveMoney(cid, guards_price) else doPlayerSendCancel(cid, "There are still guards alive.") end else doPlayerSendCancel(cid, "Delay no listo.") end end return true end Foto do suposto erro:
  9. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    Entendi o que senhor falo mais não funciono.. -- Areas/Combat for 0ms local combat0_Brush = createCombatObject() setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY) setCombatParam(combat0_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatArea(combat0_Brush,createCombatArea({{2}})) function getDmg_Brush(cid, level, maglevel) return (80)*-1,(180)*-10 end setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat0_Brush = {CONST_ANI_SMALLICE}local combat0_Brush_2 = createCombatObject() setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush_2,createCombatArea({{2}})) function getDmg_Brush_2(cid, level, maglevel) return (80)*-1,(180)*-12 end setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")local combat0_Brush_3 = createCombatObject() setCombatParam(combat0_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_STUN) setCombatParam(combat0_Brush_3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush_3,createCombatArea({{1, 0, 0, 0, 1}, {0, 1, 2, 1, 0}, {1, 0, 0, 0, 1}})) function getDmg_Brush_3(cid, level, maglevel) return (86)*-1,(200)*-10 end setCombatCallback(combat0_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3")local combat0_Brush_2 = createCombatObject() setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) setCombatParam(combat0_Brush_2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDCLUB) setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush_2,createCombatArea({{2}})) function getDmg_Brush_2(cid, level, maglevel) return (80)*-1,(200)*-10 end setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat0_Brush_2 = {CONST_ANI_WHIRLWINDCLUB}local combat0_Brush = createCombatObject() setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) setCombatParam(combat0_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_THROWINGKNIFE) setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush,createCombatArea({{2}})) function getDmg_Brush(cid, level, maglevel) return (95)*-1,(210)*-10 end setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat0_Brush = {CONST_ANI_SMALLEARTH}local combat0_Brush_6 = createCombatObject() setCombatParam(combat0_Brush_6, COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) setCombatParam(combat0_Brush_6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush_6,createCombatArea({{0, 1, 1, 1, 0}, {1, 0, 2, 0, 1}, {0, 1, 1, 1, 0}})) function getDmg_Brush_6(cid, level, maglevel) return (100)*-1,(290)*-10 end setCombatCallback(combat0_Brush_6, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_6") -- Areas/Combat for 900ms local combat9_Brush_6 = createCombatObject() setCombatParam(combat9_Brush_6, COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) setCombatParam(combat9_Brush_6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat9_Brush_6,createCombatArea({{1, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 0, 0, 0, 2, 0, 0, 0, 1}, {1, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 0, 0, 0, 0, 0, 0, 0, 1}})) function getDmg_Brush_6(cid, level, maglevel) return (100)*-1,(290)*-11 end setCombatCallback(combat9_Brush_6, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_6")local combat9_Brush_3 = createCombatObject() setCombatParam(combat9_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_STUN) setCombatParam(combat9_Brush_3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat9_Brush_3,createCombatArea({{1, 0, 0, 0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 2, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 0, 0, 0, 0, 0, 0, 0, 1}})) function getDmg_Brush_3(cid, level, maglevel) return (86)*-1,(200)*-10 end setCombatCallback(combat9_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3") -- Areas/Combat for 400ms local combat4_Brush_6 = createCombatObject() setCombatParam(combat4_Brush_6, COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) setCombatParam(combat4_Brush_6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat4_Brush_6,createCombatArea({{0, 1, 1, 1, 1, 1, 0}, {1, 0, 0, 0, 0, 0, 1}, {1, 0, 0, 2, 0, 0, 1}, {1, 0, 0, 0, 0, 0, 1}, {0, 1, 1, 1, 1, 1, 0}})) function getDmg_Brush_6(cid, level, maglevel) return (100)*-1,(290)*-10 end setCombatCallback(combat4_Brush_6, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_6")local combat4_Brush_3 = createCombatObject() setCombatParam(combat4_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_STUN) setCombatParam(combat4_Brush_3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat4_Brush_3,createCombatArea({{1, 0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 2, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {1, 0, 0, 0, 0, 0, 1}})) function getDmg_Brush_3(cid, level, maglevel) return (86)*-1,(200)*-7 end setCombatCallback(combat4_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3") -- =============== CORE FUNCTIONS =============== local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) function onGetFormulaValues(cid, level, maglevel) min = -(level*2.5)*(getResets(cid)+ 1 ) max = -(level*2.5)*(getResets(cid)+ 1 ) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part if (isCreature(cid)) then doCombat(cid, c, var) if (dirList ~= nil) then -- Emit distance effects local i = 2; while (i < #dirList) do doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) i = i + 2 end end end end function onCastSpell(cid, var) local startPos = getCreaturePosition(cid) RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos) RunPart(combat0_Brush_2,cid,var) RunPart(combat0_Brush_3,cid,var) RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos) RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos) RunPart(combat0_Brush_6,cid,var) addEvent(RunPart,900,combat9_Brush_6,cid,var) addEvent(RunPart,900,combat9_Brush_3,cid,var) addEvent(RunPart,400,combat4_Brush_6,cid,var) addEvent(RunPart,400,combat4_Brush_3,cid,var) return true end
  10. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    Olá amigos estou usando um sistema de reset muito legal e bom! Segue-se abaixo o modelo que estou usando. --[[ <(Advanced Reset System 2.0)> Autor: MarcelloMkez. Contato: ([email protected]) Versão: 2.0 Testado em: 8.50 e 8.60 TFS: 0.3.6 and 0.4.0 Fórum: http://www.xtibia.com/forum/topic/142463-advanced-reset-system-20/ -=[Características]=- ~( Versão 2.0 )~ - Resets agora Armazenados na DataBase; (Sem Valor de Storage) - Instala o System e cria a Tabela de Resets com o comando "/installreset"; - Resets no Look do jogador ex: 22:10 You see Marcello [Reset 2] (Level 8). He is an elder druid.; - [sTAGES] para "Premium Account" e "Free Account"; ]] --=[Functions]=-- -- installReset()' [instala o Sistema.] -- tableResetInstall()' [Verifica Se o Sistema ja foi instaladao.] -- nowReseting()' [Verifica, retorna o erro ou reseta.] -- getPlayerReset(cid)' [Pega numero de resets do player.] -- checLevelStageReset(cid)' [Verifica o Level para Resetar.] -- newReset(cid)' [Verifica todas as Condições de Reset.] -- addValue(value)' [Adiciona numero de resets.] --=[Comandos de Jogadores]=-- -- "/installreset" -- Só será usado uma vez, para instalar o sistema. -- "!resetar" -- Para Resetar. function onSay(cid, words, param) if words =="!resetar" then --[ Condições de Reset ] -- local coNdConf = { needPz = true, -- Precisa estar em Pz pra resetar? [true, false] needPa = false, -- Precisa ser Premium Account Pra resetar? [true, false] withe = false, -- Players com Pk Withe podem resetar? [true, false] red = false, -- Players com Pk Red pode resetar? [true, false] battle = false, -- Players precisão estar sem battle pra resetar? [true, false] teleport = true, -- Teleportar Player para o templo após resetar? [true, false] look = true, -- Aparecer Resets no Look do Player? [true, false] pid = getPlayerGUID(cid), -- Não Mexer. --[ Configurações do Reset ] -- resetConf = { Level = 350, -- Level Necessário para Resetar. [Valor] backLvl = 8, -- Level que voltará após o Reset. [Valor] time = 5, -- Tempo para o Player deslogar ao resetar, em segundos. [Valor] }, } --[[>> STAGES <<]]-- x=true;X=true -- Não Mexer. local stage = {Abilitar = {x}, Desabilitar = {}, --<< Abilitar Stages?? >>-- [{x};{}] -- [RESETS] | [PREMMY] | [FREE] stage1= {resets= 4, premmy= 330, free= 350}, stage2= {resets= 9, premmy= 340, free= 355}, -- EXPLICANDO e Configurando stages. (Se estiver Abilitado [Abilitar = {x}]) stage3= {resets= 14, premmy= 355, free= 360}, -- resets = Número de resets para o Stage; stage4= {resets= 19, premmy= 360, free= 365}, -- premmy = Level necessário para Premium Accounts; stage5= {resets= 24, premmy= 370, free= 380}, -- free = Level necessário para Free Accounts; stage6= {resets= 29, premmy= 380, free= 390}, -- Coloque em Ordem... stage7= {resets= 35, premmy= 400, free= 410}, -- [OBS: MARQUE UM "X" PARA ABILITAR OU DESABILITAR OS STAGES] stage8= {resets= 40, premmy= 410, free= 440}, -- EX: para desabilitar mude: Abilitar = {}, Desabilitar = {x} stage9= {resets= 45, premmy= 450, free= 450}, stage10={resets= 50, premmy= 465, free= 465}, } --[[>> FIM STAGES <<]]-- --=[Pega Valor de Resets]=-- function getPlayerReset(cid) local qr = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";") rss = qr:getDataInt("reset", coNdConf.pid) if rss < 0 then rss = 0 end return rss end local success = " ~~ Sucesso! ~~ \nVocê tem agora "..(getPlayerReset(cid)+1).." resets. \nVocê será deslogado em "..coNdConf.resetConf.time.." segundos." ;err = doPlayerSendTextMessage local qrt = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";");rss_db = qrt:getDataInt("reset", coNdConf.pid) local lvl_query = "UPDATE `players` SET `level` = "..(coNdConf.resetConf.backLvl)..", `experience` = 0 WHERE `id`= " .. coNdConf.pid .. ";" local reset_query = "UPDATE `players` SET `reset` = "..(getPlayerReset(cid)+(1)).." WHERE `id`= " .. coNdConf.pid .. ";" local nolook_query = "UPDATE `players` SET `description` = '' WHERE `players`.`id`= " .. coNdConf.pid .. ";" local look_query = "UPDATE `players` SET `description` = ' [Reset "..(getPlayerReset(cid)+(1)).."]' WHERE `players`.`id`= " .. coNdConf.pid .. ";" --=[Reseta]=-- function addValue(value) if coNdConf.look == false then doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(nolook_query) else doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(look_query) return LUA_NO_ERROR end end function nowReseting() if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return true end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) addEvent(addValue, coNdConf.resetConf.time*1000, value) return true end end --[sTAGES Nao mexer em nada.]-- function checkLevelStageReset(cid) local stages = { {resets= stage.stage1.resets, premmy= stage.stage1.premmy, free= stage.stage1.free}, {resets= stage.stage2.resets, premmy= stage.stage2.premmy, free= stage.stage2.free}, {resets= stage.stage3.resets, premmy= stage.stage3.premmy, free= stage.stage3.free}, {resets= stage.stage4.resets, premmy= stage.stage4.premmy, free= stage.stage4.free}, {resets= stage.stage5.resets, premmy= stage.stage5.premmy, free= stage.stage5.free}, {resets= stage.stage6.resets, premmy= stage.stage6.premmy, free= stage.stage6.free}, {resets= stage.stage7.resets, premmy= stage.stage7.premmy, free= stage.stage7.free}, {resets= stage.stage8.resets, premmy= stage.stage8.premmy, free= stage.stage8.free}, {resets= stage.stage9.resets, premmy= stage.stage9.premmy, free= stage.stage9.free}, {resets=stage.stage10.resets, premmy=stage.stage10.premmy, free=stage.stage10.free}, } local resets = getPlayerReset(cid) for i, tab in ipairs(stages) do if resets <= tab.resets then coNdConf.resetConf.Level = isPremium(cid) and tab.premmy or tab.free break end end if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then err(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return TRUE end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) return true end end function newReset(cid) if(coNdConf.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == LUA_ERROR) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar em Protection Zone Para Resetar. -") return TRUE end if(coNdConf.needPa == true) and not isPremium(cid) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa ser Premium Account para Resetar. -") return TRUE end if(coNdConf.withe == false) and (getCreatureSkullType(cid) == 3) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Withe. -") return TRUE end if(coNdConf.red == false) and (getCreatureSkullType(cid) == 4) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Red. -") return TRUE end if(coNdConf.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar sem Battle para Resetar. -") return TRUE end local xy = {true,false} table.insert(stage.Abilitar, false) table.insert(stage.Desabilitar, false) if stage.Abilitar[1] == xy[1] and stage.Desabilitar[1] == xy[2] then checkLevelStageReset(cid) elseif stage.Abilitar[1] == xy[2] and stage.Desabilitar[1] == xy[1] then nowReseting() else doPlayerPopupFYI(cid, "LUA_ERROR; Configure corretamente o Sistema de STAGES!") end return true end function tableResetInstall() print(not rss_db and LUA_ERROR or "Tabela de Resets: Instalada ... [success] ") addEvent(newReset, 1000, cid) return false end if tableResetInstall() then end end --=[install System]=-- function installReset() if db.executeQuery("ALTER TABLE `players` ADD reset INT(11) NOT NULL DEFAULT 0;") then print("[MarcelloMkez] -= Advanced Reset System 2.0 por DataBase =- Instalado com sucesso!") return TRUE end print('[Advanced Reset System/MarcelloMkez] Não foi possível instalar o Sistema.') return FALSE end local tt = { "Preparando Instalação...", "Instalando: TableReset Db...", "Instalando: getPlayerReset()...", "Instalando: addValue()...", "Instalando: checkLevelStageReset()...", "Instalando: newReset() and nowReseting()...", "Finalizando Instalação...", "...", success = { "Iniciando...", "function: TableReset Db... [success]", "function: getPlayerReset()... [success]", "function: addValue(value)... [success]", "function: checkLevelStageReset()... [success]", "function: newReset() and nowReseting()... [success]", "Fim da Instalação. ", "by: ~~ MarcelloMkez ~~ \nContato: [email protected]", inst = {"MarcelloMkez","Advanced Reset System 2.0 por DataBase" }, }, } if words == "/installreset" and getPlayerAccess(cid) >= 3 then function install() if installReset() then print(""..tt.success[7].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..tt.success[8].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] -="..tt.success.inst[2].."=- Instalado com sucesso!") else print("["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") end return 1 end function concl(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[7].."") print(""..tt[8].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[7].."") doPlayerSendTextMessage(cid, typetx,""..tt[8].."") addEvent(install, 1000,cid) end function finall(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[6].."") print(""..tt[7].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[6].."") doPlayerSendTextMessage(cid, typetx,""..tt[7].."") addEvent(concl, 3000,cid) end function installDd(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[5].."") print(""..tt[6].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[5].."") doPlayerSendTextMessage(cid, typetx,""..tt[6].."") addEvent(finall, 1000,cid) end function installCc(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[4].."") print(""..tt[5].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[4].."") doPlayerSendTextMessage(cid, typetx,""..tt[5].."") addEvent(installDd, 1000,cid) end function installBb(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[3].."") print(""..tt[4].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[3].."") doPlayerSendTextMessage(cid, typetx,""..tt[4].."") addEvent(installCc, 1000,cid) end function installAa(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[2].."") print(""..tt[3].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[2].."") doPlayerSendTextMessage(cid, typetx,""..tt[3].."") addEvent(installBb, 1000,cid) end function toInstall() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[1].."") print(""..tt[2].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[2].."") addEvent(installAa, 1000,cid) end function preparation() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[1].."") addEvent(toInstall, 3000,cid) end if preparation() then end end return 1 end --=[by: MarcelloMkez]=-- Porem a duvida fica, como posso fazer para inventar uma x Spells apenas que player que tenha 1 reset mais possa usar?! Isso é possível ou não?
  11. Pifafa postou uma resposta no tópico em Scripts tfs 0.4 (OLD)
    A ele hita mas não no mostro selecionado, mesma coisa com algumas outras spells que senhor fez. Estou tentando coloca para que apenas player com reset pode-se usa as spells, mas parece impossível pois meu sistema não usa storage! --[[ <(Advanced Reset System 2.0)> Autor: MarcelloMkez. Contato: ([email protected]) Versão: 2.0 Testado em: 8.50 e 8.60 TFS: 0.3.6 and 0.4.0 Fórum: http://www.xtibia.com/forum/topic/142463-advanced-reset-system-20/ -=[Características]=- ~( Versão 2.0 )~ - Resets agora Armazenados na DataBase; (Sem Valor de Storage) - Instala o System e cria a Tabela de Resets com o comando "/installreset"; - Resets no Look do jogador ex: 22:10 You see Marcello [Reset 2] (Level 8). He is an elder druid.; - [STAGES] para "Premium Account" e "Free Account"; ]] --=[Functions]=-- -- installReset()' [Instala o Sistema.] -- tableResetInstall()' [Verifica Se o Sistema ja foi instaladao.] -- nowReseting()' [Verifica, retorna o erro ou reseta.] -- getPlayerReset(cid)' [Pega numero de resets do player.] -- checLevelStageReset(cid)' [Verifica o Level para Resetar.] -- newReset(cid)' [Verifica todas as Condições de Reset.] -- addValue(value)' [Adiciona numero de resets.] --=[Comandos de Jogadores]=-- -- "/installreset" -- Só será usado uma vez, para instalar o sistema. -- "!resetar" -- Para Resetar. function onSay(cid, words, param) if words =="!resetar" then --[ Condições de Reset ] -- local coNdConf = { needPz = true, -- Precisa estar em Pz pra resetar? [true, false] needPa = false, -- Precisa ser Premium Account Pra resetar? [true, false] withe = false, -- Players com Pk Withe podem resetar? [true, false] red = false, -- Players com Pk Red pode resetar? [true, false] battle = false, -- Players precisão estar sem battle pra resetar? [true, false] teleport = true, -- Teleportar Player para o templo após resetar? [true, false] look = true, -- Aparecer Resets no Look do Player? [true, false] pid = getPlayerGUID(cid), -- Não Mexer. --[ Configurações do Reset ] -- resetConf = { Level = 700, -- Level Necessário para Resetar. [Valor] backLvl = 8, -- Level que voltará após o Reset. [Valor] time = 5, -- Tempo para o Player deslogar ao resetar, em segundos. [Valor] }, } --[[>> STAGES <<]]-- x=true;X=true -- Não Mexer. local stage = {Abilitar = {}, Desabilitar = {x}, --<< Abilitar Stages?? >>-- [{x};{}] -- [RESETS] | [PREMMY] | [FREE] stage1= {resets= 4, premmy= 330, free= 350}, stage2= {resets= 9, premmy= 340, free= 355}, -- EXPLICANDO e Configurando stages. (Se estiver Abilitado [Abilitar = {x}]) stage3= {resets= 14, premmy= 355, free= 360}, -- resets = Número de resets para o Stage; stage4= {resets= 19, premmy= 360, free= 365}, -- premmy = Level necessário para Premium Accounts; stage5= {resets= 24, premmy= 370, free= 380}, -- free = Level necessário para Free Accounts; stage6= {resets= 29, premmy= 380, free= 390}, -- Coloque em Ordem... stage7= {resets= 35, premmy= 400, free= 410}, -- [OBS: MARQUE UM "X" PARA ABILITAR OU DESABILITAR OS STAGES] stage8= {resets= 40, premmy= 410, free= 440}, -- EX: para desabilitar mude: Abilitar = {}, Desabilitar = {x} stage9= {resets= 45, premmy= 450, free= 450}, stage10={resets= 50, premmy= 465, free= 465}, } --[[>> FIM STAGES <<]]-- --=[Pega Valor de Resets]=-- function getPlayerReset(cid) local qr = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";") rss = qr:getDataInt("reset", coNdConf.pid) if rss < 0 then rss = 0 end return rss end local success = " ~~ Sucesso! ~~ \nVocê tem agora "..(getPlayerReset(cid)+1).." resets. \nVocê será deslogado em "..coNdConf.resetConf.time.." segundos." ;err = doPlayerSendTextMessage local qrt = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";");rss_db = qrt:getDataInt("reset", coNdConf.pid) local lvl_query = "UPDATE `players` SET `level` = "..(coNdConf.resetConf.backLvl)..", `experience` = 0 WHERE `id`= " .. coNdConf.pid .. ";" local reset_query = "UPDATE `players` SET `reset` = "..(getPlayerReset(cid)+(1)).." WHERE `id`= " .. coNdConf.pid .. ";" local nolook_query = "UPDATE `players` SET `description` = '' WHERE `players`.`id`= " .. coNdConf.pid .. ";" local look_query = "UPDATE `players` SET `description` = ' [Reset "..(getPlayerReset(cid)+(1)).."]' WHERE `players`.`id`= " .. coNdConf.pid .. ";" --=[Reseta]=-- function addValue(value) if coNdConf.look == false then doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(nolook_query) else doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(look_query) return LUA_NO_ERROR end end function nowReseting() if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return true end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) addEvent(addValue, coNdConf.resetConf.time*1000, value) return true end end --[STAGES Nao mexer em nada.]-- function checkLevelStageReset(cid) local stages = { {resets= stage.stage1.resets, premmy= stage.stage1.premmy, free= stage.stage1.free}, {resets= stage.stage2.resets, premmy= stage.stage2.premmy, free= stage.stage2.free}, {resets= stage.stage3.resets, premmy= stage.stage3.premmy, free= stage.stage3.free}, {resets= stage.stage4.resets, premmy= stage.stage4.premmy, free= stage.stage4.free}, {resets= stage.stage5.resets, premmy= stage.stage5.premmy, free= stage.stage5.free}, {resets= stage.stage6.resets, premmy= stage.stage6.premmy, free= stage.stage6.free}, {resets= stage.stage7.resets, premmy= stage.stage7.premmy, free= stage.stage7.free}, {resets= stage.stage8.resets, premmy= stage.stage8.premmy, free= stage.stage8.free}, {resets= stage.stage9.resets, premmy= stage.stage9.premmy, free= stage.stage9.free}, {resets=stage.stage10.resets, premmy=stage.stage10.premmy, free=stage.stage10.free}, } local resets = getPlayerReset(cid) for i, tab in ipairs(stages) do if resets <= tab.resets then coNdConf.resetConf.Level = isPremium(cid) and tab.premmy or tab.free break end end if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then err(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return TRUE end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) return true end end function newReset(cid) if(coNdConf.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == LUA_ERROR) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar em Protection Zone Para Resetar. -") return TRUE end if(coNdConf.needPa == true) and not isPremium(cid) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa ser Premium Account para Resetar. -") return TRUE end if(coNdConf.withe == false) and (getCreatureSkullType(cid) == 3) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Withe. -") return TRUE end if(coNdConf.red == false) and (getCreatureSkullType(cid) == 4) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Red. -") return TRUE end if(coNdConf.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar sem Battle para Resetar. -") return TRUE end local xy = {true,false} table.insert(stage.Abilitar, false) table.insert(stage.Desabilitar, false) if stage.Abilitar[1] == xy[1] and stage.Desabilitar[1] == xy[2] then checkLevelStageReset(cid) elseif stage.Abilitar[1] == xy[2] and stage.Desabilitar[1] == xy[1] then nowReseting() else doPlayerPopupFYI(cid, "LUA_ERROR; Configure corretamente o Sistema de STAGES!") end return true end function tableResetInstall() print(not rss_db and LUA_ERROR or "Tabela de Resets: Instalada ... [success] ") addEvent(newReset, 1000, cid) return false end if tableResetInstall() then end end --=[Install System]=-- function installReset() if db.executeQuery("ALTER TABLE `players` ADD reset INT(11) NOT NULL DEFAULT 0;") then print("[MarcelloMkez] -= Advanced Reset System 2.0 por DataBase =- Instalado com sucesso!") return TRUE end print('[Advanced Reset System/MarcelloMkez] Não foi possível instalar o Sistema.') return FALSE end local tt = { "Preparando Instalação...", "Instalando: TableReset Db...", "Instalando: getPlayerReset()...", "Instalando: addValue()...", "Instalando: checkLevelStageReset()...", "Instalando: newReset() and nowReseting()...", "Finalizando Instalação...", "...", success = { "Iniciando...", "function: TableReset Db... [success]", "function: getPlayerReset()... [success]", "function: addValue(value)... [success]", "function: checkLevelStageReset()... [success]", "function: newReset() and nowReseting()... [success]", "Fim da Instalação. ", "by: ~~ MarcelloMkez ~~ \nContato: [email protected]", inst = {"MarcelloMkez","Advanced Reset System 2.0 por DataBase" }, }, } if words == "/installreset" and getPlayerAccess(cid) >= 3 then function install() if installReset() then print(""..tt.success[7].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..tt.success[8].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] -="..tt.success.inst[2].."=- Instalado com sucesso!") else print("["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") end return 1 end function concl(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[7].."") print(""..tt[8].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[7].."") doPlayerSendTextMessage(cid, typetx,""..tt[8].."") addEvent(install, 1000,cid) end function finall(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[6].."") print(""..tt[7].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[6].."") doPlayerSendTextMessage(cid, typetx,""..tt[7].."") addEvent(concl, 3000,cid) end function installDd(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[5].."") print(""..tt[6].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[5].."") doPlayerSendTextMessage(cid, typetx,""..tt[6].."") addEvent(finall, 1000,cid) end function installCc(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[4].."") print(""..tt[5].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[4].."") doPlayerSendTextMessage(cid, typetx,""..tt[5].."") addEvent(installDd, 1000,cid) end function installBb(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[3].."") print(""..tt[4].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[3].."") doPlayerSendTextMessage(cid, typetx,""..tt[4].."") addEvent(installCc, 1000,cid) end function installAa(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[2].."") print(""..tt[3].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[2].."") doPlayerSendTextMessage(cid, typetx,""..tt[3].."") addEvent(installBb, 1000,cid) end function toInstall() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[1].."") print(""..tt[2].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[2].."") addEvent(installAa, 1000,cid) end function preparation() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[1].."") addEvent(toInstall, 3000,cid) end if preparation() then end end return 1 end --=[By: MarcelloMkez]=--
  12. Pifafa postou uma resposta no tópico em Scripts tfs 0.4 (OLD)
    acabei de testa é bem bonita mesmo, porem não tem dano? como coloca algum dano?
  13. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    Você saberia informar se existe como limita o numero de itens por player?! Exemplo uns 4 apenas ou 5..
  14. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    Pessoal esse sistema de Autoloot, pode causa algum lag no servidor? Já que o mesmo não apresenta limite de loot que o player pode adicionar.... <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Loot System" version="1.0" author="Vodkart And Mkalo" contact="none.com" enabled="yes"> <config name="Loot_func"><![CDATA[ info = { OnlyPremium = true, AutomaticDeposit = true, BlockMonsters = {}, BlockItemsList = {2123,2515} } function setPlayerStorageTable(cid, storage, tab) local tabstr = "&" for i,x in pairs(tab) do tabstr = tabstr .. i .. "," .. x .. ";" end setPlayerStorageValue(cid, storage, tabstr:sub(1, #tabstr-1)) end function getPlayerStorageTable(cid, storage) local tabstr = getPlayerStorageValue(cid, storage) local tab = {} if type(tabstr) ~= "string" then return {} end if tabstr:sub(1,1) ~= "&" then return {} end local tabstr = tabstr:sub(2, #tabstr) local a = string.explode(tabstr, ";") for i,x in pairs(a) do local b = string.explode(x, ",") tab[tonumber(b[1]) or b[1]] = tonumber(b[2]) or b[2] end return tab end function isInTable(cid, item) for _,i in pairs(getPlayerStorageTable(cid, 27000))do if tonumber(i) == tonumber(item) then return true end end return false end function addItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, 27000) do table.insert(x,getPlayerStorageTable(cid, 27000)[i]) end if x ~= 0 then table.insert(x,tonumber(item)) setPlayerStorageTable(cid, 27000, x) else setPlayerStorageTable(cid, 27000, {item}) end end function removeItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, 27000) do table.insert(x,getPlayerStorageTable(cid, 27000)[i]) end for i,v in ipairs(x) do if tonumber(v) == tonumber(item) then table.remove(x,i) end end return setPlayerStorageTable(cid, 27000, x) end function ShowItemsTabble(cid) local str,n = "-- My Loot List --\n\n",0 for i = 1,#getPlayerStorageTable(cid, 27000) do n = n + 1 str = str..""..n.." - "..getItemNameById(getPlayerStorageTable(cid, 27000)[i]).."\n" end return doShowTextDialog(cid, 2529, str) end function getContainerItems(containeruid) local items = {} local containers = {} if type(getContainerSize(containeruid)) ~= "number" then return false end for slot = 0, getContainerSize(containeruid)-1 do local item = getContainerItem(containeruid, slot) if item.itemid == 0 then break end if isContainer(item.uid) then table.insert(containers, item.uid) end table.insert(items, item) end if #containers > 0 then for i,x in ipairs(getContainerItems(containers[1])) do table.insert(items, x) end table.remove(containers, 1) end return items end function getItemsInContainerById(container, itemid) -- Function By Kydrai local items = {} if isContainer(container) and getContainerSize(container) > 0 then for slot=0, (getContainerSize(container)-1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getItemsInContainerById(item.uid, itemid) for i=0, #itemsbag do table.insert(items, itemsbag[i]) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return items end function doPlayerAddItemStacking(cid, itemid, quant) -- by mkalo local item = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid) local piles = 0 if #item > 0 then for i,x in pairs(item) do if getThing(x).type < 100 then local it = getThing(x) doTransformItem(it.uid, itemid, it.type+quant) if it.type+quant > 100 then doPlayerAddItem(cid, itemid, it.type+quant-100) end else piles = piles+1 end end else return doPlayerAddItem(cid, itemid, quant) end if piles == #item then doPlayerAddItem(cid, itemid, quant) end end function AutomaticDeposit(cid,item,n) local deposit = item == tonumber(2160) and (n*10000) or tonumber(item) == 2152 and (n*100) or (n*1) return doPlayerDepositMoney(cid, deposit) end function corpseRetireItems(cid, pos) local check = false for i = 0, 255 do pos.stackpos = i tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then check = true break end end if check == true then local items = getContainerItems(tile.uid) for i,x in pairs(items) do if isInArray(getPlayerStorageTable(cid, 27000), tonumber(x.itemid)) then if isItemStackable(x.itemid) then doPlayerAddItemStacking(cid, x.itemid, x.type) if info.AutomaticDeposit == true and isInArray({"2148","2152","2160"},tonumber(x.itemid)) then AutomaticDeposit(cid,x.itemid,x.type) end else doPlayerAddItem(cid, x.itemid) end doRemoveItem(x.uid) end end end end ]]></config> <event type="login" name="LootLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "MonsterAttack") return true end]]></event> <event type="death" name="LootEventDeath" event="script"><![CDATA[ domodlib('Loot_func') function onDeath(cid, corpse, deathList) local killer,pos = deathList[1],getCreaturePosition(cid) addEvent(corpseRetireItems,1,killer,pos) return true end]]></event> <event type="combat" name="MonsterAttack" event="script"><![CDATA[ domodlib('Loot_func') if isPlayer(cid) and isMonster(target) and not isInArray(info.BlockMonsters,string.lower(getCreatureName(target))) then registerCreatureEvent(target, "LootEventDeath") end return true]]></event> <talkaction words="!autoloot;/autoloot" event="buffer"><![CDATA[ domodlib('Loot_func') local t = string.explode(string.lower(param), ",") if info.OnlyPremium == true and not isPremium(cid) then doPlayerSendCancel(cid, "you must be a premium account.") return true elseif not t[1] then ShowItemsTabble(cid) return true elseif tonumber(t[1]) or tonumber(t[2]) then doPlayerSendCancel(cid, "enter!autoloot add,name or !autoloot remove,name") return true elseif isInArray({"add","remove"}, tostring(t[1])) then local func,check = tostring(t[1]) == "add" and addItemTable or removeItemTable, tostring(t[1]) == "add" and true or false local item = getItemIdByName(tostring(t[2]), false) if not item then doPlayerSendCancel(cid, "This item does not exist.") return true elseif check == true and isInArray(info.BlockItemsList, item) then doPlayerSendCancel(cid, "You can not add this item in the list!") return true elseif isInTable(cid, item) == check then doPlayerSendCancel(cid, "This Item "..(check == true and "already" or "is not").." in your list.") return true end func(cid, item) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,check == true and "you added the item "..t[2].." in the list" or "you removed the item "..t[2].." from the list") return true end return true]]></talkaction> </mod>
  15. Estou usando ehehehe, 10 msg por dia? Depois disso tem algum custo?
  16. Olá pessoal estou com problema meu script não funciona de forma algum, na verdade ele fica dizendo que os itens não estão no lugar certo, porem eles estão no lugar ok. Segue script! Realmente ele fica falando apenas as mensagens que citei, alguém teria alguma solução? -------------------------------------- --------- FUSION SYSTEM -------------- -- Ideia Original por: Dias Otonwer -- ----- Melhorado por: Duduzz ---------- -------------------------------------- function onUse(cid,item,fromPosition,itemEx,toPosition) -------------------------------- -------- Configuração ---------- -------------------------------- -- Item 1 -> pedaco de ferro ; Item 2 -> gemas local steel = 5889 -- id do pedaço de ferro ou a materia prima pra fusao. obs: APENAS 1 ID local gems = {2154,2153,2155,2156,2158} -- id das gemas ou do segundo item para fusao. obs: 2 OU MAIS IDS -- Item 3 -> frozen starlight ou wooden trash (configuravel) local item3 = 2361 -- id do item para criar items raros (frozen starlight). obs: APENAS 1 ID local item4 = 2253-- id do item para criar items fracos (wooden trash). obs: APENAS 1 ID -- Premios local premios = {2542,11301,11302,2645,2124,2173,2195,2466,5803,2414,7402,2498,2498,2520} -- premios fracos. obs: 2 OU MAIS IDS local premiosraros = {6529,8851,8926,8924,2646,8928,2470,2502,2503,2504,2453,2453,7423,6391,2522,2342,2494,2494,11240,11240,2472,2472,2123,2123,2171,2171,2496,2469,2495,2495,8932,2415,2408,2390,8885,8886,8887,8877,8878,8879} -- premios raros. obs: 2 OU MAIS IDS -- Posicoes local pos1 = {x=186,y=39,z=8,stackpos=255} -- posicao do item 1 local pos2 = {x=187,y=39,z=8,stackpos=255} -- posicao do item 2 local pos3 = {x=188,y=39,z=8,stackpos=255} -- posicao do item 3 local pos4 = {x=187,y=39,z=8,stackpos=255} -- posicao do item criado -------------------------------- -- Não mexa em nada abaixo!!! -- -------------------------------- local getpos = {getThingFromPos(pos1),getThingFromPos(pos2),getThingFromPos(pos3)} local randfacil = math.random(1,table.getn(premios)) local resultado = premios[randfacil] local randdificil = math.random(1,table.getn(premiosraros)) local resultado1 = premiosraros[randdificil] if itemEx.itemid == 1945 then if getpos[1].itemid == steel then if isInArray(gems,getpos[2].itemid) == TRUE and getpos[3].itemid == item4 then doCreateItem(resultado,1,pos4) doRemoveItem(getpos[1].uid,1) doRemoveItem(getpos[2].uid,1) doRemoveItem(getpos[3].uid,1) doSendMagicEffect(pos4,13) doSendMagicEffect(pos3,13) doSendMagicEffect(pos2,13) doSendMagicEffect(pos1,13) doPlayerSendTextMessage(cid,20,"Voce criou um Item!") doTransformItem(itemEx.uid,itemEx.itemid+1) elseif isInArray(gems,getpos[2].itemid) == TRUE and getpos[3].itemid == item3 then doCreateItem(resultado1,1,pos4) doRemoveItem(getpos[1].uid,1) doRemoveItem(getpos[2].uid,1) doRemoveItem(getpos[3].uid,1) doSendMagicEffect(pos4,13) doSendMagicEffect(pos2,13) doSendMagicEffect(pos3,13) doSendMagicEffect(pos1,13) doPlayerSendTextMessage(cid,20,"Voce criou um Item Raro!") doTransformItem(itemEx.uid,itemEx.itemid+1) else doPlayerSendCancel(cid,"Os items estao errados ou sua ordem esta incorreta.") end else doPlayerSendCancel(cid,"Voce precisa primeiramente da materia prima.") end elseif itemEx.uid == 5396 and itemEx.itemid == 1946 then doTransformItem(itemEx.uid,1945) else doPlayerSendCancel(cid,"Impossivel") end return 1 end
  17. Olá pessoal a muito tempo não ando postando nada, porem me surgiu uma duvida bem cruel, é possível mudar 1 servidor 9.80 a 9.86 de Windos ( Roda sistema Windos) Para rodar em Linux? (Pois antigamente falam que tinha que arrumar todas as pastas, e etc... Que seria um mega transtorno, se alguém souber explicar pouco melhor ficaria grato na internet so encontrei dados sobre como copilar as distro se não me engano, o que queria saber é se preciso muda toda as pastas dentro do servidor e etc...
  18. Olá, meu remeres não quer de jeito nenhum fazer meus mostro novos aparecer, para min colocar eles nos respam, já usei opção importa e tudo e nada acontece! Que devo fazer, para adicionar 1 novo bixo no mapa?? ( Os outros bixo aparecem normalmente apenas os que eu criei, e ja pus eles no monster.xml do ot também.) Ele so não importa os safados..
  19. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    Se eu por esses comandos para executarem quando meu ot liga, iria funcionar????? o em negrito é de maior interesse funcionaria sera?
  20. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    esse ai tb buga.... o cara fica sem pode usar novamente, nossa não existe sera 1 script que funga legal gente ?
  21. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    Não funciono ainda alguém poderia me dar 1 luz de double exp funcional?
  22. Pifafa postou uma resposta no tópico em Suporte Tibia OTServer
    Não apresento nenhum erro no distro..... Sera que funciono jovem?

Informação Importante

Confirmação de Termo