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

Lua Stop Attacking

Add this to creaturescripts:

XML:
<event type="combat" name="disable_combat" event="script" value="disable_combat.lua"/>

Create disable_combat.lua on creature scripts and add this:

Lua:
function onCombat(cid, target)
    if getPlayerStorageValue(cid, 128) ~= 1 then
        doPlayerSendCancel(cid, "You cannot attack.")
        return false
    end
    return true
end

Go to login.lua in creaturescripts and add this:

Lua:
registerCreatureEvent(cid, "disable_combat")



xxxx = storageplayerwhocan't attack.

if getPlayerStorageValue(cid, xxxx) ~= 1 then
 
Back
Top