Jump to content
  • 0

H>Regarding LMS


Sallycantdance

Question


  • Group:  Members
  • Topic Count:  225
  • Topics Per Day:  0.14
  • Content Count:  798
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

hello guys i would like to ask how to fix this  guildmates can't kill each other during the event they cant attack each other 

 

Quote

// Last Man Standing

-    script    Event_LMS    -1,{
OnInit:    
    // Mapflags
    setarray .@mapflag,
        mf_nowarp,
        mf_nowarpto,
        mf_noteleport,
        mf_nomemo,
        mf_nosave,
        mf_noicewall,
        mf_nobranch,
        mf_noreturn;
        
    for ( .@i = 0; .@i < getarraysize(.@mapflag); .@i++)
        setmapflag "lastman", .@mapflag[.@i];
        
    end;

OnStart:
    if ( .start ) end;
    .start = 1;
    pvpoff "lastman";
    announce "LMS: We are going to have a Last Man Standing event.",0;
    sleep 10000;
    announce "LMS: For those who wants to join, use @eventjoin",0;
    sleep 10000;
    announce "LMS: After 1 Minute Event will close.",0;
    sleep 10000;
    announce "LMS: So please if you want to join. use @eventjoin",0;
    sleep 60000;
    announce "LMS: The entry to the event is now closed.",bc_all,0x0ceedb;
    if ( getmapusers("lastman") < 2 ) {
        announce "LMS: Not enough participants.",bc_all,0x0ceedb;
        .start = false;
        mapwarp "lastman", "maintown", 98, 27; // warp out.
        end;
    }
    .start = 2;
    sleep 3500;
    mapannounce "lastman","We're about to begin the event.",bc_map,0x0ceedb;
    sleep 2500;
    mapannounce "lastman","The rules are simple.",bc_map,0x0ceedb;
    sleep 2500;
    mapannounce "lastman","Kill everyone in the map.",bc_map,0x0ceedb;
    sleep 2500;
    mapannounce "lastman","Last Man Standing wins!",bc_map,0x0ceedb;
    sleep 2000;
    mapannounce "lastman","That's all. Let's begin.",bc_map,0x0ceedb;
    sleep 3000;
    for (.@i = 10; .@i > 0; .@i--) {
        mapannounce "lastman", "LMS: -- "+.@i+" --",bc_map,0x0ceedb;
        sleep 1000;
    }
    mapannounce "lastman", "LMS: Fight! ",bc_map,0x0ceedb;
    pvpon "lastman";
    .timer = 0;
    initnpctimer;
    end;
    
OnTimer5000: // check every 5 secs..
    .timer++;
    .@size = getmapusers("lastman");
    if ( .@size > 1 && .timer == 6 ) {
        .timer = 0;
        mapannounce "lastman", "LMS: "+ .@size +" players left..", bc_blue;
    } 
    else if ( .@size <= 1 )
        donpcevent strnpcinfo(3)+"::OnEndEvent";
    setnpctimer 0;
    end;
    
OnEndEvent:
    stopnpctimer;
    .start = false;
    pvpoff "lastman";
    mapannounce "lastman", "LMS: Event ended!",bc_map,0x0ceedb;
    sleep 5000;
    .@size = getmapunits(BL_PC,"lastman",.@aid);
    if ( .@size == 0 ) {
        announce "LMS: No winners.",0;
        end;
    }
    attachrid .@aid;
    announce strcharinfo(0)+" has won the Last Man Standing Event.",bc_all,0x0ceedb;
    if ( $event_options&1 ) {
        for ( .@j = 0; .@j < $event_item_arr; .@j += 2 )
            getitem $event_item_reward[.@j], $event_item_reward[.@j+1];
    }
    if ( $event_options&2 ) {
        setd $event_var$, getd($event_var$)+$event_var_gain;
        dispbottom "You gained "+$event_var_gain+" "+$event_var_name$+". You now have "+getd($event_var$)+" "+$event_var_name$+".";
    }                
    warp "maintown",98,27;
    end;
    
OnPCDieEvent:
    if ( .start && strcharinfo(3) == "lastman" ) {
        warp "maintown",98,27;
        .@size = getmapusers("lastman");
        if ( .@size > 1 )
            mapannounce "lastman", "LMS: "+ .@size +" players left..", bc_blue;
        else if ( .@size <= 1 )
            donpcevent strnpcinfo(3)+"::OnEndEvent";
    }
    end;
    
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   1
  • Joined:  02/04/24
  • Last Seen:  

 

21 minutes ago, GM Winter said:

hello guys i would like to ask how to fix this  guildmates can't kill each other during the event they cant attack each other 

 

 

 

mf_pvp;
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  225
  • Topics Per Day:  0.14
  • Content Count:  798
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

14 hours ago, J0hn said:

 

 

mf_pvp;

still cant attacked the guild members

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