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

Onlook Error

Tachi

New Member
Joined
Aug 4, 2007
Messages
376
Reaction score
2
Location
USA, Missouri
Here's my onlook Code named "Questlook.lua"
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...
 
Creaturescripts type look doesn't exist in TFS 0.2.15.
Creaturescripts types you can use in TFS 0.2.15.
Code:
login
logout
think
preparedeath
death
kill
advance

Creaturescripts types from TFS 0.3/0.4 you can't use in TFS 0.2.15.
Code:
textedit
joinchannel
leavechannel
sendmail
receivemail
traderequest
tradeaccept
reportbug
look
direction
outfit
statschange
areacombat
push
target
follow
combat
attack
cast

textedit is btw added to TFS 1.0.
 
Back
Top