Does anyone know how I can make this NPC chat box show the numbers counting upward instead of down?
//Script by Normynator v1.1
prontera,140,180,5 script Item 80,{
function EndEvent;
if(getgmlevel() >= 99){
.@s = select("Start:Stop:Chancel");
if(.@s == 1){
mes "Start";
set $giveaway, 0;
announce "Give away has just started!!", 0;
close;
}else if(.@s == 2){
mes "Stop";
set $giveaway, 50;
EndEvent;
close;
}else{
close;
}
}
if($giveaway == 50){
mes "All items are gone!";
close;
}else{
set .@left, 50 - $giveaway;
mes "Hi";
mes .@left + " Items left.";
//mes $giveaway;
if (#AlreadyGot){
mes "You already got your item.";
close;
}
set #AlreadyGot, 1;
mes "An Apple for you";
getitem 512, 1;
set $giveaway, $giveaway + 1;
if($giveaway == 50){
EndEvent;
}
close;
}
EndEvent:
announce "Give away has just ended!!", 0;
query_sql "DELETE FROM `rathena`.`global_reg_value` WHERE `str`='#AlreadyGot'";
end;
}
Question
Rivers
Does anyone know how I can make this NPC chat box show the numbers counting upward instead of down?
//Script by Normynator v1.1 prontera,140,180,5 script Item 80,{ function EndEvent; if(getgmlevel() >= 99){ .@s = select("Start:Stop:Chancel"); if(.@s == 1){ mes "Start"; set $giveaway, 0; announce "Give away has just started!!", 0; close; }else if(.@s == 2){ mes "Stop"; set $giveaway, 50; EndEvent; close; }else{ close; } } if($giveaway == 50){ mes "All items are gone!"; close; }else{ set .@left, 50 - $giveaway; mes "Hi"; mes .@left + " Items left."; //mes $giveaway; if (#AlreadyGot){ mes "You already got your item."; close; } set #AlreadyGot, 1; mes "An Apple for you"; getitem 512, 1; set $giveaway, $giveaway + 1; if($giveaway == 50){ EndEvent; } close; } EndEvent: announce "Give away has just ended!!", 0; query_sql "DELETE FROM `rathena`.`global_reg_value` WHERE `str`='#AlreadyGot'"; end; }
Link to comment
Share on other sites
2 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.