Forum

> > CS2D > Scripts > [Tibia]Monster respawn
Forums overviewCS2D overview Scripts overviewLog in to reply

English [Tibia]Monster respawn

10 replies
To the start Previous 1 Next To the start

old Re: [Tibia]Monster respawn

Ashley
BANNED Off Offline

Quote
Lua Does not have ms10000000000

Time Hooks :

Ms100
Second
Minute
and i think some others


You Should use one of them for your Tibia

old Re: [Tibia]Monster respawn

Yates
Reviewer Off Offline

Quote
Go to monsters.lua, copy/paste the for loop that loops through the monster table. Then use the monster:die () function (make sure to add the monster id parameter in the function) and kill it. I think the monster may drop items and money but I'm not sure.

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.

old Re: [Tibia]Monster respawn

NeverLast
User Off Offline

Quote
I would like the monster every 30 minutes to die.^

This?
1
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

old Re: [Tibia]Monster respawn

yuncemm
User Off Offline

Quote
all monster delete
no have 100000ms
Notice >
More >

old Re: [Tibia]Monster respawn

Yates
Reviewer Off Offline

Quote
1
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.

old Re: [Tibia]Monster respawn

NeverLast
User Off Offline

Quote
This works to 50%
1
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")
No all monster will destroy

old Re: [Tibia]Monster respawn

Yates
Reviewer Off Offline

Quote
I tested it. It kills all the monsters. Due to the ms100 hook which spawns new monsters they respawn almost instantly.

It works. Stop complaining.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview