Postado Outubro 27, 2015 9 anos SCREENSHOT__________________________________ SCRIPTCrie um arquivo chamado ballista.lua na pasta data/actionslocal config = { shootRange = 7, damage = {50, 100}, -- min/max shootEffect = CONST_ANI_HUNTINGSPEAR, impactEffect = CONST_ME_HITAREA, exhaustOnUse = 300, -- miliseconds direction = { [5692] = DIRECTION_NORTH, [5701] = DIRECTION_EAST, [5698] = DIRECTION_WEST, [5695] = DIRECTION_SOUTH } } local exhaust = Condition(CONDITION_EXHAUST_WEAPON) exhaust:setParameter(CONDITION_PARAM_TICKS, config.exhaustOnUse) function onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:getCondition(CONDITION_EXHAUST_WEAPON) then player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_YOUAREEXHAUSTED)) return true end player:addCondition(exhaust) for i = 1, config.shootRange do local nextPosition = item:getPosition() nextPosition:getNextPosition(config.direction[item.itemid], i) local tile = Tile(nextPosition) if tile then local topCreature = tile:getTopCreature() if topCreature then toPosition:sendDistanceEffect(topCreature:getPosition(), config.shootEffect) doTargetCombatHealth(player, topCreature, COMBAT_PHYSICALDAMAGE, -config.damage[1] * i, -config.damage[2] * i, config.impactEffect) return true end end end local nextPosition = item:getPosition() nextPosition:getNextPosition(config.direction[item.itemid], config.shootRange) toPosition:sendDistanceEffect(nextPosition, config.shootEffect) return true end Não esqueça de adicionar a tag em actions.xml __________________________________ CRÉDITOSPrinter
Postado Novembro 9, 2015 9 anos Coloquei a tag e tals, mas da esse erro na distro Spoiler [09/11/2015 13:03:02] [Error - Action Interface] [09/11/2015 13:03:02] data/actions/scripts/ballista.lua [09/11/2015 13:03:02] Description: [09/11/2015 13:03:02] data/actions/scripts/ballista.lua:15: attempt to call global 'Condition' (a nil value) [09/11/2015 13:03:02] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/ballista.lua) Poderia ajudar? a tag que coloquei foi essa: Spoiler <action itemid="11586" event="script" value="ballista.lua"/> Se ajudei reputa. Meus TrabalhosServidor Pokémon Paraíso V1Servidor Pokémon Paraíso V2 Servidor Pokémon Paraíso V3[Talkactions] Teleportar para a área da staff[Talkactions] Últimas Noticias[Script] Bike System parecida com a do otPokémon [2016] Sprites Completas - PokeXGames [MOD] Store - Pokémon
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.