Jump to content
  • 0

How yo add npc


myserver

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  45
  • Reputation:   0
  • Joined:  08/27/18
  • Last Seen:  

Every 3hrs the npc will be show up to prontera then after 5mins the npc is disappear

.

-    script    mvp-ss    -1,{
    OnInit:
        set .map$,"guild_vs1-2";
    end;
    
    OnMinute34:
        announce "Attention to all players online",0;
        sleep 1000;
        announce "MVP summoner is start please warp to center of prontera",0;
        sleep 1000;            
        mapannounce .map$,"MVP summoner start in 5s",0;
        sleep 1000;
        mapannounce .map$,"5s",0;
        sleep 1000;
        mapannounce .map$,"4s",0;
        sleep 1000;
        mapannounce .map$,"3s",0;
        sleep 1000;
        mapannounce .map$,"2s",0;
        sleep 1000;
        mapannounce .map$,"1s",0;
        sleep 1000;        
        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")){
            sleep 5000;
            mapannounce .map$,"First wave clear",0;
            sleep 2000;            
            mapannounce .map$,"Second wave start in 5s",0;
            sleep 1000;
            mapannounce .map$,"5s",0;
            sleep 1000;
            mapannounce .map$,"4s",0;
            sleep 1000;
            mapannounce .map$,"3s",0;
            sleep 1000;
            mapannounce .map$,"2s",0;
            sleep 1000;
            mapannounce .map$,"1s",0;
            sleep 1000;    
            monster .map$,0,0,"Maya Purple",1289,1,"mvp-ss::OnWaveFinal";
            monster .map$,0,0,"Mutant Dragon",1262,1,"mvp-ss::OnWaveFinal";
            monster .map$,0,0,"Tirfing",1204,"mvp-ss::OnWaveFinal";
    end;            
    OnWaveFinal:
            if(!mobcount(.map$,"mvp-ss::OnWaveFinal")){
            sleep 5000;
            mapannounce .map$,"GG",0;
            sleep 2000;
            mapannounce .map$,"Stage is Clear",0;
            sleep 2000;
            mapannounce .map$,"all players warp to Prontera",0;
            sleep 2000;
            mapwarp .map$,"prontera",180,180;
            }
        end;
    }
}

 

Edited by Skorm
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  152
  • Reputation:   78
  • Joined:  06/13/15
  • Last Seen:  

4 hours ago, Jard said:

Every 3hrs the npc will be show up to prontera then after 5mins the npc is disappear

.


-    script    mvp-ss    -1,{
    OnInit:
        set .map$,"guild_vs1-2";
    end;
    
    OnMinute34:
        announce "Attention to all players online",0;
        sleep 1000;
        announce "MVP summoner is start please warp to center of prontera",0;
        sleep 1000;            
        mapannounce .map$,"MVP summoner start in 5s",0;
        sleep 1000;
        mapannounce .map$,"5s",0;
        sleep 1000;
        mapannounce .map$,"4s",0;
        sleep 1000;
        mapannounce .map$,"3s",0;
        sleep 1000;
        mapannounce .map$,"2s",0;
        sleep 1000;
        mapannounce .map$,"1s",0;
        sleep 1000;        
        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")){
            sleep 5000;
            mapannounce .map$,"First wave clear",0;
            sleep 2000;            
            mapannounce .map$,"Second wave start in 5s",0;
            sleep 1000;
            mapannounce .map$,"5s",0;
            sleep 1000;
            mapannounce .map$,"4s",0;
            sleep 1000;
            mapannounce .map$,"3s",0;
            sleep 1000;
            mapannounce .map$,"2s",0;
            sleep 1000;
            mapannounce .map$,"1s",0;
            sleep 1000;    
            monster .map$,0,0,"Maya Purple",1289,1,"mvp-ss::OnWaveFinal";
            monster .map$,0,0,"Mutant Dragon",1262,1,"mvp-ss::OnWaveFinal";
            monster .map$,0,0,"Tirfing",1204,"mvp-ss::OnWaveFinal";
    end;            
    OnWaveFinal:
            if(!mobcount(.map$,"mvp-ss::OnWaveFinal")){
            sleep 5000;
            mapannounce .map$,"GG",0;
            sleep 2000;
            mapannounce .map$,"Stage is Clear",0;
            sleep 2000;
            mapannounce .map$,"all players warp to Prontera",0;
            sleep 2000;
            mapwarp .map$,"prontera",180,180;
            }
        end;
    }
}

 

 

Try this, you just need to move " hideoffnpc strnpcinfo(0); " & " hideonnpc strnpcinfo(0); " where you want it to be and then edit the npc to warp players on talk or whatever you want it to do.

 

prontera,152,183,4    script    mvp-ss    565,{
    OnInit:
        hideonnpc strnpcinfo(0);
        set .map$,"guild_vs1-2";
    end;
    
    OnMinute15:
        hideoffnpc strnpcinfo(0);
        announce "Attention to all players online",0;
        sleep 1000;
        announce "MVP summoner is start please warp to center of prontera",0;
        sleep 1000;            
        mapannounce .map$,"MVP summoner start in 5s",0;
        sleep 1000;
        mapannounce .map$,"5s",0;
        sleep 1000;
        mapannounce .map$,"4s",0;
        sleep 1000;
        mapannounce .map$,"3s",0;
        sleep 1000;
        mapannounce .map$,"2s",0;
        sleep 1000;
        mapannounce .map$,"1s",0;
        hideonnpc strnpcinfo(0);
        sleep 1000;        
        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")){
            sleep 5000;
            mapannounce .map$,"First wave clear",0;
            sleep 2000;            
            mapannounce .map$,"Second wave start in 5s",0;
            sleep 1000;
            mapannounce .map$,"5s",0;
            sleep 1000;
            mapannounce .map$,"4s",0;
            sleep 1000;
            mapannounce .map$,"3s",0;
            sleep 1000;
            mapannounce .map$,"2s",0;
            sleep 1000;
            mapannounce .map$,"1s",0;
            sleep 1000;    
            monster .map$,0,0,"Maya Purple",1289,1,"mvp-ss::OnWaveFinal";
            monster .map$,0,0,"Mutant Dragon",1262,1,"mvp-ss::OnWaveFinal";
            monster .map$,0,0,"Tirfing",1204,"mvp-ss::OnWaveFinal";
    end;            
    OnWaveFinal:
            if(!mobcount(.map$,"mvp-ss::OnWaveFinal")){
            sleep 5000;
            mapannounce .map$,"GG",0;
            sleep 2000;
            mapannounce .map$,"Stage is Clear",0;
            sleep 2000;
            mapannounce .map$,"all players warp to Prontera",0;
            sleep 2000;
            mapwarp .map$,"prontera",180,180;
            }
        end;
    }
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  152
  • Reputation:   78
  • Joined:  06/13/15
  • Last Seen:  

This one is totally working, and fixed the error in server logs..

prontera,152,183,4	script	mvp-ss	565,{
    
	mes "Hello "+strcharinfo(0)+",do";
	mes "You want me to warp you";
	mes "MvP summoning arena?";
	next;
	
	switch(select("Yes:No")) {
		case 1:
			warp "guild_vs1-2",0,0;
			end;
		case 2:
		close;
		}
	
	OnInit:
		disablenpc "mvp-ss";
        set .map$,"guild_vs1-2";
    end;
	
OnClock2200:
OnClock1900:
OnClock1600:	
OnClock1300:
OnClock1200:
OnClock0900:
OnClock0600:
OnClock0300:
OnClock0000:
		enablenpc "mvp-ss";
		initnpctimer; // Start the timer
        announce "Attention to all players online",0;
        sleep 1000;
        announce "MVP summoning has been started, please warp to center of prontera to participate",0;
        sleep 1000;            
        mapannounce .map$,"MVP summoner start in 5s",0;
        sleep 1000;
        mapannounce .map$,"5s",0;
        sleep 1000;
        mapannounce .map$,"4s",0;
        sleep 1000;
        mapannounce .map$,"3s",0;
        sleep 1000;
        mapannounce .map$,"2s",0;
        sleep 1000;
        mapannounce .map$,"1s",0;
        sleep 1000;        
        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")){
            sleep 5000;
            mapannounce .map$,"First wave clear",0;
            sleep 2000;            
            mapannounce .map$,"Second wave start in 5s",0;
            sleep 1000;
            mapannounce .map$,"5s",0;
            sleep 1000;
            mapannounce .map$,"4s",0;
            sleep 1000;
            mapannounce .map$,"3s",0;
            sleep 1000;
            mapannounce .map$,"2s",0;
            sleep 1000;
            mapannounce .map$,"1s",0;
            sleep 1000;    
            monster .map$,0,0,"Maya Purple",1289,1,"mvp-ss::OnWaveFinal";
            monster .map$,0,0,"Mutant Dragon",1262,1,"mvp-ss::OnWaveFinal";
            monster .map$,0,0,"Tirfing",1204,1,"mvp-ss::OnWaveFinal";
    end;            
    OnWaveFinal:
            if(!mobcount(.map$,"mvp-ss::OnWaveFinal")){
            sleep 5000;
            mapannounce .map$,"GG",0;
            sleep 2000;
			disablenpc "mvp-ss";
			sleep 2000;
            mapannounce .map$,"Stage is Clear",0;
            sleep 2000;
            mapannounce .map$,"all players warp to Prontera",0;
            sleep 2000;
            mapwarp .map$,"prontera",154,180;
			sleep 225000;
			killmonsterall "guild_vs1-2"; // Just in case
            }
        end;
    }
}

 

Edited by Earnestinence
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...