Tachi
New Member
Here's my onlook Code named "Questlook.lua"
And here is the "Creaturescripts.xml"
And here is the error thrown from TFS - Version 0.2.15 (Mystic Spirit).
Please Note i tried changing "look" to "onlook", "onLook", and "Look" all show the same error, only difference is the names...
Code:
function onLook(cid, thing, position, lookDistance)
local quests = {20001, 20003, 20009}
local completed = {}
if isPlayer(thing.uid) then
for i = 1, #quests do
if getPlayerStorageValue(thing.uid, quests[i]) > 0 then
table.insert(completed, 1)
end
end
doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == 0 and ".\nShe" or ".\nHe") .. " has completed ".. #completed .. "/" .. #quests .. " quests")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPlayerName(thing.uid) .. " has completed " .. #completed .. "/" .. #quests .. " quests.")
end
return true
end
And here is the "Creaturescripts.xml"
Code:
<event type="look" name="questLook" script="questLook.lua"/>
And here is the error thrown from TFS - Version 0.2.15 (Mystic Spirit).
[24/12/2013 19:00:03] [Error - CreatureEvent::configureEvent] No valid type for creature event.look
[24/12/2013 19:00:03] Warning: [BaseEvents::loadFromXml] Can not configure event
Please Note i tried changing "look" to "onlook", "onLook", and "Look" all show the same error, only difference is the names...