Thorn
Spriting since 2013
hiii, well like i said i have an error in the console, this is my script:
and i am getting this:
plzz guys help me
- - - Updated - - -
i just saw that that happens when the throw magic wall into pz zone (yes, they can throw magic walls inside the temple or depot
)
LUA:
----------------------------------THIS CODE WAS SCRIPTED BY: OTSWE------------------------------------
local random_txt_onsay = true -- When casting a wall, should the player cast random catch phrases?
local otswe = {
timer = 15, -- How long will the magic wall stay
cooldown = 1, -- How long to cast another one
words = {"I LOVE MAGIC WALL!","HAHA YOU CANT GET ME","BIATCH","BOOM"}, -- Here can you add or edit the catch phrases!
txt = "END", -- Text when it removes
color_on_timer = TEXTCOLOR_BLUE, -- Color on countdown
empty_storage = 1000 -- Please set a unused storage
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerStorageValue(cid, otswe.empty_storage) > os.time()) then
doPlayerSendCancel(cid, "You are exhausted.")
return true
end
if getTileInfo(getThingPos(cid)).protection then
doPlayerSendCancel(cid, "You can't cast magic wall while your inside protection zone.")
else
local function removemw()
local magicwall = getTileItemById(toPosition, 1497).uid
if(magicwall > 0) then
doRemoveItem(magicwall)
doSendAnimatedText(toPosition,otswe.txt, TEXTCOLOR_RED)
doSendMagicEffect(toPosition, CONST_ME_ENERGYHIT)
end
return true
end
for mw = 1, otswe.timer do
local o = otswe.timer - mw
addEvent(doSendAnimatedText, mw * 1000, toPosition, o > 0 and tostring(o), otswe.color_on_timer)
end
doCreateItem(1497, toPosition)
setPlayerStorageValue(cid, otswe.storage, os.time() + otswe.cooldown)
addEvent(removemw, otswe.timer * 1000)
doSendMagicEffect(toPosition, CONST_ME_ENERGYAREA)
end
if random_txt_onsay == true then
doCreatureSay(cid, otswe.words[math.random(#otswe.words)], TALKTYPE_ORANGE_1)
end
return true
end
and i am getting this:
XML:
[05/08/2013 21:22:52] [Error - Action Interface]
[05/08/2013 21:22:52] data/actions/scripts/magicwall.lua:onUse
[05/08/2013 21:22:52] Description:
[05/08/2013 21:22:52] (luaDoCreateItem) Tile not found
plzz guys help me
- - - Updated - - -
i just saw that that happens when the throw magic wall into pz zone (yes, they can throw magic walls inside the temple or depot