I need help to make a function this delete all monster on the map 100000ms.
Forum




[Tibia]Monster respawn
10 replies



I need help to make a function this delete all monster on the map 100000ms.
Time Hooks :
Ms100
Second
Minute
and i think some others
You Should use one of them for your Tibia

If you need any help with the tibia script I've done almost everything you can think of so PM me any time. I won't be able to script for a few hours now as I'm off to work.
This?
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
if self.health <= 0 then 		if not PLAYERS[id].Tutorial.killm then 			message(id, "Congratulation! You have killed your first monster. You can proceed to pick up the loot by using the drop weapon button (default G)", "255000000") 			PLAYERS[id].Tutorial.killm = true 		end 		addexp(id, math.floor(self.exp*CONFIG.EXPRATE)) 		self:die() 	else 		parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 0 ' .. self.scaley .. ' ' .. (self.r and (self.r .. ' ' .. self.g .. ' ' .. self.b) or '192 0 0')) 	end 	radiussound("weapons/machete_hit.wav", self.x, self.y) 	return true end
edited 1×, last 09.03.14 09:25:14 pm
no have 100000ms
Notice

1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
yourshitmonsterkillonminutevariable = 0 function yourshitminutehooktokillsomeshitmonsters() 	yourshitmonsterkillonminutevariable = yourshitmonsterkillonminutevariable + 1 	if yourshitmonsterkillonminutevariable == 30 then 		for _, everyshitassmonsteryouwanttokill in ipairs(MONSTERS) do 			everyshitassmonsteryouwanttokill:destroy() 		end 	end end addhook("minute","yourshitminutehooktokillsomeshitmonsters")
Paste into hooks.lua
[monsterID]:destroy() removes the monster, [monsterID]:kill() drops items and shit.
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
yourshitmonsterkillonminutevariable = 0 function yourshitminutehooktokillsomeshitmonsters() yourshitmonsterkillonminutevariable = yourshitmonsterkillonminutevariable + 1 if yourshitmonsterkillonminutevariable == 1 then for _, everyshitassmonsteryouwanttokill in ipairs(MONSTERS) do everyshitassmonsteryouwanttokill:destroy() 			 		msg("©255000000Monster Reseted!") 					yourshitmonsterkillonminutevariable = 0 end end end addhook("minute","yourshitminutehooktokillsomeshitmonsters")

It works. Stop complaining.



