Kod:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid)
npcHandler:onCreatureAppear(cid)
end
function onCreatureDisappear(cid)
npcHandler:onCreatureDisappear(cid)
end
function onCreatureSay(cid, type, msg)
if(getPlayerStorageValue(cid, 40000) == 1) then
npcHandler:onCreatureSay(cid, type, msg)
else
selfSay('Arrrrgh! A dirty paleskin! To me my children! Kill them my guards!', cid)
doSummonCreature("Orc Warlord", {x = 426, y = 333, z = 9})
doSummonCreature("Orc Warlord", {x = 431, y = 333, z = 9})
doSummonCreature("Orc Leader", {x = 427, y = 335, z = 9})
doSummonCreature("Orc Leader", {x = 428, y = 335, z = 9})
doSummonCreature("Slime", {x = 429, y = 335, z = 9})
doSummonCreature("Slime", {x = 429, y = 334, z = 9})
doSummonCreature("Orc Leader", {x = 430, y = 335, z = 9})
setPlayerStorageValue(cid, 40000, 1)
end
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
-- więcej twojego kodu tutaj (:
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
za odpowiedz z gory dzieki oczywiscie sie odwdziecze!
Zakładki