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

Strange problem with wild growth 0.3.6 rep++

Dalale

GX
Joined
Jun 13, 2008
Messages
718
Reaction score
2
Location
Sweden
Hello
Im using tfs 0.3.6 and I got a problem with my Wildgrowth rune, I have post both magic wall and wildgrowth rune since magic wall rune is working
perfectly.

Problem: Wildgrowth rune is working outside pz zone, but in quests it's not working because its pvp protection ( you can spamm your spells etc but dosnt heart people) anyways, the wildgrowth rune is never removed in pvp protection quests, people can spam it over hole quests and creatures
are not passing the growth, but players can pass it, well here is a picture since its hard to explain

nquw4j.jpg




magic wall.xml
Code:
	<item id="1498" article="a" name="magic wall">
		<attribute key="type" value="magicfield"/>
		<attribute key="decayTo" value="0"/>
		<attribute key="duration" value="20"/>
	</item>

Wild growth.xml
Code:
	<item id="1499" article="a" name="rush wood">
		<attribute key="type" value="magicfield"/>
		<attribute key="decayTo" value="0"/>
		<attribute key="duration" value="45"/>
	</item>

magic wall.lua

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1498)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)

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

wild growth.lua
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1499)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
try it
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
 
function onCastSpell(cid, var)
	local pos = variantToPosition(var)
	if getTileInfo(getThingPos(cid)).protection or getTileInfo(pos).protection then
		return not doPlayerSendDefaultCancel(cid, RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE)
	end
 
	local v = getTileItemByType(pos, ITEM_TYPE_MAGICFIELD).uid
	if v ~= 0 then
		doRemoveItem(v)
	end
 
	v = doCreateItemEx(1499)
	if doTileAddItemEx(pos, v) == 1 and getTileItemByType(pos, ITEM_TYPE_MAGICFIELD).uid ~= 0 then
		doDecayItem(v)
		return doCombat(cid, combat, var)
	else
		return not doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHROOM)
	end
end
 
Back
Top