Jump to content
  • 0
Akiza Izinsky

Coin To Item Exchanger

Question

 

prontera,146,172,6 script Coin Exchanger 872,{

set [email protected]$,"[Coin Exchanger]";

mes [email protected]$;

mes "Hi! What Can i Do For You ?";

menu "Silver Coin",sc,"Gold Coin",gc;

mes [email protected]$;

sc:

next;

switch(select("Level 5 Assumptio Scroll:Level 5 Aspersio Scroll:Level 10 Blessing Scroll:Level 10 Increase Agi Scroll:Level 10 Mystical Amplification Scroll:Level 10 Wind Walk:Gold Coin")) {

case 1:

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}

delitem 675,[email protected];

getitem 12218,5*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

break;

case 2:

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}

delitem 675,[email protected];

getitem 12217,5*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

break;

case 3:

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}

delitem 675,[email protected];

getitem 12215,10*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

break;

case 4:

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}

delitem 675,[email protected];

getitem 12216,10*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

break;

case 5:

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}

delitem 675,[email protected];

getitem 14593,5*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

break;

case 6:

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}

delitem 675,[email protected];

getitem 12219,5*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

break;

case 7:

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 5 ) ||(countitem(675) < [email protected]){ close;}

delitem 675,[email protected];

getitem 671,[email protected]/5;

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

close;

}

gc:

switch(select("Ghostring Scroll:Holy Armor Scroll:Shadow Armor Scroll":Tao Gunka Scroll:Repair Weapon Scroll")) {

case 8:

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}

delitem 671,[email protected];

getitem 14598,10*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

break;

case 9:

next;

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}

delitem 671,[email protected];

getitem 14540,5*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

break;

case 10:

next;

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}

delitem 671,[email protected];

getitem 14539,10*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

break;

case 11:

next;

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}

delitem 671,[email protected];

getitem 14602,10*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

break;

case 12:

next;

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 5 ) ||(countitem(675) < [email protected]){ close;}

delitem 671,[email protected];

getitem 14521,1*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

break;

case 13:

next;

mes "Please Input The Number of Coins";

input [email protected];

if(checkweight(675,[email protected])){

if([email protected] < 5 ) ||(countitem(675) < [email protected]){ close;}

delitem 671,[email protected];

getitem 675,5*[email protected];

}else {

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";

close;

}

close;

}

}

}

can someone help me. i`ve got errored when it goes to gold coin. i`m using eathena

Edited by Akiza Izinsky
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Edit:

Lol nvm this

the script need some fixes, give me a min. and i will fix it

Try this

prontera,146,172,6 script Coin Exchanger 872,{
set [email protected]$,"[Coin Exchanger]";
mes [email protected]$;
mes "Hi! What Can i Do For You ?";
menu "Silver Coin",sc,"Gold Coin",gc;
mes [email protected]$;
sc:
next;
switch(select("Level 5 Assumptio Scroll:Level 5 Aspersio Scroll:Level 10 Blessing Scroll:Level 10 Increase Agi Scroll:Level 10 Mystical Amplification Scroll:Level 10 Wind Walk:Gold Coin")) {
case 1:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 12218,5*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 2:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 12217,5*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 3:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 12215,10*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 4:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 12216,10*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 5:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 14593,5*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 6:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 12219,5*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 7:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 5 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 671,[email protected]/5;
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
gc:
next;
switch(select("Ghostring Scroll:Holy Armor Scroll:Shadow Armor Scroll":Tao Gunka Scroll:Repair Weapon Scroll")) {
case 8:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 14598,10*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 9:
next;
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 14540,5*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 10:
next;
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 14539,10*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 11:
next;
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 14602,10*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 12:
next;
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 5 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 14521,1*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 13:
next;
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 5 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 675,5*[email protected];
}else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
close;
}
}
}

sorry i can't test it at all, my test server got bug and my hosting is ded x_x if that doesn't work give a lil time and i will re-do the whole script for you

 

any errors please provide another SS 

Edit2:

Finally fixed, there were some mistakes

  • There was no menu predefined for gold coins, it just opened alone the silver coins trade
  • This line 
    switch(select("Ghostring Scroll:Holy Armor Scroll:Shadow Armor Scroll":Tao Gunka Scroll:Repair Weapon Scroll")) {
    

    Has an error, there is an extra " just after Shadow Armor Scroll

  • When fixed that, after putting the amount of desired exchange, the npc does nothing and a blank window of npc message stucks the player (fixed adding a close; at the end of every exchange

I hope it helps :)

prontera,146,172,6	script	Kidolol	872,{
set [email protected]$,"[Coin Exchanger]";
mes [email protected]$;
mes "Hi! What Can i Do For You ?";
menu "Silver Coin",sc,"Gold Coin",gc; //added options to select for Silver/Gold exchanges
mes [email protected]$;
sc:
next;
switch(select("Level 5 Assumptio Scroll:Level 5 Aspersio Scroll:Level 10 Blessing Scroll:Level 10 Increase Agi Scroll:Level 10 Mystical Amplification Scroll:Level 10 Wind Walk:Gold Coin")) {
case 1:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 12218,5*[email protected];
close; // added 1 close; to every end of exchange to fix the tuck message window
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 2:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 12217,5*[email protected];
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 3:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 12215,10*[email protected];
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 4:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 12216,10*[email protected];
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 5:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 14593,5*[email protected];
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 6:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 675,[email protected];
getitem 12219,5*[email protected];
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
case 7:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 5 ) ||(countitem(675) < [email protected]){ close; }
delitem 675,[email protected];
getitem 671,[email protected]/5;
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break;
}
gc:
next;
menu "Ghostring Scroll",GS,"Holy Armor Scroll",HAS,"Shadow Armor Scroll",SAS,"Tao Gunka Scroll",TGS,"Repair Weapon Scroll",RWS,"Silver Coin",SCS;
//switch(select("Ghostring Scroll:Holy Armor Scroll:Shadow Armor Scroll:Tao Gunka Scroll:Repair Weapon Scroll")) {
//was removed to put a menu instead since it has an extra " and could mess the whole case count (maybe this was not neccesary at all ...
next;
GS:
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 14598,10*[email protected];
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
close;
HAS:
next;
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 14540,5*[email protected];
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
close;
SAS:
next;
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 14539,10*[email protected];
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
close;
TGS:
next;
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 0 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 14602,10*[email protected];
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
close;
RWS:
next;
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 5 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 14521,1*[email protected];
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
close;
SCS:
next;
mes "Please Input The Number of Coins";
input [email protected];
if(checkweight(675,[email protected])){
if([email protected] < 5 ) ||(countitem(675) < [email protected]){ close;}
delitem 671,[email protected];
getitem 675,5*[email protected];
close;
} else {
mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
close;
}
}

Tell me if you get an error :)

Link to comment
Share on other sites

oh lol

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
close;
} // also, looks like this is an extra } 
gc:
switch(select("Ghostring Scroll:Holy Armor Scroll:Shadow Armor Scroll":Tao Gunka Scroll:Repair Weapon Scroll")) {
case 8:

seems like you lose a break; there, try to change that for this and tell me if you get any errors

mes "You Don't Have Enough Coin, Please Comeback Again When You Have It.";
close;
}
break; //<<<< it was a close; , also there was an extra }
gc:
switch(select("Ghostring Scroll:Holy Armor Scroll:Shadow Armor Scroll":Tao Gunka Scroll:Repair Weapon Scroll")) {
case 8:

let me know if it works o:!

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.