Ir para conteúdo

Muvukaa

Membro
  • Registro em

  • Última visita

Tudo que Muvukaa postou

  1. ótimo tutorial parabéns
  2. -=[TFS]=- 0.4 - 0.3.6 - 8.60 - Como faço Pra Reporta Bugs CTRL + Z e Player CTRL + J Pra Onde Vai Diretório CTRL + Z e do CTRL + J
  3. function onUse(cid, item, frompos, item2, topos) if item.uid == 1624 then if getPlayerStorageValue(cid, 1624) == -1 then if getPlayerLevel(cid) >= 0 then local enoughSpace = true -- Checks if there is enough space for all the backpacks for i = 1, 42 do if not doPlayerAddItem(cid, 10518, 1) then enoughSpace = false break end end if enoughSpace then -- Adds 1000 coins (ID 2159) inside a backpack (ID 10518) and repeats 100 times 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 doPlayerSendCancel(cid, "You don't have enough space for the backpacks.") return true end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have won a prize.") setPlayerStorageValue(cid, 1624, 1) else doPlayerSendCancel(cid, "You don't have enough space for the backpacks.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be level 717217 to use.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already received the bonus.") end end return true end function onUse(cid, item, frompos, item2, topos) if item.uid == 1624 then if getPlayerStorageValue(cid, 1624) == -1 then if getPlayerLevel(cid) >= 0 then local enoughSpace = true -- Checks if there is enough space for all the backpacks for i = 1, 42 do if not doPlayerAddItem(cid, 10518, 1) then enoughSpace = false break end end if enoughSpace then -- Adds 1000 coins (ID 2159) inside a backpack (ID 10518) and repeats 100 times 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 doPlayerSendCancel(cid, "You don't have enough space for the backpacks.") return true end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have won a prize.") setPlayerStorageValue(cid, 1624, 1) else doPlayerSendCancel(cid, "You don't have enough space for the backpacks.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be level 717217 to use.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already received the bonus.") end end return true end
  4. Quero que ela reflita danos em %(da minha escolha). Padrão pode ser 10%, mas que der pra editar e não sistema aleatório, quero que o player ganha-se um storage igual a system da critical e dodge. data\creaturescripts\scripts crie um arquivo chamado reflectStone.lua e adicione isso nele: local lvldodge = 48903 local percent = 0.5 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 value = math.ceil(value*(percent)) doCreatureAddHealth(attacker, -value) doSendAnimatedText(getCreaturePos(cid), "Reflected!", 6) return false end end return true end creaturescripts.xml: <event type="statschange" name="ReflectStone" event="script" value="reflectStone.lua"/> login.lua: registerCreatureEvent(cid, "ReflectStone")
  5. EU QUERIA QUE MANDASSE ESSES ITENS QUE TEM NO SCRIPT PRO DEPOT CASO PLAYER NÃO TENHA MAIS CAP BP CHEIA FULL SLOT COMPLETO CONTAINER FULL MANDASSE PRO DEPOT DO PLAYER QUE DEU USE NA CHEST NAME CITY: DEXSOFT ID 1 function onUse(cid, item, frompos, item2, topos) if item.uid == 1624 then if getPlayerStorageValue(cid, 1624) == -1 then if getPlayerLevel(cid) >= 0 then -- Adds backpacks with ID 10518 to the player's inventory for i = 1, 42 do if not doPlayerAddItem(cid, 10518, 1) then doPlayerSendCancel(cid, "You don't have enough space for the backpacks.") return true end end -- Adds 1000 coins (ID 2159) inside a backpack (ID 10518) and repeats 100 times 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 doPlayerSendCancel(cid, "You don't have enough space for the backpacks.") return true end end else -- If player level requirement not met doPlayerSendCancel(cid, "You don't have the required level to use this item.") end else -- If storage value not equal to -1 doPlayerSendCancel(cid, "You have already used this item.") end end end
  6. function onUse(cid, item, frompos, item2, topos) if item.uid == 1623 then queststatus = getPlayerStorageValue(cid,1623) if queststatus == -1 then if getPlayerLevel(cid) >= 717217 then doPlayerSendTextMessage(cid,25,"Congratulations! You've won a prize.") doPlayerAddItem(cid,2159,100000) doPlayerAddItem(cid,10518,100) setPlayerStorageValue(cid,1623,1) else doPlayerSendTextMessage(cid,22,"You need to be level 717217 to use this.") end else doPlayerSendTextMessage(cid,22,"You've already claimed the bonus.") end else return 0 end return 1 end
  7. [05/04/2024 21:15:04] [Error - CreatureScript Interface] [05/04/2024 21:15:05] buffer:onKill [05/04/2024 21:15:05] Description: [05/04/2024 21:15:05] [string "loadBuffer"]:4: attempt to index a boolean value [05/04/2024 21:15:05] stack traceback: [05/04/2024 21:15:05] [string "loadBuffer"]:4: in function <[string "loadBuffer"]:2> [05/04/2024 21:15:05] [Error - CreatureScript Interface] [05/04/2024 21:15:05] buffer:onKill [05/04/2024 21:15:05] Description: [05/04/2024 21:15:05] (luaGetMonsterInfo) Monster not found
  8. Existe alguma maneira de tipo mostrar o tempo que falta pro boss nascer novamente? 1. o boss morreu 2. ai em cima do sqm que o boss morreu, aparece uma contagem em tempo real 3. quando essa contagem terminar o boss nasce dnv alguem sabe se da pra fazer isso? local colorMsg = "orange" local tableBoss = { ["Amazon"] = {seconds = 10, newBoss = "Amazon"} } local function timer(position, duration, color) for i = 0, (duration - 1) do addEvent(function() doSendAnimatedText(position, tostring(duration - i), color) end, i * 1000) end end function onKill(cid, target, damage, flags) if isPlayer(target) then return true end local boss = tableBoss[getCreatureName(target)] if not boss then return true end local position = getThingPos(target) doPlayerSendTextMessage(cid, MESSAGE_TYPES[colorMsg], "The boss will be born in " .. boss.seconds .. " seconds at position: " .. position.x .. ", " .. position.y .. ", " .. position.z) -- Exibe a posição no texto timer(position, boss.seconds, COLOR_RED) addEvent(doCreateMonster, boss.seconds * 1000, boss.newBoss, position) return true end
  9. -- Caminho para a pasta spells local spellsFolder = "data/spells/spells.xml" function onSay(cid, words, param, channel) local spells = {} -- Para armazenar os nomes das magias -- Iterar sobre os arquivos na pasta spells for fileName in io.popen("ls " .. spellsFolder):lines() do -- Verificar se o arquivo é um arquivo XML if fileName:match("%.xml$") then local filePath = spellsFolder .. fileName -- Tentar abrir e processar o arquivo XML local f, err = io.open(filePath, "r") if f then -- Ler o conteúdo do arquivo local content = f:read("*all") f:close() -- Procurar todos os nomes de feitiços no XML e adicioná-los à lista for spellName in content:gmatch('<spell%s+name="(.-)"') do table.insert(spells, spellName) end else print("Erro ao abrir o arquivo", filePath, ":", err) end end end -- Construir mensagem a ser exibida local texto = "Magias disponíveis:\n" for _, spellName in ipairs(spells) do texto = texto .. spellName .. "\n" end -- Mostrar a mensagem ao jogador doShowTextDialog(cid, 2175, texto) return true end
  10. maximumDoorLevel = 717217 Porta de nível máximo Como faço para definir 717217
  11. [02/04/2024 01:35:06] [Error - Spell Interface] [02/04/2024 01:35:06] In a timer event called from: [02/04/2024 01:35:06] data/spells/scripts/attack/samuel333.lua:onCastSpell [02/04/2024 01:35:06] Description: [02/04/2024 01:35:06] (luaDoCombat) Combat not found -- =============== COMBAT VARIABLES =============== local combat12_Brush_2 = createCombatObject() setCombatParam(combat12_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_POFF) setCombatParam(combat12_Brush_2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW) setCombatParam(combat12_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatArea(combat12_Brush_2, createCombatArea({ {1, 0, 1}, {0, 2, 0}, {1, 0, 1} })) function getDmg_Brush_2(cid, level, maglevel) return -1000000, -2000000 end setCombatCallback(combat12_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat12_Brush_2 = {CONST_ANI_FLASHARROW, 1, 1, -1, 1, -1, -1, 1, -1} local combat12_Brush = createCombatObject() setCombatParam(combat12_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) setCombatParam(combat12_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatParam(combat12_Brush, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) setCombatArea(combat12_Brush, createCombatArea({ {0, 1, 0}, {1, 2, 1}, {0, 1, 0} })) function getDmg_Brush(cid, level, maglevel) return -1000000, -2000000 end setCombatCallback(combat12_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat12_Brush = {CONST_ANI_WHIRLWINDSWORD, 1, 0, -1, 0, 0, 1, 0, -1} local combat7_Brush_2 = createCombatObject() setCombatParam(combat7_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_POFF) setCombatParam(combat7_Brush_2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW) setCombatParam(combat7_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatArea(combat7_Brush_2, createCombatArea({ {1, 0, 1}, {0, 2, 0}, {1, 0, 1} })) function getDmg_Brush_2(cid, level, maglevel) return -1000000, -2000000 end setCombatCallback(combat7_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat7_Brush_2 = {CONST_ANI_FLASHARROW, 1, 1, -1, 1, -1, -1, 1, -1} local combat5_Brush = createCombatObject() setCombatParam(combat5_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) setCombatParam(combat5_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatParam(combat5_Brush, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) setCombatArea(combat5_Brush, createCombatArea({ {0, 1, 0}, {1, 2, 1}, {0, 1, 0} })) function getDmg_Brush(cid, level, maglevel) return -1000000, -2000000 end setCombatCallback(combat5_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat5_Brush = {CONST_ANI_WHIRLWINDSWORD, 0, 1, 1, 0, 0, -1, -1, 0} local combat3_Brush_2 = createCombatObject() setCombatParam(combat3_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_POFF) setCombatParam(combat3_Brush_2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW) setCombatParam(combat3_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatArea(combat3_Brush_2, createCombatArea({ {1, 0, 1}, {0, 2, 0}, {1, 0, 1} })) function getDmg_Brush_2(cid, level, maglevel) return -1000000, -2000000 end setCombatCallback(combat3_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat3_Brush_2 = {CONST_ANI_FLASHARROW, 1, 1, -1, 1, -1, -1, 1, -1} local combat0_Brush = createCombatObject() setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) setCombatParam(combat0_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD) setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) setCombatArea(combat0_Brush, createCombatArea({ {0, 1, 0}, {1, 2, 1}, {0, 1, 0} })) function getDmg_Brush(cid, level, maglevel) return -1000000, -2000000 end setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat0_Brush = {CONST_ANI_WHIRLWINDSWORD, 0, 1, 0, -1, 1, 0, -1, 0} -- =============== CORE FUNCTION =============== 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 -- =============== SPELL CAST FUNCTION =============== function onCastSpell(cid, var) local startPos = getCreaturePosition(cid) addEvent(RunPart, 1200, combat12_Brush2, cid, var, dfcombat12_Brush2, startPos) addEvent(RunPart, 1200, combat12_Brush2, cid, var, dfcombat12_Brush2, startPos) addEvent(RunPart, 500, combat7_Brush2, cid, var, dfcombat7_Brush, startPos) addEvent(RunPart, 300, combat3_Brush2, cid, var, dfcombat3_Brush2, startPos) addEvent(RunPart, 1000, combat3_Brush, cid, var, dfcombat3_Brush, startPos) RunPart(combat0_Brush, cid, var, dfcombat0_Brush, startPos) return true end
  12. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) function damage(cid, level, maglevel) local min = 1000000000 local max = 1000000000 return -min, -max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "damage") function onCastSpell(cid, var) return doCombat(cid, combat, var) end local area = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local combatArea = createCombatArea(area) setCombatArea(combat, combatArea) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  13. local config = { itemid = {2445, 2550, 2436, 6101, 2408, 7435, 7429, 8057}, -- IDs dos itens que serão transformados position = {x = 151, y = 55, z = 7}, -- Coordenadas dos itens a serem transformados tempo = 5, -- Tempo em segundos para o item desaparecer intervalo = 10 -- Intervalo em segundos entre a aparição de um item e outro } function changeItemsToMagicGreenEffect() local itemId = config.itemid[math.random(1, #config.itemid)] local item = doCreateItemEx(itemId, 1, config.position) -- Criar item que os jogadores não podem mover if item then local itemGreen = doCreateItemEx(8047, 1, config.position) -- Criar o item 8047 em cima do item gerado if itemGreen then doSendMagicEffect(config.position, CONST_ME_MAGIC_GREEN) addEvent(function() doRemoveItem(item.uid, 1) doRemoveItem(itemGreen.uid, 1) end, config.tempo * 1000) -- Tempo para remover os itens atuais end end end function onThink(interval) changeItemsToMagicGreenEffect() addEvent(changeItemsToMagicGreenEffect, config.intervalo * 1000) -- Espera o intervalo especificado e chama a função para criar outro item return true end local config = { itemid = {2445, 2550, 2436, 6101, 2408, 7435, 7429}, -- IDs dos itens que serão transformados position = {x = 151, y = 55, z = 7}, -- Posição central onde os itens serão criados tempo = 5, -- Tempo em segundos para o item desaparecer intervalo = 3 -- Intervalo em segundos entre a aparição de um item e outro } function changeItemToMagicGreenEffect() local posX, posY, posZ = config.position.x, config.position.y, config.position.z local itemId = config.itemid[math.random(1, #config.itemid)] local item = doCreateItem(itemId, 1, {x = posX, y = posY, z = posZ}) if item then doSendMagicEffect(config.position, CONST_ME_MAGIC_GREEN) doCreateItem(8057, 1, {x = posX, y = posY, z = posZ}) -- Criar o efeito 8057 addEvent(function() doRemoveItem(item, 1) doRemoveItem(getTileItemById({x = posX, y = posY, z = posZ}, 8057).uid, 1) -- Remover o efeito 8057 end, config.tempo * 1000) -- Remover o item após o tempo especificado end end function onThink(interval) changeItemToMagicGreenEffect() addEvent(changeItemToMagicGreenEffect, config.intervalo * 1000) -- Agendar a próxima aparição de item após o intervalo especificado return true end
  14. Talkactions function onSay(cid, words, param, channel) local t = {} for i = 0, getPlayerInstantSpellCount(cid) - 1 do local spell = getPlayerInstantSpellInfo(cid, i) if(spell.mlevel ~= 1) then if(spell.manapercent > 0) then spell.mana = spell.manapercent .. "%" end table.insert(t, spell) end end table.sort(t, function(a, b) return a.mlevel < b.mlevel end) local text, 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.name .. " Mana: " .. spell.mana .. "\n" text = text .. line .. " " .. spell.words .. " : " .. spell.mana .. "\n" end doShowTextDialog(cid, 2175, text) return true end
  15. -=[TFS]=- 0.4 8.60 - Eu quero saber a <immunity ="100"/> do COMBAT_UNDEFINEDDAMAGE = 16
  16. local text = "´ . ,", ". ´ ,", "` . ,", ", ` ." local function effect(cid) local storage = 6318964232 if isPlayer(cid) then if getPlayerStorageValue(cid, storage) > 0 then doCreatureSay(cid, text, TALKTYPE_ORANGE_1) end addEvent(effect, 1000, cid) end end function onLogin(cid) effect(cid) return true end
  17. <vocation id="2" name="Mage" <vocation id="3" name="Paladin" <vocation id="4" name="Knight" <vocation id="6" name="[VIP] Mage" <vocation id="7" name="[VIP] Paladin" <vocation id="8" name="[VIP] Knight" QUERO QUE O SCRIPT FUNCIONE QUANDO USA GEMA NO JOGO E QUANDO DESLOGA E LOGA FICA COM EFEITO. creatuescript .logingema.lua function onLogin(cid) setPlayerStorageValue(cid, 47112120, 2) local voc = getPlayerVocation(cid) if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) > 0 then sendGemEffect(cid, gems.storage[voc], gems.interval[voc]) end return TRUE end creaturescript .logout.lua function onLogout(cid) setPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)],0) return TRUE end creaturescript.xml <event type="logout" name="PlayerLogout" script="logout.lua"/> <event type="login" name="gema" event="script" value="logingema.lua"/> data/lib .gems function onUse(cid, item, fromPosition, itemEx, toPosition) gem = gems.id[getPlayerVocation(cid)] if item.itemid == gem then doUseGem(cid, item, getPlayerVocation(cid)) end return TRUE end data/lib/ .pivi function doUseGem(cid, item) local voc = getPlayerVocation(cid) local interval = gems.interval[voc] if item.itemid ~= gems.id[voc] or getPlayerStorageValue(cid, gems.storage[voc]) > 0 then return FALSE end setPlayerStorageValue(cid, gems.storage[voc], 1) sendGemEffect(cid, gems.storage[voc], gems.interval[voc]) doRemoveItem(item.uid, 1) return TRUE end function sendGemEffect(cid, storage, interval) local pos = getThingPos(cid) local voc = getPlayerVocation(cid) local color = 1 if voc == 1 then color = gemMsg.colorDruid[math.random(1,#gemMsg.colorElderDruid)] elseif voc == 2 then color = gemMsg.colorSorcerer[math.random(1,#gemMsg.colorMasterSorcerer)] elseif voc == 3 then color = gemMsg.colorPaladin[math.random(1,#gemMsg.colorRoyalPaladin)] elseif voc == 4 then color = gemMsg.colorKnight[math.random(1,#gemMsg.colorEliteKnight)] end doSendAnimatedText(pos, gemMsg.rnd[math.random(1,#gemMsg.rnd)], color) if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) >= 1 then addEvent(sendGemEffect, interval, cid, storage, interval) end end function doRemoveGemEffect(cid) if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) < 1 then return FALSE end setPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)], 0) return TRUE end function doRemoveAllGemEffect(cid) for i = 1, table.maxn(gms.storage) do setPlayerStorageValue(cid, gems.storage[i], 0) end return TRUE function isGemActivated(cid) if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) > 0 then return TRUE end return FALSE end data/lib .pivi_const gems = { id = {2156, 2155, 2158, 2154, 2156, 2155, 2158, 2154}, storage = {5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008}, interval = {750, 750, 750, 750, 750, 750, 750, 750}, -- Intervalo dos efeitos } gemMsg = { rnd = {"´ . ,", ". ´ ,", "` . ,", ", ` ."}, colorDruid = {180,180}, colorSorcerer = {30,215}, colorPaladin = {251,10}, colorKnight = {204,212}, colorElderDruid = {180,180}, colorMasterSorcerer = {30,215}, colorRoyalPaladin = {251,10}, colorEliteKnight = {204,212} } action/script .gems local config = { minLevel = 200, -- Level mínimo para adquirir a gema. } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerLevel(cid) >= config.minLevel then gem = gems.id[getPlayerVocation(cid)] if item.itemid == gem then doUseGem(cid, item, getPlayerVocation(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você adquiriu uma gema espíritual.") doSendMagicEffect(getCreaturePosition(cid), 65) end else doPlayerSendCancel(cid, "Voc\ê precisa ser level "..config.minLevel.." para adquirir a gema esp\íritual.") end return TRUE end action.xml <action itemid="2156" script="gems.lua" /> <action itemid="2155" script="gems.lua" /> <action itemid="2154" script="gems.lua" /> <action itemid="2158" script="gems.lua" />
  18. -=[TFS]=- 0.4 8.60 - Programação cryingdamson 0.3.6 (8.60) V8.2 Source TODA VEZ QUE CLICK NA QUILO APARECE ISSO
  19. NPC Scrutinon tem que ter item e a quantidade para recupera a exp local itemid,count = 9020,300 -- edite o id e count do item aqui Explicação: Você compra no npc a exp que você perdeu na sua última morte. Lib > functions.lua adc death_tabble = {before_exp = 135215,after_exp = 135216, check = 251201} function onLogin(cid) registerCreatureEvent(cid, "Exp_P") if getPlayerStorageValue(cid, death_tabble.check) >= 1 then setPlayerStorageValue(cid, death_tabble.after_exp, getPlayerExperience(cid)) setPlayerStorageValue(cid, death_tabble.check, -1) end return true end function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) setPlayerStorageValue(cid, death_tabble.before_exp, getPlayerExperience(cid)) setPlayerStorageValue(cid, death_tabble.check, 1) return TRUE end <event type="preparedeath" name="Exp_P" event="script" value="exp_buy.lua"/> <event type="login" name="Exp_L" event="script" value="exp_buy.lua"/> <?xml version="1.0" encoding="UTF-8"?> <npc name="Scrutinon" script="data/npc/scripts/expbuy.lua" walkinterval="0" floorchange="0"> <health now="100" max="100"/> <look typeex="7825" head="7825" body="0" legs="0" feet="0" addons="0"/> <parameters> <parameter key="message_greet" value="Grande |PLAYERNAME|! Eu posso {recuperar} a exp perdida em sua morte." /> <parameter key="message_decline" value="Adios." /> </parameters> </npc> 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 count do item aqui if isInArray({"recover","recuperar","exp","experience"}, msg) then npcHandler:say("voce deseja recuperar a exp perdida apos 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_tabble.before_exp) ~= -1 and getPlayerExperience(cid) < getPlayerStorageValue(cid, death_tabble.before_exp) then if doPlayerRemoveItem(cid, itemid, count) == TRUE then local count = (getPlayerStorageValue(cid, death_tabble.before_exp) - getPlayerStorageValue(cid, death_tabble.after_exp)) doPlayerAddExp(cid, count) npcHandler:say("Obrigado! aqui esta sua experiencia.", cid) else npcHandler:say("Desculpe, voce nao tem "..getItemNameById(itemid).." suficientes!", cid) talkState[talkUser] = 0 end else npcHandler:say("Desculpe, voce nao morreu ou ja recuperou sua exp perdida!", cid) talkState[talkUser] = 0 end elseif msg == "no" then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  20. Quando autoloot vip abre fica os comandos autoloot quando autolootfree abre fica os comandos autoloot sendo que é pra fica autolootfree ele abre junto com autoloot vip laguem resolve esse erro pra mim pra usa comando !autolootfree abri e o autolootvip não confindir os mods. Auto Loot VIP.xml Loot System.xml
  21. EU CRIEI /newpoll e apareceu esses erros e a /newpoll eu criei apareceu mensagem vermelha mais comandos bugaram /vote [15/03/2024 08:27:16] [Error - TalkAction Interface] [15/03/2024 08:27:16] data/talkactions/scripts/pollsystem.lua:onSay [15/03/2024 08:27:16] Description: [15/03/2024 08:27:16] data/lib/012-table.lua:6: bad argument #1 to 'load' (function expected, got string) [15/03/2024 08:27:16] stack traceback: [15/03/2024 08:27:16] [C]: in function 'load' [15/03/2024 08:27:16] data/lib/012-table.lua:6: in function 'unserialize' [15/03/2024 08:27:16] data/talkactions/scripts/pollsystem.lua:86: in function <data/talkactions/scripts/pollsystem.lua:52> /poll [15/03/2024 08:26:20] [Error - TalkAction Interface] [15/03/2024 08:26:20] data/talkactions/scripts/pollsystem.lua:onSay [15/03/2024 08:26:20] Description: [15/03/2024 08:26:20] data/lib/012-table.lua:6: bad argument #1 to 'load' (function expected, got string) [15/03/2024 08:26:20] stack traceback: [15/03/2024 08:26:20] [C]: in function 'load' [15/03/2024 08:26:20] data/lib/012-table.lua:6: in function 'unserialize' [15/03/2024 08:26:20] data/talkactions/scripts/pollsystem.lua:39: in function 'getMostVotedOption' [15/03/2024 08:26:20] data/talkactions/scripts/pollsystem.lua:126: in function <data/talkactions/scripts/pollsystem.lua:52> /endpoll [15/03/2024 08:26:26] [Error - TalkAction Interface] [15/03/2024 08:26:26] data/talkactions/scripts/pollsystem.lua:onSay [15/03/2024 08:26:26] Description: [15/03/2024 08:26:26] data/lib/012-table.lua:6: bad argument #1 to 'load' (function expected, got string) [15/03/2024 08:26:26] stack traceback: [15/03/2024 08:26:26] [C]: in function 'load' [15/03/2024 08:26:27] data/lib/012-table.lua:6: in function 'unserialize' [15/03/2024 08:26:27] data/talkactions/scripts/pollsystem.lua:39: in function 'getMostVotedOption' [15/03/2024 08:26:27] data/talkactions/scripts/pollsystem.lua:126: in function <data/talkactions/scripts/pollsystem.lua:52>
  22. OLHA COMO FICA NO SEU SCRIPT LEKOT OLHA DO ONESHOT aparece isso quando uso comando /newpoll [15/03/2024 03:33:50] [Error - TalkAction Interface] [15/03/2024 03:33:50] data/talkactions/scripts/pollsystem.lua:onSay [15/03/2024 03:33:50] Description: [15/03/2024 03:33:50] data/talkactions/scripts/pollsystem.lua:56: attempt to call field 'serialize' (a nil value) [15/03/2024 03:33:50] stack traceback: [15/03/2024 03:33:50] data/talkactions/scripts/pollsystem.lua:56: in function <data/talkactions/scripts/pollsystem.lua:28>

Informação Importante

Confirmação de Termo