Jump to content
  • 0

NPC Dialogue Box Counting Upwards


Rivers

Question


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   47
  • Joined:  12/04/13
  • Last Seen:  

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

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

set .@left, 50 - $giveaway;
mes .@left + " Items left.";

change to

mes "Give Away: "+ $giveaway;

 

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

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   47
  • Joined:  12/04/13
  • Last Seen:  

Many many thanks!

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