Jump to content

Recommended Posts

  • Former Staff

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
Link to comment
https://metin2.dev/topic/231-quest-functions-spawning-doors/#findComment-2052
Share on other sites

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)

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
https://metin2.dev/topic/231-quest-functions-spawning-doors/#findComment-2077
Share on other sites

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

Link to comment
https://metin2.dev/topic/231-quest-functions-spawning-doors/#findComment-2252
Share on other sites

  • Developer

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

when you return 0 and server doesn't boot:

unknown.png

Link to comment
https://metin2.dev/topic/231-quest-functions-spawning-doors/#findComment-2258
Share on other sites

I just found some old questfunctions from my old lua extensions.
On this way I spawned the ugly fences in the background:
https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

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
Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
Link to comment
https://metin2.dev/topic/231-quest-functions-spawning-doors/#findComment-2661
Share on other sites

  • 2 weeks later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.