Jump to content
  • 0

my credits exchanger npc not appear case 4


Question

Posted
Quote

-    script    Credit Exchanger#2    903,{
    mes "[Credit Exchanger]";
    mes "What do you want?";
switch(select("[Gold Credits to Violet Credits]","[Gold Credits to Zeny]","[Zeny to Gold Credits]")){
    case 1:
        if(!countitem(1230002)){
            mes "You don't have any credit";
            close;
        }
        mes "How many you want to exchange?";
        input @u;
        if(countitem(1230002)<@u || @u < 100){
            mes "You don't have enough credit.";
            close;
        }
        set @realu, @u / 100; //report to nearest 100 multiplier
        mes "Ok~!";
        delitem 1230002,@realu * 100;
        getitem "1230001", @realu;
        close;
    case 2:
        if(!countitem(1230002)){
            mes "You don't have any credit";
            close;
        }
        mes "How many you want to exchange?";
        input @u;
        if(countitem(1230002)<@u){
            mes "You don't have enough credit.";
            close;
        }
        mes "Ok~!";
        delitem 1230002,@u;
        set Zeny,Zeny+10000000*@u;
        set @u,0;
        close;
    case 3:
        if(Zeny<10000000){
            mes "You don't have enough Zeny.";
            close;
        }
        mes "How many you want to exchange?";
        input @u;
        if(10000000*@u>Zeny){
            mes "You don't have enough Zeny.";
            close;
        }
        set ztc_player,gettimetick(2);
        mes "Ok~!";
        getitem 1230002,@u;
        set Zeny,Zeny-10000000*@u;
        close;
    case 4:
        if(!countitem(1230001)){
            mes "You don't have any credit";
            close;
        }
        mes "How many you want to exchange?";
        input @u;
        if(countitem(1230001)<@u || @u < 1){
            mes "You don't have enough credit.";
            close;
        }
        set @realu, @u / 1; //report to nearest 1 multiplier
        mes "Ok~!";
        delitem 1230001,@realu * 1;
        getitem "1230002", @realu;
        close;
        
}
OnInit:
waitingroom "Credit Exchanger",0;
end;
}
prontera,141,179,5    duplicate(Credit Exchanger#2)    Credit Exchanger#3    899
geffen,116,62,5    duplicate(Credit Exchanger#2)    Credit Exchanger#4    899
turbo_room,93,117,5    duplicate(Credit Exchanger#2)    Credit Exchanger#5    899

is it correct what i edited?.. case line 4 not appear at n pcimage.png.47b24ceab8165f50eaa78d8b7f43618c.png

4 answers to this question

Recommended Posts

  • 0
Posted
3 minutes ago, GoldRoger said:

is it correct what i edited?.. case line 4 not appear at n pcimage.png.47b24ceab8165f50eaa78d8b7f43618c.png

switch(select("[Gold Credits to Violet Credits]","[Gold Credits to Zeny]","[Zeny to Gold Credits]")){

Check that select. there is no 4th case.

  • 0
Posted

Add missing case here

Quote

switch(select("[Gold Credits to Violet Credits]","[Gold Credits to Zeny]","[Zeny to Gold Credits]")){

 

  • 0
Posted
6 hours ago, GoldRoger said:

is it correct what i edited?.. case line 4 not appear at n pcimage.png.47b24ceab8165f50eaa78d8b7f43618c.png

 

switch(select("[Gold Credits to Violet Credits]","[Gold Credits to Zeny]","[Zeny to Gold Credits]","[Violet Credits to Gold Credits]")){

 

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