Histórico de Curtidas
-
Thiago Virtuoso recebeu reputação de helix758 em Ajuda com !frags comando no defaultlocal config = { useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')), } function onSay(cid, words, param, channel) if(not config.useFragHandler) then return false end local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = { name = result:getDataString("name"), level = result:getDataInt("level"), date = result:getDataInt("date") } if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.") if(size.day > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Last frag at " .. os.date("%d %B %Y %X", contents.day[1].date) .. " on level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").") end local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd)) end return true end testa assim, não testei aqui
-
Thiago Virtuoso recebeu reputação de helix758 em Ajuda com !frags comando no defaultlocal config = { useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')), advancedFragList = getBooleanFromString(getConfigValue('advancedFragList')) } function onSay(cid, words, param, channel) if(not config.useFragHandler) then return false end local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = { name = result:getDataString("name"), level = result:getDataInt("level"), date = result:getDataInt("date") } if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } if(config.advancedFragList) then local result = "Frags gained today: " .. size.day .. "." if(size.day > 0) then for _, content in ipairs(contents.day) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end result = result .. "\nFrags gained this week: " .. (size.day + size.week) .. "." if(size.week > 0) then for _, content in ipairs(contents.week) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end result = result .. "\nFrags gained this month: " .. (size.day + size.week + size.month) .. "." if(size.month > 0) then for _, content in ipairs(contents.month) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then result = result .. "\nYour " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, result) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.") if(size.day > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Last frag at " .. os.date("%d %B %Y %X", contents.day[1].date) .. " on level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").") end local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd)) end end return true end Tente isso
-
Thiago Virtuoso deu reputação a ciroc em [Link Quebrado]GLOBAL FULL DOWNLOAD 10.95 [TFS 1.2/FERUMBRAS QUEST/KRAILOS/NEW ARENA/CAST/NEW ITEMS/REWARD/EVENTS/CASINO] ~ AtualizaçõesÚLTIMOS AJUSTES FINALIZADOS ESTAMOS FAZENDO UPLOAD!
#IMAGEM
Zombie event 100% automatico configurado para todos os dias as 20:00 horas!
-
Thiago Virtuoso deu reputação a Absolute em [Link Quebrado]GLOBAL FULL DOWNLOAD 10.95 [TFS 1.2/FERUMBRAS QUEST/KRAILOS/NEW ARENA/CAST/NEW ITEMS/REWARD/EVENTS/CASINO] ~ AtualizaçõesKK o cara aí não cansa de ser ignorado por /all
GALERA, ENFIM UPANDO LINK JÁJÁ!
-
-
Thiago Virtuoso recebeu reputação de thokito em [Action#+#] Teleport que teleporta aleatoriamente.Seria isso?
http://www.tibiaking.com/forum/topic/25474-teleporte-random/ -
Thiago Virtuoso deu reputação a Caronte em Lib 000-ConstOlá pessoal, venho mais uma vez trazer um tutorial simples, e tentar explicar tudo claramente, esse tutorial pode ficar grande dependendo do desenrolar dele, pois é um pack de tutoriais, então vou usar spoilers para ajudar na formatação do tópico.
Nota: as informações usadas abaixo, podem ser tanto usadas com o nome, quanto com o número, e podem ser encontradas na pasta lib no arquivo 000-const
https://pastebin.com/0FfPcg7y
line4
Coordenadas:
Tutorial feito e formatado por Caronte o + gato do fórum, avaliações do perfil são bem-vindas.
Explicando:
doMoveCreature(cid, direction): Serve para mover tanto o player quanto o monstro.
Combate:
Tutorial feito e formatado por Caronte o + gato do fórum, avaliações do perfil são bem-vindas.
Parâmetros de condição:
Condições:
Slots:
Tutorial feito e formatado por Caronte o + gato do fórum, avaliações do perfil são bem-vindas.
Participação: xWhiteWolf
Const_ani e Const_me:
Tutorial feito e formatado por Caronte o + gato do fórum, avaliações do perfil são bem-vindas.
Talktypes and message types:
[title][/title]
Tutoriais concluídos por ordem de formatação (podem ser alterados assim mesmo):
Coordenadas, e suas direções. Combat (ainda há coisas a serem adicionadas). Slots. CONST_ME and CONST_ANI
Os assuntos do tópico poderão se diminuídos ou aumentados de acordo com o desenrolar do tempo,
gostaria de apoio, e não me incomodaria se alguém se propusesse fazer algum tutorial, eles serão supervisionados por mim e formatados por mim, para serem postados neste tópico.
Esse tópico demorou e vai demorar muito para fazer
cada tutorial, então eu não me importo com um obrigado e REP+,
OBS.: Um obrigado vale bem mais do que um REP+
-
Thiago Virtuoso deu reputação a xWhiteWolf em (Resolvido)Bug Creaturescripto erro acontece pq vc é um callback onKill que está registrado no login.lua pra todos os players, troca por um onDeath ou um onStatsChange que resolve (só faz as modificações necesárias e coloca no xml do monstro em vez de colocar no login.lua
-
Thiago Virtuoso deu reputação a Wise em (Resolvido)Bug CreaturescriptVocê está certo, é mais simples e correto assim ;]
@Thiago Virtuoso
local generator = { ["Castle Generator I"] = {brother = "Castle Generator II"}, ["Castle Generator II"] = {brother = "Castle Generator I"} } local generatorArea = { fromPos = {x = 1130, y = 1751, z = 7}, toPos = {x = 1134, y = 1813, z = 7} } local pos = { {x= 1050, y= 1813, z= 7}, {x= 1050, y= 1812, z= 7}, {x= 1050, y= 1811, z= 7}, {x= 1050, y= 1810, z= 7}, {x= 1050, y= 1809, z= 7}, {x= 1047, y= 1809, z= 7}, {x= 1048, y= 1809, z= 7}, {x= 1047, y= 1809, z= 7}, {x= 1050, y= 1752, z= 7}, {x= 1050, y= 1753, z= 7}, {x= 1050, y= 1754, z= 7}, {x= 1050, y= 1755, z= 7}, {x= 1047, y= 1755, z= 7}, {x= 1048, y= 1755, z= 7}, {x= 1049, y= 1755, z= 7}, {x= 1050, y= 1755, z= 7} } function onDeath(cid) if generator[getCreatureName(cid)] then firstm = generator[getCreatureName(cid)] secondm = getCreatureByName(firstm.brother) if isMonster(secondm) then if isInRange(getCreaturePosition(secondm), generatorArea.fromPos, generatorArea.toPos) then return true end else items = {9533, 9485} -- items list to remove for p = 1, #pos do for i = 1, #items do item = getTileItemById(pos[p], items[i]) if item.uid > 0 then doRemoveItem(item.uid) end end end doBroadcastMessage('Os geradores primários foram destruídos, acesso aos geradores reservas liberado!') end end return true end
Altere a tag do creature event para death e adicione a seguinte tag ao(s) arquivo(s) XML do(s) monster(s) que for(em) executar esse script ao morrer(em) (o(s) monster(s) configurado(s) na tabela), com o nome estipulado ao creature event na tag (creaturescripts.xml) do mesmo:
<script> <event name="EventName"/> </script> -
Thiago Virtuoso recebeu reputação de Elwyn em (Resolvido)[Pedido] Não usar mount com certo outfit@Edit consegui resolver depois que olhei as callbacks eu consegui criar o script.. Muito obrigado Elwyn.
Achei as sources.. e encontrei essas callbacks:
case CREATURE_EVENT_DEATH: return "onDeath"; case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath"; case CREATURE_EVENT_EXTENDED_OPCODE: return "onExtendedOpcode"; case CREATURE_EVENT_MOUNT: return "onMount"; case CREATURE_EVENT_DISMOUNT: return "onDismount"; case CREATURE_EVENT_NONE: default: break; } return ""; } -
Thiago Virtuoso deu reputação a Elwyn em (Resolvido)[Pedido] Não usar mount com certo outfitVocê tem a source, certo?
Veja em creaturescripts.cpp ou creatureevents.cpp e procure por onDeath, vai ter junto de onDeath outras callbacks. Copie todas elas aqui.
Crie o hábito de procurar como funciona tal coisa no OT, mesmo que você não entenda muito de programação. Leia o básico de Lua e C++ e procure terra firme, se não você vai ficar perdido (por mais de 2 semanas) sempre que tiver uma dúvida.
-
Thiago Virtuoso recebeu reputação de crisin38012 em [Action#+#] Teleport que teleporta aleatoriamente.Seria isso?
http://www.tibiaking.com/forum/topic/25474-teleporte-random/ -
Thiago Virtuoso recebeu reputação de Liongm em [Action#+#] Teleport que teleporta aleatoriamente.Seria isso?
http://www.tibiaking.com/forum/topic/25474-teleporte-random/ -
Thiago Virtuoso deu reputação a crisin38012 em (Resolvido)[PEDIDO] Spell de buff em areaAssim que voce queria ?
Aqui o tempo q vai durar aqui no caso esta 15 minutos
local tempo = 15 * 60 * 1000 local tempo = 15 * 60 * 1000 local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) local condition = createConditionObject(CONDITION_ATTRIBUTES) local condition = createConditionObject(CONDITION_REGENERATION) setConditionParam(condition, CONDITION_PARAM_SUBID, 100) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo) setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN,300) setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS,2000) setConditionParam(condition, CONDITION_PARAM_MANAGAIN,300) setConditionParam(condition, CONDITION_PARAM_MANATICKS,2000) setCombatCondition(combat, condition) local area = createCombatArea(AREA_CIRCLE3X3) setCombatArea(combat, area) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
-
Thiago Virtuoso deu reputação a crisin38012 em NPC NATALAssim que voce quer ?
Script do presente vá em data/actions/scripts/crie um arquivo com nome presente.lua e cole isso dentro
function onUse(cid, item, fromPosition, itemEx, toPosition) local rand = math.random(0, 24) local lotteryid = 1990 if item.itemid == lotteryid then if rand == 0 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2160,1) doRemoveItem(cid, item.uid, 1) elseif rand == 1 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2506,1) doRemoveItem(cid, item.uid, 1) elseif rand == 2 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2469,1) doRemoveItem(cid, item.uid, 1) elseif rand == 3 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2492,1) doRemoveItem(cid, item.uid, 1) elseif rand == 4 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 5958,1) doRemoveItem(cid, item.uid, 1) elseif rand == 5 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2472,1) doRemoveItem(cid, item.uid, 1) elseif rand == 6 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2470,1) doRemoveItem(cid, item.uid, 1) elseif rand == 7 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2160,1) doRemoveItem(cid, item.uid, 1) elseif rand == 8 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2160,1) doRemoveItem(cid, item.uid, 1) elseif rand == 9 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2160,1) doRemoveItem(cid, item.uid, 1) elseif rand == 10 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2160,1) doRemoveItem(cid, item.uid, 1) elseif rand == 11 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2160,1) doRemoveItem(cid, item.uid, 1) elseif rand == 12 then doCreatureSay(cid, "Present!", TALKTYPE_ORANGE_1) doPlayerAddItem(cid, 2160,1) doRemoveItem(cid, item.uid, 1) elseif rand == 13 then end end return TRUE end Aqui vc coloca o id ea quantidade do item q vc quer q ganhe
doPlayerAddItem(cid, 2160,1) Aqui o id do presente mais n ira presisar pq ai ja ta
local lotteryid = 1990 Add isso no actions.xml
<action itemid="1990" event="script" value="present.lua"/> Agora o NPC vá em data/npcs/crie um arquivo chamado Papai noel.xml e cole isso dentro
<?xml version="1.0" encoding="UTF-8"?> <npc name="Papai Noel" script="data/npc/scripts/natal.lua" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="69" head="0" body="0" legs="0" feet="0" corpse="2212"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. diga {presente} para receber seu presente." /> </parameters> </npc> agora em npcs/scripts/crie um arquivo chamado natal.lua e cole isso dentro
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local qua = 1 -- quantos item que vai precisa pra troca local troca = 6512 -------------- id do item que vai ser trocado local id = 1990 --- id do item que vai ganhar dps da troca 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 msgcontains(msg, 'presente') then if doPlayerRemoveItem(cid,troca,qua) then doPlayerAddItem(cid,id,1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "aqui esta") -- edita aqui else doPlayerSendCancel(cid,"Você não possui o item santa doll.") -- edita aqui end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -
Thiago Virtuoso deu reputação a xWhiteWolf em QuakeVou deixar aqui uma spell que eu fiz pra brincar com funções da New Library, se você quiser adicionar essa spell no seu server você deve primeiro instalar a New Library: http://www.tibiaking.com/forum/topic/46015-new-library-v-10/
Testada em 8.54
A magia que vou apresentar hoje foi baseada nos dobradores de terra do desenho Avatar. Você controla uma vibração na terra que anda na direção que você está olhando e ao atingir um oponente roda ele em 540º.
Aqui tem um pequeno gif do funcionamento da spell:
Bom, sem mais delongas vamos ao script:
local config = { jumps = 15, walktime = 500 } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -15, 5, 5, 1.8, 3, -20, -40) function onCastSpell(cid, var) function moveice(cid, pos, counter) local counter = counter or 0 if (counter < config.jumps) then if (isCreature(cid)) then local pos = pos or getCreaturePosition(cid) local dir = getCreatureLookDirection(cid) local newPosition = getPosByDir(pos, dir) if ((getTopCreature(newPosition).uid == 0) and doTileQueryAdd(cid, newPosition) ~= 1) then return false end doCombat(cid, combat, { pos = newPosition, type = 2 }) doSendMagicEffect(newPosition, 34) if getTopCreature(newPosition).uid ~= 0 then doSendMagicEffect(newPosition, 54) spinRotate(getTopCreature(newPosition).uid, 2.5, 100) return false end addEvent(moveice, config.walktime, cid, newPosition, counter + 1) end end end moveice(cid) return true end e em spells.xml:
<instant name="TK" words="toph sense" lvl="8" mana="35" prem="0" exhaustion="1500" needlearn="0" event="script" value="especiais/quake.lua"> </instant> Espero que tenham gostado e façam bom proveito. Abraços!
-
Thiago Virtuoso deu reputação a xWhiteWolf em Chain LightningHoje vim trazer à pedidos uma spell do League of Legends que é a chain Lightning do personagem Ryze:
Aqui tem um vídeo explicativo:
Teoricamente está idêntico porém não tive a chance de testar então vou postar aqui e esperar que vocês me falem sobre os erros que podem dar (apesar de eu achar que não vai dar nenhum)
Crie um arquivo em data\spells\scripts chamado chainlight.lua e coloque isso dentro dele:
E agora no spells.xml:
<instant name="TK" words="chainlight" lvl="8" manapercent="8" maglv="15" prem="0" exhaustion="1500" range="4" needtarget="1" needlearn="0" event="script" value="especiais/chainlight.lua"> </instant> Qualquer duvida postem aí, e se gostou da spell é só clicar em "gostei". Vou dormir agora que faz umas 20 horas to acordado scriptando pro tk auheuha flw pra vcs
EDIT: Troquei o arquivo, a outra versão estava bugada então refiz do 0 e agora está funcionando.
EDIT2: Se você usa a New Lib ela já possui uma função pra essa spell então apenas use esse arquivo aqui:
-
Thiago Virtuoso deu reputação a xWhiteWolf em (Resolvido)[Ajuda] CreatureScriptsdá uma olhada no aegis of dimension que tem no meu perfil, é bem parecido.. Se tiver determinado storage e morrer é teleportado e tem a vida enchida, olhar lá vai te dar uma idéia de como fazer.
-
Thiago Virtuoso deu reputação a buddha em Ajuda GlobalEvent Griffinclaw Flower<globalevent name="bloomingGriffinclaw" interval="2592000000" script="blooming griffinclaw/bloomingGriffinclaw.lua"/>
Em data/globalevents/globalevents.xml. Isso fará com que ele execute a cada 30 dias, caso deixe seu server ligado direto durante esses trinta dias(jeito simples). Caso queira desligar o seu server, então precisaria usar os.time, o que não é minha especialidade. Mals.
-
Thiago Virtuoso deu reputação a dobclan em Crack tibia 10.51?PandoriumX Tibia hacks and bots
Se Cadastrar e poder baixar Crack IBot,Xenobot,RedBot Pro, na versão do tibia
-
Thiago Virtuoso deu reputação a xWhiteWolf em [PEDIDO] Item dar efeito de gelo!velho, no meu OT funcionou perfeitamente.. eu ja chequei o script mil vezes e não achei nada que pudesse impedir de rodar na 8.4 e na 8.6.
Pra falar a verdade rodou tão bem que eu até fiz umas alterações no script pra caso vc esteja usando o full glacier set ela adicione dano de congelamento ao paralisar
--[[Script made 100% by Night Wolf and Nogard do not remove the fucking credits or I may kill you and practice necrofily with your filthy body]] --condição que irá adicionar local gelocondition = createConditionObject(CONDITION_PARALYZE) setConditionParam(gelocondition, CONDITION_PARAM_TICKS, 10000) setConditionFormula(gelocondition, -0.9, 0, -0.9, 0) local frigo = createConditionObject(CONDITION_FREEZING) setConditionParam(frigo, CONDITION_PARAM_DELAYED, 1) addDamageCondition(frigo, 5, 2000, -300) addDamageCondition(frigo, 5, 2000, -200) addDamageCondition(frigo, 5, 2000, -100) ------- local config = { itemid = 7897, --id do item que deverá ser equipado para ativar o gelo place = 4, --posição que o item deve estar para funcionar, cheque na tabela abaixo percent = 5, --se vc quiser 20%, coloque 5 pois 1/5 = 0,2 (20%) valorvida = 300 --quanto deve ser o valor minimo de vida a perder para executar o script } local head = { itemid = 7902, place = 1 } local legs = { itemid = 7896, place = 7 } local boots = { itemid = 7892, place = 8 } local necklace = { itemid = 7888, place = 2 } --[[ Tabela de places possíveis CONST_SLOT_HEAD (1) = helmet CONST_SLOT_NECKLACE (2) = necklace slot (amulet of loss etc.) CONST_SLOT_BACKPACK (3) = backpack, bag CONST_SLOT_ARMOR (4) = armor CONST_SLOT_LEFT (5) = left hand (its really hand placed >> (right page on screen)) CONST_SLOT_RIGHT (6) = right hand (its really hand placed << (left page on screen)) CONST_SLOT_LEGS (7) = legs CONST_SLOT_FEET (8) = boots CONST_SLOT_RING (9) = ring slot CONST_SLOT_AMMO (10) = ammo slot (arrows etc.)]] ----------------------------------------------- function canEffect(pos, pz, proj) -- Night Wolf based on Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTilePzInfo(pos) and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function onStatsChange(cid, attacker, type, combat, value) if (getPlayerSlotItem(cid, config.place).itemid == config.itemid) then if type == STATSCHANGE_HEALTHLOSS and value >= config.valorvida then if math.random (1,config.percent) == 1 then local pos = getPlayerPosition (cid) local effectPositions = { {x = pos.x, y = pos.y - 2, z = pos.z}, {x = pos.x, y = pos.y + 2, z = pos.z}, {x = pos.x - 2, y = pos.y, z = pos.z}, {x = pos.x + 2, y = pos.y, z = pos.z}, {x = pos.x - 2, y = pos.y - 1, z = pos.z}, {x = pos.x + 2, y = pos.y - 1, z = pos.z}, {x = pos.x + 2, y = pos.y + 1, z = pos.z}, {x = pos.x - 2, y = pos.y + 1, z = pos.z}, {x = pos.x - 1, y = pos.y - 2, z = pos.z}, {x = pos.x + 1, y = pos.y - 2, z = pos.z}, {x = pos.x + 1, y = pos.y + 2, z = pos.z}, {x = pos.x - 1, y = pos.y + 2, z = pos.z} } local conditionPositions = { {x = pos.x, y = pos.y - 2, z = pos.z}, {x = pos.x, y = pos.y + 2, z = pos.z}, {x = pos.x - 2, y = pos.y, z = pos.z}, {x = pos.x + 2, y = pos.y, z = pos.z}, {x = pos.x - 2, y = pos.y - 1, z = pos.z}, {x = pos.x + 2, y = pos.y - 1, z = pos.z}, {x = pos.x + 2, y = pos.y + 1, z = pos.z}, {x = pos.x - 2, y = pos.y + 1, z = pos.z}, {x = pos.x - 1, y = pos.y - 2, z = pos.z}, {x = pos.x + 1, y = pos.y - 2, z = pos.z}, {x = pos.x + 1, y = pos.y + 2, z = pos.z}, ---- {x = pos.x, y = pos.y - 1, z = pos.z}, {x = pos.x, y = pos.y + 1, z = pos.z}, {x = pos.x - 1, y = pos.y, z = pos.z}, {x = pos.x + 1, y = pos.y, z = pos.z}, {x = pos.x - 1, y = pos.y + 1, z = pos.z}, {x = pos.x - 1, y = pos.y - 1, z = pos.z}, {x = pos.x + 1, y = pos.y - 1, z = pos.z}, {x = pos.x + 1, y = pos.y + 1, z = pos.z}, ------ {x = pos.x - 1, y = pos.y + 2, z = pos.z} } if isCreature(cid) == TRUE then for _, cPos in ipairs(conditionPositions) do local mob = getTopCreature(cPos).uid if canEffect (cPos) and mob ~= 0 and isMonster(mob) then doAddCondition(mob, gelocondition) if (getPlayerSlotItem(cid, head.place).itemid == head.itemid) and (getPlayerSlotItem(cid, legs.place).itemid == legs.itemid) and (getPlayerSlotItem(cid, boots.place).itemid == boots.itemid) and (getPlayerSlotItem(cid, necklace.place).itemid == necklace.itemid) then doAddCondition(mob, frigo) end end if (getPlayerSlotItem(cid, head.place).itemid == head.itemid) and (getPlayerSlotItem(cid, legs.place).itemid == legs.itemid) and (getPlayerSlotItem(cid, boots.place).itemid == boots.itemid) and (getPlayerSlotItem(cid, necklace.place).itemid == necklace.itemid) then if canEffect (cPos) then doSendMagicEffect(cPos, 43) end end end for _, ePos in ipairs(effectPositions) do if canEffect(ePos) then doSendMagicEffect(ePos, 41) end end else end else end return true else end return true end return true end mas mesmo assim é estranho, se não tá dando erro no console era pra funcionar (pelo menos se vc colocou tudo certinho no creaturescripts.xml e no login.lua)
-
Thiago Virtuoso deu reputação a Garou em Paralyze SwordEste é um script criado pela Script Factory e pedido pelo membro underewarr. Se você tem um pedido a fazer ou uma ideia de script, não deixe de visitar: Script Factory
Crie um arquivo chamado paralyze sword.lua em data/weapons/scripts/ e adicione o conteúdo abaixo:
-- Paralyze Weapon -- Script Factory @ TibiaKing local duration = 3 * 1000 local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, duration) setConditionFormula(condition, -0.9, 0, -0.9, 0) setCombatCondition(combat, condition) function onUseWeapon(cid, var) return doCombat(cid, combat, var) end Em weapons.xml, cole essa linha: <melee id="id_da_arma" level="100" unproperly="1" event="script" value="paralyze sword.lua"/>
Se houver algum problema relacionado a duplicated item id, você precisará deletar a linha que estiver usando o id atribuido ao script.
-
Thiago Virtuoso deu reputação a MaXwEllDeN em (Resolvido)Ajuda Spelllocal combat = createCombatObject() local meteor = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 41) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -10.3, -47, -10.2, 2) local stun = createConditionObject(CONDITION_PARALYZE) setConditionParam(stun, CONDITION_PARAM_TICKS, 5000) setConditionFormula(stun, -0.8, 0, -0.9, 0) setCombatCondition(meteor, stun) local combat2 = createCombatObject() local meteor2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 43) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -7.3, -47, -6.2, 2) local arr = { {0, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 1, 3, 1, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 0, 0} } local arr2 = { {0, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 1, 3, 1, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 0, 0} } local area = createCombatArea(arr) local area2 = createCombatArea(arr2) setCombatArea(combat, area) setCombatArea(combat2, area2) local function meteorCast(p) doCombat(p.cid, p.combat, positionToVariant(p.pos)) end local function meteorCast2(p) doCombat(p.cid, p.combat2, positionToVariant(p.pos)) end local function stunEffect(cid) doSendMagicEffect(getThingPos(cid), CONST_ME_STUN) end function onTargetTile(cid, pos) if (math.random(0, 0) == 0) then local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}) if (isInArray(water, ground.itemid) == TRUE) then local newpos = {x = pos.x + 7, y = pos.y - 6, z = pos.z} doSendDistanceShoot(newpos, pos, CONST_ANI_ICE) addEvent(meteorCast, 200, {cid = cid, pos = pos, combat = meteor_water}) else local newpos = {x = pos.x + 7, y = pos.y - 6, z = pos.z} doSendDistanceShoot(newpos, pos, CONST_ANI_ICE) addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor}) end end end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onTargetTile(cid, pos) if (math.random(0, 0) == 0) then local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}) if (isInArray(water, ground.itemid) == TRUE) then local newpos = {x = pos.x + 7, y = pos.y - 6, z = pos.z} doSendDistanceShoot(newpos, pos, CONST_ANI_ICE) addEvent(meteorCast2, 200, {cid = cid, pos = pos, combat2 = meteor_water2}) else local newpos = {x = pos.x + 7, y = pos.y - 6, z = pos.z} doSendDistanceShoot(newpos, pos, CONST_ANI_ICE) addEvent(meteorCast2, 200, {cid = cid,pos = pos, combat2 = meteor2}) end end end setCombatCallback(combat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile") local outfits = { [0] = {lookType = 144, lookAddons = 3}, [1] = {lookType = 148, lookAddons = 3} } function onCastSpell(cid, var) local conf = outfits[getPlayerSex(cid)] local outf = getCreatureOutfit(cid) if outf.lookType == conf.lookType and outf.lookAddons == conf.lookAddons then doCombat(cid, combat, var) else doCombat(cid, combat2, var) end return true end