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

Woe, problem magic wall

pugamoline

uint32_t patch_mem(char *
Joined
Nov 15, 2011
Messages
189
Reaction score
19
I have a small problem in "War of Emperium" players can use rune magic wall that people can not conquer the castle, some solution to the rune can not be used in x "town"




this is a example:


Lua:
local fromPosition = {x="1000", y="1000", z="0"}
local toPosition = {x="1000", y="1000", z="15"}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)
 
function onCastSpell(cid, var)
if not isInRange(cid, fromPosition, toPosition) then
	return doCombat(cid, combat, var)
		else
	return doPlayerSendCancel(cid, "You may not use this rune in WOE")
	end
end
 
this code I use for zombie event , I hope it helps you. (I changed it so , that you can try it)


Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)
local WoE = {
frompos = {x=1000, y=1000, z=0},
topos = {x=1000, y=1000, z=15},
}
function onCastSpell(cid, var)
if not isInArea(getPlayerPosition(cid), WoE.frompos, WoE.topos) then
return doCombat(cid, combat, var)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You may not use this rune in WoE.")
end
end
 
Last edited:
Back
Top