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

Request magic wall surounding for a monster

Linryt

Conclusionot.sytes.net
Joined
Nov 29, 2008
Messages
73
Reaction score
0
I have this sweet monster idea and I want a monster to be able to shoot magic walls around people like rune ID:2292.
This will be for event purpouses so if anyone has this script or knows how to make it post it for me please. ^_^

Sincerelly, Linryt.
 
i had it working before, but for some reason i can't get this to work again o_O

you might have to create a custom spell for this.
 
imo you HAVE to put custom spell
but its so easy...
try
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)
local area = createCombatArea({

	{1, 1, 1},
	{1, 2, 1},
	{1, 1, 1}

})
setCombatArea(combat, area)
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
not tested, hope you can make spells.xml and monstername.xml lines...
 
So I put this in the monster script right? Allthough I ave no clue how to make the spells xml etc.
If i'm wrong or anything please enlighten me and please post any other script I may need for it.

I'm just not much of a scripter just trying to learn.

Sincerelly, Linryt.
 
Code:
	<instant name="Magic Wall Bomb" blocktype="all" enabled="0" event="script" value="monster/magic wall bomb.lua"/>
 
So If i'm right I make a lua script called magic wall bomb of what zakius gave me Then what I tried was I take the script that cykotitan gave me and I put that under attacks in my monster file (which didn't work) I'll post the monster script and and then any of you please tell me if you know what I did wrong?

Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="a VERY annoying parrot" nameDescription="Pete" race="blood" experience="0" speed="500" manacost="250">
	<health now="100000" max="100000"/>
	<look type="217" corpse="6056"/>
	<targetchange interval="5000" chance="20"/>
	<strategy attack="100" defense="0"/>
	<flags>
		<flag summonable="0"/>
		<flag attackable="1"/>
		<flag hostile="0"/>
		<flag illusionable="1"/>
		<flag convinceable="0"/>
		<flag pushable="1"/>
		<flag canpushitems="1"/>
		<flag canpushcreatures="1"/>
		<flag targetdistance="1"/>
		<flag staticattack="90"/>
		<flag runonhealth="100000"/>
	</flags>
	<attacks>
	<instant name="Magic Wall Bomb" blocktype="all" enabled="1" event="script" value="monster/magic wall bomb.lua"/>
		<attack name="melee" interval="2000" skill="13" attack="6"/>
	</attacks>
	<defenses armor="2" defense="6"/>
	<voices interval="1000" chance="70">		<voice sentence="Pete wants cracker!"/>
		<voice sentence="itens plz"/>
		<voice sentence="GN ITENS PLZZZ"/>
		<voice sentence="PLS GM"/>
		<voice sentence="FRENDS?"/>
		<voice sentence="OMG NO KILL MY"/>
		<voice sentence="I FREND GM NO KILL"/>
		<voice sentence="GIEV ITAN"/>
		<voice sentence="PLX LVL"/>
	</voices>
	<loot>
		<item id="3976" countmax="10" chance="50000"/><!-- worm -->
		<item id="3976" countmax="3" chance="50000"/><!-- worm -->
	</loot>
</monster>
 
Last edited:
Code:
	<attacks>
		<attack name="Magic Wall Bomb" interval="2000" chance="20" target="1" range="7"/>
		<attack name="melee" interval="2000" skill="13" attack="6"/>
	</attacks>
 
hows that supposed to work? please just copy my script paste it then make it right and repost it because if the attack goes through a script hows that supposed to work?
 
That's how I had it working for 2 years by now, so don't question it.

Just replace the corresponding part in your script.
 
Simple and easy:

data/spells/scripts/Random_mw.lua
Code:
function onCastSpell(cid, var)
local item = {}
local n = 10
repeat
    local t = getCreaturePosition(getCreatureTarget(cid))
    t.x = t.x-1+math.random(0,2)
    t.y = t.y-1+math.random(0,2)

    if queryTileAddThing(cid, t) == RETURNVALUE_NOERROR then
        if math.random(0,1) == 1 then
            item = doCreateItem(1498, 1, t)
        else
            item = doCreateItem(1499, 1, t)
        end
        doDecayItem(item)
        n = 0
    else
        n = n - 1
    end
until n == 0

return true
end

data/spells/spells.xml --edit it as you want
Code:
<instant name="randommw" words="!randommw" needtarget="1" enabled="0" script="random_mw.lua"/>

In any monster xml file add:
Code:
<attack type="instant" name="randommw" chance="40" interval="2000"/>
 
Last edited:
Back
Top