Ir para conteúdo

gabrielsantos2435

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    gabrielsantos2435 deu reputação a xWhiteWolf em (Resolvido)[PEDIDO] Editar Items.   
    Você coloca no items.xml oque vc quer que o item faça, experimenta usar comandos de itens parecidos: 
    Exemplo: Quero que o set de Knight dê skill de club/sword/axe.. daí vc procura algum item que faça isso e só copia a parte que aumenta a skill
    <attribute key="skillSword" value="3" /> <attribute key="skillAxe" value="3" /> <attribute key="skillClub" value="3" /> Se você quiser que aumente distance é só colocar
    <attribute key="skillDist" value="3" /> para absorver danos é bem simples
    <attribute key="absorbPercentPhysical" value="3" /> <attribute key="absorbPercentEarth" value="5" /> <attribute key="absorbPercentDeath" value="6" /> <attribute key="absorbPercentFire" value="-3" /> <attribute key="absorbPercentIce" value="2" /> Perceba que o PercentFire está negativo, é porque ele tem fraqueza contra fogo, positivo ele é bom contra o elemento, negativo ele é fraco contra o elemento.

    Pra aumentar ML é só usar:
    <attribute key="magiclevelpoints" value="1" /> Pra aumentar speed é só procurar a BOH e copiar:
    <attribute key="speed" value="20" /> E não esquece de colocar no final
    <attribute key="showattributes" value="1" /> para que apareçam os atributos quando o player der look no item.


    Em 
    <attribute key="slotType" value="necklace" /> Você escolhe que tipo de item aquilo é, os values são: body, two-handed, one-handed, ammo, ring, necklace, legs, feet, head, backpack




    E PARA FINALIZAR DECLARE TUDO NO MOVEMENTS.XML:
    <movevent type="Equip" itemid="IDDOITEM" slot="TIPO DE SLOT" event="function" value="onEquipItem"/> <movevent type="DeEquip" itemid="IDDOITEM" slot="TIPO DE SLOT" event="function" value="onDeEquipItem"/> itemid="IDDOITEM" troque IDDOITEM pelo ID DO ITEM (BEM ÓBVIO, NÉ?) 
    slot="TIPO DE SLOT" coloque um dos slots possíveis, os que são possiveis estão nessa lista aqui:
    armor feet legs head shield pickupable necklace ring OBSERVAÇÃO FINAL: O SLOT QUE VC DECLARAR NO MOVEMENTS TEM QUE SER DO MESMO TIPO QUE O ITEMS.XML
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Agora as flechas/bows/armas: Essas não precisam declarar no movements.xml mas precisam de um script no weapon.xml 


    1) Flechas
    As flechas são bem simples:
    <attribute key="slotType" value="ammo" /> <attribute key="attack" value="25" /> <attribute key="maxHitChance" value="90" /> <attribute key="weaponType" value="ammunition" /> <attribute key="ammoType" value="arrow" /> <attribute key="shootType" value="arrow" /> slotype = ammo para ficar no lugar da munição (ammo)
    Attack vc muda a vontade pro que vc quiser
    MaxHitChance = chance de acertar o hit, qualquer numero menor que 100 apresenta uma chance do hit falhar
    WeaponType= Tipo de arma, flechas são munições então deixe sempre ammunition
    ammoTyoe = Tipo de munição, pode ser "arrow" ou "bolt" dependendo doque vc quiser usar, um bow ou um crossbow
    shootType é o efeito que vai sair, no caso dessa aí seria uma arrow normalzinha mas vc pode colocar qualquer flecha que exista ou até mesmo copiar efeitos de runas
    Dê ctrl+F no items.xml em shootType e copie diferentes tipos e vá vendo no servidor qual se encaixa melhor na sua opinião.

    2) Bows e Crossbows
    Eu te aconselho copiar de algum item que já exista o modificar oque você quiser
    <attribute key="slotType" value="two-handed" /> <attribute key="weaponType" value="distance" /> <attribute key="ammoType" value="bolt" /> <attribute key="range" value="5" /> <attribute key="hitChance" value="1" /> isso daqui é um crossbow duas mãos que ataca bolt (podia ser arrows tb) a uma distância de no máximo 5 SQM (modifique o range)
    a chance de hit padrão dele é 1  e essa hit chance soma com a da munição

    3) Wands e Rods
    <attribute key="weight" value="2900" /> <attribute key="weaponType" value="wand" /> <attribute key="shootType" value="ice" /> <attribute key="range" value="3" /> peso, tipo (mesmo que seja uma rod o tipo é "wand"), tipo de efeito que sai dela (no caso é o ice), distância que ataca (no caso, 3 sqm)
    Agora no weapons.xml:
    <wand id="2190" level="7" mana="2" min="8" max="18" type="energy" event="function" value="default"> <!-- Wand of Vortex --> <vocation id="1"/> </wand> id do item, level pra usar, custo de mana por hit, dano minimo e maximo, tipo de ataque, event (deixe function para ele fazer tudo que vc colocou no items.xml) value= não mexa a menos que vc seja um programador C++, vocation vc coloca as classes que podem usar.
    1= sorc, 2= druid, 3= pally, 4= kina, 5= master sorc, 6= elder druid, 7= royal pally, 8= elit kina
    OBS: Você pode colocar isso também para que quando o player dê look não apareça o nome da classe que pode usar aquele determinado item (isso é util quando vc declarar que ambos sorceres e master sorcerers podem usar o item, evitando as repetições quando o player der look no item
    <vocation id="5" showInDescription="0"/> <vocation id="1"/> 4) Outros tipos de arma
    É bem simples, só edite oque quiser seguindo o modelo:
    <attribute key="weight" value="6800" /> <attribute key="defense" value="65" /> <attribute key="attack" value="90" /> <attribute key="weaponType" value="sword" /> <attribute key="extradef" value="5" /> <attribute key="elementIce" value="30" /> <attribute key="slotType" value="two-handed" /> <attribute key="decayTo" value="2401" /> <attribute key="duration" value="60" /> weight = peso
    defense= defesa q ela dá
    attack = ataque
    weapontype = Tipo de arma (sword, axe, club)
    extradef = defesa extra (fica Defesa 65 +5 nesse caso)
    ElementIce = adiciona dano elemental à arma, pode usar também ElementFire, ElementEarth e ElementEnergy
    slotType = se a arma é duas mãos ou não (caso não seja apenas retire essa linha)
    decayTo = apos um tempo igual a duration (em segundos) ela vira o item de ID 2401 (se não quiser isso apenas remova essas duas ultimas linhas)


    OBSERVAÇÃO FINAL: Tudo que você não quiser utilizar é só remover a linha do items.xml, e todo tipo de edição em armas deve ser declarado no weapons.xml seguindo o exemplo. (COMO VOCÊ NÃO TÁ CRIANDO NENHUM ITEM E SIM EDITANDO OS QUE JÁ EXISTEM EU TE ACONSELHO A PROCURAR O ITEM LÁ DANDO CTRL F E PROCURANDO PELO ID DOQUE SAIR ADICIONANDO UM MONTE DE LINHA A MAIS QUE TALVEZ DÊ CONFLITO COM AS QUE JÁ EXISTAM).
    OS ITENS QUE VC COLOCAR PRA DAR SKILL, ML OU PORCENTAGEM ELEMENTAL VOCÊ DEVE DECLARAR NO MOVEMENTS.XML E SE ESSE ITEM FOR PARA UMA DETERMINADA VOCAÇÃO VOCÊ DEVE DECLARAR TAMBÉM SEGUINDO O EXEMPLO:
    <movevent type="Equip" itemid="7886" slot="feet" event="function" value="onEquipItem"> <vocation id="1"/> <vocation id="5" showInDescription="0"/> <vocation id="2"/> <vocation id="6" showInDescription="0"/> </movevent> <movevent type="DeEquip" itemid="7886" slot="feet" event="function" value="onDeEquipItem"/>
  2. Gostei
    gabrielsantos2435 deu reputação a xWhiteWolf em (Resolvido)[PEDIDO] Editar Items.   
    eu tive todo o trabalho do mundo pra escrever esse post e eu te garanto que ele tá todo certinho, vc tem que adicionar essa linha no items.xml na parte da bota
    <attribute key="magiclevelpoints" value="1" /> e dps colocar o id dela no movements do mesmo jeito que citei anteriormente
  3. Gostei
    gabrielsantos2435 deu reputação a Sociopata em Instalando Zombie Event   
    Bem hj vou estar postando o ZOMBIE EVENT q eu uso no meu server sem erros nem nada..

    Testado em tfs 0.3 pra mais
    Testado em 8.54,8.60






    COMANDOS




    INSTALAÇÃO

    data/creaturescripts/scripts/zombie/onattack.lua


    function loseOnZombieArena(cid) kickPlayerFromZombiesArea(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "BOOM! You are dead.") local players = getZombiesEventPlayers() if(#players <= 1) then local winner = players[1] if(winner) then doPlayerAddItem(winner, 2157, 5, true) doPlayerAddItem(winner, 6119, 1, true) doPlayerSendTextMessage(winner, MESSAGE_STATUS_CONSOLE_BLUE, "You won zombies arena event.") doBroadcastMessage("After " .. os.time() - getPlayerZombiesEventStatus(winner) .. " seconds of fight " .. getCreatureName(winner) .. " won Zombie Arena Event in game versus " .. getStorage(ZE_ZOMBIES_SPAWNED) .. " zombies!") kickPlayerFromZombiesArea(winner) else doBroadcastMessage("Zombie arena event finished! No one win?!?!?! WTF!") end doSetStorage(ZE_STATUS, 0) doSetStorage(ZE_PLAYERS_NUMBER, ZE_DEFAULT_NUMBER_OF_PLAYERS) doSetStorage(ZE_ZOMBIES_TO_SPAWN, 0) doSetStorage(ZE_ZOMBIES_SPAWNED, 0) local width = (math.max(ZE_spawnFromPosition.x, ZE_spawnToPosition.x) - math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)) / 2 + 1 local height = (math.max(ZE_spawnFromPosition.y, ZE_spawnToPosition.y) - math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)) / 2 + 1 local centerPos = {x=math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)+width,y=math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)+height,z=ZE_spawnFromPosition.z} for z = math.min(ZE_spawnFromPosition.z, ZE_spawnToPosition.z), math.max(ZE_spawnFromPosition.z, ZE_spawnToPosition.z) do centerPos.z = z for i, uid in pairs(getSpectators(centerPos, width, height, false)) do if(isMonster(uid)) then doRemoveCreature(uid) end end end end end function onStatsChange(target, cid, changetype, combat, value) if((cid and isMonster(cid) and getCreatureName(cid) == "Zombie Event") or (isInRange(getThingPosition(target), ZE_spawnFromPosition, ZE_spawnToPosition) and changetype == STATSCHANGE_HEALTHLOSS and math.abs(value) >= getCreatureHealth(target))) then doCreatureAddHealth(target, getCreatureMaxHealth(target)) loseOnZombieArena(target) return false end return true end /data/creaturescripts/scripts/zombie/ondeath.lua function onDeath(cid) setZombiesToSpawnCount(getZombiesToSpawnCount() + 2) doCreatureSay(cid, "I'll be back!", 19) return true end /data/creaturescripts/scripts/zombie/onthink.lua function onThink(cid) local target = getCreatureTarget(cid) if(target ~= 0 and not isPlayer(target)) then doRemoveCreature(target) end return true end /data/creaturescripts/scripts/login.lua add: registerCreatureEvent(cid, "ZombieAttack") /data/globalevents/scripts/zombie/onstartup.lua function onStartup() db.executeQuery("UPDATE `player_storage` SET `value` = 0 WHERE `key` = " .. ZE_isOnZombieArea .. ";") doSetStorage(ZE_STATUS, 0) doSetStorage(ZE_PLAYERS_NUMBER, ZE_DEFAULT_NUMBER_OF_PLAYERS) doSetStorage(ZE_ZOMBIES_TO_SPAWN, 0) doSetStorage(ZE_ZOMBIES_SPAWNED, 0) addZombiesEventBlockEnterPosition() return true end /data/globalevents/scripts/zombie/onthink.lua function onThink(interval, lastExecution, thinkInterval) if(getStorage(ZE_STATUS) == 2) then setZombiesToSpawnCount(getZombiesToSpawnCount()+1) local players = getZombiesEventPlayers() for i=1, getZombiesToSpawnCount() * 2 do if(getZombiesToSpawnCount() > 0 and spawnNewZombie()) then setZombiesToSpawnCount(getZombiesToSpawnCount()-1) end end end return true end /data/lib/zombie_event.lua -- CONFIG ZE_DEFAULT_NUMBER_OF_PLAYERS = 5 ZE_ACCESS_TO_IGNORE_ARENA = 3 -- POSITIONS ZE_blockEnterItemPosition = {x= 873, y=997, z=7} ZE_enterPosition = {x = 1638, y = 1530, z = 7} ZE_kickPosition = {x=874, y=994, z=7} ZE_spawnFromPosition = {x = 1617, y = 1514, z = 7} ZE_spawnToPosition = {x = 1671, y = 1565, z = 7} -- ITEM IDS ZE_blockEnterItemID = 2700 -- STORAGES -- - player ZE_isOnZombieArea = 34370 -- - global ZE_STATUS = 34370 -- =< 0 - off, 1 - waiting for players, 2 - is running ZE_PLAYERS_NUMBER = 34371 ZE_ZOMBIES_TO_SPAWN = 34372 ZE_ZOMBIES_SPAWNED = 34373 -- FUNCTION function setZombiesEventPlayersLimit(value) doSetStorage(ZE_PLAYERS_NUMBER, value) end function getZombiesEventPlayersLimit() return getStorage(ZE_PLAYERS_NUMBER) end function addPlayerToZombiesArea(cid) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) doTeleportThing(cid, ZE_enterPosition, true) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) if(getPlayerAccess(cid) < ZE_ACCESS_TO_IGNORE_ARENA) then setPlayerZombiesEventStatus(cid, os.time()) end end function kickPlayerFromZombiesArea(cid) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) doTeleportThing(cid, ZE_kickPosition, true) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) setPlayerZombiesEventStatus(cid, 0) end function getPlayerZombiesEventStatus(cid) return getCreatureStorage(cid, ZE_isOnZombieArea) end function setPlayerZombiesEventStatus(cid, value) doCreatureSetStorage(cid, ZE_isOnZombieArea, value) end function getZombiesEventPlayers() local players = {} for i, cid in pairs(getPlayersOnline()) do if(getPlayerZombiesEventStatus(cid) > 0) then table.insert(players, cid) end end return players end function getZombiesCount() return getStorage(ZE_ZOMBIES_SPAWNED) end function addZombiesCount() doSetStorage(ZE_ZOMBIES_SPAWNED, getStorage(ZE_ZOMBIES_SPAWNED)+1) end function resetZombiesCount() doSetStorage(ZE_ZOMBIES_SPAWNED, 0) end function getZombiesToSpawnCount() return getStorage(ZE_ZOMBIES_TO_SPAWN) end function setZombiesToSpawnCount(count) doSetStorage(ZE_ZOMBIES_TO_SPAWN, count) end function addZombiesEventBlockEnterPosition() if(getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID).uid == 0) then doCreateItem(ZE_blockEnterItemID, 1, ZE_blockEnterItemPosition) end end function removeZombiesEventBlockEnterPosition() local item = getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID) if(item.uid ~= 0) then doRemoveItem(item.uid) end end function spawnNewZombie() local posx = {} local posy = {} local posz = {} local pir = {} for i=1, 5 do local posx_tmp = math.random(ZE_spawnFromPosition.x ,ZE_spawnToPosition.x) local posy_tmp = math.random(ZE_spawnFromPosition.y ,ZE_spawnToPosition.y) local posz_tmp = math.random(ZE_spawnFromPosition.z ,ZE_spawnToPosition.z) local pir_tmp = 0 local spec = getSpectators({x=posx_tmp, y=posy_tmp, z=posz_tmp}, 3, 3, false) if(spec and #spec > 0) then for z, pid in pairs(spec) do if(isPlayer(pid)) then pir_tmp = pir_tmp + 1 end end end posx[i] = posx_tmp posy[i] = posy_tmp posz[i] = posz_tmp pir[i] = pir_tmp end local lowest_i = 1 for i=2, 5 do if(pir[i] < pir[lowest_i]) then lowest_i = i end end local ret = (type(doCreateMonster("Zombie Event", {x=posx[lowest_i], y=posy[lowest_i], z=posz[lowest_i]}, false)) == 'number') if(ret) then addZombiesCount() end return ret end /data/movements/scripts/zombie/onenter.lua function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if(not isPlayer(cid)) then return true end if(getPlayerAccess(cid) >= ZE_ACCESS_TO_IGNORE_ARENA) then addPlayerToZombiesArea(cid) elseif(#getZombiesEventPlayers() < getZombiesEventPlayersLimit() and getStorage(ZE_STATUS) == 1) then addPlayerToZombiesArea(cid) local players_on_arena_count = #getZombiesEventPlayers() if(players_on_arena_count == getZombiesEventPlayersLimit()) then addZombiesEventBlockEnterPosition() doSetStorage(ZE_STATUS, 2) doBroadcastMessage("Zombie Arena Event started.") else doBroadcastMessage(getCreatureName(cid) .. " has entered a Zombie Arena. We still need " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " players.") end else doTeleportThing(cid, fromPosition, true) addZombiesEventBlockEnterPosition() end return true end /data/talkactions/scripts/zombie/onsay.lua function onSay(cid, words, param, channel) if(getStorage(ZE_STATUS) ~= 2) then local players_on_arena_count = #getZombiesEventPlayers() if(param == 'force') then if(players_on_arena_count > 0) then setZombiesEventPlayersLimit(players_on_arena_count ) addZombiesEventBlockEnterPosition() doSetStorage(ZE_STATUS, 2) doBroadcastMessage("Zombie Arena Event started.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombies event started.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cannot start Zombies event. There is no players on arena.") end else if(param ~= '' and tonumber(param) > 0) then setZombiesEventPlayersLimit(tonumber(param)) end removeZombiesEventBlockEnterPosition() doSetStorage(ZE_STATUS, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Event started.") doPlayerBroadcastMessage(cid, "Zombie Arena Event teleport is opened. We are waiting for " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " players to start.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombies event is already running.") end return true end AGR EM XMLS /data/creaturescripts/creaturescripts.xml <event type="think" name="ZombieThink" event="script" value="zombie/onthink.lua"/> <event type="statschange" name="ZombieAttack" event="script" value="zombie/onattack.lua"/> <event type="death" name="ZombieDeath" event="script" value="zombie/ondeath.lua"/> /data/globalevents/globalevents.xml TFS 0.3 <globalevent name="ZombieGlobalThink" interval="5" event="script" value="zombie/onthink.lua"/> <globalevent name="ZombieGlobalStartup" type="start" event="script" value="zombie/onstartup.lua"/> TFS 0.4 <globalevent name="ZombieGlobalThink" interval="5000" event="script" value="zombie/onthink.lua"/> <globalevent name="ZombieGlobalStartup" type="start" event="script" value="zombie/onstartup.lua"/> /data/movements/movements.xml <movevent type="StepIn" actionid="5555" event="script" value="zombie/onenter.lua"/> /data/talkactions/talkactions.xml <talkaction log="yes" words="/zombiestart" access="4" event="script" value="zombie/onsay.lua"/> /data/monster/zombie_event.xml <monster name="Zombie Event" nameDescription="an event zombie" race="undead" experience="480" speed="170" manacost="0"> <health now="20000" max="20000"/> <look type="311" corpse="9875"/> <targetchange interval="5000" chance="50"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="1000" min="-1500" max="-2350"/> </attacks> <defenses armor="0" defense="0"/> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> <immunity fire="1"/> <immunity energy="1"/> <immunity poison="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="You wont last long!"/> <voice sentence="Mmmmh.. braains!"/> </voices> <script> <event name="ZombieThink"/> <event name="ZombieDeath"/> </script> <loot> </loot> </monster> /data/monster/monsters.xml


    Créditos
    PhoOwned 99%
    Sociopata 1%

    Bem é isso por favor antes de postar erros vejam se fizeram os procedimento de modo correto, por que eu uso isso RLs usam e nunca tiveram problema, e tbm so pra lembrar vcs precisam ter a arena tradicional do Zombie Event para garantir o funcionamento em 100% e pelo amor de deus n coloquem em ot com TFS menor que 0.3.
    OBRIGADO A TODOS E POR FAVOR COMENTEM
    <monster name="Zombie Event" file="zombie_event.xml"/>

Informação Importante

Confirmação de Termo