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

Token Npc Script....Errors

RockeTBunnYz

Trainee in progress
Joined
Jan 21, 2015
Messages
137
Reaction score
7
Location
sweden
Hey, i was writing and adding this script to my server and got this error but i cant find it anyway and there was some EOF error too...

Code:
[18:34:45.368] [Error - LuaInterface::loadFile] data/npc/scripts/tokentrader.lua
:32: unexpected symbol near '=='
[18:34:45.370] [Warning - NpcEvents::NpcEvents] Cannot load script: data/npc/scr
ipts/tokentrader.lua
[18:34:45.371] data/npc/scripts/tokentrader.lua:32: unexpected symbol near '=='
[18:34:45.580] [Notice - Npc::Npc] NPC Name: Frenzy - autowalk has been deprecat
ed, use walkinterval.
[18:34:45.582] [Error - LuaInterface::loadFile] data/npc/scripts/tokentrader.lua
:32: unexpected symbol near '=='
[18:34:45.583] [Warning - NpcEvents::NpcEvents] Cannot load script: data/npc/scr
ipts/tokentrader.lua
[18:34:45.584] data/npc/scripts/tokentrader.lua:32: unexpected symbol near '=='

here is my scripts can someone please help me make it work .....
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)                               npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)                           npcHandler:onCreatureDisappear(cid)            end
function onCreatureSay(cid, type, msg)                       npcHandler:onCreatureSay(cid, type, msg)        end
function onThink()                                           npcHandler:onThink()                    end

local t = {
tokens = 5468, -- id of tokens
items = {
[1] = {"boots of haste", 10, 2195},
[2] = {"demon helmet", 10, 2493},
}
}

local function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
        return false
        end
if msgcontains(msg, 'boots of haste') then
if getPlayerItemCount(cid,t.tokens,10) == true then                 -- 10 Game Tokens
selfSay('Did you bring me 10 game tokens?', cid)
else
selfSay('Sorry, I need you to have atleast {10 game tokens} . Come back when you have them.', cid)
    end
        end

if msgcontains(msg,'yes') then
    if getPlayerItemCount(cid,t.tokens,10) == true then
    doPlayerRemoveItem(cid,t.tokens,10) == true then
    doPlayerAddItem(cid,t.items > [1]) then                            ---- boots of haste
        selfSay"Here you go!" 
            end
if msgcontains(msg, 'demon helmet') then
if getPlayerItemCount(cid,t.tokens,10) == true then                 -- 10 Game Tokens
selfSay('Did you bring me 10 game tokens?', cid)
else
selfSay('Sorry, I need you to have atleast {10 game tokens} . Come back when you have them.', cid)
end
    end

if msgcontains(msg,'yes') then
    if getPlayerItemCount(cid,t.tokens,10) == true then
    doPlayerRemoveItem(cid,t.tokens,10) == true then
    doPlayerAddItem(cid,t.items > [2]) then                            ----- demon helmet
        selfSay"Here you go!" 
        end
    end

please help !!
 
Back
Top Bottom