Jump to content
  • 0

Can somone fix this script PLZ


scrubtasticx

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  12/25/12
  • Last Seen:  

this is a script i found on these forums cannot get it to compile seeing if anyone can fix please..

thankyou in advance

//||------------------------------------------------------------------------------||
//||---------------------Simple Bank Note NPC ------------------------------------||
//||---------------------------by: Whathell---------------------------------------||
//||------------------------------------------------------------------------------||
//||------------------------------------------------------------------------------||
prontera,147,184,4 script Banker 833,{
//|=====================Settings==============================
set @npcname$,"^ff0000[banker]^000000";  //npc name
set @banknoteprice,1000000;   //price you want for each bank note
set @banknoteid,7922; //the item id for your bank note
set @maxzeny,2000000000;   //put in the max zeny you have for your server
//|===========================================================
mes @npcname$;
mes "Hi "+ strcharinfo(0) +", I can change your bank notes into zeny, and vice versa.";
mes "Each bank note is worth 1 Million Zeny.";
next;
mes @npcname$;
mes "So tell me,what can I do for you?";
switch(select("Exchange Bank Notes to Zeny:Exchange Zeny to Bank Notes")) {
 case 1:
  next;
  mes @npcname$;
  mes "Please put in the amount of Bank Notes you want to exchange:";
next;
input @banknoteamount;
if (@banknoteamount <= 0) {
 mes @npcname$;
 mes "Please come back if you change your mind.";
 close;
} else if (countitem(@banknoteid) < @banknoteamount) {
 mes @npcname$;
 mes "You dont have enough Bank Notes to complete this
transaction.";
 close;
} else if ((@banknoteamount*@banknoteprice)+Zeny > @maxzeny) {
 mes @npcname$;
 mes "You cannot exchange this number of Bank Notes because you
will exceed the maximum amount of zeny you can hold.";
 close;
}
next;
set @price,@banknoteprice*@banknoteamount;
delitem @banknoteid,@banknoteamount;
set Zeny,Zeny+@price;
mes @npcname$;
mes "Transaction complete! Here's your money.";
break;
  case 2:
next;
mes @npcname$;
mes "Please put in the amount of Bank Notes you want.";
next;
input @noteamount;
if (@noteamount <= 0) {
mes @npcname$;
  mes "Please come back if you change your mind.";
 close;
} else if (@noteamount*@banknoteprice > Zeny) {
mes @npcname$;
mes "I'm sorry but you lack Zeny to complete this transaction.";
close;
}
next;
set @pricea,@noteamount*@banknoteprice;
set Zeny,Zeny-@pricea;
getitem @banknoteid,@noteamount;
mes @npcname$;
mes "Transaction complete! Here are your Bank Notes.";
break;
}
close;
end;
}

Edited by Emistry
Please use [CODEBOX] or Attachments for long contents.
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

 mes "You dont have enough Bank Notes to complete this
transaction.";
...
...
 mes "You cannot exchange this number of Bank Notes because you
will exceed the maximum amount of zeny you can hold.";

to

   mes "You dont have enough Bank Notes to complete this transaction.";
...
...
   mes "You cannot exchange this number of Bank Notes because you will exceed the maximum amount of zeny you can hold.";

Otherwise this script seems to work

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  12/25/12
  • Last Seen:  

ty very much. would there be anyway to make the npc store the bank notes on HIM like in database instead of handing player tickets?

Edited by scrubtasticx
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...