Jump to content
  • 0

MVPs announce & PVP on/off


stunkiller

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  11/15/13
  • Last Seen:  

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;
}

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  215
  • Reputation:   45
  • Joined:  05/03/13
  • Last Seen:  

-    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 by Kreustoo
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  215
  • Reputation:   45
  • Joined:  05/03/13
  • Last Seen:  

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).

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  11/15/13
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  11/15/13
  • Last Seen:  

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...