• 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.

Bounty Hunter v1.

GeKirAh

Banned User
Joined
Feb 14, 2009
Messages
163
Reaction score
0
Location
Brazil !!!
Bounty Hunter v1
Bounty Hunter System v1.

What this system does is like the quest log system in some ways, You start the mission by talking to the NPC and he will give you a list. Once you have gotten this list is when the quest begins. Inside is a list of 5 names, each one you have to find and kill. the 5th name will be behind a door, protected until you have killed the other 4 names on the list. You can only kill the last name once to stop teams helping lower level characters. Each time you kill one of the names it marks as Dead on the list. Once you have killed all 5 names you can return back to the NPC to claim your reward. For this script to work properly, the 5th bounty (in the examples is Victoria) MUST be behind the door, use bounty_door.lua.

Credits:
Myself (code).
Jeddy (suggesting this idea to me).
Colandus (a few fixes).

Please note i'm still a novice scripter compared to many on here so please be gentle. I have tried to layout the config of the main files as best as i could to allow easy editing. Please let me know what you think.

To view screenshots of this script check the attachments at the bottom of this post.

If you want to download the files to save time here are the links:
-Megaupload Link:
http://www.megaupload.com/?d=INYGG3AD

Updates:
[23:34 09/12/2008] - Added "and isPlayer(cid) == FALSE" into creaturescripts. (Thanks, Colandus).


\actions\Bounty Hunter\bounty_list.lua
Code:
Code:
-- Bounty Hunter System v1
-- Created by Avashra / Ramondo. With thanks to Jeddy for ideas.
-- [url=http://finaldawn-ots.servegame.com]finaldawn-ots.servegame.com[/url]
-- Please keep credits.
-- 
-- To edit the "nostart" (were the player trys to read list when has not started quest) you can use the following:
-- "..city.." will add the city name.
-- "..npc.." will add the NPC's name that you start the quest at.
-- "..listname.." Will add the name of the quest.

function onUse(cid, item, frompos, item2, topos)

        -- Start of Config.

    -- Input values.

local gamemaster = "Ramondo" -- Gamemaster name.
local city = "Thais" -- City name were the player can start quest.
local npc = "City Guard" -- NPC name that starts the quest.
local listname = "Bounty Hunter Quest, list #001" -- Quest Name.
local dead = "Terminated" -- Wats displayed next to the Bountys name on list when killed.
local servername = "Finaldawn-OTServer" -- Your Server name. Used in error message.

    -- Spetial Messages.

local gratz = "Gratz! you have collected all the bountys. Return to the "..npc.." in "..city.." to collect your reward" -- Message to be displayed after list when player has killed all 5 bountys.
local error = "Error! Please contact "..gamemaster.." and report this fault." -- if an error occures.
local nostart = "Sorry, Unfortunetly you need to start the "..listname.." to read this list.\n\nYou can start this quest at "..city..", by talking to "..npc.."." -- If player has not started quest.

    -- Names of the bountys.

local name1 = "Marlon" -- Name of the first monster/bounty on the list.
local name2 = "Emily" -- Name of the second monster/bounty on the list.
local name3 = "Daniel" -- Name of the third monster/bounty on the list.
local name4 = "Rodney" -- Name of the fourth monster/bounty on the list.
local name5 = "Victoria" -- Name of the fith monster/bounty on the list.

    -- Action & Sotrage ID's used by this script.

local actionid = 2500 -- List Action ID. If changed also needs editing in the NPC file.
local storage = getPlayerStorageValue(cid,2500) -- Storage ID the start NPC gives. If changed also needs editing in the NPC file.
local storage1 = getPlayerStorageValue(cid,2501) -- Storage ID the first bounty gives. If changed also needs editing in the creaturescript file.
local storage2 = getPlayerStorageValue(cid,2502) -- Storage ID the second bounty gives. If changed also needs editing in the creaturescript file.
local storage3 = getPlayerStorageValue(cid,2503) -- Storage ID the third bounty gives. If changed also needs editing in the creaturescript file.
local storage4 = getPlayerStorageValue(cid,2504) -- Storage ID the fourth bounty gives. If changed also needs editing in the creaturescript file.
local storage5 = getPlayerStorageValue(cid,2505) -- Storage ID the fith bounty gives. If changed also needs editing in the creaturescript file.

        -- End of Config.
        -- DO NOT EDIT BEYOUND THIS POINT UNLESS YOU KNOW WHAT YOU ARE DOING.

local text = ""..listname..".\n\n"..nostart..""
local text1 = ""..listname..".\n\n"..name1..".\n"..name2..".\n"..name3..".\n"..name4..".\n"..name5.."."
local text2 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2..".\n"..name3..".\n"..name4..".\n"..name5.."."
local text3 = ""..listname..".\n\n"..name1..".\n"..name2.." - "..dead..".\n"..name3..".\n"..name4..".\n"..name5.."."
local text4 = ""..listname..".\n\n"..name1..".\n"..name2..".\n"..name3.." - "..dead..".\n"..name4..".\n"..name5.."."
local text5 = ""..listname..".\n\n"..name1..".\n"..name2..".\n"..name3..".\n"..name4.." - "..dead..".\n"..name5.."."
local text6 = ""..listname..".\n\n"..name1..".\n"..name2..".\n"..name3..".\n"..name4..".\n"..name5.." - "..dead.."."
local text7 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2.." - "..dead..".\n"..name3..".\n"..name4..".\n"..name5.."."
local text8 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2..".\n"..name3.." - "..dead..".\n"..name4..".\n"..name5.."."
local text9 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2..".\n"..name3..".\n"..name4.." -"..dead..".\n"..name5.."."
local text10 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2..".\n"..name3..".\n"..name4..".\n"..name5.." - "..dead.."."
local text11 = ""..listname..".\n\n"..name1..".\n"..name2.." - "..dead..".\n"..name3.." - "..dead..".\n"..name4..".\n"..name5.."."
local text12 = ""..listname..".\n\n"..name1..".\n"..name2.." - "..dead..".\n"..name3..".\n"..name4.." - "..dead..".\n"..name5.."."
local text13 = ""..listname..".\n\n"..name1..".\n"..name2.." - "..dead..".\n"..name3..".\n"..name4..".\n"..name5.." - "..dead.."."
local text14 = ""..listname..".\n\n"..name1..".\n"..name2..".\n"..name3.." - "..dead..".\n"..name4.." - "..dead..".\n"..name5.."."
local text15 = ""..listname..".\n\n"..name1..".\n"..name2..".\n"..name3.." - "..dead..".\n"..name4..".\n"..name5.." - "..dead.."."
local text16 = ""..listname..".\n\n"..name1..".\n"..name2..".\n"..name3..".\n"..name4.." - "..dead..".\n"..name5.." - "..dead.."."
local text17 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2.." - "..dead..".\n"..name3.." - "..dead..".\n"..name4..".\n"..name5.."."
local text18 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2.." - "..dead..".\n"..name3..".\n"..name4.." - "..dead..".\n"..name5.."."
local text19 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2.." - "..dead..".\n"..name3..".\n"..name4..".\n"..name5.." - "..dead.."."
local text20 = ""..listname..".\n\n"..name1..".\n"..name2.." - "..dead..".\n"..name3.." - "..dead..".\n"..name4.." - "..dead..".\n"..name5.."."
local text21 = ""..listname..".\n\n"..name1..".\n"..name2.." - "..dead..".\n"..name3.." - "..dead..".\n"..name4..".\n"..name5.." - "..dead.."."
local text22 = ""..listname..".\n\n"..name1..".\n"..name2..".\n"..name3.." - "..dead..".\n"..name4.." - "..dead..".\n"..name5.." - "..dead.."."
local text23 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2.." - "..dead..".\n"..name3.." - "..dead..".\n"..name4.." - "..dead..".\n"..name5.."."
local text24 = ""..listname..".\n\n"..name1..".\n"..name2.." - "..dead..".\n"..name3.." - "..dead..".\n"..name4.." - "..dead..".\n"..name5.." - "..dead.."."
local text25 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2..".\n"..name3.." - "..dead..".\n"..name4.." - "..dead..".\n"..name5.." - "..dead.."."
local text26 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2.." - "..dead..".\n"..name3..".\n"..name4.." - "..dead..".\n"..name5.." - "..dead.."."
local text27 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2.." - "..dead..".\n"..name3.." - "..dead..".\n"..name4..".\n"..name5.." - "..dead.."."
local text28 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2.." - "..dead..".\n"..name3.." - "..dead..".\n"..name4..".\n"..name5.." - "..dead.."."
local text29 = ""..listname..".\n\n"..name1.." - "..dead..".\n"..name2.." - "..dead..".\n"..name3.." - "..dead..".\n"..name4.." - "..dead..".\n"..name5.." - "..dead..".\n\n"..gratz.."."
local error_text = ""..listname..".\n\n"..error.."\n\nSorry, Yours\n"..servername..""

    if storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == -1 and storage4 == -1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text1)
    elseif storage == 1 and storage1 == 1 and storage2 == -1 and storage3 == -1 and storage4 == -1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text2)
    elseif storage == 1 and storage1 == -1 and storage2 == 1 and storage3 == -1 and storage4 == -1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text3)
    elseif storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == 1 and storage4 == -1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text4)
    elseif storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == -1 and storage4 == 1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text5)
    elseif storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == -1 and storage4 == -1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text6)
    elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == -1 and storage4 == -1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text7)
    elseif storage == 1 and storage1 == 1 and storage2 == -1 and storage3 == 1 and storage4 == -1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text8)
    elseif storage == 1 and storage1 == 1 and storage2 == -1 and storage3 == -1 and storage4 == 1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text9)
    elseif storage == 1 and storage1 == 1 and storage2 == -1 and storage3 == -1 and storage4 == -1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text10)
    elseif storage == 1 and storage1 == -1 and storage2 == 1 and storage3 == 1 and storage4 == -1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text11)
    elseif storage == 1 and storage1 == -1 and storage2 == 1 and storage3 == -1 and storage4 == 1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text12)
    elseif storage == 1 and storage1 == -1 and storage2 == 1 and storage3 == -1 and storage4 == -1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text13)
    elseif storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == 1 and storage4 == 1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text14)
    elseif storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == 1 and storage4 == -1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text15)
    elseif storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == -1 and storage4 == 1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text16)
    elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == 1 and storage4 == -1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text17)
    elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == -1 and storage4 == 1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text18)
    elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == -1 and storage4 == -1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text19)
    elseif storage == 1 and storage1 == -1 and storage2 == 1 and storage3 == 1 and storage4 == 1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text20)
    elseif storage == 1 and storage1 == -1 and storage2 == 1 and storage3 == 1 and storage4 == -1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text21)
    elseif storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == 1 and storage4 == 1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text22)
    elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == 1 and storage4 == 1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text23)
    elseif storage == 1 and storage1 == -1 and storage2 == 1 and storage3 == 1 and storage4 == 1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text24)
    elseif storage == 1 and storage1 == 1 and storage2 == -1 and storage3 == 1 and storage4 == 1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text25)
    elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == -1 and storage4 == 1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text26)
    elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == 1 and storage4 == 1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text27)
    elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == 1 and storage4 == -1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text28)
    elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == 1 and storage4 == 1 and storage5 == 1 then
        doShowTextDialog(cid, item.itemid, text29)
    elseif storage == -1 and storage1 == -1 and storage2 == -1 and storage3 == -1 and storage4 == -1 and storage5 == -1 then
        doShowTextDialog(cid, item.itemid, text)
else
        doShowTextDialog(cid, item.itemid, error_text)
end
    return TRUE
end
\actions\Bounty Hunter\bounty_door.lua
Code:
Code:
-- Bounty Hunter System v1
-- Created by Avashra / Ramondo. With thanks to Jeddy for ideas.
-- [url=http://finaldawn-ots.servegame.com]finaldawn-ots.servegame.com[/url]
-- Please keep credits.
-- 
-- This script allows only thouse who have killed the first 4 bountys to pass.
-- If you change any Storage ID's you must also edit them here.
-- This also protects the fith bounty from being killed by someone who has already killed it once before.
-- Stopping people getting a high level to help them.

function onUse(cid, item, frompos, item2, topos)

        -- Start of Config.

    -- Input values.

local gamemaster = "Ramondo" -- Gamemaster name.
local city = "Thais" -- City name were the player can start quest.
local npc = "City Guard" -- NPC name that starts the quest.
local listname = "Bounty Hunter Quest, list #001" -- Quest Name.
local dead = "Terminated" -- Wats displayed next to the Bountys name on list when killed.
local servername = "Finaldawn-OTServer" -- Your Server name. Used in error message.

    -- Action & Sotrage ID's used by this script.

local actionid = 2501 -- List Action ID.
local storage = getPlayerStorageValue(cid,2500) -- Storage ID the start NPC gives. If changed also needs editing in the NPC file.
local storage1 = getPlayerStorageValue(cid,2501) -- Storage ID the first bounty gives. If changed also needs editing in the creaturescript file.
local storage2 = getPlayerStorageValue(cid,2502) -- Storage ID the second bounty gives. If changed also needs editing in the creaturescript file.
local storage3 = getPlayerStorageValue(cid,2503) -- Storage ID the third bounty gives. If changed also needs editing in the creaturescript file.
local storage4 = getPlayerStorageValue(cid,2504) -- Storage ID the fourth bounty gives. If changed also needs editing in the creaturescript file.
local storage5 = getPlayerStorageValue(cid,2505) -- Storage ID the fith bounty gives. If changed also needs editing in the creaturescript file.

        -- Names of the bountys.

local name1 = "Marlon" -- Name of the first monster/bounty on the list.
local name2 = "Emily" -- Name of the second monster/bounty on the list.
local name3 = "Daniel" -- Name of the third monster/bounty on the list.
local name4 = "Rodney" -- Name of the fourth monster/bounty on the list.
local name5 = "Victoria" -- Name of the fith monster/bounty on the list.

        -- End of Config.
        -- DO NOT EDIT BEYOUND THIS POINT UNLESS YOU KNOW WHAT YOU ARE DOING.

if item.actionid == actionid then
if storage == -1 then
doPlayerSendTextMessage(cid,22,"You must goto "..city.." and talk to "..npc.." to start "..listname.." before entering.")
elseif storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == -1 and storage4 == -1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name1..", "..name2..", "..name3.." and "..name4.." to be able to pass.")
elseif storage == 1 and storage1 == 1 and storage2 == -1 and storage3 == -1 and storage4 == -1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name2..", "..name3.." and "..name4.." to be able to pass.")
elseif storage == 1 and storage1 == -1 and storage2 == 1 and storage3 == -1 and storage4 == -1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name1..", "..name3.." and "..name4.." to be able to pass.")
elseif storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == 1 and storage4 == -1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name1..", "..name2.." and "..name4.." to be able to pass.")
elseif storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == -1 and storage4 == 1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name1..", "..name2.." and "..name3.." to be able to pass.")
elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == -1 and storage4 == -1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name3.." and "..name4.." to be able to pass.")
elseif storage == 1 and storage1 == 1 and storage2 == -1 and storage3 == 1 and storage4 == -1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name2.." and "..name4.." to be able to pass.")
elseif storage == 1 and storage1 == 1 and storage2 == -1 and storage3 == -1 and storage4 == 1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name2.." and "..name3.." to be able to pass.")
elseif storage == 1 and storage1 == -1 and storage2 == 1 and storage3 == 1 and storage4 == -1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name1..", and "..name4.." to be able to pass.")
elseif storage == 1 and storage1 == -1 and storage2 == 1 and storage3 == -1 and storage4 == 1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name1.." and "..name3.." to be able to pass.")
elseif storage == 1 and storage1 == -1 and storage2 == -1 and storage3 == 1 and storage4 == 1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name3.." and "..name4.." to be able to pass.")
elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == 1 and storage4 == -1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name4.." to be able to pass.")
elseif storage == 1 and storage1 == 1 and storage2 == 1 and storage3 == -1 and storage4 == 1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name3.." to be able to pass.")
elseif storage == 1 and storage1 == 1 and storage2 == -1 and storage3 == 1 and storage4 == 1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name2.." to be able to pass.")
elseif storage == 1 and storage1 == -1 and storage2 == 1 and storage3 == 1 and storage4 == 1 then
doPlayerSendTextMessage(cid,22,"You must kill "..name1.." to be able to pass.")
elseif storage5 == 1 then
doPlayerSendTextMessage(cid,22,"You have already killed "..name5.." once. You cannot pass this door again.")
else
pos = getPlayerPosition(cid)    
            if pos.x == topos.x then
                if pos.y < topos.y then
                    pos.y = topos.y + 1
                else
                    pos.y = topos.y - 1
                end
            elseif pos.y == topos.y then
                if pos.x < topos.x then
                    pos.x = topos.x + 1
                else
                    pos.x = topos.x - 1
                end
            else

doPlayerSendTextMessage(cid,22,'Stand in front of the door.')
                return 1
            end

            doTeleportThing(cid,pos)
            doSendMagicEffect(topos,12)
            end
        return 1
    else
        return 0
    end
end
\actions\actions.xml
Code:
Code:
        <!-- Bounty Hunter -->
    <action itemid="1969" script="Bounty Hunter/bounty_list.lua"/>
    <action actionid="2501" script="Bounty Hunter/bounty_door.lua"/>
creaturescripts\creturescripts.xml
Code:
Code:
            <!-- Bounty Hunter -->
    <event type="death" name="Bountytorage1" script="Marlon.lua"/>
    <event type="death" name="Bountytorage2" script="Emily.lua"/>
    <event type="death" name="Bountytorage3" script="Daniel.lua"/>
    <event type="death" name="Bountytorage4" script="Rodney.lua"/>
    <event type="death" name="Bountytorage5" script="Victoria.lua"/>
creaturescripts\scripts\Marlon.lua
Code:
Code:
function onDeath(cid, corpse, killer)
    local creaturename = getCreatureName(cid)
    if creaturename == 'Marlon' and isPlayer(cid) == FALSE then -- monster name
    setPlayerStorageValue(killer,2501,1) -- change to sotrage value

    end
end
creaturescripts\scripts\Emily.lua
Code:
Code:
function onDeath(cid, corpse, killer)
    local creaturename = getCreatureName(cid)
    if creaturename == 'Emily' and isPlayer(cid) == FALSE then -- monster name
    setPlayerStorageValue(killer,2502,1) -- change to sotrage value

    end
end
creaturescripts\scripts\Daniel.lua
Code:
Code:
function onDeath(cid, corpse, killer)
    local creaturename = getCreatureName(cid)
    if creaturename == 'Daniel' and isPlayer(cid) == FALSE then -- monster name
    setPlayerStorageValue(killer,2503,1) -- change to sotrage value

    end
end
creaturescripts\scripts\Rodney.lua
Code:
Code:
function onDeath(cid, corpse, killer)
    local creaturename = getCreatureName(cid)
    if creaturename == 'Rodney' and isPlayer(cid) == FALSE then -- monster name
    setPlayerStorageValue(killer,2504,1) -- change to sotrage value

    end
end
creaturescripts\scripts\Victoria.lua
Code:
Code:
function onDeath(cid, corpse, killer)
    local creaturename = getCreatureName(cid)
    if creaturename == 'Victoria' and isPlayer(cid) == FALSE then -- monster name
    setPlayerStorageValue(killer,2505,1) -- change to sotrage value

    end
end
Continued on Post 2.
monsters/monsters.xml
Code:
Code:
    <!-- Bountys -->
    <monster name="Marlon" file="Bounty Hunter/Marlon.xml"/>
    <monster name="Emily" file="Bounty Hunter/Emily.xml"/>
    <monster name="Daniel" file="Bounty Hunter/Daniel.xml"/>
    <monster name="Rodney" file="Bounty Hunter/Rodney.xml"/>
    <monster name="Victoria" file="Bounty Hunter/Victoria.xml"/>
monsters\Bounty Hunter\Marlon.xml
Code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Marlon" nameDescription="Marlon" race="blood" experience="0" speed="500">
    <health now="1300" max="1300"/>
    <look type="128"  head="113" body="95" legs="113" feet="116" corpse="7349" addons="3"/>
    <targetchange interval="5000" chance="8"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="1"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="90"/>
        <flag runonhealth="0"/>
    </flags>
<script>
<event name="Bountytorage1"/>
</script>
  <attacks>
    <attack name="melee" interval="1700" min="-150" max="-355"/>
    <attack name="explosion" interval="2000" chance="40" min="-90" max="-160"/>
    <attack name="berserk" interval="3000" chance="30" min="-150" max="-200"/>
  </attacks>
  <defenses armor="43" defense="45">
    <defense name="Ultimate Healing" interval="5000" chance="80" min="300" max="500"/>
    <defense name="Haste" interval="5000" chance="30"/>
  </defenses>
    <elements>
        <element physicalPercent="-12"/>
        <element deathPercent="-5"/>
    </elements>
    <voices interval="5000" chance="10">
        <voice sentence="You saw something you shouldn't!"/>
        <voice sentence="I will silence you forever!"/>
        <voice sentence="You will never catch me!"/>
        <voice sentence="Who sent you!?!"/>
    </voices>
</monster>
monsters\Bounty Hunter\Emily.xml
Code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Emily" nameDescription="Emily" race="blood" experience="0" speed="500">
    <health now="2300" max="2300"/>
    <look type="138"  head="113" body="95" legs="113" feet="116" corpse="7349" addons="3"/>
    <targetchange interval="5000" chance="8"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="1"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="90"/>
        <flag runonhealth="0"/>
    </flags>
<script>
<event name="Bountytorage2"/>
</script>
  <attacks>
    <attack name="melee" interval="1700" min="-150" max="-355"/>
    <attack name="explosion" interval="2000" chance="40" min="-290" max="-460"/>
    <attack name="sudden death" interval="2000" chance="80" min="-250" max="-650"/>
  </attacks>
  <defenses armor="43" defense="45">
    <defense name="Ultimate Healing" interval="5000" chance="80" min="600" max="1200"/>
    <defense name="Haste" interval="5000" chance="30"/>
  </defenses>
    <elements>
        <element physicalPercent="-12"/>
        <element deathPercent="-5"/>
    </elements>
    <voices interval="5000" chance="10">
        <voice sentence="You saw something you shouldn't!"/>
        <voice sentence="I will silence you forever!"/>
        <voice sentence="You will never catch me!"/>
        <voice sentence="Who sent you!?!"/>
    </voices>
</monster>
monsters\Bounty Hunter\Daniel.xml
Code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Daniel" nameDescription="Daniel" race="blood" experience="0" speed="500">
    <health now="2850" max="2850"/>
    <look type="268"  head="113" body="95" legs="113" feet="116" corpse="7349" addons="3"/>
    <targetchange interval="5000" chance="8"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="1"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="90"/>
        <flag runonhealth="0"/>
    </flags>
<script>
<event name="Bountytorage3"/>
</script>
  <attacks>
    <attack name="melee" interval="1700" min="-450" max="-855"/>
    <attack name="explosion" interval="2000" chance="40" min="-290" max="-460"/>
    <attack name="berserk" interval="3000" chance="30" min="-350" max="-1000"/>
  </attacks>
  <defenses armor="43" defense="45">
    <defense name="Ultimate Healing" interval="5000" chance="80" min="600" max="1200"/>
    <defense name="Haste" interval="5000" chance="30"/>
  </defenses>
    <elements>
        <element physicalPercent="-12"/>
        <element deathPercent="-5"/>
    </elements>
    <voices interval="5000" chance="10">
        <voice sentence="You saw something you shouldn't!"/>
        <voice sentence="I will silence you forever!"/>
        <voice sentence="You will never catch me!"/>
        <voice sentence="Who sent you!?!"/>
    </voices>
</monster>
monsters\Bounty Hunter\Rodney.xml
Code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Rodney" nameDescription="Rodney" race="blood" experience="0" speed="500">
    <health now="4850" max="4850"/>
    <look type="145"  head="113" body="95" legs="113" feet="116" corpse="7349" addons="3"/>
    <targetchange interval="5000" chance="8"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="1"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="90"/>
        <flag runonhealth="0"/>
    </flags>
<script>
<event name="Bountytorage4"/>
</script>
  <attacks>
    <attack name="melee" interval="1700" min="-150" max="-355"/>
    <attack name="explosion" interval="2000" chance="40" min="-790" max="-1060"/>
    <attack name="sudden death" interval="2000" chance="80" min="-1250" max="-1650"/>
  </attacks>
  <defenses armor="43" defense="45">
    <defense name="Ultimate Healing" interval="5000" chance="80" min="1600" max="2200"/>
    <defense name="Haste" interval="5000" chance="30"/>
  </defenses>
    <elements>
        <element physicalPercent="-12"/>
        <element deathPercent="-5"/>
    </elements>
    <voices interval="5000" chance="10">
        <voice sentence="You saw something you shouldn't!"/>
        <voice sentence="I will silence you forever!"/>
        <voice sentence="You will never catch me!"/>
        <voice sentence="Who sent you!?!"/>
    </voices>
</monster>
monsters\Bounty Hunter\Victoria.xml
Code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Victoria" nameDescription="Victoria" race="blood" experience="0" speed="500">
    <health now="10500" max="10500"/>
    <look type="147"  head="113" body="95" legs="113" feet="116" corpse="7349" addons="3"/>
    <targetchange interval="5000" chance="8"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="1"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="90"/>
        <flag runonhealth="0"/>
    </flags>
<script>
<event name="Bountytorage5"/>
</script>
  <attacks>
    <attack name="melee" interval="1700" min="-850" max="-1200"/>
    <attack name="explosion" interval="2000" chance="40" min="-390" max="-500"/>
    <attack name="berserk" interval="3000" chance="30" min="-650" max="-1500"/>
  </attacks>
  <defenses armor="43" defense="45">
    <defense name="Ultimate Healing" interval="5000" chance="80" min="1600" max="3200"/>
    <defense name="Haste" interval="5000" chance="30"/>
  </defenses>
    <elements>
        <element physicalPercent="-12"/>
        <element deathPercent="-5"/>
    </elements>
    <voices interval="5000" chance="10">
        <voice sentence="You saw something you shouldn't!"/>
        <voice sentence="I will silence you forever!"/>
        <voice sentence="You will never catch me!"/>
        <voice sentence="Who sent you!?!"/>
    </voices>
</monster>
npc/bountyhunter.xml
Code:
Code:
<npc name="City Guard" script="bountyhunter.lua" autowalk="0" floorchange="0" access="5" level="100" maglevel="1">
    <health now="150" max="150"/>
    <look type="133" head="20" body="120" legs="75" feet="13" corpse="2212"/>
  <parameters>      
        <parameter key="message_greet" value="Hello |PLAYERNAME|. Would you like to help me?"/>
    </parameters>
</npc>
npc\scripts\bountyhunter.lua
Code:
Code:
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end





Credits: Avashra
 
Last edited:
thanks for posting, but next time please use code tags. I've done it now for you;)
also downloadlink + screenshots don't work.
 
eh...

Code:
<event type="death" name="Bounty" script="Bounty.lua"/>

Code:
function onDeath(cid, corpse, killer)
	local name = getCreatureName(cid)
	if (isPlayer(killer)) then
		if (name == "Marlon") then
			setPlayerStorageValue(killer, 2501, 1)
		elseif (name == "Emily") then
			setPlayerStorageValue(killer, 2502, 1)
		elseif (name == "Daniel") then
			setPlayerStorageValue(killer, 2503, 1)
		elseif (name == "Rodney") then
			setPlayerStorageValue(killer, 2504, 1)
		elseif (name == "Victoria") then
			setPlayerStorageValue(killer, 2505, 1)
		end
	end
	return TRUE
end
All in one. ;)


Add also event registry.
Code:
<event type="login" name="BountyRegistry" script="BountyRegistry.lua"/>

Code:
function onLogin(cid)
	registerCreatureEvent(cid, "Bounty")
end
 
Instead of getting this to check for an NPc, i could make this check for a player correct?
 
Well, thanks for releasing but the NPC doesn't work at all, when I spawn it, and I say hi/hello or whatever, it won't respond at all.

Any fix?
 
bountyhunter.rar

fixed, should work for 0.3.4, package includes all needed files, and that's for experienced users!
 
Back
Top