So i have this script but when i use this spell i can summon 10+ spiders, so what should i do to summon only 1 and other spell that summon 3 tarantulas in one use
it should work like that
Player: Spider (summons 1 spider)
and the other one
Player: Tarantula (summons 3 tarantulas).
Code:
function onCastSpell(cid, var)
local dir = getPlayerLookDir(cid)
local pos = getPlayerPosition(cid)
if(dir==1)then
pos.x = pos.x + 1
elseif(dir==2)then
pos.y = pos.y + 1
elseif(dir==3)then
pos.x = pos.x - 1
elseif(dir==0)then
pos.y = pos.y - 1
end
doConvinceCreature(cid, doCreateMonster("Spider", pos))
return true
end
it should work like that
Player: Spider (summons 1 spider)
and the other one
Player: Tarantula (summons 3 tarantulas).