Jump to content
  • 0

my credits exchanger npc not appear case 4


GoldRoger

Question


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   0
  • Joined:  03/19/18
  • Last Seen:  

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

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1826
  • Reputation:   288
  • Joined:  08/03/12
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.03
  • Content Count:  144
  • Reputation:   10
  • Joined:  08/19/23
  • Last Seen:  

Add missing case here

Quote

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

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  407
  • Reputation:   55
  • Joined:  07/24/12
  • Last Seen:  

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]")){

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   0
  • Joined:  03/19/18
  • Last Seen:  

thanks guys..its working..

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