kiokis
New Member
- Joined
- Aug 20, 2009
- Messages
- 33
- Reaction score
- 0
this Marune I did, but I want you not to use protection area.
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, true)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
function onUse(cid, item, frompos, item2, topos)
if(isPlayer(item2.uid) == false) then
return false
end
if ((getPlayerLevel(cid) < 50) or (getPlayerMagLevel(cid) < 8)) then
doCreatureSay(cid, "lvl 50, ml 8", TALKTYPE_ORANGE_1)
return true
end
if not doCombat(cid, combat, numberToVariant(item2.uid)) then
return false
end
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (1000))
if(hasCondition(cid, CONDITION_EXHAUST)) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return true
end
doCreatureSay(item2.uid, "Aaaah...", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
doAddCondition(cid, exhaust)
doCreatureAddMana(cid, 300)
doSendMagicEffect(topos, 30)
return true
end