Ir para conteúdo

Líderes

Conteúdo Popular

Mostrando conteúdo com a maior reputação desde 03/26/24 em todas áreas

  1. FICO @Holograma VLW!
    1 ponto
  2. function checkDam(uid, AurAz, st) if (isCreature(uid)) and (os.time() - st < L_Soul.auras[AurAz].duration) then local p = getThingPos(uid) local poz = { {x = p.x, y = p.y - 2, z = p.z}, {x = p.x - 2, y = p.y, z = p.z}, {x = p.x, y = p.y + 2, z = p.z}, {x = p.x + 2, y = p.y, z = p.z} } -- Verifica se a tile está protegida if (getTileInfo(p).protection) then st = st - L_Soul.auras[AurAz].duration end local function getBest(a) local pz = poz[1] for i, v in pairs(poz) do if (getDistanceBetween(v, getThingPos(a)) < getDistanceBetween(pz, getThingPos(a))) then pz = v end end return pz end local creat = getUidsInArea({x = p.x - L_Soul.auras[AurAz].raio, y = p.y - L_Soul.auras[AurAz].raio, z = p.z}, {x = p.x + L_Soul.auras[AurAz].raio, y = p.y + L_Soul.auras[AurAz].raio, z = p.z}) local target = ((isCreature(getCreatureTarget(uid))) and getCreatureTarget(uid)) or 0 local cs = {} if (target == 0) then for _, v in pairs(creat) do -- Verifica se a criatura é um monstro ou se tem um alvo válido if ((getCreatureTarget(v) == uid) or (isMonster(v) or ((getCreatureSkullType(v) > 2) and (getCreatureTarget(v) == uid))) and (v ~= uid)) then table.insert(cs, v) end end target = (#cs > 0 and cs[math.random(#cs)]) or 0 end -- Verifica se o ataque foi feito pelo jogador if (isPlayer(uid)) then target = uid end if (target ~= 0) then doSendDistanceShoot(getBest(target), getThingPos(target), L_Soul.souls[AurAz].effects.distance) doTargetCombatHealth(uid, target, L_Soul.souls[AurAz].combat, -L_Soul.auras[AurAz].damage[1], -L_Soul.auras[AurAz].damage[2], 255) end addEvent(checkDam, L_Soul.auras[AurAz].interval, uid, AurAz, st) end end function sendEffect(uid, interval, at, st, AurAz) local at = at or 1 if (isCreature(uid)) then local p = getThingPos(uid) if (getTileInfo(p).protection) then st = st - L_Soul.auras[AurAz].duration end local poz = { {x = p.x, y = p.y - 2, z = p.z}, {x = p.x - 2, y = p.y, z = p.z}, {x = p.x, y = p.y + 2, z = p.z}, {x = p.x + 2, y = p.y, z = p.z} } if (os.time() - st > L_Soul.auras[AurAz].duration) then for i, v in ipairs(poz) do doSendDistanceShoot(v, p, L_Soul.souls[AurAz].effects.distance) end setPlayerStorageValue(uid, L_Soul.auras_sto, -1) addEvent(doSendMagicEffect, 250, p, L_Soul.souls[AurAz].effects.eff) return true end local next = poz[at + 1] and at + 1 or 1 doSendDistanceShoot(poz[at], poz[next], L_Soul.souls[AurAz].effects.distance) addEvent(sendEffect, interval, uid, interval, next, st, AurAz) end return true end function onSay(cid, words, param) domodlib("Soul System[LIB]") local lan = L_Soul.lang[L_Soul.language] local AurAz = words:explode(" ")[1] -- Verifica se a aura é válida if not (L_Soul.auras[AurAz]) then return false end -- Verifica se o jogador possui pedras de alma suficientes para ativar a aura if (#getPlayerSoulStonesByType(cid, AurAz) < L_Soul.auras[AurAz].stones_n) then return doPlayerSendCancel(cid, string.format(lan[19], AurAz, L_Soul.auras[AurAz].stones_n)) end -- Verifica se o jogador já está sob efeito de uma aura if (getPlayerStorageValue(cid, L_Soul.auras_sto) > 0) then return doPlayerSendCancel(cid, string.format(lan[20], math.floor(L_Soul.auras[AurAz].duration / 60))) end -- Verifica se o jogador está em uma área protegida if (getTileInfo(getThingPos(cid)).protection) then return doPlayerSendCancel(cid, lan[21]) end -- Define a aura que será ativada quando o jogador atacar setPlayerStorageValue(cid, "current_aura", AurAz) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, string.format("Agora você pode atacar para ativar a aura '%s'.", AurAz)) return true end function onCreatureHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) local auraName = getPlayerStorageValue(attacker, "current_aura") -- Verifica se o ataque foi feito por um jogador e se uma aura está definida para ser ativada if isPlayer(attacker) and auraName then -- Ativa a aura quando o jogador atacar um monstro ou outro jogador sendEffect(attacker, L_Soul.auras[auraName].speed, nil, os.time(), auraName) checkDam(attacker, auraName, os.time()) setPlayerStorageValue(attacker, "current_aura", nil) -- Limpa a aura após ser ativada end end --[[ System developed by MaXwEllDeN[maxwellden@hotmail.com] Version 1.0 ]] function onKill(cid, target, lastHit) if (getPlayerStorageValue(target, 7148) ~= -1) then doCreatureSetDropLoot(target, {}) end return registerCreatureEvent(target, "SoulD") end function onLogin(cid) setPlayerStorageValue(cid, 7126, -1) registerCreatureEvent(cid, "SoulATK") setPlayerStorageValue(cid, L_Soul.auras_sto, -1) return registerCreatureEvent(cid, "SoulKill") end local function TransformAMerda(cas) for a = 0, 255 do local pos = cas.pos pos.stackpos = a local item = getThingFromPos(pos) if (item.uid > 0) and (item.itemid == cas.it.itemid) and (cas.n == getItemAttribute(item.uid, "criaturaS")) and (not getItemAttribute(item.uid, "M_Time")) then return doTransformItem(item.uid, cas.nid) end end return false end function onDeath(cid, corpse, deathList) doItemSetAttribute(corpse.uid, "criaturaS", getCreatureName(cid):formal()) if (getPlayerStorageValue(cid, 7148) ~= -1) then addEvent(TransformAMerda, 1, {pos = getThingPos(cid), it = corpse, n = getCreatureName(cid), nid = getMonsterInfo(getPlayerStorageValue(cid, 7148)).lookCorpse}) return true end doItemSetAttribute(corpse.uid, "M_Time", os.clock()) return doItemSetAttribute(corpse.uid, "M_Soul", getCreatureName(cid):formal()) end local function Atacar(cid) if (not isCreature(cid)) then return false elseif (not isCreature(getCreatureTarget(cid))) then setPlayerStorageValue(cid, 7126, -1) return false end local target = getCreatureTarget(cid) local enc = isWithEnchantedW(cid) if (enc) then if (isWeapon(enc.arma.uid)) and (getDistanceBetween(getThingPos(getCreatureTarget(cid)), getThingPos(cid)) > 1) then setPlayerStorageValue(cid, 7126, -1) return false end local typ, enchant = L_Soul.souls[L_Soul.creatures[getItemAttribute(enc.arma.uid, "ES_Type")].type:lower()], L_Soul.creatures[getItemAttribute(enc.arma.uid, "ES_Type")].enchant doTargetCombatHealth(cid, target, typ.combat, -enchant.min, -enchant.max, typ.effects.eff) doSendDistanceShoot(getThingPos(cid), getThingPos(target), typ.effects.distance) if (enc.at == 1) then doPlayerSendTextMessage(cid, 27, string.format(lan[17], getItemNameById(enc.arma.itemid))) doItemSetAttribute(enc.arma.uid, "description", false) doItemSetAttribute(enc.arma.uid, "ES_Charges", false) else doItemSetAttribute(enc.arma.uid, "description", string.format(lan[16], getItemAttribute(enc.arma.uid, "ES_Type"), enc.at - 1, enchant.charges)) doItemSetAttribute(enc.arma.uid, "ES_Charges", enc.at - 1) end addEvent(Atacar, enchant.attack_speed, cid) else setPlayerStorageValue(cid, 7126, -1) end end function onAttack(cid, target) if (getPlayerStorageValue(cid, 7126) < 1) then setPlayerStorageValue(cid, 7126, 5) Atacar(cid) end return true end function isWithEnchantedW(uid) for a = 5, 6 do local item = getPlayerSlotItem(uid, a) if (item.uid > 2) and (getItemAttribute(item.uid, "ES_Charges")) then return {arma = item, at = getItemAttribute(item.uid, "ES_Charges")} end end return false end L_Soul = { souls = { ["dark"] = {effects = {distance = 31, eff = 17}, combat = COMBAT_DEATHDAMAGE}, ["flame"] = {effects = {distance = 3, eff = 15}, combat = COMBAT_FIREDAMAGE}, ["frozen"] = {effects = {distance = 36, eff = 43}, combat = COMBAT_ICEDAMAGE}, ["holy"] = {effects = {distance = 37, eff = 39}, combat = COMBAT_HOLYDAMAGE}, ["electric"] = {effects = {distance = 35, eff = 11}, combat = COMBAT_ENERGYDAMAGE}, }, creatures = { ["Necromancer"] = {chance = 50, type = "dark", summ = { hp = {hpb = 50, maxb = 700}, needSoulPoints = 50, needMana = 0, needHealth = 20, minP = 50, }, enchant = {charges = 100, min = 10, max = 60, attack_speed = 250}, }, ["Dragon Lord"] = {chance = 100, type = "flame", summ = { hp = {hpb = 50, maxb = 700}, needSoulPoints = 50, needMana = 0, needHealth = 20, minP = 50, }, enchant = {charges = 200, min = 50, max = 150, attack_speed = 1000}, }, ["Frost Dragon"] = {chance = 100, type = "frozen", summ = { hp = {hpb = 50, maxb = 700}, needSoulPoints = 50, needMana = 0, needHealth = 20, minP = 50, }, enchant = {charges = 200, min = 50, max = 160, attack_speed = 1500}, }, ["Wyrm"] = {chance = 100, type = "electric", summ = { hp = {hpb = 50, maxb = 700}, needSoulPoints = 50, needMana = 0, needHealth = 20, minP = 50, }, enchant = {charges = 200, min = 50, max = 160, attack_speed = 550}, }, ["Monk"] = {chance = 150, type = "holy", summ = { hp = {hpb = 50, maxb = 700}, needSoulPoints = 50, needMana = 0, needHealth = 20, minP = 50, }, enchant = {charges = 200, min = 50, max = 160, attack_speed = 550}, }, }, ids = {8300}, max_distance = 5, language = "en", auras_sto = 77143, soul_t = 10, -- Em Minutos } ---------------------- A U R A S ---------------------------- L_Soul.auras = { ["dark"] = {stones_n = 7, damage = {25, 250}, interval = 1200, duration = 120, raio = 4, speed = 150}, ["flame"] = {stones_n = 5, damage = {250, 650}, interval = 500, duration = 60, raio = 7, speed = 75}, ["frozen"] = {stones_n = 2, damage = {150, 350}, interval = 750, duration = 60, raio = 2, speed = 150}, ["electric"] = {stones_n = 5, damage = {150, 350}, interval = 750, duration = 60, raio = 2, speed = 150}, ["holy"] = {stones_n = 0, damage = {150, 350}, interval = 750, duration = 60, raio = 7, speed = 150}, } ------------------- E N C A N T A M E N T O ----------------- L_Soul.enchant = { weapons = { [2408] = {"dark", "flame", "frozen"}, -- Warlord Sword [2190] = {"dark", "holy"}, -- Wand of Vortex [2456] = {"dark", "holy"}, -- Bow [2400] = {"dark", "holy", "frozen", "flame", "electric"}, -- Magic Sword(SOV) }, } ------------------ L I N G U A G E M ------------------------ L_Soul.lang = { ["en"] = { "This soul stone is filled with a %s's %s soul!", "This soul stone must be near the creature's corpse.", "There's no soul!", "Your soul stone didn't supported the soul and broke! This %s's %s soul escaped!", "Congratulations, you caught a %s's soul[%s]!", "Filled with a %s's %s soul.", "This item can't be enchanted.", "To summon a %s you must have at least %d soul points.", "You can't summon a %s there.", "To summon a %s you must have at least %d mana points.", "To summon a %s you must have at least %d health points.", "The soul stone broke and the corpse was possessed by %s's %s soul!", "This corpse doesn't support this %s's powerful %s soul. The soul has escaped and is roaming the world and tormenting people.", "A body can't have two souls.", "The %s's soul was aprisioned in weapon.", "This weapon is enchanted with a %s's soul. Charges: %d/%d.", "Your %s lost charm.", "This weapon already is enchanted with a soul!", -- 18 --> AURAS <-- "You haven't enought %s souls[%d].", "You need wait %d minutes to use an aura protection again.", "You can't use an aura protection on protected zones.", { "Alive again!? How!? AH! It doesn't matter, i just want to get my revenge! MUHAUHAUHUAUA!", "OH how is sweet live!", }, } } function isWeapon(uid) -- Function by Mock the bear. local uid = uid or 0 local f = getItemWeaponType(uid) return (f == 1 or f == 2 or f == 3) or false end function string:formal() local self = self:sub(1, 1):upper() .. self:sub(2, #self) while (self:find(" (%l)")) do local a = self:find(" (%l)") self = self:sub(1, a) .. self:sub(a + 1, a + 1):upper() .. self:sub(a + 2, #self) end return self end function getUidsInArea(ext1, ext2) local uids = {} for a = 0, ext2.x-ext1.x do for b = 0, ext2.y-ext1.y do local pos = {x = ext1.x+a, y = ext1.y+b, z = ext1.z, stackpos = 255} local cid = getTopCreature(pos).uid if (isCreature(cid)) then table.insert(uids, cid) end end end return uids 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 for i, v in ipairs (getItemsInContainerById(item.uid, itemid)) do table.insert(items, v) end elseif itemid == item.itemid then table.insert(items, item) end end end return items end function getAllPlayerItemsById(uid, itemid) local items = {} for a = CONST_SLOT_FIRST, CONST_SLOT_LAST do local item = getPlayerSlotItem(uid, a) if ((item.uid > 0) and (item.itemid == itemid)) then table.insert(items, item) end if ((isContainer(item.uid)) and (getContainerSize(item.uid) > 0)) then for i, v in ipairs(getItemsInContainerById(item.uid, itemid)) do table.insert(items, v) end end end return items end function getAllPlayerSoulStones(uid, empty) local stones = {} for _, s in ipairs(L_Soul.ids) do for _, v in pairs(getAllPlayerItemsById(uid, s)) do if not ((empty) and (not getItemAttribute(v.uid, "Soul"))) then table.insert(stones, v) end end end return stones end function getPlayerSoulStonesByType(uid, type) local stones = {} for _, v in pairs(getAllPlayerSoulStones(uid)) do if ((getItemAttribute(v.uid, "Soul")) and (L_Soul.creatures[getItemAttribute(v.uid, "Soul")].type:lower() == type:lower())) then table.insert(stones, v) end end return stones end function doPlayerRemoveSoulStoneByType(uid, type, ammount) local stones = getPlayerSoulStonesByType(uid, type) local ammount = ammount or 1 if (#stones < ammount) then return false end local a = 0 for _, v in pairs(stones) do if (a ~= ammount) then a = a + 1 doRemoveItem(v.uid, 1) else break end end return true end function getPlayerSoulStonesCount(uid, type) return #getPlayerSoulStonesByType(uid, type) end function onCreatureHealthChange(creature, attacker, attackerName, damage, damType, damMsg) if isPlayer(attacker) and isCreature(creature) and attackerName ~= creature then local auraName = getPlayerStorageValue(attacker, "current_aura") if auraName then local AuraAz = auraName:lower() if L_Soul.auras[AuraAz] and os.time() - creature:getStorageValue("last_hit_" .. AuraAz) > L_Soul.auras[AuraAz].interval then doCreatureSetStorageValue(creature, "last_hit_" .. AuraAz, os.time()) doSendDistanceShoot(creature:getPosition(), creature:getPosition(), L_Soul.souls[AuraAz].effects.distance) doTargetCombatHealth(attacker, creature, L_Soul.souls[AuraAz].combat, -L_Soul.auras[AuraAz].damage[1], -L_Soul.auras[AuraAz].damage[2], 255) end end end end function onSay(cid, words, param) domodlib("Soul System[LIB]") local lan = L_Soul.lang[L_Soul.language] local AuraAz = words:explode(" ")[1] if not (L_Soul.auras[AuraAz]) then return false end if (#getPlayerSoulStonesByType(cid, AuraAz) < L_Soul.auras[AuraAz].stones_n) then return doPlayerSendCancel(cid, string.format(lan[19], AuraAz, L_Soul.auras[AuraAz].stones_n)) end if (getPlayerStorageValue(cid, L_Soul.auras_sto) > 0) then return doPlayerSendCancel(cid, string.format(lan[20], math.floor(L_Soul.auras[AuraAz].duration/60))) end if (getTileInfo(getThingPos(cid)).protection) then return doPlayerSendCancel(cid, lan[21]) end setPlayerStorageValue(cid, L_Soul.auras_sto, os.time()) doPlayerRemoveSoulStoneByType(cid, AuraAz, L_Soul.auras[AuraAz].stones_n) setPlayerStorageValue(cid, "current_aura", AuraAz) -- Armazena a aura atual do jogador return true end
    1 ponto
  3. solta o script ai que eu edito meu nobre
    1 ponto
  4. Rafaelvn10

    Base psoul

    Algum tem a base psoul pra disponibiliza pra mim .. agradeço dês de já
    1 ponto
  5. Akzs

    Base psoul

    Olá! Não sei se está tudo ai, mas tinha o link aqui ainda. https://www.mediafire.com/file/eip6akv9eo9tpuo/Project_Psoul.rar/file Scan https://www.virustotal.com/gui/file/708f034ddd8127b65b3b1461f9567d1c8b7a5297108c7d06fd925698b2127395/detection Teria só que mover o topico pra area correta.
    1 ponto
  6. coloca mais coisa no seu topico sobre a duvida que vc esta tendo
    1 ponto
  7. ok, vamos lá 1.Erro no script youdead.lua: [16/04/2024 03:41:17] [Error - CreatureScript Interface] [16/04/2024 03:41:17] data/creaturescripts/scripts/youdead.lua:onPrepareDeath [16/04/2024 03:41:17] Description: [16/04/2024 03:41:18] (luaGetCreatureMaster) Creature not found [16/04/2024 03:41:18] [Error - CreatureScript Interface] [16/04/2024 03:41:18] data/creaturescripts/scripts/youdead.lua:onPrepareDeath [16/04/2024 03:41:19] Description: [16/04/2024 03:41:19] (luaGetCreatureName) Creature not found [16/04/2024 03:41:19] > Broadcasted message: "O Jogador Fogao [level: 699553] Acaba de Morrer Para false.". Parece que há uma tentativa de obter o nome da criatura que matou o jogador (lastHitKiller). No entanto, o sistema não conseguiu encontrar essa criatura. Isso pode acontecer se o jogador for morto por um evento ou condição do jogo em vez de uma criatura específica. Você pode precisar adicionar verificações adicionais para garantir que lastHitKiller seja uma criatura válida antes de tentar obter seu nome e mestre. 2.Erro no script deathchannel.lua: [16/04/2024 03:41:23] [Error - CreatureScript Interface] [16/04/2024 03:41:23] data/creaturescripts/scripts/deathchannel.lua:onDeath [16/04/2024 03:41:23] Description: [16/04/2024 03:41:24] data/creaturescripts/scripts/deathchannel.lua:7: attempt to perform arithmetic on a boolean value [16/04/2024 03:41:24] stack traceback: [16/04/2024 03:41:24] data/creaturescripts/scripts/deathchannel.lua:7: in function <data/creaturescripts/scripts/deathchannel.lua:5> Parece que há um erro na linha 7 do script deathchannel.lua, onde uma operação aritmética está sendo tentada em um valor booleano. Isso geralmente ocorre quando você tenta realizar uma operação matemática em uma variável que não contém um valor numérico. Você precisará verificar o código na linha 7 do deathchannel.lua e garantir que todas as variáveis estejam definidas corretamente antes de tentar realizar operações matemáticas. 3.Erro XML: XML: [16/04/2024 06:52:01] [Error - CreatureEvent::executeCombat] Call stack overflow. Parece que houve um estouro de pilha (stack overflow) em um evento de combate. Isso geralmente acontece quando há muitas chamadas recursivas ou aninhadas que excedem a capacidade da pilha de execução. Você precisará investigar o evento de combate especificado e verificar se há alguma lógica recursiva ou aninhada que precisa ser otimizada para evitar estouro de pilha. 1. Para o script youdead.lua, vamos adicionar verificações adicionais para garantir que lastHitKiller seja uma criatura válida antes de tentar obter seu nome e mestre. Também vamos corrigir a mensagem de broadcast para exibir o nome do jogador que matou corretamente. function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) then if lastHitKiller and isCreature(lastHitKiller) then local killerName = getCreatureName(lastHitKiller) if not isPlayer(lastHitKiller) and not isPlayer(getCreatureMaster(lastHitKiller)) then doBroadcastMessage("O jogador " .. getCreatureName(cid) .. " [level: " .. getPlayerLevel(cid) .. "] acabou de morrer para " .. tostring(killerName) .. ".", MESSAGE_STATUS_CONSOLE_RED) end end end return true end 2.Para o script deathchannel.lua, vamos corrigir a operação aritmética na linha 7 para garantir que todas as variáveis estejam definidas corretamente antes de tentar realizar operações matemáticas. function onDeath(cid, corpse, deathList) local target = deathList[1] if target and isCreature(target) then local targetStorage = getCreatureStorage(target, storage) if targetStorage then doCreatureSetStorage(target, storage, targetStorage + 1) for _, pid in ipairs(getPlayersOnline()) do doPlayerSendChannelMessage(pid, '', info:format(getCreatureName(cid), getPlayerLevel(cid), getCreatureStorage(cid, storage), getPlayerSex(cid) == 1 and "o" or "a", isPlayer(target) and "player" or "monstro", getCreatureName(target), isPlayer(target) and " [Level: "..getPlayerLevel(target).."]." or "."), TALKTYPE_CHANNEL_O, 0xF) for _, frag in ipairs(frags) do if targetStorage == frag then doPlayerSendChannelMessage(pid, '', win:format(getCreatureName(target), frag, getCreatureName(cid)), TALKTYPE_CHANNEL_W, 0xF) end local cidStorage = getCreatureStorage(cid, storage) if cidStorage and cidStorage >= frag then doPlayerSendChannelMessage(pid, '', lose:format(getCreatureName(target), getCreatureName(cid), cidStorage + 1), TALKTYPE_CHANNEL_RN, 0xF) end end end doCreatureSetStorage(cid, storage, 0) return true end end return false end
    1 ponto
  8. function onUse(cid, item, frompos, item2, topos) if item.uid == 1624 then if getPlayerStorageValue(cid, 1624) == -1 then if getPlayerLevel(cid) >= 0 then local espacoSuficiente = true -- Adiciona as mochilas de ID 10518 ao inventário do jogador for i = 1, 42 do if not doPlayerAddItem(cid, 10518, 1) then espacoSuficiente = false break end end -- Se houver espaço suficiente, adiciona as moedas às mochilas if espacoSuficiente then for i = 1, 42 do local backpack = doCreateItemEx(10518, 1) if backpack ~= 0 then for j = 1, 100 do doAddContainerItem(backpack, 2159, 1000) end doPlayerAddItemEx(cid, backpack, false) else espacoSuficiente = false break end end -- Se tudo ocorreu bem, informa ao jogador que ele recebeu o prêmio if espacoSuficiente then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns! Você ganhou um prêmio.") setPlayerStorageValue(cid, 1624, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem espaço suficiente para as mochilas.") end else -- Se o jogador não tiver espaço suficiente, envia uma mensagem em green doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce nao tem espaço suficiente.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa ser level 0 para usar.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já pegou o bônus.") end end return true end
    1 ponto
  9. function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == 1624 then if getPlayerStorageValue(cid, 1624) == -1 then if getPlayerLevel(cid) >= 717217 then local espacoSuficiente = true for i = 1, 42 do local backpack = doCreateItemEx(10518, 1) if backpack ~= 0 then for j = 1, 100 do doAddContainerItem(backpack, 2159, 1000) end if not doPlayerAddItemEx(cid, backpack, false) then espacoSuficiente = false doRemoveItem(backpack) break end else espacoSuficiente = false break end end if espacoSuficiente then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns! Você ganhou um prêmio.") setPlayerStorageValue(cid, 1624, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem espaço suficiente para as mochilas.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa ser nível 717217 para usar.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já recebeu o bônus.") end end return true end
    1 ponto
  10. poderia falar qual erro aparece no console? function onUse(cid, item, frompos, item2, topos) if item.uid == 1624 then if getPlayerStorageValue(cid, 1624) == -1 then if getPlayerLevel(cid) >= 0 then -- Verifica se o jogador tem espaço suficiente no inventário para as mochilas local enoughSpace = true for i = 1, 42 do if not doPlayerAddItem(cid, 10518, 1) then enoughSpace = false break end end if enoughSpace then -- Adiciona 1000 moedas (ID 2159) dentro de uma mochila (ID 10518) e repete 42 vezes for i = 1, 42 do local backpack = doCreateItemEx(10518, 1) if backpack ~= 0 then for j = 1, 100 do doAddContainerItem(backpack, 2159, 1) end doPlayerAddItemEx(cid, backpack, false) else enoughSpace = false break end end end if enoughSpace then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns! Você ganhou um prêmio.") else -- Não há espaço suficiente, então cai no chão com dinheiro dentro local townID = 1 -- Altere isso para o ID da cidade desejada (1 para DexSoft) local tile = getTownTemplePosition(townID) local container = doCreateItemEx(10518, 1) for i = 1, 100 do doAddContainerItem(container, 2159, 1) end doTeleportThing(container, tile, false) doSendMagicEffect(tile, CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tinha espaço suficiente, a mochila foi enviada para o depot.") end setPlayerStorageValue(cid, 1624, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa ser level 0 para usar.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já pegou o bônus.") end end return true end
    1 ponto
  11. local lvldodge = 48903 local percent = 0.1 -- Porcentagem padrão de reflexão de dano local storageID = 10001 -- ID do storage para controlar a habilidade de reflexão function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS and isCreature(attacker) then if (getPlayerStorageValue(cid, lvldodge) * 3) >= math.random(0, 1000) then local reflectValue = math.ceil(value * percent) doCreatureAddHealth(attacker, -reflectValue) doSendAnimatedText(getCreaturePos(cid), "Reflected!", 6) -- Incrementar o storage para indicar que a habilidade foi usada setPlayerStorageValue(cid, storageID, 1) return false end end return true end -- Adicionando o evento ao XML local eventXML = [=[<event type="statschange" name="ReflectStone" event="script" value="reflectStone.lua"/>]=] local file = io.open('data/creaturescripts/creaturescripts.xml', 'a') if file then file:write(eventXML) file:close() else print("Erro ao abrir o arquivo creaturescripts.xml") end -- Registro do evento no login.lua local loginScript = [=[registerCreatureEvent(cid, "ReflectStone")]=] local loginFile = io.open('data/creaturescripts/login.lua', 'a') if loginFile then loginFile:write(loginScript) loginFile:close() else print("Erro ao abrir o arquivo login.lua") end
    1 ponto
  12. Holograma

    Healing Machine

    O erro provavelmente ocorre porque a versão do seu servidor não suporta essa função diretamente. Tenta assim local itemID = 1234 -- ID do item no mapa que irá acionar a cura function onUse(cid, item, fromPosition, itemEx, toPosition) if itemEx.itemid == itemID then doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) -- Cura o jogador doCureStatus(cid, "all", true) -- Cura todos os status negativos do jogador doSendMagicEffect(getThingPos(cid), EFFECT_HEAL) -- Efeito de cura local backpack = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) if backpack.itemid == 0 then return true end local bpItems = getItemsInContainer(backpack.uid) -- Correção aqui for _, item in ipairs(bpItems) do if isPokeball(item.itemid) then local creatureID = getItemAttribute(item.uid, "pokeid") if creatureID then doCreatureAddHealth(creatureID, getCreatureMaxHealth(creatureID) - getCreatureHealth(creatureID)) -- Cura o Pokémon doCureStatus(creatureID, "all", true) -- Cura todos os status negativos do Pokémon doSendMagicEffect(getThingPos(creatureID), EFFECT_HEAL) -- Efeito de cura end end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Todos os seus Pokémon foram curados.") -- Mensagem de sucesso end return true end function isPokeball(itemid) -- Adicione aqui os itemids das pokébolas que deseja considerar local validPokeballIDs = {1, 2, 3, 4} -- Por exemplo, considere as pokébolas com IDs 1, 2, 3, 4 for _, id in ipairs(validPokeballIDs) do if itemid == id then return true end end return false end
    1 ponto
  13. function onUse(cid, item, frompos, item2, topos) if item.uid == 1624 then if getPlayerStorageValue(cid, 1624) == -1 then if getPlayerLevel(cid) >= 0 then -- Verifica se o jogador tem espaço suficiente no inventário para as mochilas local enoughSpace = true for i = 1, 42 do if not doPlayerAddItem(cid, 10518, 1) then enoughSpace = false break end end if enoughSpace then -- Adiciona 1000 moedas (ID 2159) dentro de uma mochila (ID 10518) e repete 100 vezes for i = 1, 100 do local backpack = doCreateItemEx(10518, 1) if backpack ~= 0 then for j = 1, 42 do doAddContainerItem(backpack, 2159, 1000) end doPlayerAddItemEx(cid, backpack, false) else enoughSpace = false break end end end if enoughSpace then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns! Você ganhou um prêmio.") else -- Não há espaço suficiente, então cai no chão com dinheiro dentro local townID = 1 -- Altere isso para o ID da cidade desejada (1 para DexSoft) local tile = getTownTemplePosition(townID) local container = doCreateItemEx(10518, 1) for i = 1, 42 do doAddContainerItem(container, 2159, 1000) end doItemSetAttribute(container, "depot", true) doTeleportThing(container, tile, false) doSendMagicEffect(tile, CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tinha espaço suficiente, a mochila foi enviada para o depot.") end setPlayerStorageValue(cid, 1624, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa ser level 0 para usar.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já pegou o bônus.") end end return true end Este script verifica se o jogador tem espaço suficiente no inventário para as mochilas. Se tiver, ele adiciona as mochilas diretamente ao inventário do jogador. Caso contrário, ele cria as mochilas com dinheiro dentro e as envia para o depot da cidade especificada.
    1 ponto
  14. Rafaelvn10

    Base Psoul site + db

    Tungs vc tem a base da psoul pra disponibiliza? Maninho poderia tá disponibiliza a base dele pra mim por favor ?
    1 ponto
  15. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if (not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local msg = string.lower(msg) local itemid, count = 9020, 300 -- Edite o id e a quantidade do item aqui if isInArray({"recover", "recuperar", "exp", "experience"}, msg) then npcHandler:say("Você deseja recuperar a experiência perdida após a sua morte por " .. count .. " " .. getItemNameById(itemid) .. "? {yes}", cid) talkState[talkUser] = 1 elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerStorageValue(cid, death_table.before_exp) ~= -1 and getPlayerExperience(cid) < getPlayerStorageValue(cid, death_table.before_exp) then if doPlayerRemoveItem(cid, itemid, count) == TRUE then local count = (getPlayerStorageValue(cid, death_table.before_exp) - getPlayerStorageValue(cid, death_table.after_exp)) doPlayerAddExp(cid, count) npcHandler:say("Obrigado! Aqui está sua experiência.", cid) else npcHandler:say("Desculpe, você não tem " .. getItemNameById(itemid) .. " suficientes!", cid) end else npcHandler:say("Desculpe, você não morreu ou já recuperou sua exp perdida!", cid) end talkState[talkUser] = 0 elseif msg == "no" then npcHandler:say("Then not", cid) talkState[talkUser] = 0 end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
    1 ponto
  16. function onSay(cid, words, param, channel) local maxSpellsToShow = 5000 -- Define o número máximo de feitiços a serem mostrados local t = {} -- Loop através dos feitiços do jogador for i = 0, getPlayerInstantSpellCount(cid) - 1 do if #t >= maxSpellsToShow then break -- Sai do loop se o limite máximo de feitiços for atingido end local spell = getPlayerInstantSpellInfo(cid, i) -- Verifica se o feitiço não está no nível mínimo if(spell.mlevel ~= 1) then if(spell.manapercent > 0) then spell.mana = spell.manapercent .. "%" end table.insert(t, spell) end end -- Ordena os feitiços pelo nível de magia table.sort(t, function(a, b) return a.mlevel < b.mlevel end) -- Constrói a mensagem a ser exibida local text = "" local prevLevel = -1 for i, spell in ipairs(t) do local line = "" if(prevLevel ~= spell.mlevel) then if(i ~= 1) then line = "\n" end line = line .. "Spells for Magic Level " .. spell.mlevel .. "\n" prevLevel = spell.mlevel end text = text .. line .. " " .. spell.words .. " : " .. spell.mana .. "\n" end -- Verifica o comprimento do texto if #text > 5000 then local chunks = {} local current_chunk = "" for line in text:gmatch("[^\r\n]+") do if #current_chunk + #line > 5000 then table.insert(chunks, current_chunk) current_chunk = "" end current_chunk = current_chunk .. line .. "\n" end table.insert(chunks, current_chunk) -- Mostra cada fragmento de texto ao jogador for _, chunk in ipairs(chunks) do doShowTextDialog(cid, 2175, chunk) end else -- Mostra a mensagem ao jogador doShowTextDialog(cid, 2175, text) end return true end
    1 ponto
  17. OTCLIENT Questlog actualizado Updated quest log, showing quest details: Npc name Npc level Npc outfit Mission status Description Amount of reward experience Number of reward points Enemies you must kill Items to collect When you click on the follow button, an alternative map opens that shows you the next objective of the mission and at what coordinates: If you want the system write a comment with your discord
    1 ponto
  18. rafersiq

    Sala de shop/sala de donate

    eu vou voutar a tentar aprender a mecher com tibias quando comprar um pc melhor pra ediçao de jogos, mas esse de o npc pedir um X item por X item (ex: 50 diamantees por 1 roupa pro seu personagem) vc pode pega na pasta data/npc e procurar por mark se for server de poketibia e mudar o X item que ela vai pedir em troca do X item
    1 ponto
  19. thloko

    Sala de shop/sala de donate

    Entendi. No caso eu queria um NPC mesmo, esse normal que tem no game que voce fala trade, abre uma janela com os itens e voce compra e vende. Mas no caso, ao invés de gold normal, o NPC utilizar outro item, no caso, diamantes(Moeda que será o donate).
    1 ponto
  20. Cypher

    MALIBU BEACH 10.98

    Fala galera, sou um antigo membro do forum, acabei de fazer um mapa e acho que vocês irão gostar, me inspirei numa foto de Malibu que é uma praia bem conhecida. Utilizei um Tibia spr 10.98 e adicionei algumas sprites da Pxg. Realmente quero agradecer a essa comunidade que me ajudou muito muito, ah e pra quem não conhece meu trabalho, eu fiz a Charizard valley do Poke Storm e a Leaf Island do Kpdo. O que contém no arquivo zip: Fotos: Download Mapa Scan
    1 ponto
  21. KarlKalvin

    [.obd] todos os held itens tier 1x7

    Sem bla bla bla, mimimi, nhéco nhéco... to sem tempo para tirar print dos itens no OBJECT BUILD então segue print da pasta e façam bom aproveitos meus amigos... Held Itens.rar Ah... e o scan Held Itens.rar
    1 ponto
  22. Vai no seu config.lua do servidor, tente achar o que irei te mandar... accountManager = true Achou? agora bastar configurar corretamente. EXPLICAÇÃO: accountManager = true -- Ativar ou Desativar o ACC Manager namelockManager = false -- É possível algum player criar um char com o nome Account Manager? newPlayerChooseVoc = true -- True para o player escolher a vocação que ele quer ser no ACC Manager, e false para não escolher. newPlayerSpawnPosX = 302 -- Onde o novo player criado irá aparecer pos X newPlayerSpawnPosY = 48 -- Onde o novo player criado irá aparecer pos Y newPlayerSpawnPosZ = 5 -- Onde o novo player criado irá aparecer pos Z newPlayerTownId = 1 -- Cidade em que o personagem criado irá nascer newPlayerLevel = 1 -- Level inicial quando criar o personagem newPlayerMagicLevel = 0 -- MagicLevel inicial quando criar o personagem No newPlayerChooseVoc deixa true assim o jogador podera escolher o seu personagem Knight... etc Se caso está aparecendo até personagem que não deve aparecer, ou os personagens não está aparecendo para escolher vá na pasta \data\XML e abre a vocations.xml Agora no final de todas vocações coloque uma tag. que você quer que apareça no menu do accnout manager ou não... Para aparecer coloque: manager="1" Para não aparecer coloque: manager="0" Exemplo: <vocation id="1" name="Knight" description="a knight" needpremium="0" gaincap="100" gainhp="270" gainmana="230" manager="1"> Observe que tem o manager="1" no final. E para mudar a posição do Account Manager ou a outfit dele é na database/players.
    1 ponto
  23. Ollá, Vi muitos servidores a onde o nome do [ADM] xxxx Era Vermelho achei muito da hora, e vi em alguns servidor que a cor do nick de alguns pokemons lendarios era rosa e gostaria de saber como consigo modificar estas cores. não sei se é em parte de Cliente, Não sei. Desculpe se estiver na area errada Servidor é de Pokemon [ PDA ]
    1 ponto
  24. Talvez este Tópico lhe ajude. Ou Quem Sabe este tópico.
    1 ponto
  25. IgorROX2010

    [Talkaction] Bank

    Bom galerinha, esse e um sistema de banco por comando :] Como esse é meu segundo script aki do Xtibia pode haver erros , se ouver algo errado me fale. Script feito por : IgorROOX2010 Versão que funciona : De 7.92 á 8.60 Bom então vamos la :happy: Primeiro de tudo vá em talkactions.xml E Coloque isso: Bom agora vamos ao primeiro script que é o deposit.lua Pegue 1 arquivo lua nomeie para withdraw apague tudo e coloque isso: Prontinho.. Agora vamos ao segundo script que é o withdraw.lua Pegue 1 arquivo lua, nomeie para withdraw, apague tudo e coloque isso: Prontinho.. Agora vamos para o ultimo script que é o balance.lua Pegue 1 arquivo lua, nomeie para balance , apague tudo e coloque isso: E prontinho, o sistema de banco via talkaction já esta funcionando em seu OTserver Obrigado Script By: IgorROOX2010
    1 ponto
  26. Poo manero, ja vi isso em um ot axei bem lgl, agora vo colokar no meu...valeu mesmo0o0o mano, ta de parabéns! Axo q era pra vc ter escrito: SoulCalibur quando entra na água ele não fika molhado, é a água que fika SoulCalibur xD
    1 ponto
Líderes está configurado para São Paulo/GMT-03:00
×
×
  • Criar Novo...