Jump to content
  • 0

how to set the time..


bakuriyu2

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   1
  • Joined:  07/19/12
  • Last Seen:  

i want to set the time.. that after 2minutes the npc will disappear..

- script guessannouncer -1,{
OnMinute09:
OnMinute18:
OnMinute27:
OnMinute36:
OnMinute45:
OnMinute54:
announce "Guess the Number: Is starting in 1 Minute in Prontera!",0;
sleep 30000;
announce "Guess the Number: Is starting in 30 Seconds in Prontera!",0;
sleep 20000;
announce "Guess the Number: 10 Seconds! Gather up in Prontera quick!",0;
sleep 5000;
announce "Guess the Number: 5 Seconds Left!",0;
sleep 1000;
announce "Guess the Number: 4 Seconds!",0;
sleep 1000;
announce "Guess the Number: 3 Seconds!",0;
sleep 1000;
announce "Guess the Number: 2 Seconds!",0;
sleep 1000;
announce "Guess the Number: 1 Second!",0;
sleep 1000;
announce "Guess the Number: The event has started!",0;
enablenpc "guess";
end;
}
// ==============================================================================
prontera,164,188,5 script Guess the Number::guess 723,{
// =================== Setting the NPC Name and Prize and amount  =============
set .@n$,"^FF0000[Guess the Number]^000000";
set @prize,7227;//Change the 7227 to your reward item ID
set @amoun,10;//Change the 10 to your reward amount
// ==================== End of settings =========================================
if(.guessstart==1) goto Oneventevent;
set .usednumber, rand(1,100);
announce "Guess the Number: Guess the Number Event Started in Prontera!",0;
set .guessstart,1;
Oneventevent:
mes .@n$;
mes "Guess the number...It is a number between between 1 and 100!";
input .@guessnumber;
next;
if(.@guessnumber > .usednumber) {
mes .@n$;
mes "My number is ^FF0000SMALLER^000000 than the one you guessed!";
close;
} else if(.@guessnumber < .usednumber) {
mes .@n$;
mes "My number is ^FF0000BIGGER^000000 than the one you guessed!";
close;
} else if(.@guessnumber == .usednumber) {
announce ""+strcharinfo(0)+" has won the Guess the Number Event! My number was "+.usednumber+"!",0;
mes .@n$;
mes "You have guessed my number! Congratulations!";
getitem @prize,@amoun;
disablenpc "guess";
set .guessstart,0;
close2;
end;
}
}

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  87
  • Reputation:   13
  • Joined:  02/15/12
  • Last Seen:  

EASYMODE*

After:

announce "Guess the Number: The event has started!",0;
enablenpc "guess";

Add

initnpctimer;
end;
OnTimer120000:
disablenpc "guess";
set .guessstart,0;
stopnpctimer;
announce "No one guessed the number! The event is over!",0;
end;

ALSO:

After:

getitem @prize,@amoun;
disablenpc "guess";
set .guessstart,0;
close2;

Add:

stopnpctimer "guessannouncer";

Otherwise the "No one guessed the number." will popup regardless if someone guessed it.

Edited by shadowseph
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  87
  • Reputation:   13
  • Joined:  02/15/12
  • Last Seen:  

You need to insert tabs in the npc header.

Like

-%tabscript%tabguessannouncer%tab-1,{

Of course %tab = tab key on your keyboard

Edited by shadowseph
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   1
  • Joined:  07/19/12
  • Last Seen:  

You need to insert tabs in the npc header.

Like

-%tabscript%tabguessannouncer%tab-1,{

Of course %tab = tab key on your keyboard

tnx bro! its working now.. mwa mwa chups chups!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  87
  • Reputation:   13
  • Joined:  02/15/12
  • Last Seen:  

no problem, let me know if you have any problem.

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