
Nie tylko o Tibii i OTS...
Witam ;]
Napotkałem takowy skrypt i głowie się nad tym bo nie widzę błędu w linijkach.
[29/07/2011 12:05:29] [Error - LuaScriptInterface::loadFile] data/npc/scripts/pilaf/farmer.lua:32: ')' expected near 'm' [29/07/2011 12:05:29] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/pilaf/farmer.lua [29/07/2011 12:05:29] data/npc/scripts/pilaf/farmer.lua:32: ')' expected near 'm'
SKRYPT :
------STORAGE-------
------2500 do 2501-------
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
local item1 = 2674
local item2 = 2666
local item3 = 2667
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
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'help') or msgcontains(msg, 'mission') or msgcontains(msg, 'map') or msgcontains(msg, 'food')) then
selfSay('I can give you map to pilaf castle for {one apple}, {ten meat} and {five big fish}... Do you have this?.', cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
if (getPlayerStorageValue(cid,2501) > 1) then
selfSay('You have done this mission...', cid)
else
if(doPlayerRemoveItem(cid, item1, 1) and doPlayerRemoveItem(cid, item2, 20) and doPlayerRemoveItem(cid, item3, 5) == TRUE) then
doPlayerAddItem(cid, 5887)
setPlayerStorageValue(cid,2501,1)
doPlayerAddExperience(cid,2500)
selfSay('Thanks! Take this map. {You get 2500 experience}', cid)
elseif(msgcontains(msg, 'no') and talkState[talkUser] == 1) then
selfSay('I need food!.', cid)
end
end
return true
end
end
end
return true
endZ góry dziękuje za Pomoc!

Offline