OFeFreitas
New Member
- Joined
- Feb 17, 2024
- Messages
- 3
- Reaction score
- 0
I receive the following message when the player tries to attack a monster with wand/rods/weapons and no attack comes out.
error:
When I manage to kill a monster with spells like "exori frigo" the monster doesn't die (it doesn't generate a corpse)
and I have the following error:
scripts:
error:
script:[15:49:16.945] [Error - CreatureScript Interface]
[15:49:16.945] data/creaturescripts/scripts/doq/demonOakAttack.luanAttack
[15:49:16.945] Description:
[15:49:16.945] data/creaturescripts/scripts/doq/demonOakAttack.lua:3: attempt to index global 'questAreaPosition' (a nil value)
[15:49:16.946] stack traceback:
[15:49:16.946] data/creaturescripts/scripts/doq/demonOakAttack.lua:3: in function <data/creaturescripts/scripts/doq/demonOakAttack.lua:1>
function onAttack(cid, target)
if not isPlayer(cid) or not isMonster(target) then return true end
if not isInRange(getCreaturePosition(cid), questAreaPosition[1], questAreaPosition[2]) and isInRange(getCreaturePosition(target), questAreaPosition[1], questAreaPosition[2]) then
return false
end
return true
end
When I manage to kill a monster with spells like "exori frigo" the monster doesn't die (it doesn't generate a corpse)
and I have the following error:
[15:55:10.842] [Error - CreatureScript Interface]
[15:55:10.842] data/creaturescripts/scripts/killinginthenameof.luanKill
[15:55:10.842] Description:
[15:55:10.842] data/creaturescripts/scripts/killinginthenameof.lua:3: attempt to call global 'getPlayerStartedTasks' (a nil value)
[15:55:10.842] stack traceback:
[15:55:10.842] data/creaturescripts/scripts/killinginthenameof.lua:3: in function <data/creaturescripts/scripts/killinginthenameof.lua:1>
scripts:
function onKill(cid, target, lastHit)
local started = getPlayerStartedTasks(cid)
if isPlayer(target) or isSummon(target) then return true end
if started and #started > 0 then
for _, id in ipairs(started) do
if isInArray(tasks[id].creatures, getCreatureName(target):lower()) then
if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < 0 then
doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, 0)
end
if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < tasks[id].killsRequired then
doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) + 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) .. "/" .. tasks[id].killsRequired .. " " .. tasks[id].raceName .. " already killed.")
end
end
end
end
return true
end