Jump to content
  • 0

item to points amount problem


Question

Posted (edited)

hi anyone can help me put an amount on this script i found master emistry script but i can't apply adding amount before the exchange i put the input amount but nothing happens even no error on the script .thanks in advance.

prontera,146,107,5    script    Board Lady    646,{

.@item = 7339;
.@rate = 1;


    mes "[ Board Lady]
    mes "Hi ther adventurer";
    mes "do you have board tickets?";
    mes "i can convert it to kafra points";
    mes "so you can buy at the free cash shop NPC";
    next;
    mes "[ Board Lady]
    mes "^009900 1 ticket = 1 kafra points";
    mes "How many Board Quest Ticket do you have?";
    next;
    input .@amount;
    if (.@amount == 0) {
        mes .NPC$;
        mes "Umm, please enter your amount!";
        close;
    }
    .@amount2 = (.@amount * .ID); 
    if (.@amount > .@amount2) {
    mes .NPC$;
    mes "You dont' have enough ticket!!!";
    close;
    }
    if (.@amount2 == 0){

    mes .NPC$;
    mes "You don't have ticket!!";
    close;
    }
    .@countitem = countitem( .@item );
    mes "Exchange "+.@countitem+" x "+getitemname( .@item )+" to "+( .@countitem * .@rate )+" Point ?";

    if( .@countitem )
    if( select( "YES","Cancel" ) == 1 ){
        delitem .@item,.@countitem;
        #KAFRAPOINTS = #KAFRAPOINTS + ( .@countitem * .@rate );
        mes "Done";
    }
    close;
    }

 

Edited by Haruka Mayumi
Please Code Box

1 answer to this question

Recommended Posts

  • 0
Posted
37 minutes ago, cadz said:

hi anyone can help me put an amount on this script i found master emistry script but i can't apply adding amount before the exchange i put the input amount but nothing happens even no error on the script .thanks in advance.

prontera,146,107,5    script    Board Lady    646,{

.@item = 7339;
.@rate = 1;


    mes "[ Board Lady]
    mes "Hi ther adventurer";
    mes "do you have board tickets?";
    mes "i can convert it to kafra points";
    mes "so you can buy at the free cash shop NPC";
    next;
    mes "[ Board Lady]
    mes "^009900 1 ticket = 1 kafra points";
    mes "How many Board Quest Ticket do you have?";
    next;
    input .@amount;
    if (.@amount == 0) {
        mes .NPC$;
        mes "Umm, please enter your amount!";
        close;
    }
    .@amount2 = (.@amount * .ID); 
    if (.@amount > .@amount2) {
    mes .NPC$;
    mes "You dont' have enough ticket!!!";
    close;
    }
    if (.@amount2 == 0){

    mes .NPC$;
    mes "You don't have ticket!!";
    close;
    }
    .@countitem = countitem( .@item );
    mes "Exchange "+.@countitem+" x "+getitemname( .@item )+" to "+( .@countitem * .@rate )+" Point ?";

    if( .@countitem )
    if( select( "YES","Cancel" ) == 1 ){
        delitem .@item,.@countitem;
        #KAFRAPOINTS = #KAFRAPOINTS + ( .@countitem * .@rate );
        mes "Done";
    }
    close;
    }

alright i fix it. kindly close this thread thanks! ?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...