Tudo que Storm postou
-
Não ataca mesma classe
Agora é só utilizar a script de não poder targetar lá em cima ;
-
Não ataca mesma classe
-- Registre na XML e no login.lua :: -- registerCreatureEvent(cid, "Class") -- <event type="statschange" name="Class" event="script" value="Class.lua"/> vocation = { [1] = {5, 2}, -- vocação 1 não pode atacar a vocação 5 e 2 = Ids das vocations [2] = {4, 1}, -- vocação 2 não pode atacar a vocação 4 e 1 = Ids das vocations } function onStatsChange(cid, attacker, type, combat, value) if value >= 1 and (type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS)) and isPlayer(attacker) then if isInArray(vocation[getPlayerVocation(cid)], getPlayerVocation(attacker)) then doPlayerSendTextMessage(attacker, 23, "Você não pode atacar mesma classe") doSendMagicEffect(getCreaturePosition(attacker), 2) return false end end return true end
-
[Erro] Spell aparece com erro
local toPos = {x = 1517, y = 756, z = 7} --pos para onde o player vai ser teleportado local newPos = {x = 1517, y = 758, z = 7} --pos para inimigo local time = 30 local function teleport(cid, pos) if isCreature(cid) then doTeleportThing(cid, getClosestFreeTile(cid, pos)) doSendMagicEffect(getPlayerPosition(cid), 215) end end function onCastSpell(cid, var) if exhaustion.check(cid, 23083) == false then exhaustion.set(cid, 23083, 120) else doPlayerSendCancel(cid, "A Habilidade esta em tempo de recarga espere " ..exhaustion.get(cid, 23083).." segundos.") return false end local target = getCreatureTarget(cid) if not isCreature(target) then return doPlayerSendTextMessage(cid, 27, "Ataque um jogador para utilizar essa habilidade.") end local posTarget = getPlayerPosition(target) doTeleportThing(cid, toPos, false) teleport(target, newPos) addEvent(teleport, time*1000, cid, posTarget) addEvent(teleport, time*1000, target, posTarget) doSendMagicEffect(posTarget, 215) return true end
-
Não ataca mesma classe
Sim , lembrando que você tem que jogar aquela tabela da script la de cima nessa e mudar a tag na XML , além de registrar no login.lua
-
Não ataca mesma classe
function onStatsChange(cid, attacker, type, combat, value) if value >= 1 and (type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS)) and isPlayer(attacker) then if isInArray(vocation[getPlayerVocation(cid)], getPlayerVocation(attacker)) then doPlayerSendTextMessage(attacker, 23, "Você não pode atacar mesma classe") doSendMagicEffect(getCreaturePosition(attacker), 2) return false end end return true end
-
[Pedido] Prender player no chão por x tempo
function onCastSpell(cid, var) local target = getCreatureTarget(cid) local waittime = 60 -- tempo para poder travar o player dnv ( em segundos ) local storage = 2521 local time = 5 -- segundos que o target ficará preso local effect = 5 if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Você tem que espera " .. exhaustion.get(cid, storage) .. " segundos.") return false end exhaustion.set(cid, storage, waittime) doCreatureSetNoMove(target, true) doSendMagicEffect(getCreaturePosition(target), effect) addEvent(doSendMagicEffect, time * 1000, getCreaturePosition(target), effect) addEvent(doCreatureSetNoMove, time * 1001, target, false) return true end
-
[Pedido] Adicionar dano e tempo em spell
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1) function onCastSpell(cid, var) local jogadorpos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local monsterpos = getCreaturePosition(target) local waittime = 60 -- Exaust local storage = 2521 if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Você tem que espera " .. exhaustion.get(cid, storage) .. " segundos.") return false end if target == isMonster or isCreature then doTeleportThing(cid,monsterpos) doSendMagicEffect(jogadorpos, 10) exhaustion.set(cid, storage, waittime) return doCombat(cid, combat, var) else doPlayerSendTextMessage(cid, 20, 'Precisa Selecionar um Alvo') end end
-
[Pedido] Prender player no chão por x tempo
function onCastSpell(cid, var) local target = getCreatureTarget(cid) local waittime = 60 -- tempo para poder travar o player dnv ( em segundos ) local storage = 2521 local time = 5 -- segundos que o target ficará preso if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Você tem que espera " .. exhaustion.get(cid, storage) .. " segundos.") return false end exhaustion.set(cid, storage, waittime) doCreatureSetNoMove(target, true) addEvent(doCreatureSetNoMove, time * 1000, target, false) return true end
-
(Resolvido)[PEDIDO] Spell regeneração
Armei essa gambiarra aqui : local function LoopEff(time2, time3, uid, effect, position, health) if isCreature(uid) then for i= 1, #effect do local position = {x = getCreaturePosition(uid).x, y = getCreaturePosition(uid).y, z = getCreaturePosition(uid).z } doSendMagicEffect(position, effect[i]) doCreatureAddHealth(uid, health) end end end function doLoopEffect(uid, effect, time, position, health) local time2 = 0 while (time2 ~= (time*1000)) do addEvent(LoopEff, time2, time2, time3, uid, effect, position) time2 = time2 + 300 end return true end function onCastSpell(cid, var) local effect = 200 -- Efeito local time = 30 -- em segundos local health = 200 -- Quanto ganhará de vida em aproximadamente alguns segundos quebrados if isPlayer(cid) then doLoopEffect(cid, effect, time, getCreaturePosition(cid), health) doCreatureSetNoMove(cid, true) addEvent(doCreatureSetNoMove, time * 1000, cid, false) return true end return true end
-
(Resolvido)Monstro Que Nao Anda
speed="0" È só colocar a speed igual a zero.
-
(Resolvido)NPC que conversa por Vocation
<?xml version="1.0" encoding="UTF-8"?> <npc name="Helmut" floorchange="0" walkinterval="7500"> <health now="150" max="150"/> <look type="133" head="20" body="120" legs="75" feet="13"/> <interaction range="3" idletime="30"> <interact keywords="hi" param="sorcerer" focus="1"> <keywords>hello</keywords> <response text="Oh, be welcome |NAME|."/> </interact> <interact keywords="hi" focus="1"> <keywords>hello</keywords> <response text="Back from here."/> </interact> </interaction> </npc>
-
Preciso de uma Script que o Summon Teleporter
- [TFS 0.X] Players doando itens atráves de um comando
Eaí galera , como vão ? A script de hoje consiste um sistema onde um player envia um item pra outro por uma TALKACTION ; não requer configurações dentro da script , apenas na XML. A tag na XML está disponivel na própria script e me desculpem pelos erros de inglês . -- Os parâmentros do comando são : !transfer NOME DO PLAYER, NOME DO ITEM , QUANTIDADE DO ITEM A SER DOADA -- <talkaction words="!transfer;/transfer" event="script" value="transfer.lua"/> function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") local a = getPlayerByNameWildcard(t[1]) if isNumber(t[2]) or not isNumber(t[3]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Incorrect command parameters") return true end if (not getItemIdByName(t[2])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Put the item name correctly in the second parameter") return true end if (not t[1]) or (not t[2]) or (not t[3]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Incorrect command parameters") return true end if not a then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found") return true end if not doPlayerRemoveItem(cid, getItemIdByName(t[2]), t[3]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You dont have a item") return true end doPlayerRemoveItem(cid, getItemIdByName(t[2]), t[3]) doPlayerAddItem(a, getItemIdByName(t[2]), t[3]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You donated ".. t[3] .. " ".. getItemInfo(getItemIdByName(t[2])).name .. " to player ".. getCreatureName(a) .." ") doPlayerSendTextMessage(a, MESSAGE_STATUS_WARNING, "You receive ".. t[3] .. " ".. getItemInfo(getItemIdByName(t[2])).name .. " of player ".. getCreatureName(cid) .."") return true end- [Pedido] Adicionar efeito numa spell
@adolfbig Mecha nessas linhas ; for i=1, #posAll do if isWalkable(posAll[i]) then local efeito = 3 doCreateItem(item_id, 1, posAll[i]) doSendMagicEffect(posAll[i], efeito) end end- [Pedido] Adicionar efeito numa spell
Mecha nas ultimas linhas ; function removeItem(posAll) local effect = 3 for i=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[i].x,y=posAll[i].y,z=posAll[i].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == item_id then doRemoveItem(removeTile.uid) doSendMagicEffect(pos_stack, effect) end end end end- (Resolvido)Habilidade que Causa danos continuo
local condition = createConditionObject(CONDITION_X) -- FIRE, POISON, etc.. setConditionParam(condition, CONDITION_PARAM_DELAYED, 1) addDamageCondition(condition, 5, 3000, -45) -- vezes, intervalo, dano setCombatCondition(combat, condition)- [Criar Bau 10.90]
Se for de vários itens de uma tabela , tem que usar essa script aqui ; @mikaelkelvin local storage = 34326 local a = { [1] = {2160, 30}, -- [Número na sequencia] = {ITEMID , COUNT} // não esqueça da virgula [2] = {2150, 4}, [3] = {2140, 1}, } function onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:getStorageValue(storage) == -1 then for var = 1, #a do player:addItem(a[var][1], a[var][2]) end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a item") player:setStorageValue(storage, 1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.") end return true end- [Criar Bau 10.90]
local item, count = 2160, 30 -- Item id // Count local storage = 34326 function onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:getStorageValue(storage) == -1 then player:addItem(item, count) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a item") player:setStorageValue(storage, 1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The chest is empty.") end return true end- [Criar] Client
https://tibiaking.com/forums/topic/33691-old-crie-seu-client-próprio-860-10xx/- (Resolvido)Transformando essa magia sendo utilizavel para monstros
local tempo = 60 -- tempo em segundos. local ml = 40 -- quantos ira aumentar o skill de ML local skillfist = 0 -- quantos ira aumentar o skill de Fist local skillsword = 15 -- quantos ira aumentar o skill de Sword local skillaxe = 0 -- quantos ira aumentar o skill de Axe local skillclub = 15 -- quantos ira aumentar o skill de Club local skilldistance = 15 -- quantos ira aumentar o skill de Distance local skillshield = 0 -- quantos ira aumentar o skill de Shield local health = 25 -- A cada 1 segundo quantos aumentar de vida local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield) setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_SPEED, 300) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_REGENERATION) setConditionParam(condition, CONDITION_PARAM_SUBID, 1) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health) setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000) setCombatCondition(combat, condition) function onCastSpell(cid, var) if getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then doCombat(cid, combat, var) repeatEff(cid, 185, 120) doCreatureSay(cid, "Perfect Susanoo", TALKTYPE_MONSTER) else end end- Formação de Equipe NTO
- (Resolvido)Help Como usar mais Effect
- spell que rouba vida
Na XML da spell ; coloque needtarget="1"- (Resolvido)[PEDIDO] Script Transporte
function onUse(cid, item, fromPosition, itemEx, toPosition) local tp = {x = 100, y = 200, z = 7} -- Posição onde será teleportado if os.date("%X") >= "06:00:00" then if os.date("%d") == "10" then doTeleportThing(cid, tp) doPlayerSendTextMessage(cid, 23, "Teleported!!!") doSendMagicEffect(getCreaturePosition(cid), 3) else doPlayerSendTextMessage(cid, 23, "Volte no dia 10") doSendMagicEffect(getCreaturePosition(cid), 3) end else doPlayerSendTextMessage(cid, 23, "Voce nao pode usar a alavanca antes do SS") doSendMagicEffect(getCreaturePosition(cid), 3) end return true end- (Resolvido)[Help] Upgrade System
Não entendi muito bem ... você quer remover o broadcast ? se sim , remova a linha doBroadcastMessage(self.message.broadcast:format(getCreatureName(uid), self.item.name, (self.item.level + 1))) - [TFS 0.X] Players doando itens atráves de um comando
Informação Importante
Confirmação de Termo