• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent deleted thread

hello! it's nice script but tell me what i need to do if i want to add like 5 monsters hunter to my server :>
 
It's working but tackman tell me what i need to do when i wanna add 3 or 5 this events like: demon hunter, dragon lords hunter etc?
 
It's working but tackman tell me what i need to do when i wanna add 3 or 5 this events like: demon hunter, dragon lords hunter etc?

I think you need to change this :

Code:
monstername = [b]"demon"[/b], -- monster name
storage = [b]10001[/b], -- storage of kills 
hunterstorage = [b]10002[/b], -- storage of completed quest
 
Ok its works fine i know where is the problem :)
thanks!
 
Last edited:
idk how it works...when I kill 100 demon after i got the reward?Where I got the reward?Please reply

It's simple - when you kill - for example - 100 demons you'll get medal of honour and the second reward. It'll be placed in your backpack. When you get your reward you won't be able to do this quest again.

@Topic

Really useful scripts, thanks!
 
I have an issue, i made a few extra one's and for some reason it wont work.

creaturescripts/scripts/aknohunt.lua

Code:
-- Copyright to teckman
function onKill(cid, target)

local config = {
monstername = "akno", -- monster name
needeedkills = 1, -- kills needed to complete quest
reward1 = 2641, -- first reward id
reward1count = 1, -- first reward count
wrightablereward = 5785, -- second reward id
effect = 15, -- effect used after completing quest
storage = 10006, -- storage of kills
hunterstorage = 10007, -- storage of completed quest
pos = getPlayerPosition(cid) -- replacement for cid is target
}
        if(isMonster(target) == TRUE) then
            if getCreatureName(target) == config.monstername then
                if getPlayerStorageValue(cid, config.storage) == config.needeedkills-1 and getPlayerStorageValue(cid,config.hunterstorage) == -1 then
                    doCreatureSay(cid, "You killed "..config.needeedkills.." "..config.monstername..", you're a real "..config.monstername.." hunter. Here is your reward.", TALKTYPE_ORANGE_1)
                    setPlayerStorageValue(cid,config.hunterstorage,1)
                    doSendMagicEffect(config.pos, config.effect)
                    doPlayerAddItem(cid,config.reward1,config.reward1count)
                    medal = doPlayerAddItem(cid,config.wrightablereward,1)
                    doSetItemSpecialDescription(medal, "This medal was given to "..getPlayerName(cid).." for killing "..config.needeedkills.." "..config.monstername.." and becoming a real "..config.monstername.." hunter.")
                elseif getPlayerStorageValue(cid, config.storage) < config.needeedkills-1 then
                    setPlayerStorageValue(cid, config.storage,(getPlayerStorageValue(cid, config.storage))+1)
                    doCreatureSay(cid, "You need to kill "..config.needeedkills-getPlayerStorageValue(cid, config.storage).." "..config.monstername.." to become a "..config.monstername.." hunter.", TALKTYPE_ORANGE_1)
                end
            end
        end
    return TRUE
end

data/creaturescripts.xml
Code:
<creaturescripts>
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
<event type="death" name="inquisitionPortals" script="Inquisition/teleports_inquisition.lua"/>
<event type="kill" name="Monsterhunter" event="script" value="monsterhunter.lua"/>
<event type="kill" name="Aknohunt" event="script" value="aknohunt.lua"/>
<event type="kill" name="Apochunt" event="script" value="apochunt.lua"/>
</creaturescripts>

creaturescripts/scripts/login.lua

Code:
function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	registerCreatureEvent(cid, "Mail")
	registerCreatureEvent(cid, "GuildMotd")
	registerCreatureEvent(cid, "PlayerDeath")
	registerCreatureEvent(cid, "inquisitionPortals")
	registerCreatureEvent(cid, "Monsterhunter")
	registerCreatureEvent(cid, "Aknohunt")
	registerCreatureEvent(cid, "Apochunt") 
	return TRUE
end


When i go ingame, for some reason when i kill the creature nothing happens at all, but all the normal one works including the original / default one.
 
I have an issue, i made a few extra one's and for some reason it wont work.

creaturescripts/scripts/aknohunt.lua

Code:
-- Copyright to teckman
function onKill(cid, target)

local config = {
monstername = "akno", -- monster name
needeedkills = 1, -- kills needed to complete quest
reward1 = 2641, -- first reward id
reward1count = 1, -- first reward count
wrightablereward = 5785, -- second reward id
effect = 15, -- effect used after completing quest
storage = 10006, -- storage of kills
hunterstorage = 10007, -- storage of completed quest
pos = getPlayerPosition(cid) -- replacement for cid is target
}
        if(isMonster(target) == TRUE) then
            if getCreatureName(target) == config.monstername then
                if getPlayerStorageValue(cid, config.storage) == config.needeedkills-1 and getPlayerStorageValue(cid,config.hunterstorage) == -1 then
                    doCreatureSay(cid, "You killed "..config.needeedkills.." "..config.monstername..", you're a real "..config.monstername.." hunter. Here is your reward.", TALKTYPE_ORANGE_1)
                    setPlayerStorageValue(cid,config.hunterstorage,1)
                    doSendMagicEffect(config.pos, config.effect)
                    doPlayerAddItem(cid,config.reward1,config.reward1count)
                    medal = doPlayerAddItem(cid,config.wrightablereward,1)
                    doSetItemSpecialDescription(medal, "This medal was given to "..getPlayerName(cid).." for killing "..config.needeedkills.." "..config.monstername.." and becoming a real "..config.monstername.." hunter.")
                elseif getPlayerStorageValue(cid, config.storage) < config.needeedkills-1 then
                    setPlayerStorageValue(cid, config.storage,(getPlayerStorageValue(cid, config.storage))+1)
                    doCreatureSay(cid, "You need to kill "..config.needeedkills-getPlayerStorageValue(cid, config.storage).." "..config.monstername.." to become a "..config.monstername.." hunter.", TALKTYPE_ORANGE_1)
                end
            end
        end
    return TRUE
end

data/creaturescripts.xml
Code:
<creaturescripts>
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
<event type="death" name="inquisitionPortals" script="Inquisition/teleports_inquisition.lua"/>
<event type="kill" name="Monsterhunter" event="script" value="monsterhunter.lua"/>
<event type="kill" name="Aknohunt" event="script" value="aknohunt.lua"/>
<event type="kill" name="Apochunt" event="script" value="apochunt.lua"/>
</creaturescripts>

creaturescripts/scripts/login.lua

Code:
function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	registerCreatureEvent(cid, "Mail")
	registerCreatureEvent(cid, "GuildMotd")
	registerCreatureEvent(cid, "PlayerDeath")
	registerCreatureEvent(cid, "inquisitionPortals")
	registerCreatureEvent(cid, "Monsterhunter")
	registerCreatureEvent(cid, "Aknohunt")
	registerCreatureEvent(cid, "Apochunt") 
	return TRUE
end


When i go ingame, for some reason when i kill the creature nothing happens at all, but all the normal one works including the original / default one.

You must replace the monster name ("anko"), to "Anko".
 
Back
Top