sick
Member
So i got this summon scroll script which is unfinished completely (It summons monster when used, removes some mana and has 20 charges, when charges are out it becomes to a piece of paper):
So the question is, could anyone edit it so when pressed "look" on the scroll i would see how many charges left ( like you see Summon scroll. Charges: 17 ) . And one more thing, it would be cool if it would have like 1 sec exhaust between pressing the scroll, because now you can summon it any time, even when using sds or so.
Thanks in advance, reputation for the ones who will help for sure :thumbup:
Code:
local config = {
[6119] = { -- # SCROLL ID # --
monster = "Demon Skeleton",
charges = 20,
mana = 600,
summons = 2
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = config[item.itemid]
if table.maxn(getCreatureSummons(cid)) >= v.summons then
return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
end
if getCreatureMana(cid) < v.mana then
return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
end
if item.actionid <= 0 then
doItemSetAttribute(item.uid, "aid", v.charges - 1)
elseif item.actionid == 1 then
doTransformItem(item.uid,7491)
else
doItemSetAttribute(item.uid, "aid", item.actionid - 1)
end
return doPlayerAddMana(cid, - v.mana) and doSummonMonster(cid,v.monster)
end
So the question is, could anyone edit it so when pressed "look" on the scroll i would see how many charges left ( like you see Summon scroll. Charges: 17 ) . And one more thing, it would be cool if it would have like 1 sec exhaust between pressing the scroll, because now you can summon it any time, even when using sds or so.
Thanks in advance, reputation for the ones who will help for sure :thumbup: