Jump to content
  • 0
Padrio

Quest Functions spawning doors

Question

Hey Guys,

 

i´m currently writing a new dungeon script and wanted to create dynamic doors which disappear when you kill a boss.

 

I´ve found the following function:

d.spawn_stone_door() but how can i remove it now?
 
Greets,
Padrio

Share this post


Link to post

11 answers to this question

Recommended Posts

  • 0

I suggest you take a look at deviltower_zone.quest and what it does with the metins in 4th floor particularly the functions d.spawn_mob d.set_unique and d.purge_unique

Share this post


Link to post
  • 0

Example:

d.set_unique("door", d.spawn_mob(101, pc.get_local_x(), pc.get_local_y()))

With that you set an "id" for a monster.

You can "manage" the monster and for example you can purge it with:

d.purge_unique("door")
  • Love 3

Share this post


Link to post
  • 0

Oh sounds like an idea for a new feature. Maybe we'd add unique-functions globally and not limited to dungeons?

  • Love 1

Share this post


Link to post
  • 0

Oh sounds like an idea for a new feature. Maybe we'd add unique-functions globally and not limited to dungeons?

 

This would be really great. Its one of the most missing quest function

 

  • Love 1

Share this post


Link to post
  • 0

yeah and It'd be really cool to spawn some special bosses and let users kill them (maybe there'd be a special event where one or more of the same bosses are spawned but only one is the chosen one and that'd be solved by creating unique IDs)

Share this post


Link to post
  • 0

Example:

d.set_unique("door", d.spawn_mob(101, pc.get_local_x(), pc.get_local_y()))
With that you set an "id" for a monster.

You can "manage" the monster and for example you can purge it with:

d.purge_unique("door")

But how can i set a view direction for the mob?

Gesendet von meinem Nexus 5 mit Tapatalk

Share this post


Link to post
  • 0

d.set_unique("door", d.spawn_mob_ac_dir(101, pc.get_local_x(), pc.get_local_y(), dir)
dir -> mob direction.

The function d.spawn_mob_ac_dir is only available on rev 40k, I think there's another but for 34k.

  • Love 1

Share this post


Link to post
  • 0

I just found some old questfunctions from my old lua extensions.
On this way I spawned the ugly fences in the background:
http://puu.sh/5ZmRP.png

But you can't set the direction, so look for something roundly :D
 

-- Join a dungeon index like: 208001
function d.join_by_index(dungeonIndex,x,y)
	pc.warp(x*100,y*100,dungeonIndex)
end

-- Spawn fences: Name, Vnum, Startposition X on map,Startposition Y on map, X Space between the fences, Y Space between the fences, How many fences you want to spawn
function d.spawn_object_fence(objectName,objectVnum,objectX,objectXadd,objectY,objectYadd,objectCount)
	local i = 0
	while i < objectCount do
		d.set_unique(objectName.."_"..i,d.spawn_mob(objectVnum, objectX, objectY))
		i = i+1
		objectX = objectX + objectXadd 
		objectY = objectY + objectYadd
	end
end 
-- Delete fences: Name, How many fences of this name you want to delete
function d.delete_object_fence(objectName,objectCount)
	local i = 0
	while i < objectCount do
		d.purge_unique(objectName.."_"..i)
		i = i+1
	end
end

Share this post


Link to post
  • 0

I Could create the functions (global unique) for the 40k and release it here, if you like  :)

Just tell me!

  • Love 2

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.