Tudo que Fir3element postou
-
[Pedido] Sistema de Resets com Stages
local config = { backToLevel = 8, redskull = false, battle = true, pz = false, stages = { {resets = 4, level = 350, vip = 330}, {resets = 9, level = 355, vip = 335}, {resets = 14, level = 360, vip = 340}, {resets = 19, level = 365, vip = 345}, {resets = 24, level = 380, vip = 350}, {resets = 29, level = 390, vip = 355}, {resets = 34, level = 410, vip = 360}, {resets = 39, level = 430, vip = 365}, {resets = 44, level = 450, vip = 370} } } function onSay(cid, words, param) if config.redskull and getCreatureSkullType(cid) == 4 then return doPlayerSendCancel(cid, "Voce precisa estar sem red skull para resetar.") elseif config.pz and not getTilePzInfo(getCreaturePosition(cid)) then return doPlayerSendCancel(cid, "Voce precisa estar em protection zone para resetar.") elseif config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "Voce precisa estar sem battle para resetar.") end local resetLevel = 0 for x, y in ipairs(config.stages) do if getResets(cid) <= y.resets then resetLevel = isPremium(cid) and y.vip or y.level break end end if getPlayerLevel(cid) < resetLevel then return doPlayerSendCancel(cid, "Voce precisa do level " .. resetLevel .. " ou mais para resetar.") end setResets(cid, 1) local guid = getPlayerGUID(cid) doRemoveCreature(cid, true) db.executeQuery("UPDATE `players` SET `level` = " .. config.backToLevel .. ", `experience` = " .. getExperienceForLevel(config.backToLevel) .. " WHERE `id` = " .. guid) return true end
-
[AJUDA] Item que corta wild growth
TOOLS = {} TOOLS.ROPE = function(cid, item, fromPosition, itemEx, toPosition) if(toPosition.x == CONTAINER_POSITION) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end toPosition.stackpos = STACKPOS_GROUND error(false) local ground = getThingFromPos(toPosition) error(true) if(isInArray(SPOTS, ground.itemid)) then doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, false) return true elseif(isInArray(ROPABLE, itemEx.itemid)) then local canOnlyRopePlayers = getBooleanFromString(getConfigValue('canOnlyRopePlayers')) local hole = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) if(canOnlyRopePlayers) then if(isPlayer(hole.uid) and (not isPlayerGhost(hole.uid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(hole.uid))) then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, false) else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end else if(hole.itemid > 0) then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, false) else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end end return true end return false end TOOLS.PICK = function(cid, item, fromPosition, itemEx, toPosition) error(false) local ground = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_GROUND}) error(true) if(isInArray(SPOTS, ground.itemid) and isInArray({354, 355}, itemEx.itemid)) then doTransformItem(itemEx.uid, 392) doDecayItem(itemEx.uid) doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(itemEx.itemid == 7200) then doTransformItem(itemEx.uid, 7236) doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT) return true end return false end TOOLS.MACHETE = function(cid, item, fromPosition, itemEx, toPosition, destroy) if(isInArray(JUNGLE_GRASS, itemEx.itemid)) then doTransformItem(itemEx.uid, itemEx.itemid - 1) doDecayItem(itemEx.uid) return true end if(isInArray(SPIDER_WEB, itemEx.itemid)) then if math.random(3) == 1 then doTransformItem(itemEx.uid, (itemEx.itemid + 6)) doDecayItem(itemEx.uid) end doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(isInArray(BAMBOO_FENCE, itemEx.itemid)) then if math.random(3) == 1 then if(itemEx.itemid == BAMBOO_FENCE[1]) then doTransformItem(itemEx.uid, (itemEx.itemid + 161)) elseif(itemEx.itemid == BAMBOO_FENCE[2]) then doTransformItem(itemEx.uid, (itemEx.itemid + 159)) end doDecayItem(itemEx.uid) end doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(isInArray(WILD_GROWTH, itemEx.itemid)) then doSendMagicEffect(toPosition, CONST_ME_POFF) doRemoveItem(itemEx.uid) return true end return destroy and destroyItem(cid, itemEx, toPosition) or false end TOOLS.SHOVEL = function(cid, item, fromPosition, itemEx, toPosition) if(isInArray(HOLES, itemEx.itemid)) then local newId = itemEx.itemid + 1 if(itemEx.itemid == 8579) then newId = 8585 end doTransformItem(itemEx.uid, newId) doDecayItem(itemEx.uid) elseif(isInArray(SAND, itemEx.itemid)) then local rand = math.random(1, 100) local ground = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_GROUND}) if(isInArray(SPOTS, ground.itemid) and rand <= 20) then doTransformItem(itemEx.uid, 489) doDecayItem(itemEx.uid) elseif(rand >= 1 and rand <= 5) then doCreateItem(2159, 1, toPosition) elseif(rand > 85) then doCreateMonster("Scarab", toPosition, false) end doSendMagicEffect(toPosition, CONST_ME_POFF) end return true end TOOLS.SCYTHE = function(cid, item, fromPosition, itemEx, toPosition, destroy) if(itemEx.itemid == 2739) then doTransformItem(itemEx.uid, 2737) doCreateItem(2694, 1, toPosition) doDecayItem(itemEx.uid) return true end return destroy and destroyItem(cid, itemEx, toPosition) or false end TOOLS.KNIFE = function(cid, item, fromPosition, itemEx, toPosition) if(itemEx.itemid ~= PUMPKIN) then return false end doTransformItem(itemEx.uid, PUMPKIN_HEAD) return true end local config = { functions = { [10511] = { -- sneaky stabber of eliteness TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.KNIFE }, [10513] = { -- squeezing gear of girlpower TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.SCYTHE }, [10515] = { -- whacking driller of fate TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.KNIFE } }, jamChance = 10 } function onUse(cid, item, fromPosition, itemEx, toPosition) local funcs = config.functions[item.itemid] if(funcs == nil) then return false end local result = false for _, func in ipairs(funcs) do if(func(cid, item, fromPosition, itemEx, toPosition)) then result = true break end end if(not result) then return false end if(math.random(1, 100) <= config.jamChance) then doTransformItem(item.uid, item.itemid + 1) doDecayItem(item.uid) end return true end
-
[Pedido] Sistema de Resets com Stages
Fiz de acordo com a tabela do RadBR, testei e ta funcionado local config = { backToLevel = 8, redskull = false, battle = true, pz = false, stages = { {resets = 4, level = 350}, {resets = 9, level = 355}, {resets = 14, level = 360}, {resets = 19, level = 365}, {resets = 24, level = 380}, {resets = 29, level = 390}, {resets = 34, level = 410}, {resets = 39, level = 430}, {resets = 44, level = 450} } } function onSay(cid, words, param) if config.redskull and getCreatureSkullType(cid) == 4 then return doPlayerSendCancel(cid, "Voce precisa estar sem red skull para resetar.") elseif config.pz and not getTilePzInfo(getCreaturePosition(cid)) then return doPlayerSendCancel(cid, "Voce precisa estar em protection zone para resetar.") elseif config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "Voce precisa estar sem battle para resetar.") end local resetLevel = 0 for x, y in ipairs(config.stages) do if getResets(cid) <= y.resets then resetLevel = y.level break end end if getPlayerLevel(cid) < resetLevel then return doPlayerSendCancel(cid, "Voce precisa do level " .. resetLevel .. " ou mais para resetar.") end setResets(cid, 1) local guid = getPlayerGUID(cid) doRemoveCreature(cid, true) db.executeQuery("UPDATE `players` SET `level` = " .. config.backToLevel .. ", `experience` = " .. getExperienceForLevel(config.backToLevel) .. " WHERE `id` = " .. guid) return true end
- [C++] Malformed File
-
[AJUDA] War System em TFS 0.7.5
TFS vai até o 0.4, essa versão ai acho que é do styller yurots, ela não tem war system... Troca pelo TFS 0.4 (tem na área de downloads).
-
[PEDIDO] Global Atual Com Account Manager
O account manager foi removido do TFS 1.x, sqlite também.
-
[AJUDA] Item que corta wild growth
actions.xml <action itemid="10511;10513;10515" event="script" value="tools/squeeze.lua"/> tools/squeeze.lua TOOLS = {} TOOLS.ROPE = function(cid, item, fromPosition, itemEx, toPosition) if(toPosition.x == CONTAINER_POSITION) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end toPosition.stackpos = STACKPOS_GROUND errors(false) local ground = getThingFromPos(toPosition) errors(true) if(isInArray(SPOTS, ground.itemid)) then doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, false) return true elseif(isInArray(ROPABLE, itemEx.itemid)) then local canOnlyRopePlayers = getBooleanFromString(getConfigValue('canOnlyRopePlayers')) local hole = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) if(canOnlyRopePlayers) then if(isPlayer(hole.uid) and (not isPlayerGhost(hole.uid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(hole.uid))) then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, false) else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end else if(hole.itemid > 0) then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, false) else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end end return true end return false end TOOLS.PICK = function(cid, item, fromPosition, itemEx, toPosition) errors(false) local ground = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_GROUND}) errors(true) if(isInArray(SPOTS, ground.itemid) and isInArray({354, 355}, itemEx.itemid)) then doTransformItem(itemEx.uid, 392) doDecayItem(itemEx.uid) doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(itemEx.itemid == 7200) then doTransformItem(itemEx.uid, 7236) doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT) return true end return false end TOOLS.MACHETE = function(cid, item, fromPosition, itemEx, toPosition, destroy) if(isInArray(JUNGLE_GRASS, itemEx.itemid)) then doTransformItem(itemEx.uid, itemEx.itemid - 1) doDecayItem(itemEx.uid) return true end if(isInArray(SPIDER_WEB, itemEx.itemid)) then if math.random(3) == 1 then doTransformItem(itemEx.uid, (itemEx.itemid + 6)) doDecayItem(itemEx.uid) end doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(isInArray(BAMBOO_FENCE, itemEx.itemid)) then if math.random(3) == 1 then if(itemEx.itemid == BAMBOO_FENCE[1]) then doTransformItem(itemEx.uid, (itemEx.itemid + 161)) elseif(itemEx.itemid == BAMBOO_FENCE[2]) then doTransformItem(itemEx.uid, (itemEx.itemid + 159)) end doDecayItem(itemEx.uid) end doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if(isInArray(WILD_GROWTH, itemEx.itemid)) then doSendMagicEffect(toPosition, CONST_ME_POFF) doRemoveItem(itemEx.uid) return true end return destroy and destroyItem(cid, itemEx, toPosition) or false end TOOLS.SHOVEL = function(cid, item, fromPosition, itemEx, toPosition) if(isInArray(HOLES, itemEx.itemid)) then local newId = itemEx.itemid + 1 if(itemEx.itemid == 8579) then newId = 8585 end doTransformItem(itemEx.uid, newId) doDecayItem(itemEx.uid) elseif(isInArray(SAND, itemEx.itemid)) then local rand = math.random(1, 100) local ground = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_GROUND}) if(isInArray(SPOTS, ground.itemid) and rand <= 20) then doTransformItem(itemEx.uid, 489) doDecayItem(itemEx.uid) elseif(rand >= 1 and rand <= 5) then doCreateItem(2159, 1, toPosition) elseif(rand > 85) then doCreateMonster("Scarab", toPosition, false) end doSendMagicEffect(toPosition, CONST_ME_POFF) end return true end TOOLS.SCYTHE = function(cid, item, fromPosition, itemEx, toPosition, destroy) if(itemEx.itemid == 2739) then doTransformItem(itemEx.uid, 2737) doCreateItem(2694, 1, toPosition) doDecayItem(itemEx.uid) return true end return destroy and destroyItem(cid, itemEx, toPosition) or false end TOOLS.KNIFE = function(cid, item, fromPosition, itemEx, toPosition) if(itemEx.itemid ~= PUMPKIN) then return false end doTransformItem(itemEx.uid, PUMPKIN_HEAD) return true end local config = { functions = { [10511] = { -- sneaky stabber of eliteness TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.KNIFE }, [10513] = { -- squeezing gear of girlpower TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.SCYTHE }, [10515] = { -- whacking driller of fate TOOLS.ROPE, TOOLS.SHOVEL, TOOLS.PICK, TOOLS.MACHETE, TOOLS.KNIFE } }, jamChance = 10 } function onUse(cid, item, fromPosition, itemEx, toPosition) local funcs = config.functions[item.itemid] if(funcs == nil) then return false end local result = false for _, func in ipairs(funcs) do if(func(cid, item, fromPosition, itemEx, toPosition)) then result = true break end end if(not result) then return false end if(math.random(1, 100) <= config.jamChance) then doTransformItem(item.uid, item.itemid + 1) doDecayItem(item.uid) end return true end
- (Resolvido)Como alterar fonte da DLL Lua51 ?
- (Resolvido)Como alterar fonte da DLL Lua51 ?
-
[Ajuda] Link Ubuntu ou Debian
x32: http://cdimage.debian.org/debian-cd/7.8.0/i386/iso-cd/debian-7.8.0-i386-CD-1.iso x64: http://cdimage.debian.org/debian-cd/7.8.0/amd64/iso-cd/debian-7.8.0-amd64-CD-1.iso
- (Resolvido)Como alterar fonte da DLL Lua51 ?
- (Resolvido)Como alterar fonte da DLL Lua51 ?
-
(Resolvido)[DUVIDA] Spells por MagicLevel e por Level
tenta ai: o level n ta alterando mt os valores, é bem chato de balancear isso local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onGetFormulaValues(cid, level, maglevel) if isInArray({4, 8}, getPlayerVocation(cid)) then -- knight min = ((level / 80.0) + (maglevel * 140) + 5) max = ((level / 90.0) + (maglevel * 145) + 7) elseif isInArray({3, 7}, getPlayerVocation(cid)) then -- paladin min = ((level / 80.0) + (maglevel * 73) + 5) max = ((level / 90.0) + (maglevel * 75) + 7) elseif isInArray({1, 2, 5, 6}, getPlayerVocation(cid)) then -- sorcerer/druid min = ((level / 80.0) + (maglevel * 15) + 5) max = ((level / 90.0) + (maglevel * 17) + 7) end return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
-
(Resolvido)Item bug stak 160 ao invés de 100
acho que a quantidade é no items.otb, tente usar algum item otb editor pra ver isso
-
(Resolvido)[RESOLVIDO] Player ganha vida upando Defense
Correto, cada vez que upar shielding vai ganhar 50 de hp (ganhar, não regenerar).
-
[AJUDA]Paladin Não sobe ML
posta o seu ai
-
[DUVIDA] Como retirar função SALT Gesior2012
Esse arquivo que você me passou não tem nada de salt
-
(Resolvido)Item bug stak 160 ao invés de 100
Acontece com todos os items?
-
(Resolvido)[RESOLVIDO] Player ganha vida upando Defense
1 - local amount = 50 2 - Sim, adicione isso no creaturescripts.xml <event type="advance" name="AdvanceShield" event="script" value="advanceshield.lua"/> login.lua, adicione junto aos outros: registerCreatureEvent(cid, "AdvanceShield") crie um arquivo na pasta scripts chamado advanceshield.lua: function onAdvance(cid, skill, oldLevel, newLevel) local amount = 50 if skill == SKILL_SHIELD then setCreatureMaxHealth(cid, amount + getCreatureMaxHealth(cid)) end return true end
-
alguém bom de linux para ajuda Segmentation fault
É o mesmo erro, você tem que compilar nesse pc ai, baixar já compilado pra linux é complicado.
-
Compilando distro 8.54
Linux: ./autogen.sh ./configure --enable-mysql make No windows pode usar dev-cpp, mas acho que não vai funcionar nessa source sem fazer modificações.
-
alguém bom de linux para ajuda Segmentation fault
Pelo jeito você já baixou compilado, acho que só arrumando a source mesmo...
-
[Duvida]Player Atravessa outro!
Coloque esse atributo no tile que você usa no evento (items.xml): <attribute key="walkStack" value="0" />
-
Tibia Auto 10.76 Dando erro
http://www.microsoft.com/en-us/download/details.aspx?id=40784
-
(Resolvido)[RESOLVIDO] Player ganha vida upando Defense
function onAdvance(cid, skill, oldLevel, newLevel) local amount = 50 if skill == SKILL_SHIELD then setCreatureMaxHealth(cid, amount + getCreatureMaxHealth(cid)) end return true end