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

Problem z itemem / funkcją.

Zielas92

New Member
Joined
Oct 24, 2010
Messages
17
Reaction score
0
Cześć wam, mam pewien problem z itemkiem, chciałbym aby po użyciu dawał on kilka procent do dmg ze wszytkich czarów, mam skrypt oparty o condition'y ale nie wiem który odpoiada za to co chcę uzyskać.

Chciałbym przerobić poniższy skrypt na taki, który da mi porządany efekt lub też prosić was o inny, który będzie działał na tej samej lub podobnej zasadzie.

Oto skrypt, który chcę przerobić (obecnie daje on % do many):

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

Jeśli nie ma możliwości przerobienia poyższego skryptu to byłbym bardzo wdzięczny za inny. Pozdrawiam i proszę tylko o mądre i sensowne odpowiedzi.
 
Back
Top