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

Lua Wut? Script doesnt execute!

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,299
Location
Sweden?
Well,

Im trying to make a script that you damage max 5 on the monster named blocker. But the script just doesnt execute. It doesnt print anything on the console. Also any tips about how to make it just max damage 5?

LUA:
function onStatsChange(cid, attacker, type, combat, value)
        if getCreatureName(cid) == "Blocker" then
	if(isPlayer(attacker) and (type == STATSCHANGE_MANALOSS or type == STATSCHANGE_HEALTHLOSS)) then
		print("it Works")
	end
        end
	return true
end

Thanks in advice.
 
wesoly136 is most likely correct.

It'd be something like this:
XML:
<script>
	<event name="name_of_event"/>
</script>
 
wesoly136 is most likely correct.

It'd be something like this:
XML:
<script>
	<event name="name_of_event"/>
</script>

Ye forgot to add that, Thanks :)

Between, you guys have any advice how to make that players will damage max 5, like azerus in service of yalahar quest. Im thinking about something with math.random but maybe there is another way.
 
Back
Top