• 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 Crash server when player use Avalanche rune or thunderstorm rune on water (Random water)

Mariuskens

Sword Art Online 2D-MMORPG
Joined
Nov 21, 2008
Messages
1,000
Reaction score
106
Location
Spain
GitHub
Olimpotibia
Crash server when player use Avalanche rune or thunderstorm rune on water (Random water), but if try to use great fireball rune or other runes client say There is not enough room.

Anyone have idea how i can fix it?
In /data any file have it ro register id items cant use in water or something like it?

Thnx for your help
 
Maybe
@heba can help u
lol, first you tag me then edit to Heba? xD
eyFkjaC.png



Crash server when player use Avalanche rune or thunderstorm rune on water (Random water), but if try to use great fireball rune or other runes client say There is not enough room.

Anyone have idea how i can fix it?
In /data any file have it ro register id items cant use in water or something like it?

Thnx for your help
hm, Are you using a custom OBD file?
 
But i test to put protection zone in all water and dont crash just say is protection zone, but if i need put all protection zone in water ......... OMG

what OBD? explain me XD
 
Last edited by a moderator:
Code:
local water = {1111,1112,1113}
function onCastSpell(cid, var)
local pos = variantToPosition(var)
if isInArray(getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=0}).itemid,water) then
  return true
end

you could paste something like this into the runes, and add all waters id into the array i wrote this in the forum , so there might be some mistakes
 
Code:
local water = {1111,1112,1113}
function onCastSpell(cid, var)
local pos = variantToPosition(var)
if isInArray(getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=0}).itemid,water) then
  return true
end

you could paste something like this into the runes, and add all waters id into the array i wrote this in the forum , so there might be some mistakes
If you are getting the position from var why not just use
Code:
local pos = variantToPosition(var)
pos.stackpos = 0
if isInArray(water, getThingFromPos(pos).itemid) then
    return true
end
Also you had isInArray arguments reversed.
or
Code:
return isInArray(water, getThingFromPos(pos).itemid)
 
If you are getting the position from var why not just use
Code:
local pos = variantToPosition(var)
pos.stackpos = 0
if isInArray(water, getThingFromPos(pos).itemid) then
    return true
end
Also you had isInArray arguments reversed.
or
Code:
return isInArray(water, getThingFromPos(pos).itemid)

pos.stackpos = 0

doesn't make really much difference, i knew the parameters would be reversed lol,anyway i was just giving him a hint, he can do the rest
 
Back
Top