stunkiller Posted June 16, 2020 Posted June 16, 2020 Hello, Im trying to make the mvp spawn in a specific map (pvp_y_1-1) when the mvps is alive, pvp will be turned on and off when all mvps are dead and there will be an announcement of remaining mvps inside. Here are my problems, When the mvps is dead, the pvp wont turn off. And there are no announcement about how many mvps are remaining. I really need some help Thank you in advance! Quote - script mvpspawner -1,{ OnClock1130: OnClock2330: .@event$ = strnpcinfo(0)+"::OnBossDead"; if( mobcount( "pvp_y_1-1",.@event$ ) ) killmonster "pvp_y_1-1",.@event$; pvpon "pvp_y_1-1"; monster "pvp_y_1-1",100,119,"Faceworm Queen",2529,1,.@event$; monster "pvp_y_1-1",44,204,"Faceworm Queen (Yellow)",2535,1,.@event$; monster "pvp_y_1-1",156,315,"Faceworm Queen (Red)",2532,1,.@event$; monster "pvp_y_1-1",268,204,"Faceworm Queen (Blue)",2534,1,.@event$; monster "pvp_y_1-1",237,79,"Faceworm Queen (Green)",2533,1,.@event$; announce "FACEWORM QUEENS HAS AWAKEN! DEAR ADVENTURE, PLEASE PUT THEM TO SLEEP.",bc_all; end; OnBossDead: set .@mob_dead,mobcount("pvp_y_1-1", .@event$); if (.@mob_dead < 1) { pvpoff "pvp_y_1-1"; } else announce "Remaining" + .@mob_dead + "MVPs left.",bc_all; end; } Quote
0 Kreustoo Posted June 16, 2020 Posted June 16, 2020 (edited) - script mvpspawner::mvpspawner -1,{ OnClock1130: OnClock2330: .event$ = strnpcinfo(3)+"::OnBossDead"; if( mobcount( "pvp_y_1-1",.event$ ) ) killmonster "pvp_y_1-1",.event$; pvpon "pvp_y_1-1"; monster "pvp_y_1-1",100,119,"Faceworm Queen",2529,1,.event$; monster "pvp_y_1-1",44,204,"Faceworm Queen (Yellow)",2535,1,.event$; monster "pvp_y_1-1",156,315,"Faceworm Queen (Red)",2532,1,.event$; monster "pvp_y_1-1",268,204,"Faceworm Queen (Blue)",2534,1,.event$; monster "pvp_y_1-1",237,79,"Faceworm Queen (Green)",2533,1,.event$; announce "FACEWORM QUEENS HAS AWAKEN! DEAR ADVENTURE, PLEASE PUT THEM TO SLEEP.",bc_all; end; OnBossDead: announce "OnBossDead called, remove me, I'm here to check if it works.",bc_all; set .@mob_dead,mobcount("pvp_y_1-1", .event$); announce "OnBossDead called, value: "+.@mob_dead,bc_all; if (.@mob_dead < 1) { pvpoff "pvp_y_1-1"; } else announce "Remaining" + .@mob_dead + "MVPs left.",bc_all; end; } This should works, I added 2 announce to help you be sure it works or not (hopefully you have a test server, otherwise removes them before testing). Edited June 16, 2020 by Kreustoo Quote
0 Kreustoo Posted June 16, 2020 Posted June 16, 2020 Hello, There's an error in OnBossDead: .@event$ is a temporary variable and you're using it on OnBossDead without giving it a value (so either you replace by .event$ or copy paste your initalisation). Quote
0 stunkiller Posted June 16, 2020 Author Posted June 16, 2020 5 hours ago, Kreustoo said: Hello, There's an error in OnBossDead: .@event$ is a temporary variable and you're using it on OnBossDead without giving it a value (so either you replace by .event$ or copy paste your initalisation). Hi, Im sorry I still don't understand, could you perhaps guide me about this? Thanks. Quote
0 stunkiller Posted June 16, 2020 Author Posted June 16, 2020 Hi, thank you so much it works. Quote announce "OnBossDead called, remove me, I'm here to check if it works.",bc_all; if this is enabled it become like that, and i've already removed it. again, thank you so much. @Kreustoo Quote
Question
stunkiller
Hello,
Im trying to make the mvp spawn in a specific map (pvp_y_1-1)
when the mvps is alive, pvp will be turned on and off when all mvps are dead
and there will be an announcement of remaining mvps inside.
Here are my problems,
When the mvps is dead, the pvp wont turn off.
And there are no announcement about how many mvps are remaining.
I really need some help
Thank you in advance!
4 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.