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

[REQUEST]Storage Protection

Joined
May 23, 2010
Messages
185
Reaction score
23
I want to know how to do this:

When i have storage X, monster Y can't attack me.

Ex:

Player Storage 1000
Minotaur can't attack this player.

AND hugen try to help me, but i want a specific monsters, he sad that:


function onCombat(cid, target)
if isMonster(cid) then
if isPlayer(target) then
if getPlayerstorageValue(target, 1000) == 1 then
return false
end
end
end
return true
end
Is it possible to do with a specific monsters?

OBS NOW (22:50) i Try this script, but it doesn't work :( what tag i have to paste in creatures/xml? and i have to register something in login?

Please help me.
 
just add at monster xml script, before </monster> :
XML:
	<script>
		<event name="eventname!"/> 
	</script>
just put the same event name from the one of creaturescripts.xml
 
It works, the minotaur can't attack me, but i can attack the minotaur :(, and the monster can't attack me but he still follow me o.0 kkk

i using this script CyberM

function onCombat(cid, target)
if isMonster(cid) then
if isPlayer(target) then
if getPlayerstorageValue(target, 6435) == 1 then
if getCreatureName(cid) == "Minotaur" then
return false
end
end
end
end
return true
end
 
Back
Top