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

Script Fix

homarwh

Just a Milan fan.
Joined
Dec 29, 2012
Messages
93
Reaction score
3
Location
Mexico
I use this to not allow players of the same storage attack each other, when i open the server it says that cannot open the script cause an error on line 9

Code:
local t = {
fireStorage = 15000,
rockStorage = 15002,
natureStorage = 15003,
electrifiedStorage = 15004
}
function onCombat(cid, target)
if isPlayer(cid) and isPlayer(target) then
if getPlayerStorageValue(cid, t.fireStorage) == 1 and getPlayerStorageValue(target, t.fireStorage) == 1 then
return doPlayerSendCancel(cid, "You may not attack your kingdom family.") and false
elseif getPlayerStorageValue(cid, t.rockStorage) == 1 and getPlayerStorageValue(target, t.rockStorage) == 1 then
return doPlayerSendCancel(cid, "You may not attack your kingdom family.") and false
if isPlayer(cid) and isPlayer(target) then
if getPlayerStorageValue(cid, t.natureStorage) == 1 and getPlayerStorageValue(target, t.natureStorage) == 1 then
return doPlayerSendCancel(cid, "You may not attack your kingdom family.") and false
elseif getPlayerStorageValue(cid, t.natureStorage) == 1 and getPlayerStorageValue(target, t.natureStorage) == 1 then
return doPlayerSendCancel(cid, "You may not attack your kingdom family.") and false
end
end
return true
end
 
Back
Top