Noire Posted August 24, 2013 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 103 Reputation: 1 Joined: 06/26/13 Last Seen: July 26, 2022 Share 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 Link to comment Share on other sites More sharing options...
Skorm Posted August 24, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1268 Reputation: 382 Joined: 02/03/12 Last Seen: April 28 Share 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. Quote Link to comment Share on other sites More sharing options...
Killmesoftly Posted August 24, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 73 Reputation: 6 Joined: 06/16/12 Last Seen: August 4, 2017 Share 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 Link to comment Share on other sites More sharing options...
Noire Posted August 24, 2013 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 103 Reputation: 1 Joined: 06/26/13 Last Seen: July 26, 2022 Author Share 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 Link to comment Share on other sites More sharing options...
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 ?Link to comment
Share on other sites
3 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.