Jump to content
  • 0
luisangelops

Credit Exchanger Script Error

Question

Hello Guys, Good Day!

 

Can Someone help me to fix this script because I spent 2 days just to fix this. Thank you Guys!

Here`s my Credit Exchanger.txt

 

//===== rAthena Script =======================================
//= Coin Exchanger
//===== By: ==================================================
//= Skyzone Modifyd
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
//= rAthena SVN 
//===== Description: ========================================= 
//= Quest to Exchange Credit.
//= Credit to Zeny Unlimited Exchange
//= Zeny to Credit w/ Exchange Time
//===== Other Information: ===================================
 
//===== Additional Comments: =================================
//= v1.0 - First release [Skyzone Modifyd]
//= v1.1 - Adding Max Capacity Zeny Checker.


-	script	Credit Agent	-1,{
	set @header$,"[ ^0000ffCredit Agent^000000 ]";
	
	//START SCRIPT FOR REGISTRATION ######################
	if(#CREDIT_QUEST != 1){
			mes @header$;
			mes "Welcome to Bank of Ragnarok.,";
			mes "Do you want to Invest you'r Zeny?"; 
			mes "In Exchange I will Make your zeny to Credit Card.";
		next;
		
		switch(select("Yes! Sign-Up Me.:What do I need to prepare?:I want to change Credit to Zeny.:Not yet.")){
		case 1:
			if((countitem(969) < 1) || (countitem(969) < 1) || (Zeny < 1)){
				mes @header$;
				mes "I think you are missing something this is the list that i needed:";
				mes "- 1x ^FF0000Gold^000000 [from Gold Room]";
				mes "- 1x ^FF0000Gold^000000 [from Gold Room]";
				mes "and also ^FF00001 Zeny^000000.";
				close;
			}
			next;
			mes @header$;
			mes "Congratulations, Enjoy your Back Account.";
			mes " ";
			mes "You may now use Zeny to ^FF0000Credit^000000 services in a matter of time.";
			delitem 969,1;
			delitem 969,1;
			Zeny -= 1; 
			#CREDIT_QUEST = 1;
			close;
		case 2: 
			mes @header$;
			mes "You will have to bring me the following:";
			mes "- 1x ^FF0000Gold^000000 [from Gold Room]";
			mes "- 1x ^FF0000Credit^000000 [Gold Room]";
			mes "and also ^FF00001 Zeny^000000.";
			next;
			mes @header$;
			mes "I suggest you look for Vote Shop in Main Town. Make a Vote in Website to get Vote Points.";
			mes " ";
			mes "I'll be waiting for you!";
			close;
		case 3: 
			goto CREDITTOZENY;
		case 4: 
			mes @header$;
			mes "Okay, Hurry up!";
			close;
		}
	}else{
		set [email protected], #EXCHANGETIME, gettimetick(2) + 1;
		mes @header$;
		mes "Welcome Back to Bank of Ragnarok.,";
		mes " ";
		mes "What can I do for you?";
		next; 
		
		menu "Zeny to Credit",ZenyCredit,
		     "Instant Exchange",InstantExchange,
			 "Credit to Zeny",CreditZeny,
			 "Exit",BRB;
		
		ZenyCredit:
			mes @header$;			
			if(#EXCHANGETIME > gettimetick(2)) {
				mes "^FF3333You Can use Zeny to Credit After: " + callfunc("Time2Str",[email protected]);
				close;
			}
			mes "The exchange rate is fixed and its ^00008810,000,000^000000 Zeny = 1 ^FF0000Credit^000000.";
			mes " ";
			mes "You can only exchange a maximum of ^0000881,000,000,000^000000 Zeny at a time.";
			next;
			mes @header$;
			mes "So how much ^FF0000Credit^000000 do you want to exchange?";
			mes " ";
			mes "(Insert 0, if you want to cancel).";
			input @PLAYER_ZENY;
			next;
			if (@PLAYER_ZENY == 0) {
				mes @header$;
				mes "Please do come back, Have a nice day!.";
				close;
			}
			else if (@PLAYER_ZENY > 200) {
				mes @header$;
				mes "You cannot buy more than 201 ^FF0000Credit^000000 at a time.";
				close;
			}
			else if (@PLAYER_ZENY*10000000 > Zeny) {
				mes @header$;
				mes "You do not have enought zeny in your pocket.";
				close;
			} else {
				mes @header$;
				mes "Do you want to exchange your ^000088"[email protected]_ZENY+"0,000,000^000000 Zeny to ^FF0000"[email protected]_ZENY+" Credit^000000?";
				if(select("Cancel:Yes, Change it!")==1) close;
				next;
				mes @header$;
				mes "Okay, Here you go!, Thank you for using my services.";
				mes "Come back again after 1 Fuck u.";
				getitem 3100,@PLAYER_ZENY;
				set Zeny,Zeny - @PLAYER_ZENY*10000000;
				#EXCHANGETIME = 1+ gettimetick(2);
				close;
			}
		end;
		
		InstantExchange:
			mes @header$;
			if(#EXCHANGETIME > gettimetick(2)){
				mes "^FF3333You Can use Zeny to Credit After: " + callfunc("Time2Str",[email protected]);
				close;
			}
			mes "The exchange rate is fixed and its ^00008810,000,000^000000 Zeny = 1 ^FF0000Credit^000000.";
			mes " ";
			mes "You can only exchange a maximum of ^0000882,000,000,000^000000 Zeny at a time.";
			
			@GET_MY_ZENY = Zeny;	   //	
			@ZENY_EXCHANGE = 10000000; //Credit Exchange Rate
			
			next;
			if (Zeny < 10000000){
				mes @header$;
				mes "^FF0000You do not have enought zeny in your pocket.";
				close;
			}else{
				@GET_CREDIT_QTY = Zeny / @ZENY_EXCHANGE;
				@DEL_ZENY = @GET_CREDIT_QTY * @ZENY_EXCHANGE;
				mes @header$;
				mes "Do you want to exchange your " + @DEL_ZENY + " Zeny to ^FF0000"+ @GET_CREDIT_QTY +" Credit.^000000?";
				if(select("Cancel:Yes, Change it!")==1) close;
				next;
				mes @header$;
				getitem 3100, @GET_CREDIT_QTY;
				set Zeny,Zeny - @DEL_ZENY;
				#EXCHANGETIME = 1+ gettimetick(2);
			}
			
		end;
			
		CreditZeny: 
			goto CREDITTOZENY;
		end;
		
		BRB:
			mes @header$;
			mes "Please do come back, Have a nice day!.";
			close;
		end;
	}
	
	CREDITTOZENY:
		mes @header$;
		mes "The exchange rate is fixed and its 1 ^FF0000Credit^000000 = ^00008810,000,000^000000 Zeny.";
		mes " ";
		mes "You can only exchange a maximum of 200 ^FF0000Credit^000000 at a time.";
		next;
		mes @header$;
		mes "So how many ^FF0000Credit^000000 do you want to exchange?";
		mes " ";
		mes "(Insert 0, if you want to cancel).";
		input @PLAYER_CREDIT;
		next;
		if (@PLAYER_CREDIT == 0) {
			mes @header$;
			mes "Please do come back, Have a nice day!.";
			close;
		}
		else if (@PLAYER_CREDIT > 200) {
			mes @header$;
			mes "You cannot exchange more than 200 ^FF0000Credit^000000 at a time.";
			close;
		}
		else if (@PLAYER_CREDIT > countitem(3100)) {
			mes @header$;
			mes "You do not have enought ^FF0000Credit^000000 in your pocket.";
			close;
		} else {
			@GET_OLD_ZENY = Zeny;
			@GET_NEW_ZENY = @GET_OLD_ZENY + @PLAYER_CREDIT*10000000;
		    if(@GET_NEW_ZENY >= 2000000010) goto L_FullZeny; //Checks to see if the player has more than 1b
			mes @header$;
			mes "Do you want to exchange your ^FF0000"[email protected]_CREDIT+" Credit^000000 to ^000088"[email protected]_CREDIT+"0,000,000^000000 Zeny?";
			mes " ";
			mes "^FF0000NOTE^000000: That you cannot hold morethan ^0000881,000,000,000^000000 Zeny.";
			if(select("Cancel:Yes, Exchange it!")==1) close;
			next;
			mes @header$;
			mes "Okay, Here you go!, Thank you for using my services.";
			delitem 3100,@PLAYER_CREDIT;
			set Zeny,Zeny + @PLAYER_CREDIT*10000000;
			close; 
		}
	end;
		
	L_FullZeny: 
		mes @header$;
		mes "I'm sorry, but I can't allow you to exchange Credit into Zeny when you have over 1b zeny.";
	end;
	
	
}

// Duplicates 
prontera,164,175,4	duplicate(Credit Agent)	Philip [Credit Agent]#1	900

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

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