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

[Question] Spell whose area is a "certain" designed area? +Repping

Guitar Freak

_LüA_n☺b_
Joined
Dec 27, 2008
Messages
831
Reaction score
13
Location
Caracas, Venezuela
This is my doubt today. I want to make a spell that, instead of using the normal "areas" like:

Lua:
local area = {
	{0, 1, 0, 1, 0, 1, 0},
	{0, 0, 1, 1, 1, 0, 0},
	{0, 1, 1, 2, 1, 1, 0},
	{0, 0, 1, 1, 1, 0, 0},
	{0, 1, 0, 1, 0, 1, 0},
}

I want a spell that hits always in a "certain" pre-designed area, some sort of:

Lua:
spell_area_from = {x = 123, y = 123, z = 7}
spell_area_to = {x = 321, y = 321, z = 7}

Or something like "the area where the player is positioned, but +123&-123 in X and +123&-123 in Y", but I think this one would be harder.

(I know I could do the last one by using the normal area, but Im not exagerating by using numbers like 123, I do want some HUGE area so I prefer using coordinates than having to make a huge array of 100s of lines full of 0s and 1s everywhere which wont let me be organized)

Anyhow that's pretty much what Im looking for, be the 1st or the 2nd both work for what Im trying.

To avoid confusion, this is NOT what I mean:

I dont want a spell that CAN BE USED in a certain selected area, the spell will be used in any area but will AFFECT/HIT only a selected area chosen by me or an area that surrounds the player in a *really* huge range.

I havent tried to pull this off yet and maybe it isnt even as hard as I think but I will be extremely busy the next few days and wont be able to try this myself, therefore I ask here in case anyone knows about this better or can give me a head start.

Thanks in advance! Im +repping helpful answers.
-GF
 
maybe like this ?

Lua:
-- 321 - 123 = 198 / 2 = 99
-- to - from = range / 2 = center

local arr = {}

for y = 1, 198 do
    table.insert(arr, {})
    for x = 1, 198 do
        table.insert(arr[y], (((y == 99) and (x == 99)) and 2 or 1))
    end
end

local area = createCombatArea(arr)
 
Back
Top