Tudo que Vodkart postou
-
(Resolvido)Ajuda alguem porfavor
function doTpTime(cid, delay) if not isCreature(cid) then return LUA_ERROR end if delay > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} "..delay.." segundos para se teletransportar.") addEvent(doTpTime, 1000, cid, delay-1) else doTeleportThing(cid, {x = 433, y = 992, z = 15}) doSendMagicEffect(getPlayerPosition(cid), 10) doPlayerSendTextMessage(cid, 22, "Voce foi teleportado para Earth! DBO EVOLUTION") end end function onUse(cid, item, fromPosition, item2, toPosition) doTpTime(cid, 5) end
-
Soya master npc bugado
@alexpaimel acabei de baixar um servidor só para testar e não apresentou esses erros. Acho que tem a ver com a lib de npc do seu servidor, você pode tentar trocar por outra lib(baixa outro ot e substitua pela lib do seu). @alexpaimel e a segunda imagem diz que não está encontrando a lib "Labia_System" isso sim é um erro seu, pode ser isso que estais fazendo errado. para instalar tem que copiar a lib e colocar no seu servidor na pasta lib: Baiak Yurots 5.2\data\lib por exemplo o meu é esse. Não é na lib na pasta do npc hein.
-
Soya master npc bugado
com certeza o erro está na lib do npc, na hora de copiar deve ter feito algo errado... me envia a lib do npc que vc esta usando.
- Exclusive Cave System By Account! 8.6
-
Soya master npc bugado
vc modificou algo na lib? valor, item, etc? se sim, posta ela aqui...
-
[AJUDA] AUTO LOOT
* Query para SQLITE: CREATE TABLE player_autoloot_persist ( player_guid INTEGER NOT NULL, cont_id INT NOT NULL DEFAULT 0, item_id INT NOT NULL DEFAULT 0, PRIMARY KEY ( player_guid ) ); * Query para MySql: CREATE TABLE player_autoloot_persist ( player_guid INT NOT NULL AUTO_INCREMENT, cont_id INT NOT NULL DEFAULT 0, item_id INT NOT NULL DEFAULT 0, PRIMARY KEY ( player_guid ) );
-
(Resolvido)Spell Hidan Imortal TFS 0.4
é bem simples, faz por creaturescript usando onStats e onAttack. Ai na sepell vc coloca pra dar o effect, storage e e imobilizar ele.
-
Novo comando de depot
ele pega o primeiro e coloca onde? na sua bag?
-
(Resolvido)Soft e Firewalker Boots.
como ele disse, deve ser algum movement relacionado ao item. procure lá na pasta e arquivo xml
-
(Resolvido)Soft e Firewalker Boots.
para que usar 2 códigos se pode fazer somente 1? usa assim: nome do seu script.lua local ret = { [10021] = {id = 6132, price = 10000, effect = CONST_ME_FIREWORK_BLUE}, [10022] = {id = 9933, price = 20000, effect = CONST_ME_FIREWORK_RED} } function onUse(cid, item, fromPosition, itemEx, toPosition) local t = ret[item.itemid] if not t then return true elseif not doPlayerRemoveMoney(cid, t.price) then doPlayerSendCancel(cid, "You need "..t.price.." golds.") return true end local pos = getThingPos(cid) doSendMagicEffect(pos, t.effect) doTransformItem(item.uid, t.id) return true end tag: <action itemid="10021;10022" event="script" value="nome do seu script.lua"/> ---------------------- OBS: não dá para ver o vídeo.
-
Script de permitir apenas 1 player
já sei porque está acontecendo isso e é bem simples, o seu script já veio com a função errada. sabe essa linha: doTeleportThing(cid, fromPosition, false) vc tem que colocar true. doTeleportThing(cid, fromPosition, true) ai ai, nem reparei nisso. local tp_mineracao = {x = 2848, y = 2871, z = 8} local areasMineracao = { {{x = 2803, y = 2861, z = 8}, {x = 2864, y = 2896, z = 8}}, {{x = 2799, y = 2864, z = 9}, {x = 2869, y = 2903, z = 9}}, {{x = 2802, y = 2876, z = 10}, {x = 2894, y = 2923, z = 10}} } function onStepIn(cid, item, position, fromPosition, toPosition) local max, ret = 3,0 -- 3 por account if not isPlayer(cid) then return true end for _, v in pairs(areasMineracao) do for _, pid in pairs(getPlayersOnline()) do if (getPlayerIp(pid) == getPlayerIp(cid) and isInRange(getThingPos(pid), v[1], v[2])) then ret = ret+1 end end end if ret > max then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Só é permitido "..max.." jogadores por IP na mineração.") doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) return true end doTeleportThing(cid, tp_mineracao, false) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) setPlayerStorageValue(cid, 45393, 1) return true end
-
Script de permitir apenas 1 player
@Pifafa foi um erro noob meu... kkkkk troque essa linha: if ret > max then por if ret >= max then
-
Script de permitir apenas 1 player
Deixa eu ver a lib das positions das minerações, porque pela lógica do código está certo.
-
Script de permitir apenas 1 player
@Pifafa function onStepIn(cid, item, position, fromPosition, toPosition) local max, ret = 3,0 -- 3 por account if not isPlayer(cid) then return true end for _, v in pairs(areasMineracao) do for _, pid in pairs(getPlayersOnline()) do if (getPlayerIp(pid) == getPlayerIp(cid) and isInRange(getThingPos(pid), v[1], v[2])) then ret = ret+1 end end end if ret > max then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Só é permitido "..max.." jogadores por IP na mineração.") doTeleportThing(cid, fromPosition, false) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) return true end doTeleportThing(cid, tp_mineracao, false) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) setPlayerStorageValue(cid, 45393, 1) return true end
-
Ajuda com script da anihi modificado
na verdade n precisa nem atribuir storage, a função da anihi no caso para esse codigo, está errada... use assim: local config = { from = {x = 22987, y = 19805, z = 7}, -- coordenada do canto superior esquerdo da área. to = {x = 23024, y = 19992, z = 7}, -- coordenada do canto inferior direito da área. } local t = { lvl = 100, Time = 2, -- em minutos entrada = { {x = 23052, y = 19991, z = 7}, -- pos players {x = 23051, y = 19991, z = 7}, {x = 23050, y = 19991, z = 7}, {x = 23049, y = 19991, z = 7} }, saida = { {x = 23017, y = 19985, z = 7}, -- pos para onde eles irão {x = 23019, y = 19985, z = 7}, {x = 23017, y = 19987, z = 7}, {x = 23019, y = 19987, z = 7} }, monstros = { {{x = 23004, y = 19832, z = 7}, "Juggernaut"}, -- defina pos dos montros e nomes {{x = 23004, y = 19834, z = 7}, "Ghazbaran"} } } local 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 local function VarAnihiPlayer(cid) if not isCreature(cid) then return LUA_ERROR end if isInRange(getPlayerPosition(cid), config.from, config.to) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end end function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} if #getPlayersInArea(config.from, config.to) > 0 then doPlayerSendCancel(cid, 'Aguarde, tem jogadores fazendo a quest.') return true 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 _, summon in pairs(t.monstros) do local creature = getTopCreature(summon[1]).uid if(creature > 0 and not isPlayer(creature)) then doRemoveCreature(creature) end doCleanTile(summon[1]) doCreateMonster(summon[2], summon[1]) end for i, tid in ipairs(check) do doSendMagicEffect(t.entrada[i], CONST_ME_POFF) doTeleportThing(tid, t.saida[i], false) addEvent(VarAnihiPlayer, t.Time*60*1000, tid) doSendMagicEffect(t.saida[i], CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end
-
(Resolvido)Boss só pode receber dando quando seus summons forem mortos
@maicao22 entendi, então tem a ver com a datapack!! bom saber, que bom que deu certo!! valeu.
-
[Sistema 0.3.6 - 8.54] Chuva Editado por LeoTK & NightWolf
Ficou perfeito esse rain system, parabéns pelo código!! Gostei mesmo, espero ver mais scripts seus daqui pra frente, você é o cara mesmo!
-
(Resolvido)Boss só pode receber dando quando seus summons forem mortos
diz que não está achando o arquivo, reinstala de novo...
-
(Resolvido)Boss só pode receber dando quando seus summons forem mortos
@maicao22 seu servidor não tem a função onStats... apaga tudo aí que te mandei, e dentro do xml do monstro apaga o event tbm, claro... (obs: apa as tags tbm) agora usa assim: nome do seu script.lua function onLogin(cid) registerCreatureEvent(cid, "noBossDamage") return true end function onCombat(cid, target) if isPlayer(cid) and isMonster(target) then local monster = "Rabbit" -- nome do boss if getCreatureName(target):lower() == monster:lower() and #getCreatureSummons(target) ~= 0 then return false end end return true end TAG <event type="login" name="noBossLogin" event="script" value="nome do seu script.lua"/> <event type="combat" name="noBossDamage" event="script" value="nome do seu script.lua"/>
-
(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