• 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!

No summons on pos

andii95

New Member
Joined
Aug 21, 2009
Messages
413
Reaction score
2
Location
Sweden
Hi, i need help with something.
How do i fix so that a couple of cordinates cant have summons in it? I want to fix so ppl cant step on a tile or position with a summon. Only without summons. Is this do able?
It also sends a message so when stepping on the tile/pos it sends a message "You cant walk thrue with summons" or something.

Thanks in advance :)
 
If you are requesting something, use the Request Forum, the Support forum is to help people that have problems with their codes

you could do a onStepIn function and use getCreatureSummons(cid) to get the player summons and if he has any, remove them


I think the getCreatureSummons returns a table with all the summons, so it would be something like:

Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
   if isPlayer(cid) then
      local table = getCreatureSummons(cid)
      if #table > 0 then
          for i=1, #table, 1 do
             doSendMagicEffect(getCreaturePosition(table[i]), CONST_ME_POFF)
             doRemoveCreature(table[i])
          end
          doPlayerSendCancel(cid, "You cannot have summons in here!")
      end
   end
   return true
end
 
Last edited:
Thanks for helping. Ill try it out, but how do i use it? Do i just add <action actionid="1003" event="script" value="example.lua"/> in action id then put the script in action map aswell?
 
Just wondering if u got a script so when u tp ur summon follows u, cuz on my server the summons just dissapear as soon as i tp in a magic forcefield :/ rep++ btw
 
Back
Top