• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

I need a spell

Dalt0n

Hiho:)
Joined
Dec 14, 2011
Messages
535
Reaction score
31
Location
Italia
Hello members of otland, i need a one spell,
I want the fast attack spell increase to 5 in 2 seconds
if they could make please: / I wanted to do it myself but I worked
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionParam(condition, CONDITION_PARAM_SKILL_ATTACKSPEEDPERCENT, 1000)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)

local speed = createConditionObject(CONDITION_PARALYZE)
setConditionParam(speed, CONDITION_PARAM_TICKS, 30000)
setConditionFormula(speed, -1.8, 60, -1.8, 60)
setCombatCondition(combat, speed)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 45000)
setCombatCondition(combat, exhaust)

function onCastSpell(cid, var)
        return doCombat(cid, combat, var)
end

an example;
to pull some 10 bolts or arrows, in 1 or 2 seconds, the spell is for paladin
 
Last edited:
Not available without source edit. you can try to change vocation and then change it back with addEvent though
 
Well what you can do to make it hapend is to addEvent to shot bolts.

dont have time to do it now so i will send you one of my scripts that does something simlar.

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_BLOODHIT)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POWERBOLT)
function onGetFormulaValues(cid, skill, attack, factor)	
		skill = getPlayerSkill(cid, 4)
		return
		- (skill * 1.3),
		- (skill * 2.8)
end
 
local repeatTimes = 2 [COLOR="#FF0000"]-- how many times it should shoot.[/COLOR]
local timeBetween = 350 -- 1000 = 1 sec [COLOR="#FF0000"]-- how long time between shots.[/COLOR]
 
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, 'onGetFormulaValues')
function onCastSpell(cid, var)
local Ppos = getCreaturePosition(cid) 
	if doPlayerRemoveItem(cid, 2547, 2) >= 2 then [COLOR="#FF0000"]-- how many power bolts it should take to cast the spell.[/COLOR]
		doPlayerSendCancel(cid,"Not enough power bolts.")
			doSendMagicEffect(Ppos, CONST_ME_POFF)
		return 0
		end
	for i = 1, repeatTimes do
		addEvent(doCombat, timeBetween * i, cid, combat, var)
	end
	return doCombat(cid, combat, var)
end


Edited some minor bug in it hope i didnt fuck it up to much. hehe
 
add this on creaturescript? if so what is the xml part to call it.

wat im doing wrong?
<event type="shoot bolt" name="increaseattspeed" event="script" value="increaseattspeed.lua"/>
 
Back
Top