Jump to content
  • 0

NPC with timer


XkAcY-

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   0
  • Joined:  11/13/11
  • Last Seen:  

Hello.. i got problem when i use this the exist sleep2 is overwriting when  you do it again

or can you modify this to work proper thanks

 

-    script    GAnnounce    -1,{

OnEnable:
    sleep2 5000;
    donpcevent "Greedsummoner::OnSummon";
    mapannounce "prt_fild08","Summoner: Start now!",0;
    sleep2 60000;
    mapannounce "prt_fild08","Summoner: 5 minute's left",0;
    sleep2 60000;
    mapannounce "prt_fild08","Summoner: 4 minute's left",0;
    sleep2 60000;
    mapannounce "prt_fild08","Summoner: 3 minute's left",0;
    sleep2 60000;
    mapannounce "prt_fild08","Summoner: 2 minute's left",0;
    sleep2 60000;
    mapannounce "prt_fild08","Summoner: 1 minute's left",0;
    sleep2 30000;
    mapannounce "prt_fild08","Summoner: 30 second's left",0;
    sleep2 20000;
    mapannounce "prt_fild08","Summoner: 20 second's left",0;
    sleep2 10000;
    mapannounce "prt_fild08","Summoner: 10 second's left",0;
    sleep2 5000;
    mapannounce "prt_fild08","Summoner: 5 second's left",0;
    sleep2 1000;
    mapannounce "prt_fild08","Summoner: 4 second's left",0;
    sleep2 1000;
    mapannounce "prt_fild08","Summoner: 3 second's left",0;
    sleep2 1000;
    mapannounce "prt_fild08","Summoner: 2 second's left",0;
    sleep2 1000;
    mapannounce "prt_fild08","Summoner: Time is up",0;
    killmonster "prt_fild08","All";
    end;
    }
    
    -    script    Greedsummoner    -1,{

OnSummon:
   monster "prt_fild08.gat",0,0,"Kukre",1438,1,"kukre::OnMobKilled";
   monster "prt_fild08.gat",0,0,"Kukr3",1438,15,"kukrelose::OnMobKilled";
   end;
}

-    script    kukre    -1,{
 
OnMobKilled:
        if(HunterPoints < 20){
        set KukrePoints, KukrePoints + 1;
        dispbottom "Hunter License : awesome!.";
        end;
        }
        dispbottom "Summoner : Thank you";
        set _HunterLicenseDone,1;
        killmonster "prt_fild08","All";
        awake "GAnnounce";
        warp "prontera",0,0;
        end;
 
}
 
-    script    kukrelose    -1,{
 
OnMobKilled:
        dispbottom "Summoner : not lucky!.";
        set HunterPoints,0;
        killmonster "prt_fild08","All";
        awake "GAnnounce";
        warp "prontera",0,0;
        end;
 
}

 

 

 

 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

I suggest you to use initnpctimer instead of sleep command : awake only 'awake' the current sleep, the script still run

like that

OnEnable:
	sleep2 5000;
	donpcevent "Greedsummoner::OnSummon";
	mapannounce "prt_fild08","Summoner: Start now!",0;
	initnpctimer;
        end;
OnTimer60000:
	mapannounce "prt_fild08","Summoner: 5 minute's left",0;
	end;
OnTimer120000:
	mapannounce "prt_fild08","Summoner: 4 minute's left",0;
	end;
OnTimer180000:
	mapannounce "prt_fild08","Summoner: 3 minute's left",0;
	end;
// etc..

 

Don't forget to stop the timer

-    awake "GAnnounce";
+    stopnpctimer;
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...