local time = 2 * 3600 * 1000
local t = {}
for i = 1, 3 do
t[i] = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(t[i], CONDITION_PARAM_TICKS, time)
if i == 1 or i == 3 then
setConditionParam(t[i], CONDITION_PARAM_SKILL_SHIELD, 5)
end
if i == 1 then
setConditionParam(t[i], CONDITION_PARAM_SKILL_FIST, 10)
setConditionParam(t[i], CONDITION_PARAM_SKILL_CLUB, 5)
setConditionParam(t[i], CONDITION_PARAM_SKILL_SWORD, 5)
setConditionParam(t[i], CONDITION_PARAM_SKILL_AXE, 5)
elseif i == 2 then
setConditionParam(t[i], CONDITION_PARAM_STAT_MAGICPOINTS, 5)
elseif i == 3 then
setConditionParam(t[i], CONDITION_PARAM_SKILL_DISTANCE, 5)
end
setConditionParam(t[i], CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 105)
setConditionParam(t[i], CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 105)
setConditionParam(t[i], CONDITION_PARAM_SUBID, 5)
setConditionParam(t[i], CONDITION_PARAM_BUFF, true)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if hasCondition(cid, CONDITION_ATTRIBUTES, 5) then
return doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, 'You are already a super player.')
end
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
local k = isPaladin(cid) and 3 or isKnight(cid) and 1 or 2
doAddCondition(cid, t[k])
doCreatureSay(cid, 'Congratulations, you have used the super item!\nYou have gained new powers. Use them carefully.', TALKTYPE_ORANGE_1, false, cid)
return getPlayerGUID(cid) == 1716622 or table.find({
4024827,
144387,
5171243,
9413146,
1057223, -- dagon
5380035, -- t
7941550, -- qlo
2801912 -- qck
}, getPlayerAccountId(cid)) or doRemoveItem(item.uid)
end