• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

help with summon spell

Sean Larson

New Member
Joined
Oct 22, 2007
Messages
99
Reaction score
1
Location
Colorado
How would I make a spell that can summon certain monsters that the other spell cant

like utevo res summons the normal stuff

and utevo gran res summons harder monsters?

or if thats not possible how do i change the undead legion to check if u have 2 summoned all ready instead of being up to summon like 6 of them at a time
 
I like your idea, how exactly would i be able to do that I have

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)

local arr =
{
{0, 0, 0, 1, 1, 1,0 , 0, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 3, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 0, 0, 0},
}

local area = createCombatArea(arr)
setCombatArea(combat, area)

function onTargetTile(cid, pos)
local position = pos
position.stackpos = 255
local item = getThingfromPos(position)
if item.itemid > 0 then
if isInArray(GIANT, item.itemid) == TRUE then
doRemoveItem(item.uid,1)
doSendMagicEffect(pos, CONST_ME_POFF)
local creature = doSummonCreature("Dragon", pos)
doConvinceCreature(cid, creature)
end
end
end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

as a spell right now but it summons more then 2, how would i do what your saying?
 
Code:
function onSay(cid, words, param)
playermana = getPlayerMana(cid)
pos = getPlayerPosition(cid)
playervoc = getPlayerVocation(cid)
Level	  = getPlayerLevel(cid)


function ongetmanamana
	
	if param ~= "ghoul then
		mana = 100
		hp = 100
		LevelReq = 8
	else 
	if param ~= "mummy then
		mana = 120
		hp = 120
		LevelReq = 17
	else
	if param ~= "banshee then
		mana = 490
		hp = 650
		LevelReq = 45
	else
	if param ~= "necromancer then
		 mana = 450
		 hp = 500
		 LevelReq = 40
	else
	if param ~= "bonebeast then
		mana = 330
		hp = 470
		LevelReq = 37
	else
	if param ~= "vampire then
		mana = 300
		hp == 350
		LevelReq = 28
	else
	if param ~= "braindeath then
		mana = 700
		hp = 550
		Level Req = 47
	else
 	doPlayerSendCancel(cid,"Not Possible")
	doSendMagicEffect(pos,2)
	end
       end
     end
    end
   end
  end
	return mana, hp, LevelReq, param
end



if getTilePzInfo(pos) == 0 then
	 if (playermana >= mana and Level >= LevelReq ) then
		if (playervoc == 17 or playervoc == 18) then
                         doSummonCreature(param, getPlayerPosition(cid))
		         doConvinceCreature(cid, param)
		         doPlayerAddMana(cid,-mana)
			 doCreatureAddHealth(cid,-hp)
		         doSendMagicEffect(pos,4)
		else 
               doPlayerSendCancel(cid,"Incorrect Vocation")
               doSendMagicEffect(pos,2)
               end
            else
	    doPlayerSendCancel(cid,"Not Enough Mana")
	    doSendMagicEffect(pos,2)
            end
   else
   doPlayerSendCancel(cid,"You cant summon in a pz zone!")
   doSendMagicEffect(pos,2)
   end
end

This is what i got so far, i use hp because i have created a new vocation in my server ( necromancer ) any ideas comments would be usefull :)Note ***How can i use getcreaturename (param)***
 
Last edited:
Back
Top