Jump to content
  • 0
stunkiller

MVPs announce & PVP on/off

Question

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:
    [email protected]$ = strnpcinfo(0)+"::OnBossDead";
    if( mobcount( "pvp_y_1-1",[email protected]$ ) )
    killmonster "pvp_y_1-1",[email protected]$;
    pvpon "pvp_y_1-1";
    monster "pvp_y_1-1",100,119,"Faceworm Queen",2529,1,[email protected]$;    
    monster "pvp_y_1-1",44,204,"Faceworm Queen (Yellow)",2535,1,[email protected]$;                   
    monster "pvp_y_1-1",156,315,"Faceworm Queen (Red)",2532,1,[email protected]$; 
    monster "pvp_y_1-1",268,204,"Faceworm Queen (Blue)",2534,1,[email protected]$; 
    monster "pvp_y_1-1",237,79,"Faceworm Queen (Green)",2533,1,[email protected]$; 
    announce "FACEWORM QUEENS HAS AWAKEN! DEAR ADVENTURE, PLEASE PUT THEM TO SLEEP.",bc_all;
end;

OnBossDead:

    set [email protected]_dead,mobcount("pvp_y_1-1", [email protected]$);
    if ([email protected]_dead < 1) {
        pvpoff "pvp_y_1-1";
    }
    else
        announce "Remaining" + [email protected]_dead + "MVPs left.",bc_all;
    end;
}

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
-    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 [email protected]_dead,mobcount("pvp_y_1-1", .event$);
    announce "OnBossDead called, value: "[email protected]_dead,bc_all;
    if ([email protected]_dead < 1) {
        pvpoff "pvp_y_1-1";
    }
    else
        announce "Remaining" + [email protected]_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 by Kreustoo
Link to comment
Share on other sites

  • 0
5 hours ago, Kreustoo said:

Hello,

There's an error in OnBossDead[email protected]$ 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.

Link to comment
Share on other sites

  • 0

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.

 204499781_mvpannounce.png.9ea9d94838a4da7d437fc1b17e3051f3.png

again, thank you so much. @Kreustoo

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.