poring_w02,101,86,3 script Password Event NPC 405,{
if ( $event_run > 0 ) goto event_start;
if ( getgmlevel() != 99 ) {
mes "[Password Event NPC]";
mes "There is no on-going event as of the moment.";
next;
mes "[Password Event NPC]";
mes "I will inform you when a GM hosts this event.";
close2;
emotion e_heh;
end;
}
mes "[Password Event NPC]";
mes "Hello ^CC0000"+strcharinfo(0)+"^000000!";
next;
mes "[Password Event NPC]";
mes "Current Password: ^CC0000"+$event_pword$+"^000000";
mes "Current Prize: ^CC0000"+$event_amount+"^000000 ^CC0000"+getitemname($event_prize)+"^000000";
mes "Number of Winners: ^CC0000"+$event_winners+"^000000";
next;
mes "[Password Event NPC]";
mes "How can I help you today?";
menu
"Set Password",event_password,
"Set Event",event_prize,
"Set Winner Count",event_winner,
"Start Event",event_start1;
event_winner:
next;
mes "[Password Event NPC]";
mes "How many player do you want to win this event?";
input $event_winners;
next;
mes "[Password Event NPC]";
mes "Should ^CC0000"+$event_winners+"^000000 win this event?";
menu
"Yes",event_count_yes,
"Reset",event_winner;
event_count_yes:
next;
mes "[Password Event NPC]";
mes "Then ^CC0000"+$event_winners+"^000000 will win this event!";
close;
event_prize:
next;
mes "[Password Event NPC]";
mes "Please insert the item ID of this event's prize.";
input $event_prize;
next;
mes "[Password Event NPC]";
mes "Now please enter how many ^CC0000"+getitemname($event_prize)+"^000000";
input $event_amount;
next;
mes "Are you sure you want to give ^CC0000"+$event_amount+"^000000 ^CC0000"+getitemname($event_prize)+"^000000 for this event?";
menu
"Yes",event_prize_yes,
"Reset",event_prize;
event_prize_yes:
next;
mes "[Password Event NPC]";
mes "Then ^CC0000"+$event_amount+"^000000 ^CC0000"+getitemname($event_prize)+"^000000 it is!";
close;
event_start1:
next;
mes "[Password Event NPC]";
mes "Then let's begin!";
close2;
announce "Password Event NPC: The Password Event has begun!",bc_blue;
sleep2 5000;
announce "Password Event NPC: Try to crack the password to win "+$event_amount+" "+getitemname($event_prize)+"!",bc_blue;
sleep2 5000;
announce "Password Event NPC: Only "+$event_winners$+" can win this event!",bc_blue;
sleep2 5000;
announce "Password Event NPC: Now go! Try to crack the password!";
set $event_run,1;
end;
event_start:
if ( #event_winner == 1 ) {
mes "[Password Event NPC]";
mes "Congratulations! You have already won! Try your luck again next event!";
close;
}
if ( $crack == $event_winners ) {
set $event_run,0;
set $event_winners,0;
mes "[Password Event NPC]";
mes "All prizes are given away!";
next;
mes "[Password Event NPC]";
mes "Try your luck again next event!";
close2;
sleep2 5000;
announce "Password Event NPC: All prizes have already been acquired!",bc_blue;
sleep2 5000;
announce "Password Event NPC: Better luck next time to those who didn't win!",bc_blue;
end;
}
mes "[Password Event NPC]";
mes "What is the password for today's event?";
input .@event_try$;
if ( .@event_try$ == $event_pword$ ) {
next;
mes "[Password Event NPC]";
mes "Congratulations! You win "+$event_amount+" "+getitemname($event_prize)+" !";
set #event_winner,1;
set $crack,$crack+1;
getitem $event_prize,$event_amount;
close2;
if ( Sex == 1 ) {
announce "Password Event NPC: "+strcharinfo(0)+" wins!! Let's congratulate him!",bc_blue;
end;
}
announce "Password Event NPC: "+strcharinfo(0)+" wins!! Let's congratulate her!",bc_blue;
end;
}
next;
mes "[Password Event NPC]";
mes "Sorry, wrong password!";
close;
event_password:
next;
mes "[Password Event NPC]";
mes "What password would you like to set?";
input $event_pword$;
next;
mes "[Password Event NPC]";
mes "Do you really want to set ^CC0000"+$event_pword$+"^000000 as this event's password?";
menu
"Yes",yes_confirm,
"Reset",event_password;
yes_confirm:
next;
mes "[Password Event NPC]";
mes "Then ^CC0000"+$event_pword$+"^000000 it is!";
close;
}
my question is that how can i delete the #variable of a character after the event without the character ever talking to the same NPC.
If i add it in the if ( getgmlevel() != script then if the player is not online when the next event starts then the npc will not let him play since he already got the variable from last event.
Question
Yomigaeru
hey ra.
I recently made this script:
my question is that how can i delete the #variable of a character after the event without the character ever talking to the same NPC.
If i add it in the if ( getgmlevel() != script then if the player is not online when the next event starts then the npc will not let him play since he already got the variable from last event.
so, any tips?
Thanks for future replies.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.