Ir para conteúdo
Banner com Efeitos

Storm

Héroi
  • Registro em

  • Última visita

Tudo que Storm postou

  1. local tempo = 60 local effect = {241} local ml = 55 local outfit = {lookType = 605} function magicEffect118(tempo2,tempo3,cid) if (isCreature(cid)) then if getPlayerStorageValue(cid, 104053) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then for i=1, #effect do local position = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} doSendMagicEffect(position, effect[i]) end end end end function onCastSpell(cid, var) if getPlayerStorageValue(cid, 104053) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then doSetCreatureOutfit(cid, outfit, tempo * 1000) doCombat(cid, combat, var) tempo2 = 0 tempo3 = 0 while (tempo2 ~= (tempo*1000)) do addEvent(magicEffect118, tempo2, tempo2, tempo*1000, cid) tempo2 = tempo2 + 300 tempo3 = tempo3 + 1 end setPlayerStorageValue(cid, 104053,1) else doPlayerSendCancel(cid, "Sorry, you are transformed.") end end
  2. -- <rune name="Magic Wall" id="2293" allowfaruse="1" charges="3" lvl="32" maglv="9" exhaustion="2000" blocktype="all" event="script" value="support/magic wall rune.lua"/> function doShowTimeByPos(uid, pos, duration, type) type = type or 20 for i = 0, (duration - 1) do addEvent(function() if isCreature(uid) then doCreatureSay(uid, tostring(duration - i), type, false, 0, pos) end end, i * 1000) end return true end local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) function onCastSpell(cid, var) local duration = 20 -- duração da magic wall doShowTimeByPos(cid, variantToPosition(var), duration, 20) return doCombat(cid, combat, var) end
  3. <?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="TibiaKing.com"> <!-- Configs and Functions --> <config name="PotionExpConfigs50"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES needpa = FALSE, needlvl = {TRUE, level = 1}, costmana = {FALSE, mana = 10}, addrate = 25, -- Exp que vai adicionar em % removeonuse = TRUE } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotion.lua --> <action itemid="6544" event="script"><![CDATA[ domodlib('PotionExpConfigs50') if getTilePzInfo(getCreaturePosition(cid)) then doSendMagicEffect(getPlayerPosition(cid), 2) return doCreatureSay(cid, "[Error] nao pode usar em pz", TALKTYPE_ORANGE_1) end if getPlayerStorageValue(cid, 49015) >= 1 then doSendMagicEffect(getPlayerPosition(cid), 2) return doCreatureSay(cid, "[Error] So pode usar 1 EXP POT por vez.", TALKTYPE_ORANGE_1) end if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "You need to be a premmium account to use this item.") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "You need to be level " .. configs.needlvl.level .. " to use this item.") end if configs.costmana[1] then if getCreatureMana(cid) < configs.costmana.mana then return doPlayerSendCancel(cid, "You need " .. configs.costmana.mana .. " mana to use this item.") else doCreatureAddMana(cid, -configs.costmana.mana) end end if configs.removeonuse then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "The effect of the exp potion end.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "[Exp +25%], o efeito acabara em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doCreatureSay(cid, "EXP POTION Ativada, voce ganhou um bonus de EXP [+25%] por 30 minutos.", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), 21) setPlayerStorageValue(cid, 49015, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 49015, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotion" event="script"><![CDATA[ domodlib('PotionExpConfigs50') local time = configs.time if os.time()-getPlayerStorageValue(cid, 49015) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 49015))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 49015))) * 1000 , cid, 49015, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 49015))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 49015))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 49015)))*1000, cid, "The effect of the exp potion end.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 49015)))-i)*1000, cid, "+25% de experiencia!, o efeito acabara em "..a..".") end end return TRUE ]]></creaturescript> </mod>
  4. [-1] = "Estudante", [0] = "Estudante", [1] = "Genin", [2] = "Chunnin", [3] = "Jounin", [4] = "Anbu", [5] = "Akatsuki" [5] = "Kage", Está incorreto ; o correto é seguir a sequencia [-1] = "Estudante", [0] = "Estudante", [1] = "Genin", [2] = "Chunnin", [3] = "Jounin", [4] = "Anbu", [5] = "Akatsuki" [6] = "Kage",
  5. Dando um determinado valor de uma storage a um player ; por exemplo setPlayerStorageValue(cid, storage, 5) -- dará ao player o rank de SENNIN
  6. Config.lua ; configure a quantidade aqui deathLostPercent = 10
  7. Sim , 100%
  8. Ambas vão ter a mesma storage , o que vai mudar é o value da storage
  9. Storm postou uma resposta no tópico em Suporte OTServer Derivados
    Configure aqui local function onCastSpell1(parameters) local position = {x=getCreaturePosition(cid).x+3, y=getCreaturePosition(cid).y-1, z=getCreaturePosition(cid).z} local effect = 3 doCombat(parameters.cid, acombat1, parameters.var) doSendMagicEffect(position , effect) end local function onCastSpell2(parameters) local position = {x=getCreaturePosition(cid).x+3, y=getCreaturePosition(cid).y-1, z=getCreaturePosition(cid).z} local effect = 3 doCombat(parameters.cid, acombat2, parameters.var) doSendMagicEffect(position , effect) end
  10. Storm postou uma resposta no tópico em Suporte Tibia OTServer
    Certifique-se de que colocou ActionID no item pelo seu Map Editor.
  11. Storm postou uma resposta no tópico em Suporte Tibia OTServer
    Actions , since it was a stone that removed the items
  12. Storm postou uma resposta no tópico em Suporte Tibia OTServer
    function onUse(cid, item, fromPosition, itemEx, toPosition) local itemid, count = 2160, 30 local storage = 32135 if getPlayerStorageValue(cid, storage) >= 1 then doPlayerSendTextMessage(cid, 15, "voce ja fez essa quest") doSendMagicEffect(fromPosition, 3) return false end doPlayerSendTextMessage(cid, 25, "quest completada!!") doSendMagicEffect(fromPosition, 5) setPlayerStorageValue(cid, storage, 1) doBroadcastMessage("O Player ".. getCreatureName(cid) .."[".. getPlayerLevel(cid).."] completou a anihi quest", 23) doPlayerAddItem(cid, itemid, count) return true end Em todos os baús da mesma quest você coloca a mesma storage
  13. Storm postou uma resposta no tópico em Suporte Tibia OTServer
    local olditens = {5435, 5215} -- Aqui dentro coloque os ids do set que irá se transformar local newitens = {2134, 2156} -- Aqui dentro coloque os ids do novo set que irá se transformar function onUse(cid, item, fromPosition, itemEx, toPosition) local pid = getCreaturePosition(cid) for _, check in ipairs(olditens) do if getPlayerItemCount(cid, check) > 0 then doPlayerRemoveItem(cid, check, 1) end end for _, id in ipairs(newitens) do doPlayerAddItem(cid, id, 1) end doSendMagicEffect(pid, 3) doPlayerSendTextMessage(cid, 13,"Itens Changeds") doRemoveItem(item.uid, 1) return true end
  14. -- Start Config -- local topos = {x = 842, y = 654, z = 11} -- Posição para onde o player será teleportado. -- End Config -- function onUse(cid) local effect = 3 if doTeleportThing(cid, topos) then doSendMagicEffect(topos, effect) doPlayerSendTextMessage(cid,20,"You have been teleported.") -- Menssagem que aparecerá para o player ao ser teleportado. end end
  15. Existem um mod que adiciona os itens iniciais ao logar pela primeira vez ; <?xml version="1.0" encoding="UTF-8"?> <mod name="First Items" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes"> <config name="firstitems_config"><![CDATA[ config = { storage = 30001, items = {2050, 2382} } ]]></config> <event type="login" name="FirstItems" event="buffer"><![CDATA[ domodlib('firstitems_config') if(getPlayerStorageValue(cid, config.storage) > 0) then return end for _, id in ipairs(config.items) do doPlayerAddItem(cid, id, 1) end if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then doPlayerAddItem(cid, 2651, 1) else doPlayerAddItem(cid, 2650, 1) end doAddContainerItem(doPlayerAddItem(cid, 1987, 1), 2674, 1) setPlayerStorageValue(cid, config.storage, 1) ]]></event> </mod>
  16. --Spell Method by Night Wolf local config = { tempo = 30, --- tempo que vai durar a spell (em segundos) -- Skills -- ml = 30, -- quantos ira aumentar o skill de ML skillfist = 30, -- quantos ira aumentar o skill de Fist skillsword = 0, -- quantos ira aumentar o skill de Sword skillaxe = 0, -- quantos ira aumentar o skill de Axe skillclub = 0, -- quantos ira aumentar o skill de Club skilldistance = 0, -- quantos ira aumentar o skill de Distance skillshield = 0, -- quantos ira aumentar o skill de Shield -- //Skills -- outfit = 612, --- outfit que o player ira ter storage = 15674, -- storage que salva o cooldown cooldown = 60, -- tempo em segundos de 1 uso e outro efeito = 5 -- efeito que sai ao castar a spell } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setCombatParam(combat, COMBAT_PARAM_EFFECT, config.efeito) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, config.tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, config.ml) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, config.skillfist) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, config.skillsword) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, config.skillaxe) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, config.skillclub) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, config.skilldistance) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, config.skillshield) setConditionParam(condition, CONDITION_PARAM_OUTFIT, config.outfit) setConditionParam(condition, CONDITION_PARAM_SPEED, 500) setCombatCondition(combat, condition) function onCastSpell(cid, var) t = {} local voc = 60 -- Segundos para a vocation voltar ao normal , lembrando que se o player ficar off durante esse tempo vai dar erro if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then setPlayerStorageValue(cid, config.storage, os.time() + config.cooldown) local outfit = getCreatureOutfit(cid) outfit.lookType = config.outfit doSetCreatureOutfit(cid, outfit, config.tempo * 1000) table.insert(t, getPlayerVocation(cid)) addEvent(doPlayerSetVocation, voc * 1000, cid, t[1]) doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Your spell is in cooldown.") return false end return true end
  17. @Sotten A bless não protege contra perca de itens , apenas experience function onSay(cid, words, param) local pos = getCreaturePosition(cid) local calculo = getPlayerLevel(cid) * 1000 -- O calculo é feito apartir do level do player , exemplo : level 100 = 100k de money , você pode alterar o valor do calculo livremente for b = 1,5 do if getPlayerBlessing(cid, b) then doSendMagicEffect(pos, 3) doPlayerSendTextMessage(cid, 13, "You already blessed") end end if getCreatureCondition(cid, CONDITION_INFIGHT) then doSendMagicEffect(pos, 3) return doPlayerSendTextMessage(cid, 13, "You can only use the command without being in battle") end if doPlayerRemoveMoney(cid, calculo) then for a = 1,5 do doPlayerAddBlessing(cid, a) end doSendMagicEffect(pos, 3) return doPlayerSendTextMessage(cid, 13, "You have been blessed by all of eight gods!") else doSendMagicEffect(pos, 3) return doPlayerSendTextMessage(cid, 13, "You don't have enough money. You need ".. calculo .." to buy bless") end return true end
  18. Não cara , eu editei o código que eu postei asuahsuashauas
  19. Código editado.
  20. function onSay(cid) local pos = getCreaturePosition(cid) local calculo = getPlayerLevel(cid) * 1000 -- O calculo é feito apartir do level do player , exemplo : level 100 = 100k de money , você pode alterar o valor do calculo livremente if getPlayerBlessing(cid, 4) then doSendMagicEffect(pos, 3) return doPlayerSendTextMessage(cid, 13, "You already blessed") end if getCreatureCondition(cid, CONDITION_INFIGHT) then doSendMagicEffect(pos, 3) return doPlayerSendTextMessage(cid, 13, "You can only use the command without being in battle") end if doPlayerRemoveMoney(cid, calculo) then doPlayerAddBlessing(cid, 4) doSendMagicEffect(pos, 3) return doPlayerSendTextMessage(cid, 13, "You have been blessed by all of eight gods!") else doSendMagicEffect(pos, 3) return doPlayerSendTextMessage(cid, 13, "You don't have enough money. You need ".. calculo .." to buy bless") end return true end Não fiz por tabela porque se não seria um código muito grande.
  21. Se não tiver essas tags na XML da spell , adicione aggressive="0" needtarget="1" params="1"
  22. local t = { --[vocation name] = {vocationid, hp extra, mana extra}, ["Druid"] = {2, 100, 50}, ["Knight"] = {4, 100, 50}, ["Paladin"] = {3, 100, 50}, ["Sorcerer"] = {1, 100, 50}, } 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 get_voc = t[getParameters()] local pos = getCreaturePosition(cid) if get_voc then if(getPlayerItemCount(cid, 7722) >= 10) then doPlayerRemoveItem(cid, 7722, 10) selfSay('Vocation trocada com sucesso', cid) doSendMagicEffect(pos, 5) doPlayerSetVocation(cid, get_voc[1]) setCreatureMaxHealth(cid, getCreatureMaxMana(cid) + get_voc[2]) setCreatureMaxMana(cid, getCreatureMaxMana(cid) + get_voc[3]) else selfSay('Você não tem {Lethal Orbs} Suficientes.', cid) doSendMagicEffect(pos, 3) return true end else selfSay('{Vocation} not found', cid) doSendMagicEffect(pos, 3) return true end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  23. -- <action itemid="2200" event="script" value="2200.lua"/> local config = { name = "Pikachu", -- Nome do monstro summonado max = 2, -- Max de summons contando com o pokemon que o player já tem msgfail = "Voce tem mais que dois pokemons", -- Msg de fail caso o player já tenha usado o item msgsucess = "voce agora tem 2 pokemons" -- Msg qnd ele usar o item } function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = getCreaturePosition(cid) local summons = getCreatureSummons(cid) local pokemon = doCreateMonster(config.name, pos) if (table.maxn(summons) == max) then doPlayerSendTextMessage(cid, 25, config.fail) doSendMagicEffect(pos, 2) return true end doPlayerSendTextMessage(cid, 25, config.sucess) doSendMagicEffect(pos, 2) doConvinceCreature(cid, pokemon) return true end
  24. Storm postou uma resposta no tópico em Suporte Bots
  25. local config = { porc = 25, -- | % de chance | -- itemid = 5252, -- | id do item | -- qnt = 1, -- | Count do item | -- storage = 232526, -- | Storage que conta o tempo | -- horas = 1 -- | Horas para usar o item novamente | -- } local msgs = { exaust = "você so pode usar isso a cada uma hora", -- | Msg de exaust | -- sucess = "voce recebeu o item", -- | Msg qnd conseguir | -- notmission = "você não está nestas missões.", -- | Msg quando n tiver na missao | -- fail = "voce n recebeu o item" -- | Msg quando falhar | -- } function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = getCreaturePosition(cid) if getPlayerStorageValue (cid, 8000) ~= 98 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msgs.notmission) doSendMagicEffect(pos, 3) return true end if os.time() - getPlayerStorageValue(cid, config.storage) <= config.horas * 3600 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msgs.exaust) doSendMagicEffect(pos, 3) return true end if math.random(1, 100) <= config.porc then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msgs.sucess) doPlayerAddItem(cid, config.itemid, config.qnt) setPlayerStorageValue (cid, 8000, 99) setPlayerStorageValue(cid, config.storage, os.time()) return true end doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msgs.fail) setPlayerStorageValue(cid, config.storage, os.time()) return true end

Informação Importante

Confirmação de Termo