Padrio 988 Posted February 20, 2014 Share Posted February 20, 2014 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 Link to comment Share on other sites More sharing options...
Premium Shogun 4587 Posted February 20, 2014 Premium Share Posted February 20, 2014 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 Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted February 20, 2014 Developer Share Posted February 20, 2014 Blazing Purgatory and Spider Dungeon 3 use purge_area. when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
Remix 45 Posted February 21, 2014 Share Posted February 21, 2014 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") 3 Link to comment Share on other sites More sharing options...
Vanilla 1455 Posted February 25, 2014 Share Posted February 25, 2014 Oh sounds like an idea for a new feature. Maybe we'd add unique-functions globally and not limited to dungeons? 1 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 More sharing options...
Former Staff .InyaProduction 1124 Posted February 25, 2014 Former Staff Share Posted February 25, 2014 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 1 Link to comment Share on other sites More sharing options...
Vanilla 1455 Posted February 25, 2014 Share Posted February 25, 2014 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 More sharing options...
Premium Shogun 4587 Posted February 27, 2014 Premium Share Posted February 27, 2014 Moved to programming. Link to comment Share on other sites More sharing options...
Padrio 988 Posted February 28, 2014 Author Share Posted February 28, 2014 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 More sharing options...
Developer PACI 921 Posted February 28, 2014 Developer Share Posted February 28, 2014 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. 1 when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
ProfessorEnte 404 Posted March 4, 2014 Share Posted March 4, 2014 (edited) 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 -- 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 August 18, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Mijago 4 Posted March 12, 2014 Share Posted March 12, 2014 I Could create the functions (global unique) for the 40k and release it here, if you like Just tell me! 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now