Tudo que Storm postou
-
(Resolvido)Modificar spell
Spell que o player ganhará a outfit local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -415.0, 0, -425.0, 0) arr1 = { {0, 3, 0} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end function onCastSpell(cid, var) local outfit = {lookType = 607, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local time = 20 -- segundos que ficará com a outfit local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+3, y=getThingPosition(getCreatureTarget(cid)).y+0, z=getThingPosition(getCreatureTarget(cid)).z} local parameters = { cid = cid, var = var, combat1 = combat1 } addEvent(onCastSpell1, 0, parameters) doSetCreatureOutfit(cid, outfit, time) doSendMagicEffect(position1, 83) return true end Spell em que o player ficará invisível local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -415.0, 0, -425.0, 0) arr1 = { {0, 3, 0} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local tempo = 5 -- Segundos que vai ficar invisível. local invis = createConditionObject(CONDITION_INVISIBLE) setConditionParam(invis, CONDITION_PARAM_TICKS, tempo*1000) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end function onCastSpell(cid, var) local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+3, y=getThingPosition(getCreatureTarget(cid)).y+0, z=getThingPosition(getCreatureTarget(cid)).z} local parameters = { cid = cid, var = var, combat1 = combat1 } addEvent(onCastSpell1, 0, parameters) doSendMagicEffect(position1, 83) doAddCondition(cid, invis) return true end
-
[Pedido] Ganhar item ao upar um nível.
Essa script já existe , procure no fórum antes de postar um tópico sobre dúvidas.
-
(Resolvido)[PEDIDO] Action com Crosshair para Item TFS 0.4.0
function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return true end if getPlayerStorageValue(itemEx.uid, 3999) == 2 then doPlayerSetStorageValue(itemEx.uid, 3999, 3) doRemoveItem(item.uid) doCreatureSay(itemEx.uid, "Um aliado foi afetado.", TALKTYPE_ORANGE_1, cid) else doSendMagicEffect(getCreaturePosition(itemEx.uid), CONST_ME_POFF) doPlayerSendCancel(itemEx.uid,"Você não está apto a utilizar este item.") end return true end
-
(Pedido) Pesca
local fishing = { ["Magikarp"] = {skill = 1, level = 1}, ["Krabby"] = {skill = 10, level = 10}, ["Horsea"] = {skill = 10, level = 10}, ["Goldeen"] = {skill = 15, level = 15}, ["Marill"] = {skill = 15, level = 15}, ["Luvdisc"] = {skill = 15, level = 15}, ["Chinchou"] = {skill = 20, level = 20}, ["Remoraid"] = {skill = 20, level = 20}, ["Clamperl"] = {skill = 20, level = 20}, ["Spheal"] = {skill = 25, level = 25}, ["Poliwag"] = {skill = 25, level = 25}, ["Lanturn"] = {skill = 25, level = 25}, ["Staryu"] = {skill = 25, level = 25}, ["Mantyke"] = {skill = 25, level = 25}, ["Qwilfish"] = {skill = 30, level = 30}, ["Tentacool"] = {skill = 30, level = 30}, ["Finneon"] = {skill = 30, level = 30}, ["Azumarill"] = {skill = 30, level = 30}, ["Psyduck"] = {skill = 30, level = 30}, ["Octillery"] = {skill = 30, level = 30}, ["Squirtle"] = {skill = 30, level = 30}, ["Totodile"] = {skill = 30, level = 30}, ["Corphish"] = {skill = 30, level = 30}, ["Mudkip"] = {skill = 30, level = 30}, ["Corsola"] = {skill = 30, level = 30}, ["Huntail"] = {skill = 35, level = 35}, ["Relicanth"] = {skill = 35, level = 35}, ["Lumineon"] = {skill = 35, level = 35}, ["Gorebyss"] = {skill = 40, level = 40}, ["Seaking"] = {skill = 40, level = 40}, ["Starmie"] = {skill = 40, level = 40}, ["Seadra"] = {skill = 40, level = 40}, ["Crawdaunt"] = {skill = 40, level = 40}, ["Kingler"] = {skill = 45, level = 45}, ["Poliwhirl"] = {skill = 50, level = 50}, ["Wartortle"] = {skill = 50, level = 50}, ["Prinplup"] = {skill = 50, level = 50}, ["Croconaw"] = {skill = 50, level = 50}, ["Marshtomp"] = {skill = 50, level = 50}, ["Feebas"] = {skill = 75, level = 75}, ["Golduck"] = {skill = 90, level = 90}, ["Vaporeon"] = {skill = 90, level = 90}, ["Blastoise"] = {skill = 100, level = 100}, ["Milotic"] = {skill = 100, level = 100}, ["Tentacruel"] = {skill = 100, level = 100}, ["Kingdra"] = {skill = 100, level = 100}, ["Gyarados"] = {skill = 100, level = 100}, ["Feraligatr"] = {skill = 100, level = 100}, ["Wailord"] = {skill = 100, level = 100}, ["Empoleon"] = {skill = 100, level = 100}, ["Swampert"] = {skill = 100, level = 100}, } local storage = 15458 local bonus = 1 local outfit = {lookType = 607, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local limite = 100 local function doFish(cid, pos, ppos, chance, interval, number) if not isCreature(cid) then return false end if getThingPos(cid).x ~= ppos.x or getThingPos(cid).y ~= ppos.y then return false end if getPlayerStorageValue(cid, storage) ~= number then return false end doSendMagicEffect(pos, CONST_ME_LOSEENERGY) local peixe = 0 local playerpos = getClosestFreeTile(cid, getThingPos(cid)) local fishes = {} local randomfish = "" if getPlayerSkillLevel(cid, 6) < limite then doPlayerAddSkillTry(cid, 6, bonus) end for a, b in pairs (fishing) do if getPlayerSkillLevel(cid, 6) >= b.skill then table.insert(fishes, a) end end if math.random(1, 100) <= chance then if getPlayerSkillLevel(cid, 6) < limite then doPlayerAddSkillTry(cid, 6, bonus) end randomfish = fishes[math.random(#fishes)] peixe = doSummonCreature(randomfish, playerpos) if not isCreature(peixe) then addEvent(doFish, interval, cid, pos, ppos, chance, interval, number) return true end doSetMonsterPassive(peixe) doWildAttackPlayer(peixe, cid) doCreatureSetLookDir(cid, getDirectionTo(getThingPos(cid), getThingPos(peixe))) --alterado ver depois if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173) doChallengeCreature(getCreatureSummons(cid)[1], peixe) else doSendMagicEffect(getThingPos(cid), 173) doChallengeCreature(cid, peixe) end return true end addEvent(doFish, interval, cid, pos, ppos, chance, interval, number) return true end local waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825} function onUse(cid, item, fromPos, itemEx, toPos) if getPlayerGroupId(cid) == 11 then return true end local checkPos = toPos checkPos.stackpos = 0 if getTileThingByPos(checkPos).itemid <= 0 then doPlayerSendCancel(cid, '!') return true end if not isInArray(waters, getTileInfo(toPos).itemid) then return true end if (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1) and not canFishWhileSurfingOrFlying then doPlayerSendCancel(cid, "You can't fish while surfing/flying.") return true end if getCreatureOutfit(cid) ~= outfit then doPlayerSendCancel(cid, "You can't fish sem a roupa de pescador") return true end if isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then doPlayerSendCancel(cid, "You can\'t fish while surfing neither flying above water.") return true end if getTileInfo(getThingPos(getCreatureSummons(cid)[1] or cid)).protection then doPlayerSendCancel(cid, "You can't fish pokémons if you or your pokémon is in protection zone.") return true end if not tonumber(getPlayerStorageValue(cid, storage)) then local test = io.open("data/sendtobrun123.txt", "a+") local read = "" if test then read = test:read("*all") test:close() end read = read.."\n[fishing.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, storage).."" local reopen = io.open("data/sendtobrun123.txt", "w") reopen:write(read) reopen:close() setPlayerStorageValue(cid, storage, 1) end setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1) if getPlayerStorageValue(cid, storage) >= 800 then setPlayerStorageValue(cid, storage, 1) end local delay = 3500 - getPlayerSkillLevel(cid, 6) * 25 local chance = 10 + getPlayerSkillLevel(cid, 6) / 2.5 doFish(cid, toPos, getThingPos(cid), chance, delay, getPlayerStorageValue(cid, storage)) return true end
-
(Resolvido)[PEDIDO] Spell que cria items em area
Está retornando erro porque não tem um TILE na posição em que você colocou .
-
Comandos de God
Poste o seu talkactions.xml
-
SCRIPT TOP LEVEL
Mesmo assim , teste para ver se funciona.
-
SCRIPT TOP LEVEL
Provavelmente funcionará em TFS 1.x . Não sei se funcionará em Otx , já que você pediu para TFS 1.3. Bastar olhar a script direito , verá que tem tudo.
-
[PEDIDO] Script exani hur up
<instant name="Levitate" words="exani hur" lvl="12" mana="50" prem="1" aggressive="0" exhaustion="1000" params="1" needlearn="0" event="function" value="Levitate"> <vocation id="1"/> <vocation id="2"/> <vocation id="3"/> <vocation id="4"/> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> </instant> Essa script já vem junto a source , basta adicionar na spells.xml
-
(Resolvido)Mensagem broadcast quando o player ganhar tal item
Creaturescripts/scripts local item,count = 2161,1 function onDeath(cid, corpse, deathList) local killer = deathList[1] if not isPlayer(killer) then return true end if math.random(1,100) <= 20 then doAddContainerItem(corpse.uid, item, count) doBroadcastMessage("O Player ".. getCreatureName(killer).. " ganhou o item "..getItemNameById(item).." ao matar o monstro ".. getCreatureName(cid)..". ") return true end end creaturescripts.xml <event type="death" name="drop" event="script" value="dropitem.lua"/> XML DO MONSTRO , REMOVA O DROP DO ITEM QUE SERÁ ANUNCIADO AO DROPAR O ITEM. <script> <event name="drop"/> </script>
-
SCRIPT TOP LEVEL
--[[ Script by Bruno Minervino para o Tibia King Caso for postar, colocar os créditos ]] -- [[ Adaptado TFS 1.3 by Sttorm ]] local config = { tempo = 10, --tempo em segundos mensagem = { texto = "[TOP]", --não use mais de 9 caracteres efeito = TEXTCOLOR_LIGHTBLUE --efeito para a função doSendAnimatedText }, efeito = 30, --efeito da função doSendMagicEffect globalstr = 5687 -- uma global storage qualquer q esteje vazia } --[[ Não mexa em nada abaixo ]] local topPlayer = getGlobalStorageValue(config.globalstr) > 0 and getGlobalStorageValue(config.globalstr) or 0 function onLogin(cid) local query = db.getResult("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then local pid = query:getDataString("id") local name = query:getDataString("name") if creature:getName(cid) == name then if topPlayer ~= creature:getId(cid) then topPlayer = creature:getId(cid) end setGlobalStorageValue(config.globalstr, pid) TopEffect(cid) end end creature:registerEvent(cid, "CheckTop") return true end function onAdvance(cid, skill, oldlevel, newlevel) if skill == 8 then local query = db.getResult("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then local level = tonumber(query:getDataString("level")) if level < newlevel and topPlayer ~= creature:getId(cid) then Game.broadcastMessage("O jogador " .. creature:getName(cid) .. " tornou-se o novo Top Level. Parabens!", 22) topPlayer = creature:getId(cid) doSaveServer() setGlobalStorageValue(config.globalstr, creature:getId(cid)) TopEffect(cid) end end end return true end function TopEffect(cid) if not player:isPlayer()(cid) then return true end if topPlayer == creature:getId(cid) then doSendAnimatedText(creature:getPosition(cid), config.mensagem.texto, config.mensagem.efeito) position:sendMagicEffect(creature:getPosition(cid), config.efeito) addEvent(TopEffect, config.tempo * 1000, cid) end end function getPlayerNameById(id) local query = db.getResult("SELECT `name` FROM `players` WHERE `id` = " .. db.escapeString(id)) if query:getID() ~= -1 then return query:getDataString("name") end return 0 end function getPlayerIdByName(name) local query = db.getResult("SELECT `id` FROM `players` WHERE `name` = " .. db.escapeString(name)) if query:getID() ~= -1 then return tonumber(query:getDataString("id")) end return 0 end function getPlayerID(cid) return getPlayerIdByName(creature:getName(cid)) end XML <event type="login" name="TopEffect" event="script" value="topeffect.lua"/> <event type="advance" name="CheckTop" event="script" value="topeffect.lua"/>
-
[PEDIDO] NPC Vocation 2
Criando um npc para cada promote.
-
[PEDIDO] NPC Vocation 2
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 x = 2 -- Id da vocação necessaria pra promote local y = 3 -- Id da voc de promote local sto = 4642 -- storage praq ele n faça a promotion novamente local lvl = 8 -- lvl ao resetar local health = 185 -- hp ao resetar local mana = 35 -- mana ao resetar if (msgcontains(msg, 'promotion')) then if getPlayerStorageValue(cid, sto) == -1 then if getPlayerVocation(cid) == x then local playerid = getPlayerGUID(cid) selfSay('Congratulations! You were promoted', cid) setPlayerStorageValue(cid, sto, 1) setCreatureMaxHealth(cid, health) setCreatureMaxMana(cid, mana) db.executeQuery("UPDATE `players` SET `level`="..lvl..",`experience`= 0 WHERE `players`.`id`= ".. playerid .."") else selfSay('You do not have the vocation', cid) end else selfSay('You have already been promoted', cid) end return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
(Resolvido)Mensagem broadcast quando o player ganhar tal item
Sobre a segunda script , o drop desse item seria 100% ? Pensei em fazer uma script que ao monstro morrer adicionar ao corpse o item que você quer.
-
[Pedido] Tile que pode passar com x item sem remover
function onStepIn(cid, item, position, fromPosition) local id,amount = 2160,1 if getPlayerItemCount(cid, id) >= amount then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, 25, "Você só pode passar se tiver " .. amount .. " " .. getItemNameById(id) .. ".") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end return true end
-
(Resolvido)[PEDIDO] Spell que cria items em area
local pos = { pos1 = {x=1010, y=725, z=8, stackpos=1}, pos2 = {x=1010, y=725, z=8, stackpos=1}, pos3 = {x=1010, y=725, z=8, stackpos=1}, pos4 = {x=1010, y=725, z=8, stackpos=1}, pos5 = {x=1010, y=725, z=8, stackpos=1} } local itens = { item1 = 2424, count1 = 1, item2 = 4325, count2 = 1, item3 = 2455, count3 = 1, item4 = 3244, count4 = 1, item5 = 1003, count5 = 1 } local time = 60 -- segundos para que os itens sejam removidos. function onCastSpell(cid, var) doCreateItem(itens.item1, itens.count1, pos.pos1) doCreateItem(itens.item1, itens.count2, pos.pos2) doCreateItem(itens.item1, itens.count3, pos.pos3) doCreateItem(itens.item1, itens.count4, pos.pos4) doCreateItem(itens.item1, itens.count5, pos.pos5) doBroadcastMessage("Uma grande area foi atingida pela magia de "..getCreatureName(cid)..".", 25) addEvent(remove, time * 1000) return true end function Remove() doRemoveItem(getThingFromPos(pos.pos1).uid, itens.count1) doRemoveItem(getThingFromPos(pos.pos2).uid, itens.count1) doRemoveItem(getThingFromPos(pos.pos3).uid, itens.count1) doRemoveItem(getThingFromPos(pos.pos4).uid, itens.count1) doRemoveItem(getThingFromPos(pos.pos5).uid, itens.count1) end
-
(Resolvido)[PEDIDO] Spell que cria items em area
Os itens que serão criados podem ser pegos ? Se sim , se alguém pegar a script vai retornar erro.
-
(Resolvido)[PEDIDO] Spell que cria items em area
function onCastSpell(cid, var) local pos = { pos1 = {x=1687, y=710, z=7}, pos2 = {x=1687, y=710, z=7}, pos3 = {x=1687, y=710, z=7}, pos4 = {x=1687, y=710, z=7}, pos5 = {x=1687, y=710, z=7} } local itens = { item1 = 2424, count1 = 1, item2 = 4325, count2 = 1, item3 = 2455, count3 = 1, item4 = 3244, count4 = 1, item5 = 1003, count5 = 1 } doCreateItem(itens.item1, itens.count1, pos.pos1) doCreateItem(itens.item1, itens.count2, pos.pos2) doCreateItem(itens.item1, itens.count3, pos.pos3) doCreateItem(itens.item1, itens.count4, pos.pos4) doCreateItem(itens.item1, itens.count5, pos.pos5) doBroadcastMessage("Uma grande area foi atingida pela magia de "..getCreatureName(cid)..".", 25) end Bom , como você não especificou direito o que queria , taí.
-
(Resolvido)Skill de area simples
local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 57) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -100.5, 1, -150.5, 1) arr1 = { {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, 3, 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 area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end function onCastSpell(cid, var) local position1 = {x=getCreaturePosition(cid).x+2, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z} local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 100, parameters) return TRUE end
-
[PEDINDO] BASE NTO SHIPPUDEN
Pode dar alguma informação sobre como era essa base ?