• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Monster stay or move.

Black123

New Member
Joined
Nov 17, 2011
Messages
32
Reaction score
0
Hi, is there anyone able to add to this script functions that immobilizes a monster in place, and when the player is required storage allows him to move?
The script itself works, because if we do not have specific storage we can not hit Wolf and he us ... but it comes to us; /
Code:
local monster = 'Wolf' -- name
local stor = 8000 -- storage
function onCombat(cid, target)
    if (isPlayer(cid)) then
        if (isMonster(target) and (getCreatureName(target) == monster and (getPlayerStorageValue(cid, stor) == 1 or 3))) then
        return false end
    elseif (isMonster(cid)) then
        if (isPlayer(target) and (getPlayerStorageValue(target, stor) == 1 or 3)) then
        return false
        end
    end
    return true
end
function onKill(cid, target)
    if isMonster(target) and getCreatureName(target) == monster and getPlayerStorageValue(cid, stor) == 2 then
        setPlayerStorageValue(cid, stor, 3)
    end
    return true
end
 
Back
Top