Hi all, im using the sript posted below, which is 100% working, however, it bypasses the max summons and im able to summon infinite amounts of monsters, is there any way to fix this?
Code:
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, 27, "Please enter a level or password.")
return true
elseif(param == '200') then
if getPlayerLevel(cid) > 199 or getCreatureMana(cid) < getCreatureMaxMana(cid) then
if isKnight(cid) then
doConvinceCreature(cid, doSummonCreature ("Mage Pet 200", getThingPos(cid)))
doCreatureAddMana(cid, -getCreatureMaxMana(cid), false)
doPlayerAddSpentMana(cid, getCreatureMaxMana(cid))
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
else
doConvinceCreature(cid, doSummonCreature ("Tank Pet 200", getThingPos(cid)))
doCreatureAddMana(cid, -getCreatureMaxMana(cid), false)
doPlayerAddSpentMana(cid, getCreatureMaxMana(cid))
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
end
else
doPlayerSendTextMessage(cid, 27, "You are not ready to summon this pet")
end
end
end