-Silnik NPC daj?cy Questy!!

Status
Zamknięty.

Vexot

User
Zarejestrowany
Dołączył
Październik 30, 2011
Posty
27
Liczba reakcji
0
Hello All!

Poszukuje Npc kt?ry daje questy! np. Musisz zabi? 35 dragon?w i po zabi?u wr?? do mnie. I za to dostajemy xxx Expa i np 3cc ;]
 
Odp: NPC daj?cy Questy!!

Wygrzeba?em tak? Wersj?, Wystarczy pozmienia? monstery, Nagrod? i ilo?? Expa do twoich potrzeb ;)
Tworzymy w Folderze NPC: Grizzly Adams.xml
A W Nim:
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Grizzly Adams" script="data/npc/scripts/serial_murder.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="289" head="57" body="59" legs="40" feet="76" addons="3"/>
</npc>

Nast?pnie:
NPC>scripts> Tworzymy: serial_murder.lua
Zawarto?? serial_murder.lua:
PHP:
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)            npcHandler:onCreatureSay(cid, type, msg)        end
function onThink()                    npcHandler:onThink()                    end

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 say(param)
            npcHandler:say(param.text,param.cid)
         end
    function delayedSay(text, delay, cid)
    if(not npcHandler:isFocused(cid)) then
                return FALSE
     else
         local param = {cid = cid, text = text}
            local delay = delay or 0
            local cid = cid or 0
            local nid = getNpcCid()
            addEvent(say, delay, param)


        end
    end

function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
    return false
end
    
	if msgcontains(msg, 'demonhunter addon') or msgcontains(msg, 'demonhunter') then
		if getPlayerStorageValue(cid,1280) == -1 then
			npcHandler:say('Are you realy want be a {demonhunter}?', cid)
			talk_state = 1
		elseif getPlayerStorageValue(cid,1280) == 1 then
			npcHandler:say('You don\'t kill {one thousand demons}! Back when you ready.', cid)
			talk_state = 0
		elseif getPlayerStorageValue(cid,1280) == 2 then
			npcHandler:say('Great! You are a realy demonhunter! For reward I maked for you {first demonhunter addon} and {demon trophy}! And my second reward is access to Ferumbras Tower!', cid)
           	doSendMagicEffect(getCreaturePosition(cid), 13)
           	doPlayerAddOutfit(cid, 288, 1)
           	doPlayerAddOutfit(cid, 289, 1)
			doPlayerAddItem(cid,7393,1)
			setPlayerStorageValue(cid, 1280, 3)
			setPlayerStorageValue(cid, 1281, 1)			
			talk_state = 0
		elseif getPlayerStorageValue(cid,1282) == -1 then
			npcHandler:say('If you want get next demonhunter addon kill {two thousand demons} and bring for me {two hundred demon dust}, ok?', cid)
			talk_state = 2
		elseif getPlayerStorageValue(cid,1282) == 1 then
			npcHandler:say('You don\'t kill two thousand demons! Back when you ready.', cid)
			talk_state = 0
		elseif getPlayerStorageValue(cid,1282) == 2 then
			npcHandler:say('Good! You have killed two thousand demons. Do you have 200 demon dust?', cid)
			talk_state = 3
		elseif getPlayerStorageValue(cid,1282) == 3 then
			npcHandler:say('You have finished demonhunter quest!', cid)
			talk_state = 0
		end
	elseif ((msgcontains(msg, 'oak') or msgcontains(msg, 'demon oak')) and getPlayerStorageValue(cid, 1282) == 3) and getPlayerStorageValue(cid, 13120) == -1 then
		npcHandler:say('Are you intresting in Demon Oak Quest?', cid)
		talk_state = 10
	elseif msgcontains(msg, 'yes') then
		if talk_state == 1 then
			npcHandler:say('So go and kill {one thousand demons}! Letter back to me.', cid)
			setPlayerStorageValue(cid, 1280, 1)
			talk_state = 0
		elseif talk_state == 2 then
			npcHandler:say('I\'ll be waiting.', cid)
			setPlayerStorageValue(cid, 1282, 1)
			talk_state = 0
		elseif talk_state == 3 then
			if getPlayerItemCount(cid,5906) >= 200 then
				if doPlayerRemoveItem(cid,5906,200) then
					npcHandler:say('Thank you. Good luck in future!', cid)
            			doSendMagicEffect(getCreaturePosition(cid), 13)
            			doPlayerAddOutfit(cid, 288, 2)
            			doPlayerAddOutfit(cid, 289, 2)
					setPlayerStorageValue(cid, 1282, 3)
					talk_state = 0
				end
			else
				npcHandler:say('Sorry, you don\'t have 200 demon dust.', cid)
				talk_state = 0
			end
		elseif talk_state == 10 then
			npcHandler:say('It\'s very long mission adn very hard. You must kill 6666 of demons and fight with evil tree on Undead Land. Good Luck.', cid)
			setPlayerStorageValue(cid, 13210, 1)
			talk_state = 0
		end
	elseif msgcontains(msg, 'mission') then
		npcHandler:say('If you\'ll be a serial murder, you must do many missions for me. Select oneself mission of {behemoth}, {lizards}, {giant spiders}, {spiders}, {drakens}, {ferumbras}, {juggernauts}, {dark torturers}, {bog raiders}, {undead dragons}, {vampires}, {dark mages}, {hand of cursed fates}, {phantasams}, {infernalists}, {sea serpents}, {nightmares}, {hell spawns}, {necromancers}, {wolfs}, {dragon lords}, {rotworms}, {minotaurs} or {deers}.', cid)
		if getPlayerStorageValue(cid, 47666) == -1 then
			setPlayerStorageValue(cid, 47666, 1)
		end
		talk_state = 0
	elseif msgcontains(msg, 'juggernaut') or msgcontains(msg, 'juggernauts') then
		if getPlayerStorageValue(cid,46020) == -1 then
			npcHandler:say('You selected hard mission. Yours job rest at killing 300 juggernauts. Reward is {Piece of Massare\'s Shell} and {5,000,000 expirence}}.', cid)
			setPlayerStorageValue(cid, 46020, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46020) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,6540,1)
                        doPlayerAddExp(cid, 5000000)
			setPlayerStorageValue(cid, 46020, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'dark torturer') or msgcontains(msg, 'dark torturers') then
		if getPlayerStorageValue(cid,46021) == -1 then
			npcHandler:say('You selected hard mission. Yours job rest at killing 500 dark torturers. Reward is {Mr. Punish\'s Handcuffs} and {3,500,000 expirence}.', cid)
			setPlayerStorageValue(cid, 46021, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46021) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,6537,1)
                        doPlayerAddExp(cid, 3500000)
			setPlayerStorageValue(cid, 46021, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'bog raider') or msgcontains(msg, 'bog raiders') then
		if getPlayerStorageValue(cid,46022) == -1 then
			npcHandler:say('You selected hard mission. Yours job rest at killing 1000 bog riders. Reward is {Plasmother\'s Remains} and {800,000 expirence} and {10 crystal coins}.', cid)
			setPlayerStorageValue(cid, 46022, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46022) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,6535,1)
                        doPlayerAddExp(cid, 800000)
                        doPlayerAddItem(cid,2160,10)
			setPlayerStorageValue(cid, 46022, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'undead dragon') or msgcontains(msg, 'undead dragons') then
		if getPlayerStorageValue(cid,46023) == -1 then
			npcHandler:say('You selected very hard mission. Yours job rest at killing 600 undead dragons. Reward is {Dracola\'s Eye} and {2,500,000 expirence}.', cid)
			setPlayerStorageValue(cid, 46023, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46023) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,6546,1)
                        doPlayerAddExp(cid, 2500000)
			setPlayerStorageValue(cid, 46023, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'vampire') or msgcontains(msg, 'vampires') then
		if getPlayerStorageValue(cid,46024) == -1 then
			npcHandler:say('If you kill 500 vampires I give you one vampire lord token. Letter you can change it for {vampire doll} per 50 tokens or {bat decoration} for 30 tokens.', cid)
			setPlayerStorageValue(cid, 46024, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46024) == 2 then
			npcHandler:say('Great job! Here is your token.', cid)
			doPlayerAddItem(cid,9020,1)
			setPlayerStorageValue(cid, 46024, 1)
			setPlayerStorageValue(cid, 45024, 1)
			talk_state = 0
		end
	elseif msgcontains(msg, 'dark mage') or msgcontains(msg, 'dark mages') then
		if getPlayerStorageValue(cid,46025) == -1 then
			npcHandler:say('You selected very hard mission. Yours job rest at killing 600 dark mages. Reward is {grey tome} and {backpack of holding} and {addon doll}.', cid)
			setPlayerStorageValue(cid, 46025, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46025) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,1985,1)
			doPlayerAddItem(cid,2365,1)
                        doPlayerAddItem(cid,6579,1)
			setPlayerStorageValue(cid, 46025, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'hand of cursed fate') or msgcontains(msg, 'hand of cursed fates') then
		if getPlayerStorageValue(cid,46026) == -1 then
			npcHandler:say('You selected very hard mission. Yours job rest at killing 500 hand of cursed fates. Reward is {Handmaiden\'s Protector} and {4,400,000 expirence}.', cid)
			setPlayerStorageValue(cid, 46026, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46026) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,6539,1)
                        doPlayerAddExp(cid, 4400000)
			setPlayerStorageValue(cid, 46026, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'phantasm') or msgcontains(msg, 'phantasms') then
		if getPlayerStorageValue(cid,46027) == -1 then
			npcHandler:say('You selected very hard mission. Yours job rest at killing 300 phantasms. Reward is {Countess Sorrow\'s Frozen Tear}.', cid)
			setPlayerStorageValue(cid, 46027, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46027) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,6536,1)
			setPlayerStorageValue(cid, 46027, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'infernalist') or msgcontains(msg, 'infernalists') then
		if getPlayerStorageValue(cid,46028) == -1 then
			npcHandler:say('You selected hard mission. Yours job rest at killing 600 inferlaists. Reward is {Imperor\'s Trident} and {25 crystal coins}.', cid)
			setPlayerStorageValue(cid, 46028, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46028) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,6534,1)
                        doPlayerAddItem(cid,2160,25)
			setPlayerStorageValue(cid, 46028, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'sea serpent') or msgcontains(msg, 'sea serpents') then
		if getPlayerStorageValue(cid,46029) == -1 then
			npcHandler:say('You selected hard mission. Yours job rest at killing 400 sea serpents. Reward is {Sea Serpent Trophy} and {800,000 expirence}.', cid)
			setPlayerStorageValue(cid, 46029, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46029) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,10529,1)
                        doPlayerAddExp(cid, 800000)
			setPlayerStorageValue(cid, 46029, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'nightmare') or msgcontains(msg, 'nightmares') then
		if getPlayerStorageValue(cid,46030) == -1 then
			npcHandler:say('You selected hard mission. Yours job rest at killing 1200 nightmares. Reward is {Bear} and {2,000,000 expirence} and {10 crystal coins}.', cid)
			setPlayerStorageValue(cid, 46030, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46030) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,3954,1)
                        doPlayerAddExp(cid, 2000000)
                        doPlayerAddItem(cid,2160,10)
			setPlayerStorageValue(cid, 46030, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'hell spawn') or msgcontains(msg, 'hell spawns') then
		if getPlayerStorageValue(cid,46032) == -1 then
			npcHandler:say('You selected hard mission. Yours job rest at killing 800 hell spawns. Reward is {Nose Ring} and {2,000,000 expirence} and {15 crystal coins}.', cid)
			setPlayerStorageValue(cid, 46032, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46032) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,5804,1)
                        doPlayerAddExp(cid, 2000000)
                        doPlayerAddItem(cid,2160,15)
			setPlayerStorageValue(cid, 46032, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'necromancer') or msgcontains(msg, 'necromancers') then
		if getPlayerStorageValue(cid,46033) == -1 then
			npcHandler:say('You selected hard mission. Yours job rest at killing 750 necormancers. Reward is {Soul Stone}.', cid)
			setPlayerStorageValue(cid, 46033, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46033) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,5809,1)
			setPlayerStorageValue(cid, 46033, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'quara predator') or msgcontains(msg, 'quara predators') then
		if getPlayerStorageValue(cid,46034) == -1 then
			npcHandler:say('You selected hard mission. Yours job rest at killing 600 quara predators. Reward is {Marlin Trophy} and {600,000 expirence}.', cid)
			setPlayerStorageValue(cid, 46034, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46034) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,7964,1)
                        doPlayerAddExp(cid, 600000)
			setPlayerStorageValue(cid, 46034, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'wolf') or msgcontains(msg, 'wolfs') then
		if getPlayerStorageValue(cid,46035) == -1 then
			npcHandler:say('You selected easy mission. Yours job rest at killing 50 wolfs. Reward is {Wolf Trophy} and {250,000 expirence}.', cid)
			setPlayerStorageValue(cid, 46035, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46035) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,7394,1)
			doPlayerAddExp(cid, 250000)
			setPlayerStorageValue(cid, 46035, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'dragon lord') or msgcontains(msg, 'dragon lords') then
		if getPlayerStorageValue(cid,46036) == -1 then
			npcHandler:say('You selected easy mission. Yours job rest at killing 1000 dragon lords. Reward is {Dragon Claw} and {800,000 expirence} and {10 crystal coins}.', cid)
			setPlayerStorageValue(cid, 46036, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46036) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,5919,1)
			doPlayerAddExp(cid, 800000)
                        doPlayerAddItem(cid,2160,10)
			setPlayerStorageValue(cid, 46036, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'deer') or msgcontains(msg, 'deers') then
		if getPlayerStorageValue(cid,46037) == -1 then
			npcHandler:say('You selected very easy mission. Yours job rest at killing 30 deers. Reward is {Deer Trophy} and {200,000 expirence}.', cid)
			setPlayerStorageValue(cid, 46037, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46037) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,7397,1)
			doPlayerAddExp(cid, 200000)
			setPlayerStorageValue(cid, 46037, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'minotaur') or msgcontains(msg, 'minotaurs') then
		if getPlayerStorageValue(cid,46038) == -1 then
			npcHandler:say('You selected very easy mission. Yours job rest at killing 100 miotaurs. Reward is {Minotaur Trophy} and {250,000 expirence}.', cid)
			setPlayerStorageValue(cid, 46038, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46038) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,7401,1)
			doPlayerAddExp(cid, 250000)
			setPlayerStorageValue(cid, 46038, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'rotworm') or msgcontains(msg, 'rotworms') then
		if getPlayerStorageValue(cid,46039) == -1 then
			npcHandler:say('You selected very easy mission. Yours job rest at killing 100 rotworms. Reward is {8 crystal coins}.', cid)
			setPlayerStorageValue(cid, 46039, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,46039) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,2160,8)
			setPlayerStorageValue(cid, 46039, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'behemoth') or msgcontains(msg, 'behemoths') then
		if getPlayerStorageValue(cid,14251) == -1 then
			npcHandler:say('You selected very hard mission. Yours job rest at killing 400 behemoth. Reward is {behemoth trophy} and {1,990,000 expirence}.', cid)
			setPlayerStorageValue(cid, 14251, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,14251) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,7396,1)
                        doPlayerAddExp(cid, 1990000)
			setPlayerStorageValue(cid, 14251, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'draken') or msgcontains(msg, 'drakens') then
		if getPlayerStorageValue(cid,14253) == -1 then
			npcHandler:say('You selected very hard mission. Yours job rest at killing 1000 drakens. Reward is {draken doll} and {1,000,000 expirence} and {25 crystal coins}.', cid)
			setPlayerStorageValue(cid, 14253, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,14253) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,11309,1)
                        doPlayerAddItem(cid,2160,25)
                        doPlayerAddExp(cid, 1000000)
			setPlayerStorageValue(cid, 14253, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'lizard') or msgcontains(msg, 'lizards') then
		if getPlayerStorageValue(cid,14255) == -1 then
			npcHandler:say('You selected very hard mission. Yours job rest at killing 900 lizards. Reward is {lizard trophy} and {800,000 expirence} and {25 crystal coins}.', cid)
			setPlayerStorageValue(cid, 14255, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,14255) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,11330,1)
                        doPlayerAddItem(cid,2160,25)
                        doPlayerAddExp(cid, 800000)
			setPlayerStorageValue(cid, 14255, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'giant spider') or msgcontains(msg, 'giant spiders') then
		if getPlayerStorageValue(cid,14257) == -1 then
			npcHandler:say('You selected very hard mission. Yours job rest at killing 800 giant spiders. Reward is {spiderwebs} and {1,500,000 expirence} and {10 crystal coins}.', cid)
			setPlayerStorageValue(cid, 14257, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,14257) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,8860,1)
                        doPlayerAddItem(cid,2160,10)
                        doPlayerAddExp(cid, 1500000)
			setPlayerStorageValue(cid, 14257, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'spider') or msgcontains(msg, 'spiders') then
		if getPlayerStorageValue(cid,14259) == -1 then
			npcHandler:say('You selected very easy mission. Yours job rest at killing 40 spiders. Reward is {toy spider} and {360,000 expirence}.', cid)
			setPlayerStorageValue(cid, 14259, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,14259) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,9006,1)
                        doPlayerAddExp(cid, 360000)
			setPlayerStorageValue(cid, 14259, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'ferumbras') then
		if getPlayerStorageValue(cid,14261) == -1 then
			npcHandler:say('You selected very hard mission. Yours job rest at killing 2 ferumbras. Reward is {fireflanz} and {ferumbras hat}.', cid)
			setPlayerStorageValue(cid, 14261, 1)
			talk_state = 0
		elseif getPlayerStorageValue(cid,14261) == 2 then
			npcHandler:say('Great job! Here is your reward.', cid)
			doPlayerAddItem(cid,7959,1)
                        doPlayerAddItem(cid,5903,1)
			setPlayerStorageValue(cid, 14261, 3)
			talk_state = 0
		end
	elseif msgcontains(msg, 'doll') then
		if getPlayerItemCount(cid,9020) >= 50 then 
			if doPlayerRemoveItem(cid,9020,50) then
				doPlayerAddItem(cid,9019,1)
				npcHandler:say('Here is you vampire doll.', cid)
				talk_state = 0
			end
		else
			npcHandler:say('You don\'t have 50 vampire lord tokens.', cid)
			talk_state = 0
		end
	elseif msgcontains(msg, 'vampire doll') then
		if getPlayerItemCount(cid,9020) >= 50 then 
			if doPlayerRemoveItem(cid,9020,50) then
				doPlayerAddItem(cid,9019,1)
				npcHandler:say('Here is you vampire doll.', cid)
				talk_state = 0
			end
		else
			npcHandler:say('You don\'t have 50 vampire lord tokens.', cid)
			talk_state = 0
		end
	elseif msgcontains(msg, 'bat decoration') then
		if getPlayerItemCount(cid,9020) >= 30 then 
			if doPlayerRemoveItem(cid,9020,30) then
				doPlayerAddItem(cid,6492,1)
				npcHandler:say('Here is you bat decoration.', cid)
				talk_state = 0
			end
		else
			npcHandler:say('You don\'t have 30 vampire lord tokens.', cid)
			talk_state = 0
		end
	elseif msgcontains(msg, 'no') then
		npcHandler:say('Ok, then not.', cid)
		talk_state = 0
	end

	return 1
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

A Tutaj Liczenie zabitych Potwork?w ;)
data>creaturescripts>scripts> Tworzymy: monster_counter.lua
PHP:
local monsters = {
	--name = storage
	["demon"] = 45007,
	["demonic"] = 45007,
	["juggernaut"] = 45020,
	["dark torturer"] = 45021,
	["bog raider"] = 45022,
	["undead dragon"] = 45023,
	["vampire"] = 45024,
	["dark mage"] = 45025,
	["hand of cursed fate"] = 45026,
	["phantasm"] = 45027,
	["infernalist"] = 45028,
	["sea serpent"] = 45029,
	["nightmare"] = 45030,
	["hellspawn"] = 45032,
	["necromancer"] = 45033,
	["quara predator"] = 45034,
	["wolf"] = 45035,
        ["war wolf"] = 45035,
	["dragon lord"] = 45036,
	["deer"] = 45037,
	["minotaur"] = 45038,
	["rotworm"] = 45039,
	["the mutated pumpkin"] = 12999,
	["hades"] = 45012,
	["hegard"] = 45009,
	["dipthrah"] = 45006,
	["thalas"] = 45006,
	["hydra"] = 45004,
	["wyrm"] = 45004,	
	["lich"] = 45004,
	["syzam"] = 45011,
	["koshei the deathless"] = 14205,
	["behemoth"] = 14250,
	["draken spellweaver"] = 14252,
	["draken warmaster"] = 14252,
	["draken abomination"] = 14252,
	["draken elite"] = 14252,
	["lizard legionnaire"] = 14254,
	["lizard dragon priest"] = 14254,
	["lizard high guard"] = 14254,
	["lizard zaogun"] = 14254,
	["giant spider"] = 14256,
	["spider"] = 14258,
	["ferumbras"] = 14260,
        ["ashmuunrah"] = 14263,
        ["diipthrah"] = 14265,
        ["ashmmunrah"] = 14266,
        ["dipthraah"] = 14267,
        ["ashmunraah"] = 14268,
        ["dipthrol"] = 14269,
        ["ashmuunroh"] = 14270
}

function onKill(cid, target)
	local name = getCreatureName(target)
	local monster = monsters[getCreatureName(target):lower()]
	if name == "Demon" or name == "Demonic" then
		if(isPlayer(target) == FALSE and monster) then
			if getPlayerStorageValue(cid, 1280) == 1 then
				if getPlayerStorageValue(cid, monster) < 1000 then 
					local killedMonsters = getPlayerStorageValue(cid, monster)
					if(killedMonsters == -1) then
						killedMonsters = 1
					end
					setPlayerStorageValue(cid, monster, killedMonsters + 1)
					doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 1000 demons.")
				else
					doPlayerSendTextMessage(cid, 22, "You have killed enough demons.")
					setPlayerStorageValue(cid, 1280, 2)
				end
			elseif getPlayerStorageValue(cid, 1282) == 1 then
				if getPlayerStorageValue(cid, 45008) < 2000 then 
					local killedMonsters = getPlayerStorageValue(cid, 45008)
					if(killedMonsters == -1) then
						killedMonsters = 1
					end
					setPlayerStorageValue(cid, 45008, killedMonsters + 1)
					doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 2000 demons.")
				else
					doPlayerSendTextMessage(cid, 22, "You have killed enough demons.")
					setPlayerStorageValue(cid, 1282, 2)
				end
			elseif getPlayerStorageValue(cid, 13210) == 1 then
				if getPlayerStorageValue(cid, 13121) < 6666 then 
					local killedMonsters = getPlayerStorageValue(cid, 13121)
					if(killedMonsters == -1) then
						killedMonsters = 1
					end
					setPlayerStorageValue(cid, 13121, killedMonsters + 1)
					doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 6666 demons.")
				else
					doPlayerSendTextMessage(cid, 22, "You have killed enough demons.")
					setPlayerStorageValue(cid, 13210, 2)
				end
			end
		end
	elseif name == "The Mutated Pumpkin" then
		if(isPlayer(target) == FALSE and monster) then	
			setPlayerStorageValue(cid,12999,1)
		end
	elseif name == "Juggernaut" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46020) == 1) then
			if getPlayerStorageValue(cid, monster) < 300 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 300 juggernauts.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough jugegernauts.")
				setPlayerStorageValue(cid, 46020, 2)
			end
		end
	elseif name == "Dark Torturer" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46021) == 1) then
			if getPlayerStorageValue(cid, monster) < 500 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 500 dark torturers.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough dark torturers.")
				setPlayerStorageValue(cid, 46021, 2)
			end
		end
	elseif name == "Bog Raider" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46022) == 1) then
			if getPlayerStorageValue(cid, monster) < 1000 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 1000 bog raiders.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough bog raiders.")
				setPlayerStorageValue(cid, 46022, 2)
			end
		end
	elseif name == "Undead Dragon" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46023) == 1) then
			if getPlayerStorageValue(cid, monster) < 600 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 600 undead dragons.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough undead dragons.")
				setPlayerStorageValue(cid, 46023, 2)
			end
		end
	elseif name == "Vampire" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46024) == 1) then
			if getPlayerStorageValue(cid, monster) < 500 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 500 vampires.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough vampires.")
				setPlayerStorageValue(cid, 46024, 2)
			end
		end
	elseif name == "dark mage" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46025) == 1) then
			if getPlayerStorageValue(cid, monster) < 600 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 600 dark mages.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough dark mages.")
				setPlayerStorageValue(cid, 46025, 2)
			end
		end
	elseif name == "Hand of Cursed Fate" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46026) == 1) then
			if getPlayerStorageValue(cid, monster) < 500 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 500 hand of cursed fates.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough hand of cursed fates.")
				setPlayerStorageValue(cid, 46026, 2)
			end
		end
	elseif name == "Phantasm" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46027) == 1) then
			if getPlayerStorageValue(cid, monster) < 300 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 300 phantasms.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough phantasms.")
				setPlayerStorageValue(cid, 46027, 2)
			end
		end
	elseif name == "Infernalist" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46028) == 1) then
			if getPlayerStorageValue(cid, monster) < 600 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 600 infernalists.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough infernalists.")
				setPlayerStorageValue(cid, 46028, 2)
			end
		end
	elseif name == "Sea Serpent" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46029) == 1) then
			if getPlayerStorageValue(cid, monster) < 400 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 400 sea serpents.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough sea serpents.")
				setPlayerStorageValue(cid, 46029, 2)
			end
		end
	elseif name == "Nightmare" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46030) == 1) then
			if getPlayerStorageValue(cid, monster) < 1000 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 1000 nightmares.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough nightmares.")
				setPlayerStorageValue(cid, 46030, 2)
			end
		end
	elseif name == "Hellspawn" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46032) == 1) then
			if getPlayerStorageValue(cid, monster) < 800 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 800 hell spawns.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough hell spawns.")
				setPlayerStorageValue(cid, 46032, 2)
			end
		end
	elseif name == "Necromancer" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46033) == 1) then
			if getPlayerStorageValue(cid, monster) < 750 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 750 necromaners.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough necromaners.")
				setPlayerStorageValue(cid, 46033, 2)
			end
		end
	elseif name == "Quara Predator" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46034) == 1) then
			if getPlayerStorageValue(cid, monster) < 600 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 600 quara predators.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough quara predators.")
				setPlayerStorageValue(cid, 46034, 2)
			end
		end
	elseif name == "Wolf" or name == "War Wolf" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46035) == 1) then
			if getPlayerStorageValue(cid, monster) < 50 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 50 wolfs.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough wolfs.")
				setPlayerStorageValue(cid, 46035, 2)
			end
		end
	elseif name == "Dragon Lord" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46036) == 1) then
			if getPlayerStorageValue(cid, monster) < 1000 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 1000 dragon lords.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough dragon lords.")
				setPlayerStorageValue(cid, 46036, 2)
			end
		end
	elseif name == "Deer" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46037) == 1) then
			if getPlayerStorageValue(cid, monster) < 30 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 30 deers.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough deers.")
				setPlayerStorageValue(cid, 46037, 2)
			end
		end
	elseif name == "Minotaur" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46038) == 1) then
			if getPlayerStorageValue(cid, monster) < 100 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 100 minotaurs.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough minotaurs.")
				setPlayerStorageValue(cid, 46038, 2)
			end
		end
	elseif name == "Rotworm" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 46039) == 1) then
			if getPlayerStorageValue(cid, monster) < 100 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 100 rotworms.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough rotworms.")
				setPlayerStorageValue(cid, 46039, 2)
			end
		end
	elseif name == "Hades" then
		if(isPlayer(target) == FALSE and monster) then	
			hades = {x=32597, y=32550, z=10, stackpos=1}
			gethades = getThingfromPos(hades)
			doRemoveItem(gethades.uid,1)
		end
	elseif name == "Ashmuunrah" then
		if(isPlayer(target) == FALSE and monster) then	
			hades = {x=32713, y=32069, z=15, stackpos=1}
			gethades = getThingfromPos(hades)
			doRemoveItem(gethades.uid,1)
		end
        elseif name == "Diipthrah" then
		if(isPlayer(target) == FALSE and monster) then	
			hades = {x=32739, y=32072, z=15, stackpos=1}
			gethades = getThingfromPos(hades)
			doRemoveItem(gethades.uid,1)
		end
        elseif name == "Ashmmunrah" then
		if(isPlayer(target) == FALSE and monster) then	
			hades = {x=32741, y=32089, z=15, stackpos=1}
			gethades = getThingfromPos(hades)
			doRemoveItem(gethades.uid,1)
		end
        elseif name == "Dipthraah" then
		if(isPlayer(target) == FALSE and monster) then	
			hades = {x=32730, y=32107, z=15, stackpos=1}
			gethades = getThingfromPos(hades)
			doRemoveItem(gethades.uid,1)
		end
        elseif name == "Ashmunraah" then
		if(isPlayer(target) == FALSE and monster) then	
			hades = {x=32686, y=32104, z=15, stackpos=1}
			gethades = getThingfromPos(hades)
			doRemoveItem(gethades.uid,1)
		end
        elseif name == "Dipthrol" then
		if(isPlayer(target) == FALSE and monster) then	
			hades = {x=32679, y=32083, z=15, stackpos=1}
			gethades = getThingfromPos(hades)
			doRemoveItem(gethades.uid,1)
		end
        elseif name == "Ashmuunroh" then
		if(isPlayer(target) == FALSE and monster) then	
			hades = {x=32682, y=32063, z=15, stackpos=1}
			gethades = getThingfromPos(hades)
			doRemoveItem(gethades.uid,1)
		end
	elseif name == "Hegard" and getPlayerStorageValue(cid,86205) == 2 then
		if(isPlayer(target) == FALSE and monster) then	
  			if getPlayerStorageValue(cid, 45009) == -1 then 
                	setPlayerStorageValue(cid, 86205, 3)
                	setPlayerStorageValue(cid, 8624, -1)
				setPlayerStorageValue(cid, 45009, 1)
                	doPlayerSendTextMessage(cid, 22, "You have killed Hegard. Unfortunately Mour\'s husbend is dead.")
			end
		end
	elseif name == "Dipthrah" and getPlayerStorageValue(cid,86202) == 1 then
		if(isPlayer(target) == FALSE and monster) then	
                if getPlayerStorageValue(cid, 45006) == -1 then 
				setPlayerStorageValue(cid, 86202, 2)
				setPlayerStorageValue(cid, 8619, -1)
				setPlayerStorageValue(cid, 45006, 1)     
				doPlayerSendTextMessage(cid, 22, "You have killed Pharaoh, now back to Pharaoh.")
                end
		end
	elseif name == "Thalas" and getPlayerStorageValue(cid,86203) == 1 then
		if(isPlayer(target) == FALSE and monster) then	
                if getPlayerStorageValue(cid, 45006) == 1 then 
				setPlayerStorageValue(cid, 86203, 2)
				setPlayerStorageValue(cid, 8620, -1)
				setPlayerStorageValue(cid, 45006, 2)
				doPlayerSendTextMessage(cid, 22, "You have killed second Pharaoh, now back to Pharaoh.")
			end
		end
	elseif (name == "Hydra" or name == "Wyrm" or name == "Lich") and getPlayerStorageValue(cid,86305) == 1 then
		if(isPlayer(target) == FALSE and monster) then	
			if getPlayerStorageValue(cid, monster) < 50 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
				if(killedMonsters == -1) then
					killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 50 monsters.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough monsters.")
				setPlayerStorageValue(cid, 86201, 2)
			end
		end
	elseif name == "Syzam" and getPlayerStorageValue(cid,86206) == 2 then
		if(isPlayer(target) == FALSE and monster) then	
                if getPlayerStorageValue(cid, 45011) == -1 then 
                	setPlayerStorageValue(cid, 86206, 3)
				setPlayerStorageValue(cid, 45011, 1)
                	doPlayerSendTextMessage(cid, 22, "You have killed Syzam.")
			end
		end
	elseif name == "Koshei The Deathless" then
		if(isPlayer(target) == FALSE and monster) then	
               	setPlayerStorageValue(cid, 14202, 2)
			setPlayerStorageValue(cid, 14205, 1)
               	doPlayerSendTextMessage(cid, 22, "You have killed Koshei The Deathless.")
		end
	elseif name == "Behemoth" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 14251) == 1) then
			if getPlayerStorageValue(cid, monster) < 400 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 400 behemoths.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough behemoths.")
				setPlayerStorageValue(cid, 14251, 2)
			end
		end
	elseif(name == "Draken Warmaster" or name == "Draken Spellweaver" or name == "Draken Abomination" or name == "Draken Elite")then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 14253) == 1) then
			if getPlayerStorageValue(cid, monster) < 1000 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 1000 drakens.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough drakens.")
				setPlayerStorageValue(cid, 14253, 2)
			end
		end
	elseif(name == "Lizard High Guard" or name == "Lizard Zaogun" or name == "Lizard Dragon Priest" or name == "Lizard Legionnaire")then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 14255) == 1) then
			if getPlayerStorageValue(cid, monster) < 900 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 900 lizards.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough lizards.")
				setPlayerStorageValue(cid, 14255, 2)
			end
		end
	elseif name == "Giant Spider" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 14257) == 1) then
			if getPlayerStorageValue(cid, monster) < 800 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 800 giant spiders.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough giant spiders.")
				setPlayerStorageValue(cid, 14257, 2)
			end
		end
	elseif name == "Spider" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 14259) == 1) then
			if getPlayerStorageValue(cid, monster) < 40 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 100 spiders.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough spiders.")
				setPlayerStorageValue(cid, 14259, 2)
			end
		end
	elseif name == "Ferumbras" then
		if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, 14261) == 1) then
			if getPlayerStorageValue(cid, monster) < 2 then 
				local killedMonsters = getPlayerStorageValue(cid, monster)
           	 if(killedMonsters == -1) then
           	     killedMonsters = 1
				end
				setPlayerStorageValue(cid, monster, killedMonsters + 1)
				doPlayerSendTextMessage(cid, 22, "You have killed " .. killedMonsters .. " of 2 ferumbras.")
			else
				doPlayerSendTextMessage(cid, 22, "You have killed enough ferumbras.")
				setPlayerStorageValue(cid, 14261, 2)
			end
		end
	end
	return TRUE
end
Do creaturescripts.xml Dodajemy:
PHP:
	<event type="kill" name="MonsterCounter" event="script" value="monster_counter.lua"/>
 
Ostatnia edycja:
Status
Zamknięty.
Back
Do góry