
Histórico de Curtidas
-
Vorkhon deu reputação a Fabi Marzan em [SPELL] METEOROHonestamente, nao sou especialista em lua ou em fazer spells, mas fiz algo rapido para voce aqui:
local combatOne = createCombatObject() setCombatParam(combatOne, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combatOne, COMBAT_PARAM_HITCOLOR, COLOR_MAYABLUE) setCombatFormula(combatOne, COMBAT_FORMULA_LEVELMAGIC, -1.0, -500, -1.0, -650) setCombatArea(combatOne,createCombatArea( {{1, 1, 1}, {1, 3, 1}, -- Area 3X3 {1, 1, 1}} )) local function meteor_1(cid, target) if isCreature(target) then local pos = getCreaturePosition(target) local post = getThingPosition(getCreatureTarget(cid)) local fromposition = {x = pos.x - math.random(2, 5), y = pos.y - 4, z = pos.z} local toposition = {x = post.x - math.random(1, 2), y = post.y, z = post.z} doSendDistanceShoot(fromposition, toposition, CONST_ANI_FIRE) doSendMagicEffect(pos, CONST_ME_FIREAREA) end end local function meteor_2(cid, target) if isCreature(target) then local pos = getCreaturePosition(target) local post = getThingPosition(getCreatureTarget(cid)) local fromposition = {x = pos.x + math.random(2, 5), y = pos.y - 4, z = pos.z} local toposition = {x = post.x + math.random(1, 2), y = post.y, z = post.z} doSendDistanceShoot(fromposition, toposition, CONST_ANI_FIRE) doSendMagicEffect(pos, CONST_ME_FIREAREA) end end local function meteor_3(cid, target) if isCreature(target) then local pos = getCreaturePosition(target) local post = getThingPosition(getCreatureTarget(cid)) local fromposition = {x = pos.x, y = pos.y - 4, z = pos.z} local toposition = {x = post.x, y = post.y, z = post.z} doSendDistanceShoot(fromposition, toposition, CONST_ANI_FIRE) doSendMagicEffect(pos, CONST_ME_FIREAREA) end end local config = { hit = 1, time = 1200, -- meteor_1 time_2 = 1300, -- meteor_2 time_3 = 1500, -- meteor_3 numberOfAttacks = 3, attackInterval = 200 } function onCastSpell(cid, var) addEvent(function() doCombat(cid, combatOne, var) end, 1200) local pos = getCreaturePosition(cid) for i = 1, config.numberOfAttacks do addEvent(function() doSendDistanceShoot(pos, {x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, CONST_ANI_FIRE) end, config.attackInterval * i) end for fbn = 1, config.hit do addEvent(meteor_1, config.time * fbn, cid, getCreatureTarget(cid)) addEvent(meteor_2, config.time_2 * fbn, cid, getCreatureTarget(cid)) addEvent(meteor_3, config.time_3 * fbn, cid, getCreatureTarget(cid)) end return true end
-
Vorkhon deu reputação a L3K0T em [AJUDA] Summon que explodelocal damageTable = { {4, -3}, -- Quantidade / dano {9, -2}, {20, -1} } local function createExplosion() local explosion = createConditionObject(CONDITION_FIRE) setConditionParam(explosion, CONDITION_PARAM_DELAYED, 1) for i = 1, #damageTable do local t = damageTable[i] addDamageCondition(explosion, t[1], 1000, t[2]) -- tempo end return explosion end local function explodeCreature(creature) if isCreature(creature) then local explosion = createExplosion() local area = createCombatArea({{1, 1, 1}}) doAreaCombatHealth(creature, 1, getThingPos(creature), area, -1, -30, 5) doAreaCombatCondition(creature, getThingPos(creature), area, explosion, 255) doSendMagicEffect(getThingPos(creature), CONST_ME_EXPLOSIONAREA) end end function onDeath(creature, corpse, killer) if isSummon(creature) or isMonster(creature) then addEvent(explodeCreature, 1, creature) end return true end
-
Vorkhon deu reputação a leozincorsair em [AJUDA] Summon que explodeeu tenho esse:
.. Só que tem um problema, o summon explode antes de chegar no alvo :(
--Created with SuperVego-- local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 214) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 39) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -88.5, 5, -88.5, 5) arr = { {1, 1, 1}, {1, 3, 1}, {1, 1, 1}, } local area = createCombatArea(arr) setCombatArea(combat, area) function onCastSpell(cid, var) doCreatureAddHealth(cid, -(getCreatureMaxHealth(cid) / 100) * 100) return doCombat(cid, combat, var) end
-
Vorkhon deu reputação a Sociopata em Creature Script [Ajuda]local config = { ["Boss"] = { posiTeleporte = {x = 96, y = 1153, z = 7, stackpos = 254}, -- Posição em que o teleporte aparecerá. posiToTeleporte = {x = 96, y = 1142, z = 7}, -- Posição onde será teleportado. time = 60, -- Tempo em que o teleporte irá desaparecer 60 segundos. life = 185, -- Life ao rebornar mana = 40, -- Mana ao rebornar level = 8, -- Level ao rebornar exp = 4200, -- exp que fica voc = 18, -- Voc ao rebornar cap = 450, storage = 30023 } } function removeTeleporte(tp) local teleporte = getTileItemById(tp.posiTeleporte, 5023) if teleporte then doRemoveItem(teleporte.uid, 1) doSendMagicEffect(tp.posiTeleporte, CONST_ME_POFF) end end function onDeath(cid) local teleport = config[getCreatureName(cid)] if teleport then doTeleportThing(cid, teleport.posiToTeleporte) doPlayerSetVocation(cid, teleport.voc) doPlayerSetOutfit(cid, teleport.outfit) doRemoveCreature(cid) addEvent(removeTeleporte, teleport.time*1000, teleport) end return true end
As alterações que fiz foram as seguintes:
Adicionei uma função removeTeleporte() que remove o teleporte após o tempo especificado. Na função onDeath(), agora eu teleporto o jogador para a posição especificada no config, altero a classe e a roupa do jogador e removo o jogador do jogo. Este script funciona da seguinte forma:
Quando um monstro é morto, a função onDeath() é chamada. A função onDeath() verifica se o monstro está no config. Se o monstro estiver no config, a função onDeath() executa as seguintes ações: Cria um teleporte na posição especificada no config. Adiciona um evento para remover o teleporte após o tempo especificado. Teleporta o jogador para a posição especificada no config. Altera a classe do jogador para a classe especificada no config. Altera a roupa do jogador para a roupa especificada no config. Remove o jogador do jogo. Este script é apenas um ponto de partida. Você pode personalizá-lo para atender às suas necessidades específicas. Por exemplo, você pode adicionar uma verificação para garantir que o jogador não esteja em combate antes de teleportá-lo. Você também pode adicionar uma mensagem de confirmação para o jogador antes de teleportá-lo.
Aqui estão algumas sugestões para personalizar o script:
if isPlayerInCombat(cid) then return true end
Adicione uma mensagem de confirmação para o jogador antes de teleportá-lo. local answer = doPlayerAskYesNo(cid, "Deseja ser teleportado?") if not answer then return true end
Adicione uma condição para que o teleporte só funcione se o jogador tiver uma determinada quantidade de experiência. if getPlayerExperience(cid) < 10000 then return true end
Adicione um efeito mágico quando o jogador é teleportado
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
Espero que isso ajude
-
Vorkhon deu reputação a Fabi Marzan em NPC de barco que checa Addonif player:hasOutfit(153) and player:hasOutfit(157) then Troca pra
if not player:hasOutfit(153) and not player:hasOutfit(157) then
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) if not player:isPlayer() then return false end if msgcontains(msg, "sail") then if player:hasOutfit(153) and player:hasOutfit(157) then if player:removeMoney(50) then npcHandler:say("Good luck.", cid) npcHandler:releaseFocus(cid) player:teleportTo(Position(32227, 31756, 7)) else npcHandler:say("Nao tem dinheiro.", cid) npcHandler:releaseFocus(cid) end else npcHandler:say("Voce não pode, voce é da classe X.", cid) npcHandler:releaseFocus(cid) end end return true end npcHandler:setMessage(MESSAGE_GREET, 'Olá, com meu barco você pode {sail} para x.') npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Vorkhon recebeu reputação de Cat em [TFS 1.3] Block Wall Spelldata/spells/scripts/support/icewall.lua:21: attempt to index global 'combat' (a number value)
[3/9/2020 14:42:1] [Error - Event::checkScript] Cannot load script (data/spells/scripts/support/icewall.lua)
Aqui nao deu. Será minha versao?
-
Vorkhon recebeu reputação de Cat em [TFS 1.3] Block Wall SpellValeu irmão!!
-
Vorkhon deu reputação a Marvok em (Resolvido)[ERRO] Ao usar ROPE@Vorkhon Testa esse aqui
function onUse(cid, item, fromPosition, itemEx, toPosition) local storageEx = 923501 local time = 1 ---- EXHAUST ------------------------------------------------------- if(getPlayerStorageValue(cid,storage) >= os.time()) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end doPlayerSetStorageValue(cid, storage, os.time() + time) ---- -------- ------------------------------------------------------- if(toPosition.x == CONTAINER_POSITION) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end toPosition.stackpos = STACKPOS_GROUND local itemGround = getThingFromPos(toPosition) if(isInArray(SPOTS, itemGround.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 hole = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) 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 return true end return false end
-
Vorkhon recebeu reputação de XGaduX em [Ajuda] Spell que ImobilziaFala pessoal. Eu quero fazer uma spell que faz uma wave, da dano, transforma quem atingir em um item, e deixe imóvel e mutado por 5 segundos. Por enquanto estou usando paralyze, mas acho muito ruim, pois pode ser curado ai fica o item andando.
Segue o código que eu tenho:
local combat, area = createCombatObject(), createCombatArea(AREA_BEAM6,AREADIAGONAL_BEAM6)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatArea(combat, area)
local condition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 12000)
for i = 5474, 5474 do
addOutfitCondition(condition, {lookTypeEx = i})
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 12000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -700)
setCombatCondition(combat, condition)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -60, -1, -60, 5, 5, 4, 7)
end
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end