Ir para conteúdo

Barths

Campones
  • Total de itens

    17
  • Registro em

  • Última visita

2 Seguidores

Sobre Barths

Informações

  • Forma que conheci o xTibia
    Otservs
  • Sou
    Programador

Barths's Achievements

  1. Olá, gostaria de saber se eu poderia ajudar, Eu tenho o script para a sobrevivência, e, portanto, eu desejo que os respawns / monstros, apareceu mais rápido, não 15-20 segundos cada onda <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Arena" version="1.0" author="DrakyLucas" contact="XTibia" enabled="yes"> <config name="arena_config"><![CDATA[ config = { delay = 60, -- tempo de um level para o outro posicaoPlayer = {x = 318, y = 1811, z = 7}, -- posição q o player vai cair dps de entra no TP posicaoArena = {{x = 306, y = 1803, z = 7},{x = 330, y = 1818, z = 7}}, premio = { {2160,70}, {2152,50}, }, -- ID, Quantidade... só aceita de 1 a 100 por vez, e você pode adicionar quantos itens quiser. storage = 15444, -- não mecha.. posicaoTp = {x = 1440, y = 1198, z = 7}, -- posicao que o teleporte vai aparecer acesso = 3, -- acesso minimo para ser ignorado pelo evento, e o mesmo acesso para poder inicializa-lo } -- você pode adicionar quantos leveis desejar -- [NumeroDoLevel] = {{"Nome",Quantidade},{"Nome",Quantidade},{"Nome",Quantidade},{"Nome",Quantidade},{"Nome",Quantidade}}, leveis = { [1] = {{"Elder Hydra",5}}, [2] = {{"Elder Hydra",5},{"Elder Dragon Lord",4}}, [3] = {{"Elder Dragon Lord",7}}, [4] = {{"King Kong",1},{"Angry Lady",3}}, [5] = {{"Demon lord",7},{"Demon",4},{"Dragon",5}}, [6] = {{"Demon",6},{"Orshabaal",1},{"Ferumbras",1}}, [7] = {{"Angry Lady",4},{"Morgaroth",1},{"Ferumbras",2}}, [8] = {{"Demon lord",4},{"Angry Lady",1},{"Oblivions",1}}, } function abrirTeleport(n) doItemSetAttribute(doCreateItem(1387, config.posicaoTp), "aid", 2941) -- cria o tp e deixa aid 2941 doBroadcastMessage("The event will start arena! teleport was open on room event and".. n .. " people for the event starts!") doSetStorage(config.storage, n) end function fecharTPeAguardarEvento() doRemoveItem(getTileItemById(config.posicaoTp, 1387).uid,100) doBroadcastMessage("The event has been closed " .. #getPlayersInArena() .. " and players will begin in " .. config.delay .. " segundos!") addEvent(evento,config.delay*1000,1) end function HaveCreatureArena(area, remove, clean) -- função do Vodkart for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do local pos = {x=x, y=y, z=area[1].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 function resetEvento() doSetStorage(config.storage, -1) end function criarMonstros(lv) local monstro = leveis[lv] local area = {config.posicaoArena[1],config.posicaoArena[2]} for i = 1,#monstro do for k=1,monstro[i][2]do pos = {x=math.random(area[1].x,area[2].x), y=math.random(area[1].y,area[2].y), z=area[1].z} monstrinho = doCreateMonster(monstro[i][1], pos) registerCreatureEvent(monstrinho, "removerCorpse") end end end function evento(i) if #getPlayersInArena() == 0 then doBroadcastMessage("Nobody survived the arena.") doBroadcastMessage("EVENTO TERMINADO!") HaveCreatureArena({config.posicaoArena[1],config.posicaoArena[2]}, true, true) -- remove monstros, itens da arena resetEvento() return true end if i == (#leveis +1) then HaveCreatureArena({config.posicaoArena[1],config.posicaoArena[2]}, true, true) doBroadcastMessage("Event finalized, " .. #getPlayersInArena() .. " survived the event!") for _, pid in ipairs(getPlayersInArena()) do doPlayerSendTextMessage(pid,22,"Congratulations, you survived the event!") addItens(pid) doTeleportThing(pid,getTownTemplePosition(getPlayerTown(pid))) end resetEvento() return true end for _, pid in ipairs(getPlayersInArena()) do doPlayerSendTextMessage(pid,22,"GoGo Nivel " .. i .. " !!!") end criarMonstros(i) addEvent(evento,config.delay*1000,i+1) end function addItens(pid) for i=1,#config.premio do doPlayerAddItem(pid,config.premio[i][1],config.premio[i][2]) end doPlayerSendTextMessage(pid,22,"Congratulations, you have received their prizes!") end function getPlayersInArena() local t = {} for _, pid in pairs(getPlayersOnline()) do if getPlayerAccess(pid) < config.acesso then if isInRange(getCreaturePosition(pid), config.posicaoArena[1], config.posicaoArena[2]) then table.insert(t, pid) end end end return t end ]]></config> <talkaction words="/arena" event="buffer"><![CDATA[ domodlib('arena_config') if getPlayerAccess(cid) < config.acesso then return doPlayerSendCancel(cid,"You do not have access to this command") end if tonumber(param) ~= nil then -- se o parametro é numerico if tonumber(param) > 0 then doSetStorage(config.storage, param) abrirTeleport(param) end else doPlayerSendTextMessage(cid,19,"Comando /arena y un numero.. \n ejemplo: \n/arena 5") end ]]></talkaction> <movevent type="StepIn" actionid="2941" event="script"><![CDATA[ domodlib('arena_config') if getPlayerAccess(cid) > config.acesso then doTeleportThing(cid, config.posicaoPlayer) return false elseif getPlayerAccess(cid) < config.acesso then doSetStorage(config.storage,getStorage(config.storage) - 1) doTeleportThing(cid, config.posicaoPlayer) registerCreatureEvent(cid, "naoAtacarPlayer") registerCreatureEvent(cid, "morrerNaArena") if getStorage(config.storage) <= 0 then fecharTPeAguardarEvento() end end return true ]]></movevent> <event type="login" name="VerSeTaNaArenaEExpulsa" event="script"><![CDATA[ domodlib('arena_config') if isInRange(getCreaturePosition(cid), config.posicaoArena[1], config.posicaoArena[2]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true ]]></event> <event type="combat" name="naoAtacarPlayer" event="script"><![CDATA[ domodlib('arena_config') if isPlayer(cid) and isPlayer(target) then if isInRange(getPlayerPosition(cid), config.posicaoArena[1], config.posicaoArena[2]) and isInRange(getPlayerPosition(target), config.posicaoArena[1], config.posicaoArena[2]) then doPlayerSendCancel(cid, "Do not attack your team.") return false end end return true ]]></event> <event type="death" name="removerCorpse" event="script"><![CDATA[ domodlib('arena_config') doCreatureSay(cid,"Nobody will take my loot! Buaahahahha",1) pos = getCreaturePosition(cid) addEvent(doCleanTile,1,pos, false) return true ]]></event> <event type="statschange" name="morrerNaArena" event="script"><![CDATA[ domodlib('arena_config') if isInRange(getPlayerPosition(cid), config.posicaoArena[1], config.posicaoArena[2]) then if type == STATSCHANGE_HEALTHLOSS then if isPlayer(cid) then if value >= getCreatureHealth(cid) then doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid))) doPlayerSendTextMessage(pid,22,"You died in the arena = / .. look on the bright side, you did not miss anything!") doCreatureAddHealth(cid,getCreatureMaxHealth(cid) - getCreatureHealth(cid)) return false end end end end return true ]]></event> </mod> thanks
  2. mm, but with one storage to give for wand, and create a script on weapons , if getplayerStorageValue... then player attack more?
  3. Olá, eu tenho o caso de sobrevivência, e isso me dá esse erro, tudo funciona, mas quando os jogadores simplesmente não dão itens, e marcar-me este error: http://www.xtibia.com/forum/topic/189703-arena-sobrevivencia-event-system/ [29/8/2012 23:42:44] [Error - MoveEvents Interface] [29/8/2012 23:42:44] In a timer event called from: [29/8/2012 23:42:44] function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) [29/8/2012 23:42:44] domodlib('arena_config') [29/8/2012 23:42:45] if getPlayerAccess(cid) > config.acesso then doTeleportThing(cid, config.posicaoPlayer) return false end -- GM nao conta [29/8/2012 23:42:45] doSetStorage(config.storage,getStorage(config.storage) - 1) [29/8/2012 23:42:45] doTeleportThing(cid, config.posicaoPlayer) [29/8/2012 23:42:45] registerCreatureEvent(cid, "naoAtacarPlayer") [29/8/2012 23:42:45] registerCreatureEvent(cid, "morrerNaArena") [29/8/2012 23:42:45] if getStorage(config.storage) <= 0 then [29/8/2012 23:42:45] fecharTPeAguardarEvento() [29/8/2012 23:42:45] end [29/8/2012 23:42:45] return true [29/8/2012 23:42:45] end:onStepIn [29/8/2012 23:42:45] Description: [29/8/2012 23:42:45] (LuaInterface::luaRegisterCreatureEvent) Creature not found [29/8/2012 23:43:45] > Broadcasted message: "Event finalized, 2 survived the event!".
  4. Olá amigos xtibia, Peço este script, ou seja, o sistema de atualização (Mock), pode funcionar no varinhas, para 12, o que significa que cada vez que você ligar-se uma, duas, três, etc, mas a varinha pege , por favor , deixo o script -- &a = weapon attack -- &d = weapon defense -- &s = shield defense -- &p = armor defense -- &l = magic Attack -- # = nivel do item -- @ = max level local gain = { gainArmor='&p+(1)',loseArmor='&p-(1)', gainShield='&s+#',loseShield='&s-(#+1)', gainAttack='&a+(1*(#))',loseAttack='&a-(1*(#+1))', gainDefense='&d+(1*(#))',loseDefense='&d-(1*(#+1))', gainMagic='&l+(1*(#))',loseMagic='&l-(1*(#+1))', chance='(100/math.sqrt((((@/4)+(#*2))/@)*#))', maxlvl = 10, blocked_ids = {8892} } local it = { --[itemid] = [percent] [8301] = 0, -- 0% additional [8298] = 39, -- 30% } if not setItemName then function setItemName(uid,name) return doItemSetAttribute(uid,'name',name) end function setItemArmor(uid,name) return doItemSetAttribute(uid,'armor',name) end function setItemDefense(uid,name) return doItemSetAttribute(uid,'defense',name) end function setItemAttack(uid,name) return doItemSetAttribute(uid,'attack',name) end function setItemMagic(uid,name) return doItemSetAttribute(uid,'attack',name) end function getItemAttack(uid) return getItemAttribute(uid,'attack') end function getItemDefense(uid) return getItemAttribute(uid,'defense') end function getItemMagic(uid) return getItemAttribute(uid,'attack') end function getItemArmor(uid) if type(uid) == 'number' then return getItemAttribute(uid,'armor') else return getItemInfo(uid.itemid).armor end end end local function isArmor(uid) -- Function by Mock the bear. if (getItemInfo(uid.itemid).armor ~= 0) and (getItemWeaponType(uid.uid) == 0) then return true end return false end local function isWeapon(uid) -- Function by Mock the bear. uid = uid or 0 local f = getItemWeaponType(uid) if f == 1 or f == 2 or f == 3 then return true end return false end local function isShield(uid) -- Function by Mock the bear. uid = uid or 0 if getItemWeaponType(uid) == 4 then return true end return false end local function isBow(uid) -- Function by Mock the bear. uid = uid or 0 if getItemWeaponType(uid) == 5 then return true end local function isWand(uid) -- Function by Mock the bear. uid = uid or 0 if getItemWeaponType(uid) == 6 then return true end return false end return false end local function getWeaponLevel(uid) -- Function by Mock the bear. uid = uid or 0 local name = getItemName(uid.uid) or getItemInfo(uid.itemid).name or '' local lvl = string.match(name,'%s%+(%d+)%s*') return tonumber(lvl) or 0 end local function doTransform(s,i) -- Function by Mock the bear. local c = string.gsub(s,'@',gain.maxlvl) local c = string.gsub(c,'&a',(getItemAttack(i.uid) ~= 0 and getItemAttack(i.uid) or getItemInfo(i.itemid).attack)) local c = string.gsub(c,'&d',(getItemDefense(i.uid) ~= 0 and getItemDefense(i.uid) or getItemInfo(i.itemid).defense)) local c = string.gsub(c,'&s',(getItemDefense(i.uid) ~= 0 and getItemDefense(i.uid) or getItemInfo(i.itemid).defense)) local c = string.gsub(c,'&p',(getItemArmor(i.uid) ~= 0 and getItemArmor(i.uid) or getItemInfo(i.itemid).armor)) local c = string.gsub(c,'#',getWeaponLevel(i)) local q = assert(loadstring('return '..c)) return math.floor(assert(q())) end function onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid == 0 or item.itemid == 0 then return false end toPosition.stackpos = 255 if isInArray(gain.blocked_ids, itemEx.itemid) or (not getItemWeaponType(itemEx.uid) or getItemWeaponType(itemEx.uid) > 5) or (getItemWeaponType(itemEx.uid) == 0 and not isArmor(itemEx)) or itemEx.itemid == 0 or itemEx.type > 1 or isItemStackable(itemEx.uid) then doPlayerSendTextMessage(cid, 24,"You cant refine this item.") return TRUE end if isCreature(itemEx.uid) == TRUE then return FALSE end local level = getWeaponLevel(itemEx) local chance = doTransform(gain.chance,itemEx) if level == gain.maxlvl then doSendMagicEffect(toPosition, 2) return doPlayerSendTextMessage(cid, 24,"Your item is on max level, you can't upgrade it.") end doPlayerSendTextMessage(cid, 24,"Trying refine with "..(chance+it[item.itemid] > 100 and 100 or chance+it[item.itemid]).."% of sucess!") if chance+it[item.itemid] >= math.random(0,100) then local nm = getItemName(itemEx.uid) local slot = nm:match('(%[.+%])') or '' ---If you server use slot system dont change it ^^ slot = slot~='' and ' '..slot or slot setItemName(itemEx.uid, getItemNameById(itemEx.itemid)..' +'..(level+1)..slot) addEvent(doPlayerSendTextMessage,500,cid, 24,"Your item has been upgrated to +"..(level+1)..slot..".") doSendAnimatedText(toPosition, "Succes", 30) doSendMagicEffect(toPosition, 30) if isArmor(itemEx) then local get = doTransform(gain.gainArmor,itemEx) setItemArmor(itemEx.uid,get) elseif isBow(itemEx.uid) then setItemAttack(itemEx.uid, doTransform(gain.gainAttack,itemEx)) elseif isWeapon(itemEx.uid) then setItemAttack(itemEx.uid, doTransform(gain.gainAttack,itemEx)) setItemDefense(itemEx.uid, doTransform(gain.gainDefense,itemEx)) elseif isShield(itemEx.uid) then setItemDefense(itemEx.uid, doTransform(gain.gainShield,itemEx)) end else if level == 0 then addEvent(doPlayerSendTextMessage,500,cid, 24,"No effect.") doSendMagicEffect(toPosition, 2) elseif level > 0 then local nm = getItemName(itemEx.uid) local slot = nm:match('(%[.+%])') or '' ---If you server use slot system dont change it ^^ slot = slot~='' and ' '..slot or slot if level == 1 then setItemName(itemEx.uid, getItemNameById(itemEx.itemid)..slot) addEvent(doPlayerSendTextMessage,500,cid, 24,"Your item back to normal.") else setItemName(itemEx.uid, getItemNameById(itemEx.itemid)..' +'..(level-1)..slot) addEvent(doPlayerSendTextMessage,500,cid, 24,"Your item back to +"..(level-1)..slot..".") end if isArmor(itemEx) then setItemArmor(itemEx.uid,doTransform(gain.loseArmor ,itemEx)) elseif isWeapon(itemEx.uid) then setItemAttack(itemEx.uid, doTransform(gain.loseAttack,itemEx)) setItemDefense(itemEx.uid, doTransform(gain.loseDefense,itemEx)) elseif isBow(itemEx.uid) then setItemAttack(itemEx.uid, doTransform(gain.loseAttack,itemEx)) elseif isShield(itemEx.uid) then setItemDefense(itemEx.uid, doTransform(gain.loseShield,itemEx)) end end doSendAnimatedText(toPosition, "Failed", TEXTCOLOR_RED) doSendMagicEffect(toPosition, 34) end doRemoveItem(item.uid,1) return true end
  5. Excellent vodkart! i will test this:)
  6. Barths

    Depotaccount

    8.60 Refresh Refresh.. REFRES! BUMP PLEASE D; bump!
  7. Olá amigos xtibia, Este é um outro script, eu preciso, Este script é ativar invasões, puxar uma alavanca, ou seja, eu puxar uma alavanca, e ativar um ataque, mas são vários ataques com esses monstros, (demônio senhor, Ryuk, etc) Se eu puxar a alavanca do demon lord, irá ativar o ataque, mas para retirá-lo precisa ser nível 250 +, e é invocado na cidade .. Mas para puxar e ativar outro ataque, você tem que matar todos os monstros, que apareceu com o primeiro ataque, Por exemplo, se eu puxar a alavanca senhor demônio, e eu tenho o nível + 250, diga Você não tem nível suficiente .. Mas se eu tiver 250 + nível irá ativar o demon lords, e sair da cidade, Se eu ativar outro ataque, precisa matar, todos os monstros do primeiro ataque, caso contrário, não pode ser ativada, Eu espero e eu entendo: D Obrigado .. VERSION ENGLISH: Hello friends xtibia, This is another script, I need, This script is to activate raids, pulling a lever, ie I pull a lever, and activate a raid, but are several raids with these monsters, (demon lord, Ryuk, etc) If I pull the lever of the Demon Lord, will activate the raid, but to pull it need to be level 250 +, and is invoked in the city .. But to pull and activate another raid, you have to kill all monsters, who appeared with the first raid, For example, if I pull the lever demon lord, and I have the 250 + level, tell You do not have enough level .. But if I have 250 + level will activate the raid of demon lord, and come out in the city, If I activate another raid, need to kill, all the monsters of the first raid, otherwise can not be activated, I hope and I understand: D Thanks .. Refresh.. Bump help please :s, i need ur help!
  8. Barths

    Arrow Multi-Element

    Thanks, but don't change or remove the arrow :S with the arrowvip only BUMP bump Bring up my Post sOLVED
  9. Barths

    Arrow Multi-Element

    Mas se você mudar o elemento e efeito .. mas que não altera o ID de seta Se eu disser! Seta frigorífico, ó flecha de fogo que está na mesma seta
  10. Hello amigos xtibi, Eu olho para um script como varinha multielementar, Eu quero que ele seta, ou seja, um vip seta, a dizer! seta, elemento mudança gelo, terra, fogo, morte, santo, etc Please
  11. Barths

    Depotaccount

    uma depotAccount (itemid: 1741), que é para todos os characters em sua conta.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...