Jump to content

Quest Functions spawning doors


Recommended Posts

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
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
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
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 4

      Feeding game source to LLM

    2. 0

      Quest 6/7 Problem

    3. 5

      Effect weapons

    4. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

    5. 3

      Crystal Metinstone

    6. 4

      Feeding game source to LLM

    7. 113

      Ulthar SF V2 (TMP4 Base)

    8. 4

      Feeding game source to LLM

  • Recently Browsing

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