Noire Posted August 24, 2013 Posted August 24, 2013 How to kill a certain monster on a map via script? for Ex. i summon in prontera city 1 Poring | 1 Drops | 1 Poporing and i only need to kill the Poring is there any possible way to do it ? Quote
1 Skorm Posted August 24, 2013 Posted August 24, 2013 Like this? prontera,150,150,5 script Monster Spawner 100,{ monster "prontera",151,151,"Poringz0rd",2341,1,"Monster Spawner::OnDeath"; monster "prontera",151,150,"Drops",1113,1; monster "prontera",151,149,"Poporing",1031,1; sleep 1000; npctalk "I will now kill the Poringz0rd!"; sleep 1000; killmonster "prontera","Monster Spawner::OnDeath",1; end; OnDeath: npctalk "Fear not! The Poringz0rd has been slain!"; } This is the only way I know of currently... So you have to spawn the monster with a specific event label and target it through that method. Until the mobsearch and new getmapxy commands are implemented. Edit-- I thought of a few more that I used previously. Using bg_monster and .@gid with unitkill I'm not sure if it triggers the death event still though. prontera,150,150,5 script Monster Spawner 100,{ set .@gid, bg_monster(.@foo,"prontera",151,151,"Poringz0rd",1002,"Monster Spawner::OnDeath"); monster "prontera",151,150,"Drops",1113,1; monster "prontera",151,149,"Poporing",1031,1; sleep 1000; npctalk "I will now kill the Poringz0rd!"; sleep 1000; unitkill .@gid; end; OnDeath: npctalk "Fear not! The Poringz0rd has been slain!"; } Another way with bg_monster. prontera,150,150,5 script Monster Spawner 100,{ set .@gid, bg_monster(.@foo,"prontera",0,0,"bar",1002,"Monster Spawner::OnDeath"); mercenary_create 6017,999; .@gid++; killmonster "prontera","Monster Spawner::OnDeath"; sleep 1000; npctalk "I will now kill you helping hand!"; sleep 1000; unitkill .@gid; npctalk "The Mercenary has been slain!"; end; } In this example I summoned a fake monster with bg_monster off screen to get the gameid for our next summoned creature... This can be used to return the gameid of anything we cannot normally. If using in the right way even players. 1 Quote
0 zeusc137 Posted October 31, 2024 Posted October 31, 2024 On 8/24/2013 at 9:53 AM, Noire said: Thanks for the reply and help, though i'm gonna test it first if my request will meet this script you've made. Hello sir! On 8/24/2013 at 1:22 AM, Skorm said: Like this? prontera,150,150,5 script Monster Spawner 100,{ monster "prontera",151,151,"Poringz0rd",2341,1,"Monster Spawner::OnDeath"; monster "prontera",151,150,"Drops",1113,1; monster "prontera",151,149,"Poporing",1031,1; sleep 1000; npctalk "I will now kill the Poringz0rd!"; sleep 1000; killmonster "prontera","Monster Spawner::OnDeath",1; end; OnDeath: npctalk "Fear not! The Poringz0rd has been slain!"; } This is the only way I know of currently... So you have to spawn the monster with a specific event label and target it through that method. Until the mobsearch and new getmapxy commands are implemented. Edit-- I thought of a few more that I used previously. Using bg_monster and .@gid with unitkill I'm not sure if it triggers the death event still though. prontera,150,150,5 script Monster Spawner 100,{ set .@gid, bg_monster(.@foo,"prontera",151,151,"Poringz0rd",1002,"Monster Spawner::OnDeath"); monster "prontera",151,150,"Drops",1113,1; monster "prontera",151,149,"Poporing",1031,1; sleep 1000; npctalk "I will now kill the Poringz0rd!"; sleep 1000; unitkill .@gid; end; OnDeath: npctalk "Fear not! The Poringz0rd has been slain!"; } Another way with bg_monster. prontera,150,150,5 script Monster Spawner 100,{ set .@gid, bg_monster(.@foo,"prontera",0,0,"bar",1002,"Monster Spawner::OnDeath"); mercenary_create 6017,999; .@gid++; killmonster "prontera","Monster Spawner::OnDeath"; sleep 1000; npctalk "I will now kill you helping hand!"; sleep 1000; unitkill .@gid; npctalk "The Mercenary has been slain!"; end; } In this example I summoned a fake monster with bg_monster off screen to get the gameid for our next summoned creature... This can be used to return the gameid of anything we cannot normally. If using in the right way even players. Hello! Thanks for this excelente idea! Do you have a suggestion where I can kill ALL MONSTER EXCEPT ONE? I am trying to invoke the MVP's without their slaves(like Baphomet without Baphomet Junior) but I tried so much and couldn't find a good way yet... So I'm thinking if I could kill all the slaves(Baphomet Jr for example) and leave the MVP(Baphomet) alive... Be safe! Thanks! Quote
0 Skorm Posted November 1, 2024 Posted November 1, 2024 On 10/30/2024 at 10:49 PM, zeusc137 said: Hello sir! Hello! Thanks for this excelente idea! Do you have a suggestion where I can kill ALL MONSTER EXCEPT ONE? I am trying to invoke the MVP's without their slaves(like Baphomet without Baphomet Junior) but I tried so much and couldn't find a good way yet... So I'm thinking if I could kill all the slaves(Baphomet Jr for example) and leave the MVP(Baphomet) alive... Be safe! Thanks! This is topic hijacking btw. I would recommend creating another version of the MVPs without the slave spawns. Quote
0 zeusc137 Posted November 1, 2024 Posted November 1, 2024 (edited) 5 hours ago, Skorm said: This is topic hijacking btw. I would recommend creating another version of the MVPs without the slave spawns. Hello! Thanks for the feedback, @Skorm! I wasn’t aware of “topic hijacking” — sorry about that! I thought adding more information to existing posts would be helpful, but I can see how it might be misleading. Thank you very much for the tip! EDIT: I also created my own post/question related to this after your tip: Edited November 1, 2024 by zeusc137 addlink Quote
0 Skorm Posted November 1, 2024 Posted November 1, 2024 3 hours ago, zeusc137 said: Hello! Thanks for the feedback, @Skorm! I wasn’t aware of “topic hijacking” — sorry about that! I thought adding more information to existing posts would be helpful, but I can see how it might be misleading. Thank you very much for the tip! EDIT: I also created my own post/question related to this after your tip: Thanks it's mainly for the search engines. What if someone else has the same question as you? They wouldn't find it buried under this topic. While your question might be related, it isn't exactly the same. 1 Quote
Killmesoftly Posted August 24, 2013 Posted August 24, 2013 I remember when i could right click the monster and click " kill monster " i don't know why it doesnt work anymore. Quote
Noire Posted August 24, 2013 Author Posted August 24, 2013 Like this? prontera,150,150,5 script Monster Spawner 100,{ monster "prontera",151,151,"Poringz0rd",2341,1,"Monster Spawner::OnDeath"; monster "prontera",151,150,"Drops",1113,1; monster "prontera",151,149,"Poporing",1031,1; sleep 1000; npctalk "I will now kill the Poringz0rd!"; sleep 1000; killmonster "prontera","Monster Spawner::OnDeath",1; end; OnDeath: npctalk "Fear not! The Poringz0rd has been slain!"; } This is the only way I know of currently... So you have to spawn the monster with a specific event label and target it through that method. Until the mobsearch and new getmapxy commands are implemented. Edit-- I thought of a few more that I used previously. Using bg_monster and .@gid with unitkill I'm not sure if it triggers the death event still though. prontera,150,150,5 script Monster Spawner 100,{ set .@gid, bg_monster(.@foo,"prontera",151,151,"Poringz0rd",1002,"Monster Spawner::OnDeath"); monster "prontera",151,150,"Drops",1113,1; monster "prontera",151,149,"Poporing",1031,1; sleep 1000; npctalk "I will now kill the Poringz0rd!"; sleep 1000; unitkill .@gid; end; OnDeath: npctalk "Fear not! The Poringz0rd has been slain!"; } Another way with bg_monster. prontera,150,150,5 script Monster Spawner 100,{ set .@gid, bg_monster(.@foo,"prontera",0,0,"bar",1002,"Monster Spawner::OnDeath"); mercenary_create 6017,999; .@gid++; killmonster "prontera","Monster Spawner::OnDeath"; sleep 1000; npctalk "I will now kill you helping hand!"; sleep 1000; unitkill .@gid; npctalk "The Mercenary has been slain!"; end; } In this example I summoned a fake monster with bg_monster off screen to get the gameid for our next summoned creature... This can be used to return the gameid of anything we cannot normally. If using in the right way even players. Thanks for the reply and help, though i'm gonna test it first if my request will meet this script you've made. (: Quote
Question
Noire
How to kill a certain monster on a map via script? for Ex. i summon in prontera city 1 Poring | 1 Drops | 1 Poporing and i only need to kill the
Poringis there any possible way to do it ?7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.