Forum nie tylko o Tibii i OTS...

Nie tylko o Tibii i OTS...

  • Nie jesteś zalogowany.

#1 2011-07-29 12:26:13

 Yogi

http://i37.tinypic.com/30iway9.gif

status ??
308133
Call me!
Skąd: Świebodzin
Zarejestrowany: 2008-06-29
Posty: 98
Server: 1
WWW

Skrypt NPC!

Witam ;]
Napotkałem takowy skrypt i głowie się nad tym bo nie widzę błędu w linijkach.


Kod:

[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 :

Kod:

------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 
end

Z góry dziękuje za Pomoc!


http://jacekkopiec.w.interia.pl/Gothic.gif

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
customform kredyt z dopłata sklep medyczny schody kielce szkolenia podatki katowice