Tudo que Reds postou
-
Quest Log
<?xml version="1.0" encoding="UTF-8"?> <quests> <quest name="Nomedaquest" startstorageid="storage do inicio a quest" startstoragevalue="1"> <mission name="Montanha das Wyverns" storageid="mesmo storage de cima" startvalue="1" endvalue="numero de missoes"> <missionstate id="1" description="Voce encontrou as small sapphires"/> </mission> </quest> </quests> vai adicionando missionstate conforme o numero de missoes
-
como colocar % do condition funcionar
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) combat:setParameter(COMBAT_PARAM_USECHARGES, 1) function onGetFormulaValues(player, skill, attack, factor) local skillTotal = skill * attack local levelTotal = player:getLevel() / 5 return -(((skillTotal * 0.01) + 1) + (levelTotal)), -(((skillTotal * 0.03) + 6) + (levelTotal)) end local exhaust = Condition(CONDITION_EXHAUST_COMBAT) exhaust:setParameter(CONDITION_PARAM_TICKS, 1000) chance = math.random(1,100) if chance > 80 then combat:setCondition(exhaust) end local exhaustAttackGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN) exhaustAttackGroup:setParameter(CONDITION_PARAM_SUBID, 1) exhaustAttackGroup:setParameter(CONDITION_PARAM_TICKS, 1000) combat:setCondition(exhaustAttackGroup) combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(creature, var) return combat:execute(creature, var) end
-
Quest Log
<?xml version="1.0" encoding="UTF-8"?> <quests> <quest name="Secret Quest" startstorageid="30031" startstoragevalue="1"> <mission name="Montanha das Wyverns" storageid="30031" startvalue="1" endvalue="3"> <missionstate id="1" description="Voce encontrou as small sapphires"/> <missionstate id="2" description="Entregue-as para o joalheiro!"/> <missionstate id="3" description="Volte e fale com Rangalf!"/> </mission> </quest> </quests> tenho esse na pasta do meu sv
-
Staff que Almenta ataque Por Level Ajuda
function onGetFormulaValues(cid, level, maglevel) min = -(level*20) max = -(level*20) return min, max end cara, em spell funciona assim, acredito que seja igual
-
[Ajuda] Spell que cria um PIANO.
Nao entendi muito bem se era para o piano ficar em cima do personagem (mesmo sqm), ou se era para ficar no sqm de cima e no de baixo, mas enfim sqm do target: local config = { cooldown = 2, -- cooldown da spell. } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) function damage(cid, level, maglevel) local min = -(1000) local max = -(3000) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "damage") function onCastSpell(cid, var) if getPlayerStorageValue(cid, 12224) - os.time() <= 0 then setPlayerStorageValue(cid, 12224, os.time() + config.cooldown) local target = getCreatureTarget(cid) local position = getCreaturePosition(target) local piano = doCreateItem(2080, 1, position) doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Voce deve esperar para invocar outro piano.") return false end return true end 1sqm acima e 1 abaixo do target: local config = { cooldown = 2, -- cooldown da spell. } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) function damage(cid, level, maglevel) local min = -(1000) local max = -(3000) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "damage") function onCastSpell(cid, var) if getPlayerStorageValue(cid, 12224) - os.time() <= 0 then setPlayerStorageValue(cid, 12224, os.time() + config.cooldown) local target = getCreatureTarget(cid) local position = {x=getThingPosition(getCreatureTarget(cid)).x+0, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+0, y=getThingPosition(getCreatureTarget(cid)).y-1, z=getThingPosition(getCreatureTarget(cid)).z} local piano = doCreateItem(2080, 1, position) local piano1 = doCreateItem(2080, 1, position1) doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Voce deve esperar para invocar outro piano.") return false end return true end
-
[Pedido] Como Fazer um Npc (Script)
Nao sei muito bem como é no pokemon, mas em sv's normais é assim <?xml version="1.0" encoding="UTF-8"?> <npc name="Donald" script="default.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="128" head="20" body="122" legs="99" feet="134" corpse="2212"/> <parameters> <parameter key="module_shop" value="1"/> <parameter key="message_greet" value="Hello |PLAYERNAME|. I sell ham, meat, carrots, apples, brown breads, brown mushrooms and eggs (everything for 8 gold coins)!"/> <parameter key="shop_buyable" value="brown bread,2691,8;ham,2671,8"/> </parameters> </npc> Hello |PLAYERNAME|. I sell ham, meat, carrots, apples, brown breads, brown mushrooms and eggs (everything for 8 gold coins)! << aqui vc troca pela frase quando o player da hi brown bread,2691,8;ham,2671,8 << aqui vc edita o nome do item quando fala trade, em seguida o id do item e o preço
-
ERRO SCRIPT Spell
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 245) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -165.2, 1, -165.2, 1) function onCastSpell(cid, var) local waittime = 15 local storage = 5868 if exhaustion.check(cid, storage) then doCreatureSay(cid, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.", TALKTYPE_MONSTER) return false end local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+0, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(position1, 12) doCombat(cid, combat, var) doSendMagicEffect(position1, 245) doCreatureSay(cid, "RASEN FURIE MENMA", TALKTYPE_MONSTER) exhaustion.set(cid, storage, waittime) doCombat(cid, combat, var) end
-
Sistema de refinamento (AJUDA AE PO!)
pesquise sobre slot system, existem vários com isso
-
script exausted error
local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 214) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -120.2, 1, -120.2, 1) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 214) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -120.2, 1, -120.2, 1) arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {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, 3, 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}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr2 = { {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, 0, 0, 0, 1, 1, 1, 0}, {1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 1}, {0, 1, 1, 1, 0, 0, 0, 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 area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) setCombatArea(combat1, area1) setCombatArea(combat2, area2) local function onCastSpell1(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end local function onCastSpell2(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat2, parameters.var) end function onCastSpell(cid, var) local waittime = 2 -- Tempo de exhaustion local storage = 115818 if exhaustion.check(cid, storage) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") return false end local parameters = { cid = cid, var = var} if getPlayerStorageValue(cid, 3202) <= 0 then setPlayerStorageValue(cid, 3201, os.time()+10000) addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 630, parameters) else return false exhaustion.set(cid, storage, waittime) end return TRUE end acho q é isso, se n der avisa
-
Erro Scripts (Exaustivas e combo nao vai)
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 134) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -275.2, 1, -275.2, 1) function onCastSpell(cid, var) if exhaustion.check(cid, 23029) == false then exhaustion.set(cid, 23029, 25) local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+0, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(position1, 244) return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Cooldown for Spell is" ..exhaustion.get(cid, 23029).." seconds") return false end return true end if exhaustion.check(cid, 23029) == false then, aqui verifica se está exhaust exhaustion.set(cid, 23029, 25), depois que verificou ele exhausta o caster ..., executa a spell else, caso nao a verificação seja falsa doPlayerSendCancel(cid, "Cooldown for Spell is" ..exhaustion.get(cid, 23029).." seconds"), recebe essa mensagem return false, nao permite soltar a spell end, fim do else return true, adiciona antes na ultima linha end, fim de codigo
-
Ajuda CASSINO
function onUse(cid, item, frompos, item2, topos) --== Configurações local config = { items = {X, X, X, X, X, X, X, X}, -- Itens que ele pode ganhar vp = 2159, -- ID do Vip Coin } --== Fim das Configurações local rand = math.random(1, #config.items) if (item.actionid == 1140) and item.itemid == 1945 then if getPlayerItemCount(cid, config.vp) >= 6 then doPlayerRemoveItem(cid, config.vp, X) doPlayerAddItem(cid, config.items[rand], 1) doBroadcastMessage("O Jogador "..getCreatureName(cid).." Ganhou um "..getItemNameById(config.items[rand])..".") else return false doPlayerSendCancel(cid,"Você precisa de X coins") doSendMagicEffect(getPlayerPosition(cid), 2) end elseif item.itemid == 1946 then doTransformItem(item.uid,item.itemid-1) end return TRUE end não testei
-
Alavanca que remove varias pedras!
function onUse(cid, item, toPosition) rock1pos = {x=XXXX, y=YYYY, z=ZZ, stackpos=1} -- Posição da Pedra rock2pos = {x=XXXX, y=YYYY, z=ZZ, stackpos=1} rock3pos = {x=XXXX, y=YYYY, z=ZZ, stackpos=1} rock4pos = {x=XXXX, y=YYYY, z=ZZ, stackpos=1} rock5pos = {x=XXXX, y=YYYY, z=ZZ, stackpos=1} rock6pos = {x=XXXX, y=YYYY, z=ZZ, stackpos=1} rock7pos = {x=XXXX, y=YYYY, z=ZZ, stackpos=1} rock8pos = {x=XXXX, y=YYYY, z=ZZ, stackpos=1} rock9pos = {x=XXXX, y=YYYY, z=ZZ, stackpos=1} rock10pos = {x=XXXX, y=YYYY, z=ZZ, stackpos=1} getrock1 = getThingfromPos(rock1pos) UniID = 3331 -- UniqueID que vai ser adicionado na alavanca rockID = 1304 -- ID da pedra if item.uid == UniID and item.itemid == 1945 and getrock1.itemid == rockID then doRemoveItem(getrock1.uid, 1) doRemoveItem(getrock2.uid, 1) doRemoveItem(getrock3.uid, 1) doRemoveItem(getrock4.uid, 1) doRemoveItem(getrock5.uid, 1) doRemoveItem(getrock6.uid, 1) doRemoveItem(getrock7.uid, 1) doRemoveItem(getrock8.uid, 1) doRemoveItem(getrock9.uid, 1) doRemoveItem(getrock10.uid, 1) doTransformItem(item.uid, item.itemid+1) doSendMagicEffect(rock1pos, 2) elseif item.uid == UniID and item.itemid == 1946 then doCreateItem(rockID, 1, rock1pos) doCreateItem(rockID, 2, rock1pos) doCreateItem(rockID, 3, rock1pos) doCreateItem(rockID, 4, rock1pos) doCreateItem(rockID, 5, rock1pos) doCreateItem(rockID, 6, rock1pos) doCreateItem(rockID, 7, rock1pos) doCreateItem(rockID, 8, rock1pos) doCreateItem(rockID, 9, rock1pos) doCreateItem(rockID, 10, rock1pos) doTransformItem(item.uid,item.itemid-1) doSendMagicEffect(rock1pos, 13) end return TRUE end <action uniqueid="3331" script="alavanca.lua"></action> peguei o codigo do tibiaking e modifiquei, se mesmo assim só remover 3 pedras explica melhor que eu arrumo
-
Ajuda com função
addEvent(function() doSendMagicEffect(rock1pos, 25) end, 500) addEvent(function() doSendMagicEffect(rock1pos, 25) end, 1000) addEvent(function() doSendMagicEffect(rock1pos, 25) end, 1500) e vai fazendo isso, aumentando de 500 em 500
-
Procuro Equipe
Eu tenho um projeto, estou trabalhando sozinho nele há uns 4 anos, o mapa é 90% feito por mim então algumas partes deixam a desejar. Gosto de trabalhar com sistemas/spells que não são parecidas com do tibia. Se quiser que eu te mande o projeto para você ver como tá me manda uma msg
-
Npc Auction Versão 1.0 [Atualizado]
épico, deu até mesmo em meu tfs que é todo bugado e não funciona nada sem que eu precise encher de gambiarras merece fixo no fórum, melhor npc
-
[8.6] Staff Time
eita cara vou testar agora, uma das melhores ideias que eu ja vi
-
[8.6] Staff Time
ainda espero o dia que o vodkart vai liberar aquele sistema de npc/market
-
Frozen Orb
else doPlayerSendCancel(cid, "You're exhausted.") end nao seria: else doPlayerSendCancel(cid, "You're exhausted.") return false end ??
-
Magical Orb
Vende os itens listados no script, ao dar use em algo no mapa
-
Exhausted no alvo
estou querendo fazer uma spell em que o alvo apenas possa se mover porém nao consigo fazer com que: local exhaust = createConditionObject(CONDITION_EXHAUST) funcione nesse script da tudo certo menos o exhausted, estou querendo testar a condition. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_STUN) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION) setCombatParam(combat, COMBAT_PARAM_USECHARGES, true) function onGetFormulaValues(cid, level, skill, attack, factor) local skillTotal, levelTotal = skill + attack * 3, level / 5 * 3 return -(skillTotal / 5 + levelTotal), -(skillTotal / 4 + levelTotal) end t1 = 1000 t2 = 2000 function effect(cid) if not isCreature(cid) then return false end local targ = getCreatureTarget(cid) if not isCreature(targ) then return false end doSendMagicEffect(getThingPos(targ), CONST_ME_SLEEP) end local paralyze = createConditionObject(CONDITION_PARALYZE) setConditionParam(paralyze, CONDITION_PARAM_TICKS, 2000) local muted = createConditionObject(CONDITION_MUTED) setConditionParam(muted, CONDITION_PARAM_TICKS, 2000) local pacified = createConditionObject(CONDITION_PACIFIED) setConditionParam(pacified, CONDITION_PARAM_TICKS, 1000) local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, 200000) setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") local function doCreatureChangeSpeed(cid, speed) if not isCreature(cid) then return false end doChangeSpeed(cid, speed) return true end function onCastSpell(cid, var) local target = getCreatureTarget(cid) if not isCreature(target) then return false end local speed = getCreatureSpeed(target) local selfspeed = getCreatureSpeed(target) local pos = getThingPos(target) doChangeSpeed(cid, 5000) doSteerCreature(cid, pos) doChangeSpeed(target, -speed) doAddCondition(target, paralyze) doAddCondition(target, muted) doAddCondition(target, pacified) doAddCondition(target, exhaust) addEvent(doCreatureChangeSpeed, 2000, target, speed) addEvent(doCreatureChangeSpeed, 1000, cid, -5000) addEvent(effect,t1,cid) addEvent(effect,t2,cid) return doCombat(cid, combat, var) end alguem sabe como resolver, ou se esse erro só esta dando aqui
-
(Resolvido)Spell Continua
o unico problema q ta dando é quando acaba a mana e vai utilizar a spell denovo, precisa ativar 2x para ela ir
-
(Resolvido)Spell Continua
Não tive tempo ainda, mas de madrugada eu testo. Você poderia dar uma explicada como funciona uid?
-
(Resolvido)Spell Continua
Galera, eu tava tentando criar uma spell continua que: - Gasta 40 de mana por segundo. - Spell parar se a mana for menor que 40. - Spell parar se for castada novamente.
-
[Pedido] Action de click receber item ou nascer monstro
function onUse(cid, item, frompos, item2, topos) --Config--> local portal_quest01_pos = {x = 1334, y = 1258, z = 7, stackpos = 1} --End Config--> function Potwory1() if math.random (1,3) == 1 then doPlayerAddItem(cid,idfruta,1) else doSummonCreature('Kongra', {x = 1338, y = 1261, z = 7, stackpos = 253}) addEvent(RemoveAll, 1 * 1) end end if item.uid == uniqueitemid and getThingfromPos(portal_quest22_pos).itemid ~= idarvore then addEvent(Potwory1, 0) else doPlayerSendTextMessage(cid,22,"Sorry, not possible.") end return TRUE end <action actionid="1337" event="script" value="valan.lua"/> nao faço a menor ideia se vai funcionar
-
Regen Soul
Galera, após matar uma criatura se regenera soul points por 4 minutos. Como eu posso alterar isso para 1 minuto por exemplo?