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

Lua Desintegrate remove walls

mpa

Member
Joined
Oct 8, 2008
Messages
319
Reaction score
13
Location
Sweden
The desintegrate rune can be used to remove walls!!
How can you change this?
Here is the script:
PHP:
local function doRemoveObject(cid, pos)
 pos.stackpos = 1
 local object = getThingfromPos(pos)
 if(object.uid > 65535 and isCreature(object.uid) == FALSE and isMovable(object.uid) == FALSE and object.actionid == 0 and getTilePzInfo(pos) == FALSE) then
  doRemoveItem(object.uid)
  doSendMagicEffect(pos, CONST_ME_BLOCKHIT)
  return LUA_NO_ERROR
 end
 doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
 doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
 return LUA_ERROR
end
function onCastSpell(cid, var)
 local pos = variantToPosition(var)
 if(pos.x ~= 0 and pos.y ~= 0 and pos.z ~= 0) then
  return doRemoveObject(cid, pos)
 end
 doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
 doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
 return LUA_ERROR
end
 
Back
Top