
Tudo que Vodkart postou
-
(Resolvido)Boss só pode receber dando quando seus summons forem mortos
function onStatsChange(cid, attacker, type, combat, value) local monster = "Rabbit" -- nome do boss if not isMonster(cid) then return true end if type == STATSCHANGE_HEALTHLOSS and getCreatureName(cid):lower() == monster:lower() then if #getCreatureSummons(cid) ~= 0 then return false end end return true end Tag <event type="statschange" name="NoDamageBoss" event="script" value="nome do seu script.lua"/> Na XML do monstro adc: <script> <event name="NoDamageBoss"/> </script>
-
[8.6] Task System 4.0! (Task system + Daily Task System)
@bpm91 depois me passa o seu mods e npc por pm que eu vou fazer uma alteração pra você!!
-
(Resolvido)Nao sei aonde ta erro
function getPlayerReset(cid) local check = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..getPlayerGUID(cid)) return check:getDataInt("reset") <= 0 and 0 or check:getDataInt("reset") end local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY) function onGetFormulaValues(cid, level, maglevel) min = -(level*2.6)*(getResets(cid)+ 5 ) max = -(level*2.6)*(getResets(cid)+ 5 ) return min, max end local arr = { {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, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 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} } local area = createCombatArea(arr) setCombatArea(combat, area) setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local resetmin = 1 function onCastSpell(cid, var) if getPlayerReset(cid) >= resetmin then doCombat(cid, combat, var) else doPlayerSendCancel(cid, "DESCULPA, VOCE NAO TEM ".. resetmin .." RESET PARA USAR ESSA SPELL.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end return true end
-
Dota liberando o nexus depois de matar so uma torre
@Gabrieldsadaxas estranho, esta td certo, vou colocar um timer de 2 segundos, pode estar executando 2x seguidos. tenta assim: function onPrepareDeath(cid, deathList) if isPlayer(cid) and getPlayerStorageValue(cid, dota_config.storages[1]) > 0 then local strings = {""} local j, position, corpse = 1, 1, 0 for _, pid in ipairs(deathList) do if isCreature(pid) == true then strings[position] = j == 1 and "" or strings[position] .. ", " strings[position] = strings[position] .. getCreatureName(pid) .. "" j = j + 1 else strings[position] = j == 1 and "" or strings[position] .. ", " strings[position] = strings[position] .."a field item" j = j + 1 end end for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end desc = "You recognize " desc = desc .. "" .. getCreatureName(cid) .. ". He was killed by " .. str end if(getPlayerSex(cid) == 1) then corpse = doCreateItem(3058, getCreaturePosition(cid)) else corpse = doCreateItem(3065, getCreaturePosition(cid)) end doItemSetAttribute(corpse, "description", desc) doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, dota_config.storages[6], 1) noMoveAfterDeath(cid, dota_config.DeathDelay) setPlayerStorageValue(cid, 878756, 0) -- special kill doRemoveConditions(cid, false) doAddCondition(cid, getPlayerStorageValue(cid, dota_config.storages[3]) > 0 and conditionDotaBlue or conditionDotaRed) if isPlayer(deathList[1]) then dotaBroadSpecialKills(deathList[1], cid) end end return true end function onKill(cid, target, lastHit) local exausted = 2 if isPlayer(cid) and isMonster(target) then local var, jungle = DotaTowers_Lib[getCreatureName(target)],Monsters_Dota[getCreatureName(target)] if var then -- towers and nexus if var.winners == nil then local storage = isInArray({"Mid Tower Blue","Bot Tower Blue","Top Tower Blue"}, getCreatureName(target)) and dota_config.storages[5] or dota_config.storages[6] if getGlobalStorageValue((storage+1000)) - os.time() <= 0 then setGlobalStorageValue(storage, getGlobalStorageValue(storage)+1) if getGlobalStorageValue(storage) <= 2 then broadcastMessage("[Evento Dota] A "..getCreatureName(target).." Foi Destruida! ["..getGlobalStorageValue(storage).."/3]", MESSAGE_EVENT_ADVANCE) elseif getGlobalStorageValue(storage) == 3 then local ret = isInArray({"Mid Tower Blue","Bot Tower Blue","Top Tower Blue"}, getCreatureName(target)) and "Blue Nexus" or "Red Nexus" broadcastMessage("[Evento Dota] A última Torre "..getCreatureName(target).." Foi Destruido! O "..ret.." Surgiu!", MESSAGE_EVENT_ADVANCE) createNexus(ret) end setGlobalStorageValue((storage+1000), os.time()+exausted) end else broadcastMessage("[Evento Dota] "..getCreatureName(target).." Foi Destruido! Time "..(getCreatureName(target) == "Blue Nexus" and "Vermelho" or "Azul").." foi o Vencedor desta Rodada do Evento Dota!", MESSAGE_EVENT_ADVANCE) getDotaWinners(var.winners) OpenorClosedPortoes() RemoveAllTowers() removeDotaConditions() ZerarStorDota() end end end return true end function onLogin(cid) registerCreatureEvent(cid, "DotaAttack") registerCreatureEvent(cid, "KillGerador") registerCreatureEvent(cid, "DeathDota") registerCreatureEvent(cid, "TowerStats") if getPlayerStorageValue(cid, dota_config.storages[1]) > 0 or getPlayerStorageValue(cid, dota_config.storages[4]) > 0 or getPlayerStorageValue(cid, dota_config.storages[4]) > 0 then doPlayerSetTown(cid, 1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end setPlayerStorageValue(cid, dota_config.storages[3], 0) setPlayerStorageValue(cid, dota_config.storages[4], 0) setPlayerStorageValue(cid, dota_config.storages[1], 0) setPlayerStorageValue(cid, dota_config.storages[6], 0) return true end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(attacker) and isMonster(cid) then local tower = DotaTowers_Lib[getCreatureName(cid)] if type == STATSCHANGE_HEALTHLOSS and tower then local TowerPercent = 100/(getCreatureMaxHealth(cid)/getCreatureHealth(cid)) if TowerPercent <= 75 and TowerPercent >= 74 then sendMsgPlayersDota(getCreatureName(cid) .. " está com 75% de Vida, Corra para proteger!!", MESSAGE_STATUS_CONSOLE_RED) elseif TowerPercent <= 50 and TowerPercent >= 49 then sendMsgPlayersDota(getCreatureName(cid) .. " está com 50% de Vida!! Corra para proteger!!", MESSAGE_STATUS_CONSOLE_RED) elseif TowerPercent <= 25 and TowerPercent >= 24 then sendMsgPlayersDota(getCreatureName(cid) .. " está com 25% de Vida!! Corra para proteger!!", MESSAGE_STATUS_CONSOLE_RED) end end end return true end function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) and getPlayerStorageValue(cid, dota_config.storages[3]) > 0 and getPlayerStorageValue(target, dota_config.storages[3]) > 0 or getPlayerStorageValue(cid, dota_config.storages[4]) > 0 and getPlayerStorageValue(target, dota_config.storages[4]) > 0 or getPlayerStorageValue(cid, dota_config.storages[6]) > 0 or getPlayerStorageValue(target, dota_config.storages[6]) > 0 then doPlayerSendCancel(cid, "You may not attack this player.") return false elseif isPlayer(cid) and isMonster(target) and getPlayerStorageValue(cid, dota_config.storages[3]) > 0 and isInArray({"Mid Tower Blue","Bot Tower Blue","Top Tower Blue","Blue Nexus"}, getCreatureName(target)) or getPlayerStorageValue(cid, dota_config.storages[4]) > 0 and isInArray({"Top Tower Red","Bot Tower Red","Mid Tower Red","Red Nexus"}, getCreatureName(target)) then doPlayerSendCancel(cid, "You may not attack this.") return false end return true end function onDeath(cid, corpse, deathList) if isPlayer(cid) or not Monsters_Dota[getCreatureName(cid)] then return true end local killer, jungle = deathList[1], Monsters_Dota[getCreatureName(cid)] if isPlayer(killer) and jungle then local conditions = getCreatureName(cid) == "Spider Of Jungle" and {condition_ps,dota_speed} or {condition_kd, dota_speed} local storage = getPlayerStorageValue(killer, dota_config.storages[3]) > 0 and dota_config.storages[3] or dota_config.storages[4] for _, pid in ipairs(deathList) do if isPlayer(pid) then doRemoveConditions(pid, CONDITION_PARALYZE) end end doBuffPlayer(conditions, storage, jungle.vocs) addEvent(doSpawnJungleMobs, jungle.respaw*1000*60, getCreatureName(cid), jungle.pos) end return true end
-
Dota liberando o nexus depois de matar so uma torre
@Gabrieldsadaxas passa a parte do creaturescript.
-
comparar item name
function onSay(cid, words, param) local money = 500 local slots, param = {CONST_SLOT_LEFT, CONST_SLOT_RIGHT}, param:lower() local table = { ["wand"] = {id = 12609, toid = 7754, upgrade = 16}, ["sword"] = {id = 2408, toid = 7391, upgrade = 15}, } local t = table[param] if not t then doPlayerSendTextMessage(cid, 22, "eu nao troco esse item, apenas wand ou sword!") return true elseif getPlayerMoney(cid) < 500 then doPlayerSendTextMessage(cid, 22, "você nao tem 500 gps!") return true end for _, ret in pairs(slots) do if getPlayerSlotItem(cid, ret).itemid == t.id then -- aqui ja faz a verificação se tem o item local var = getItemNameById(getPlayerSlotItem(cid, ret).itemid) local z = var:match("(%d+)") if z == nil or z < t.upgrade then doPlayerSendTextMessage(cid, 22, "o item n tem o upgrade necessario!") return true end doPlayerSendTextMessage(cid, 22, "Você fez uma troca de items!") doPlayerRemoveItem(cid, t.id) doPlayerAddItem(cid, t.toid, 1) end end return true end
-
(Resolvido)ajuda a terminar esse script de quest
@hiquezerah sim, todos os players recebem um time de 24 horas para voltar a fazer a quest, essa storage é ó para controlar esse time.
-
(Resolvido)ajuda a terminar esse script de quest
local lvl = 400 local stor_time = 787687 local hours = 24 local pos_die = {x=1429, y=1549, z=9} local t = { {vocations = {1, 13},Pos = {{x=1397, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1398, y=1502, z=9}}}, -- TANK OR DRUNK {vocations = {14, 15},Pos = {{x=1396, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1398, y=1508, z=9}}}, -- ATTACK OR DRUNK {vocations = {16, 17},Pos = {{x=1395, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1508, z=9}}}, -- SUPPORT OR DRUNK {vocations = {18, 19},Pos = {{x=1394, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1502, z=9}}}, -- PARALYZE OR DRUNK {vocations = {18, 19},Pos = {{x=1394, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1502, z=9}}}, -- PARALYZE {vocations = {18, 19},Pos = {{x=1394, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1502, z=9}}} -- SUPPORT } function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} local items = {} for _, k in ipairs(t) do local x = getTopCreature(k.Pos[1]).uid local v = getTileItemById(k.item[2], k.item[1]) if x == 0 or not isPlayer(x) or getPlayerLevel(x) < lvl or isInArray(k.vocations, getPlayerVocation(x)) == FALSE or getPlayerStorageValue(x, stor_time) - os.time() > 0 then doPlayerSendCancel(cid, 'Está faltando player ou alguém não possui level '..lvl..' ou mais ou não tem a vocação ou so pode participar 1x no dia.') return true elseif v.uid == 0 then doPlayerSendCancel(cid, "Todos os itens precisão estar na posição.") return true end table.insert(check, x) table.insert(items, v) end local sort = check[math.random(1, #check)] for k, tid in ipairs(check) do doSendMagicEffect(getCreaturePosition(tid), CONST_ME_POFF) if tid ~= sort then doTeleportThing(tid, t[k].Pos[2]) else doTeleportThing(tid, pos_die) end doSendMagicEffect(getCreaturePosition(tid), CONST_ME_TELEPORT) setPlayerStorageValue(tid, stor_time, os.time()+hours*3600) end for _, remove in ipairs(items) do doRemoveItem(remove.uid) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end
-
[8.6] Task System 4.0! (Task system + Daily Task System)
@ITALOx @ITALOx é qndo vc usa a talk? poderia mostrar o erro todo no console?
-
Script de deleta player.
result = db.getResult("SELECT `id`,`name`,`account_id` FROM `players` WHERE `level` < ".. cleanup[i].level .." AND `name` NOT IN('Account Manager', 'Sorcerer Sample', 'Druid Sample', 'Paladin Sample', 'Knight Sample', 'Rook Sample') AND `group_id` < 2 AND `lastlogin` < UNIX_TIMESTAMP() - ".. cleanup[i].time .." AND `lastlogin` > 0;") onde está o group_id onde esta 2 , coloca para 3 `group_id` < 3
-
[8.6] Task System 4.0! (Task system + Daily Task System)
pra quem tem o bug no distro que troca os números da storage por string. no mods: troca <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) and not isSummon(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[3])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[3]) .. "/" .. t.count .. "] da Task do " .. t.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[3]) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.") end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[5])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[5]) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[5]) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.") end end end return true end]]></event> por <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) and not isSummon(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < 0 and 1 or (tonumber(getPlayerStorageValue(cid, task_sys_storages[3]))+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) .. "/" .. t.count .. "] da Task do " .. t.name .. ".") end if tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.") end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (tonumber(getPlayerStorageValue(cid, task_sys_storages[5]))+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".") end if tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.") end end end return true end]]></event>
-
Creature Not Found.
é porque a criatura nao está viva no caso kkk é um onDeath e vc usa addEvent, ou seja, não vai aparecer mesmo. você pode colocar uma função diferente para ao invés de aparecer na criatura, faz o cid ser no jogador e a pos da onde vai sair a fala, ser onde o monstro morreu.
-
Creature Not Found.
addEvent(function() doCreatureSay(cid, "Corra enquanto á tempo o teleport irá desaparecer em breve.", TALKTYPE_ORANGE_1, false, cid, tp.info.pos) end, 100) por addEvent(function(cid) if not isCreature(cid) then return LUA_ERROR end doCreatureSay(cid, "Corra enquanto á tempo o teleport irá desaparecer em breve.", TALKTYPE_ORANGE_1, false, cid, tp.info.pos) end, 100, cid)
-
parchment quest
é que estranho, parece que não tem essa função na sua source mesmo. o jeito é fazer o script de outro jeito, ao clicar fazer sumir aquela papel lá e depois de 2 segundos aparecer os monstros.
-
Ajuda monstro não quer healar
@Icaro Simoes não ta funcionando é a spell em si, nenhuma parte dela. quando tu tenta usar sem o summon, aparece aquela mensagem? "Você não invocou nenhum summon." ou nao aparece nada?
-
parchment quest
seu ot é 8.6?
-
Ajuda monstro não quer healar
@Icaro Simoes testa assim e ve se retorna algo no seu console(distro) local combat = createCombatObject() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onCastSpell(cid, var) local summons = getCreatureSummons(cid) local health_summon = 2000 -- quantidade a ser curada no summon local health_player = 1600 -- quantidade a ser curada no player if #summons > 0 then doCreatureAddHealth(getCreatureSummons(cid)[1], health_summon) print(#summons, getCreatureName(getCreatureSummons(cid)[1])) doCreatureAddHealth(cid, health_player) print(getCreatureName(cid),health_player) return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Você não invocou nenhum summon.") return true end return true end
-
parchment quest
na pasta creaturescript em script la parchquest.lua local config = { str = 123123123, -- Global storage tempo = 10, -- Tempo para criar os monstros novamente itemID = 2159, -- ID do item a ser movido tileAID = 1231, -- Actionid do tile em que o item está monster = {"Demon", "Dragon"} -- Monstros } function onMoveItem(moveItem, fromPosition, position, cid) if (moveItem.itemid == config.itemID and getTileInfo(fromPosition).actionid == config.tileAID and getGlobalStorageValue(config.str) < os.time()) then for _, i in ipairs(config.monster) do doCreateMonster(i, fromPosition) end setGlobalStorageValue(config.str, os.time() + 30) end return true end creaturescript.xml <event type="moveitem" name="MovePaQuest" event="script" value="parchquest.lua"/> registra no onLogin.lua registerCreatureEvent(cid, "MovePaQuest")
-
Ajuda monstro não quer healar
@Icaro Simoes testa o que eu acabei de passar ali em cima!!
-
parchment quest
@bpm91 acho que tu colocou errada a tag no creaturescript posta o creaturescript.xml deve ter sim a função moveitem no seu servidor.
-
Ajuda monstro não quer healar
@Icaro Simoes tenta assim local combat = createCombatObject() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onCastSpell(cid, var) local summons = getCreatureSummons(cid) local health_summon = 2000 -- quantidade a ser curada no summon local health_player = 1600 -- quantidade a ser curada no player if #summons > 0 then doCreatureAddHealth(getCreatureSummons(cid)[1], health_summon) doCreatureAddHealth(cid, health_player) return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Você não invocou nenhum summon.") return true end return true end
-
Ajuda monstro não quer healar
local combat = createCombatObject() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onCastSpell(cid, var) local summons = getCreatureSummons(cid) local health_summon = 2000 -- quantidade a ser curada if #summons > 0 then doCreatureAddHealth(getCreatureMaster(cid), health_summon) return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Você não invocou nenhum summon.") return true end return true end
-
Top Effect
Qual group id do player? não é 1? porque já está só para players WHERE `group_id` < 2 "<" menor que 2... ou seja, menor que 2 é 1, 0 , etc...
-
Players sao teleportados apos puxar a alavanca
@Brunds function HaveCreatureArena(area, remove, clean) for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do for z = area[1].z, area[2].z do local pos = {x=x, y=y, z=z} local m = getTopCreature(pos).uid if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end if clean ~= false then doCleanTile(pos,false) end end end end end local areas = { -- colocas começo e final pos de todas as salas {{x=909,y=1019,z=7}, {x=1000,y=1019,z=7}}, {{x=156,y=1019,z=7}, {x=200,y=1019,z=7}}, {{x=200,y=1019,z=7}, {x=300,y=1019,z=9}} } local t = { lvl = 100, Time = 15, -- em minutos entrada = { {x = 1045, y = 1014, z = 6}, -- pos players {x = 1045, y = 1015, z = 6} }, saida = { {x = 1110, y = 1122, z = 7}, -- pos para onde eles irão {x = 1110, y = 1123, z = 7} }, monstros = { {{x = 1108, y = 1116, z = 7}, "Orc"}, -- defina pos dos montros e nomes {{x = 1108, y = 1117, z = 7}, "Orc"}, {{x = 1108, y = 1118, z = 7}, "Orc"}, {{x = 1108, y = 1119, z = 7}, "Orc"} } } function VarAnihiPlayer(cid, tab) if not isCreature(cid) then return LUA_ERROR end for _, var in ipairs(tab) do if isInRange(getPlayerPosition(cid), var[1], var[2]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end end end function getPlayersInArea(fromPos, toPos) local players = {} for _, pid in ipairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), fromPos, toPos) then table.insert(players, pid) end end return players end function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, var in ipairs(areas) do if #getPlayersInArea(var[1], var[2]) > 0 then doPlayerSendCancel(cid, 'Aguarde, tem jogadores fazendo a quest.') return true end end for _, k in ipairs(t.entrada) do local x = getTopCreature(k).uid if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.lvl) then doPlayerSendCancel(cid, 'Está faltando player ou alguém não possui level '..t.lvl..' ou mais.') return true end table.insert(check, x) end for _, clear in ipairs(areas) do HaveCreatureArena({clear[1],clear[2]}, true, true) -- limpar monstro de todas as salas end for _, summon in pairs(t.monstros) do doCreateMonster(summon[2], summon[1]) end for i, tid in ipairs(check) do doSendMagicEffect(t.entrada, CONST_ME_POFF) doTeleportThing(tid, t.saida, false) addEvent(VarAnihiPlayer, t.Time*1000, tid, areas) doSendMagicEffect(t.saida, CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end
-
(Resolvido)Morrer e dropar tudo e após passar rook itens nao vem do script de first itens
kkkkkkkkk qual id do brass set? ainda ta ganhando esse lixo?