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

Speciell Monster For a Speciell Item? [READ]

chackie

New Member
Joined
Nov 1, 2009
Messages
87
Reaction score
0
Yes good afternoon.

I've come up with something that I would like a reply!
Is it possible to just be able to have one item like a sword, and that sword will only be possible to kill 'the monster'.

as a custom item such as: "Black Sword" and you need the sword to kill the "black demon" some other attacks on the black demon will not work. Only the sword.

It's like a quest.
Would be cool if someone could tell me how I do. :cool:
 
Last edited:
any attack without sword will not harm that monster:
XML:
<event type="statschange" name="sword" event="script" value="sword.lua"/>

Lua:
local sword = 2345

function onStatsChange(cid, attacker, type, combat, value)
    local g = getPlayerSlotItem
    if not isInArray({g(attacker,CONST_SLOT_LEFT).itemid,g(attacker,CONST_SLOT_RIGHT).itemid},sword) then
        doPlayerSendCancel(attacker, 'Your attack seems to not be harming this monster.')
        return false
    end
    return true
end

add at monster xml file, before </monster> :
XML:
<script>
    <event name="sword"/> 
</script>
 
Back
Top