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

Monster who attack only players with selected storage.

Areto Hakori

New Member
Joined
Apr 5, 2009
Messages
12
Reaction score
0
Hi, i need help. I want to make monster who's attacking only players with storagevalue X (ex. 3000), beacuse i need to place this monster near city, and he's too strong for new players. He's used to a storyline mission. Can anyone help me?

TFS 0.3.5pl1

Thanks
 
Yhm, im newbie, i tried write it but i think it isn't correct.

creaturescripts
Code:
function onCombat(cid, target)
    if (isMonster(target) and getCreatureName(target) == "Demon") then
	if getPlayerStorageValue(cid, 3000) == 9 then
        return true
    end
	
 if (isMonster(target) and getCreatureName(target) == "Demon") then
	if getPlayerStorageValue(cid, 3000) < 9 then
	 doPlayerSendCancel(cid, "You cannot attack this monster.")
        return false
    end
    return true
end
end
end

And with this you can attack Demon if u have storage 3000,9 but... only Demon, only with this storage and monster attacks everyone ;/
At all i dont know how to get started... Any suggestions ?



Sry for eng x)
 
Last edited:
Back
Top