• 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!

Lua Problem with item giving % to hit with spells

Zielas92

New Member
Joined
Oct 24, 2010
Messages
17
Reaction score
0
Hi guys, I would like to make the script below did not give % to mana but the damage from spells.

This is a script that would change:

Code:
local vocations = {191, 179, 182, 203, 197, 206, 209, 212, 185, 200, 227, 239, 194, 188, 251, 264, 6, 12, 18, 24, 30, 36, 42, 48, 63, 74, 81, 171, 220, 232, 244, 257}
local manaPercent = 15 --- How many % MP add! 
local time = 900 -- time in seconds
local storage = 40061 -- Must be unused!
 
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
 
local addmana = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(addmana, CONDITION_PARAM_BUFF, true)
setConditionParam(addmana, CONDITION_PARAM_SUBID, 1)
setConditionParam(addmana, CONDITION_PARAM_STAT_MAXMANAPERCENT, 100 + manaPercent) 
setConditionParam(addmana, CONDITION_PARAM_TICKS, time * 1000)
setCombatCondition(combat, addmana)
 
function remove(cid)
	if not isPlayer(cid) then
		return true
	end
	doPlayerSendTextMessage(cid, 23, "Bonus Ki is time out!")
end
 
function onUse(cid, item)
	if isInArray(vocations, getPlayerVocation(cid)) then 
		if exhaustion.get(cid, storage) == FALSE then
			doCombat(cid, combat, numberToVariant(cid))  
			doCreatureSay(cid, "Yeeeah, Bonus Ki!!!\nFeel the power!", 19)
			doSendMagicEffect(getCreaturePosition(cid), 133)
			doTransformItem(item.uid, 11609)
			addEvent(remove,time*1000, cid)
			exhaustion.set(cid, storage, time)
		else
			doPlayerSendCancel(cid, "Sorry, you only can again use this item after " .. exhaustion.get(cid, storage) .. " seconds.")	
		end	
	else
		doPlayerSendCancel(cid, "Sorry, you must be on last transform!")	
	end
	return TRUE 
end

Sorry for my english and thanks for help, I will be grateful.
 
~Refresh~ Please help me, can someone give me another script on the item, which gives a percent of the damage with spells on 15 minutes. Thanks!
 
Back
Top