[06/05/2012 15:49:37] [Error - CreatureScript Interface]
[06/05/2012 15:49:37] data/creaturescripts/scripts/playerattack.lua:onTarget
[06/05/2012 15:49:37] Description:
[06/05/2012 15:49:37] (luaGetPlayerParty) Player not found
[06/05/2012 15:49:47] [Error - CreatureScript Interface]
[06/05/2012 15:49:47] data/creaturescripts/scripts/playerattack.lua:onTarget
[06/05/2012 15:49:47] Description:
[06/05/2012 15:49:47] (luaGetPlayerParty) Player not found
Still same i can attack his monster without the storage![]()
No im not in party
I should be able attack when im in party and also when i have this storage.
But i dont have any party or storage i can still attack :/
registerCreatureEvent(cid, "Duel")
<event type="target" name="Duel" event="script" value="duel.lua" />
local storage = 5701
function onTarget(cid, target)
if(isSummon(target)) then
local master = getCreatureMaster(target)
if(master and master == target) then return true end
if(master and master ~= target) then
if(not isInParty(cid) and not isInParty(master)) then
if(getCreatureStorage(cid, storage) > 0) then
return true
else
doPlayerSendCancel(cid, "You must be in a party to duel.")
return false
end
elseif(getPlayerParty(cid) ~= getPlayerParty(master)) then
if(getCreatureStorage(cid, storage) > 0) then
return true
else
doPlayerSendCancel(cid, "You must be in the same party to duel.")
return false
end
end
end
end
return true
end