Thunder OT 8.0
New Member
- Joined
- Jan 24, 2014
- Messages
- 16
- Reaction score
- 0
As the topic says.. Thanks in advance!
Why? maybe just make infernal bolt script in weapons and inside if getplayerslot(hand) == arbalest then return true or something.yes, im pretty sure it would require source edit in weapons.cpp
yes, im pretty sure it would require source edit in weapons.cpp
Why? maybe just make infernal bolt script in weapons and inside if getplayerslot(hand) == arbalest then return true or something.
As the topic says.. Thanks in advance!
local config =
{
----------------- CONFIGURATION ----------------
removeAmmo = true, -- set true to remove one ammo per each shot. true is better for more RPG (remember to add , after "true" or "false")
damageMultipiler = 1.0, -- 1.0 mean 100% of you normal damage will be apiled per each shot (0.75 = 75%, 2.0 = 200% ...)
alwaysHits = true, -- set true to make this spell always hits, otherwise hits will be afected by your distance
--- YOU HAVE TO ADD AMMO IDS AND DISTANCE EFFECT FOR EACH AMMO ---
ammoIds = {11111, 22222, 33333}, -- type ids here
effects = {
[11111] = CONST_ANI_BOLT,
[22222] = CONST_ANI_ARROW,
[33333] = CONST_ANI_INFERNAL -- last can't have , at the end
}
}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)
function onGetFormulaValues(cid, level, maglevel)
max = -(13 * getItemAttack(getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid) ^ (1 / 1.5) + getPlayerSkillLevel(cid, 4) * 11 / 4 - 30) * config.damageMultipiler
-- yes yes, this formula looks ugly, but this is a real tibia calculation, you can edit it as you like
if config.alwaysHits == true then
min = max
else
min = 0
end
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
local ammo = getPlayerSlotItem(cid, CONST_SLOT_AMMO)
if(isInArray(config.starsids, ammo.itemid)) then
if(isCreature(getCreatureTarget(cid)) and (getCreatureHealth(getCreatureTarget(cid)) > 0)) then
local tos = getCreaturePosition(getCreatureTarget(cid))
local pos = getCreaturePosition(cid)
local ammo = getPlayerSlotItem(cid, CONST_SLOT_AMMO)
if(config.removeAmmo == true) then
doPlayerRemoveItem(cid, ammo.itemid, 1)
end
doCombat(cid, combat, var)
doSendDistanceShoot(pos, tos, config.effects[ammo.itemid])
end
else
return false
end
return true
end
In weapons scripts and remember to add line in weapons.xmlWhere do I put this arbalest script? I don't have any atm.