Jump to content
  • 0

about mobcount!


Blue Jem

Question


  • Group:  Members
  • Topic Count:  151
  • Topics Per Day:  0.04
  • Content Count:  393
  • Reputation:   3
  • Joined:  09/16/13
  • Last Seen:  

-    script    mvp-ss    -1,{
    OnInit:
        set .map$,"guild_vs1";
    end;
    
    OnClock0129:
        mapannounce .map$,"Begining blablabla",0;
        sleep 2000;
        set .@mobCount,0;
        initnpctimer; // Start the timer
        monster .map$,0,0,"Angeling",1096,1,"mvp-ss::OnWave";
        monster .map$,0,0,"Archangeling",1388,1,"mvp-ss::OnWave";
        monster .map$,0,0,"Ghostring",1582,1,"mvp-ss::OnWave";
    end;
    
    OnWave:
        set .@mobCount, .@mobCount + 1;
        if(.@mobCount == 3){
            mapannounce .map$,"First wave ended blablabla",0;
            sleep 2000;
            set .@mobCount,0;
            monster .map$,0,0,"Maya Purple",1289,1;
            monster .map$,0,0,"Mutant Dragon",1262,1;
            monster .map$,0,0,"Tirfing",1204,1;
            end;
        }
}
 

this is my full script 

 

    OnClock0129:
        mapannounce .map$,"Begining blablabla",0;
        sleep 2000;
        set .@mobCount,0;
        initnpctimer; // Start the timer
        monster .map$,0,0,"Angeling",1096,1,"mvp-ss::OnWave";
        monster .map$,0,0,"Archangeling",1388,1,"mvp-ss::OnWave";
        monster .map$,0,0,"Ghostring",1582,1,"mvp-ss::OnWave";
    end;
 

this is the 1st mob to summon after killed all monster or mob show the 2nd batch but i have problem of this script the 2nd batch never pop up for 2nd batch for mobs

 

 

 

    OnWave:
        set .@mobCount, .@mobCount + 1;
        if(.@mobCount == 3){
            mapannounce .map$,"First wave ended blablabla",0;
            sleep 2000;
            set .@mobCount,0;
            monster .map$,0,0,"Maya Purple",1289,1;
            monster .map$,0,0,"Mutant Dragon",1262,1;
            monster .map$,0,0,"Tirfing",1204,1;
            end;
        }
}
 

what is my wrong? please help me

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

set .@mobCount, .@mobCount + 1;

 

Temp variable you need .var.

 

.var = NPC Variable

set .mobCount, .mobCount + 1;

 

I suggest using an NPC variable if multiple players can do this event.

 

An instance 'variable if multiple partys are allowed to do the event on an instanced map.

 

-    script    mvp-ss    -1,{
    OnInit:
        set .map$,"guild_vs1";
    end;
    
    OnClock0129:
        mapannounce .map$,"Begining blablabla",0;
        sleep 2000;
        set .mobCount,0;
        initnpctimer; // Start the timer
        monster .map$,0,0,"Angeling",1096,1,"mvp-ss::OnWave";
        monster .map$,0,0,"Archangeling",1388,1,"mvp-ss::OnWave";
        monster .map$,0,0,"Ghostring",1582,1,"mvp-ss::OnWave";
    end;
    
    OnWave:
        set .mobCount, .mobCount + 1;
        if(.mobCount == 3){
            mapannounce .map$,"First wave ended blablabla",0;
            sleep 2000;
            set .mobCount,0;
            monster .map$,0,0,"Maya Purple",1289,1;
            monster .map$,0,0,"Mutant Dragon",1262,1;
            monster .map$,0,0,"Tirfing",1204,1;
            end;
        }
}

 

Alternatively you could remove the variables and use mobcount.

-    script    mvp-ss    -1,{
    OnInit:
        set .map$,"guild_vs1";
    end;
    
    OnClock0129:
        mapannounce .map$,"Begining blablabla",0;
        sleep 2000;
        initnpctimer; // Start the timer
        monster .map$,0,0,"Angeling",1096,1,"mvp-ss::OnWave";
        monster .map$,0,0,"Archangeling",1388,1,"mvp-ss::OnWave";
        monster .map$,0,0,"Ghostring",1582,1,"mvp-ss::OnWave";
    end;
    
    OnWave:
        if(!mobcount(.map$,"mvp-ss::OnWave")){
            mapannounce .map$,"First wave ended blablabla",0;
            sleep 2000;
            monster .map$,0,0,"Maya Purple",1289,1;
            monster .map$,0,0,"Mutant Dragon",1262,1;
            monster .map$,0,0,"Tirfing",1204,1;
            end;
        }
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  151
  • Topics Per Day:  0.04
  • Content Count:  393
  • Reputation:   3
  • Joined:  09/16/13
  • Last Seen:  

i try master



can you show the correct script master?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

I updated my previous post.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  151
  • Topics Per Day:  0.04
  • Content Count:  393
  • Reputation:   3
  • Joined:  09/16/13
  • Last Seen:  

can you send the link master

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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