Jump to content
  • 0

Requesting NPC Trader


Hyoru

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

Hello!

 

I need an NPC that trades 100 #invasionpoint to 1 Poring Coin ( ID: 7539 ). 

 

Thanks in Advanced.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  86
  • Topics Per Day:  0.02
  • Content Count:  591
  • Reputation:   146
  • Joined:  06/19/12
  • Last Seen:  

here  100 x #invasionpoint to 1 x Poring Coins and 1x Poring coin to 100x  #invasionpoint

prontera,155,155,4	script	Converter	83,{

    .@name$ ="[^FF0000Converter^000000]";


    dispbottom "You have " + #invasionpoint + " Invasion Point's.";
    mes .@name$;
    mes "Hello, 100 Invasion Point is equals to 1 Poring Coin.";
    mes "What would you like to do?";
    next;



    switch( select("Invasion Point to Poring Coin","Poring Coin to Invasion Point") ) {

        case 1:
            mes .@name$;
            mes "How many Poring Coin(s) do you want?";
            input .@num;
            next;



            if( .@num <= 0 || #invasionpoint  < .@num * 100 ) {
                mes .@name$;
                mes "Sorry, you don't have enough Invasion Point!";
                close;

            }

            mes .@name$;
            mes "This will cost ^FF0000" +(.@num * 100)+ " Invasion Point^000000.";
            next;



            if( select("Proceed:Nevermind") -1 ) {
                mes .@name$;
                mes "Goodbye!";
                close;

            }

            set #invasionpoint,#invasionpoint -  .@num * 100;
            dispbottom "Lost: " +(.@num * 100)+ " Invasion Point. Total: " +#invasionpoint +" Invasion Point.";
            getitem 7539, .@num;
            break;

    

        case 2:
            mes .@name$;
            mes "How many Poring Coin(s) will you give?";
            input .@num;
            next;



            if( .@num <= 0 || countitem(7539) < .@num ) {
                mes .@name$;
                mes "Sorry, you don't have enough Poring Coin!";
                close;

            }

            mes .@name$;
            mes "I can give you ^FF0000" +(.@num * 100)+ " Invasion Point.^000000 for this.";
            next;



            if( select("Proceed:Nevermind") -1 ) {
                mes .@name$;
                mes "Goodbye!";
                close;

            }

			set #invasionpoint,#invasionpoint +  .@num * 100;
            dispbottom "Gained: " +(.@num * 100)+ " Invasion Point. Total: " +#invasionpoint +" Invasion Point's.";
            delitem 7539,.@num;

    }

    close;

}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

Thanks a lot!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  317
  • Reputation:   63
  • Joined:  11/13/11
  • Last Seen:  

Please mark topic as solved, and select the post that helped you solve it. This would help other members facing the same issue / having the same request.

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