Jump to content
  • 0

Request > Ore exchanger NPC scripts


coconutswt

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   0
  • Joined:  01/13/14
  • Last Seen:  

I want to make NPC that exchange : 10 mithril = 1 bronze coin

                                                         20 mithril = 1 silver coin

                                                         30 mithril = 1 gold coin

                                                         50 mithril = 1 mithril coin

 

 

                                                         20 mithril ore = 1 bronze coin

                                                         30 mithril ore = 1 silver coin

                                                         40 mithril ore = 1 gold coin

                                                         60 mithril ore = 1 mithril coin

 

 

 

Please help me !!

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

Hm... How does this script must look like? Any suggestions or anything else? And 50 mithril = 1 mithril coin?? What the crap? :)

 

so, simple exchanger:

//    Simple Ore Excange to coconutswt, user of rAthena community
//    ============================================================
prontera,155,170,4    script    Ore Exchanger    100,{

    mes "^3363A6[ Ore Exchanger ]^000000";
    mes "Hello, dear Adventure! How can i help you?";
    next;
    menu    "Exchange Bronze Coins 2 Silver Coins",    BrC2SiC,
            "Exchange Silver Coins 2 Gold Coins",    SiC2GoC,
            "Exchange Gold Coins 2 Platinum Coins",    GoC2PlC;
            
        BrC2SiC:
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "I want to note, that 1 Silver Coin cost 10 Brozne Coins, so do you want to continue?";
            next;
            if( select( "No, i want to leave", "Yes, exchange please" ) == 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "So, see you next time, and good luck!";
                close;
            }
            if( countitem(673) < 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you have no even 1 Bronze Coin... Come back later.";
                emotion e_sry;
                close;
            }
            if( countitem(673) < 10 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you dont have enought Bronze Coins to exchange for our today course. You must have at least 10 Bronze Coins.";
                close;
            }
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "Do you want to exchange all your Bronze Coins or just step by step 10 to 1?";
            next;
            switch( select( "Exchange all my Bronze Coins", "Exchange 10 to 1" ) ) {
                case 1:
                //set .@curr_bc_count, countitem(673);
                set .@exchanged_coins, ( countitem(673) / 10 );
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 673, .@exchanged_coins * 10;
                getitem 675, .@exchanged_coins;
                close;
                
                case 2:
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 673, 10;
                getitem 675, 1;
                close;
            }
            
        SiC2GoC:
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "I want to note, that 1 Gold Coin cost 10 Silver Coins, so do you want to continue?";
            next;
            if( select( "No, i want to leave", "Yes, exchange please" ) == 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "So, see you next time, and good luck!";
                close;
            }
            if( countitem(675) < 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you have no even 1 Bronze Coin... Come back later.";
                emotion e_sry;
                close;
            }
            if( countitem(675) < 10 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you dont have enought Silver Coins to exchange for our today course. You must have at least 10 Silver Coins.";
                close;
            }
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "Do you want to exchange all your Bronze Coins or just step by step 10 to 1?";
            next;
            switch( select( "Exchange all my Silver Coins", "Exchange 10 to 1" ) ) {
                case 1:
                //set .@curr_gc_count, countitem(675);
                set .@exchanged_coins, ( countitem(675) / 10 );
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 675, .@exchanged_coins * 10;
                getitem 671, .@exchanged_coins;
                close;
                
                case 2:
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 675, 10;
                getitem 671, 1;
                close;
            }
            
        GoC2PlC:
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "I want to note, that 1 Platinum Coin cost 10 Gold Coins, so do you want to continue?";
            next;
            if( select( "No, i want to leave", "Yes, exchange please" ) == 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "So, see you next time, and good luck!";
                close;
            }
            if( countitem(671) < 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you have no even 1 Bronze Coin... Come back later.";
                emotion e_sry;
                close;
            }
            if( countitem(671) < 10 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you dont have enought Silver Coins to exchange for our today course. You must have at least 10 Silver Coins.";
                close;
            }
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "Do you want to exchange all your Gold Coins or just step by step 10 to 1?";
            next;
            switch( select( "Exchange all my Gold Coins", "Exchange 10 to 1" ) ) {
                case 1:
                //set .@curr_pc_count, countitem(671);
                set .@exchanged_coins, ( countitem(671) / 10 );
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 671, .@exchanged_coins * 10;
                getitem 677, .@exchanged_coins;
                close;
                
                case 2:
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 671, 10;
                getitem 677, 1;
                close;
            }
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   0
  • Joined:  01/13/14
  • Last Seen:  

 

Hm... How does this script must look like? Any suggestions or anything else? And 50 mithril = 1 mithril coin?? What the crap? :)

 

so, simple exchanger:

//    Simple Ore Excange to coconutswt, user of rAthena community
//    ============================================================
prontera,155,170,4    script    Ore Exchanger    100,{

    mes "^3363A6[ Ore Exchanger ]^000000";
    mes "Hello, dear Adventure! How can i help you?";
    next;
    menu    "Exchange Bronze Coins 2 Silver Coins",    BrC2SiC,
            "Exchange Silver Coins 2 Gold Coins",    SiC2GoC,
            "Exchange Gold Coins 2 Platinum Coins",    GoC2PlC;
            
        BrC2SiC:
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "I want to note, that 1 Silver Coin cost 10 Brozne Coins, so do you want to continue?";
            next;
            if( select( "No, i want to leave", "Yes, exchange please" ) == 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "So, see you next time, and good luck!";
                close;
            }
            if( countitem(673) < 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you have no even 1 Bronze Coin... Come back later.";
                emotion e_sry;
                close;
            }
            if( countitem(673) < 10 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you dont have enought Bronze Coins to exchange for our today course. You must have at least 10 Bronze Coins.";
                close;
            }
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "Do you want to exchange all your Bronze Coins or just step by step 10 to 1?";
            next;
            switch( select( "Exchange all my Bronze Coins", "Exchange 10 to 1" ) ) {
                case 1:
                //set .@curr_bc_count, countitem(673);
                set .@exchanged_coins, ( countitem(673) / 10 );
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 673, .@exchanged_coins * 10;
                getitem 675, .@exchanged_coins;
                close;
                
                case 2:
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 673, 10;
                getitem 675, 1;
                close;
            }
            
        SiC2GoC:
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "I want to note, that 1 Gold Coin cost 10 Silver Coins, so do you want to continue?";
            next;
            if( select( "No, i want to leave", "Yes, exchange please" ) == 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "So, see you next time, and good luck!";
                close;
            }
            if( countitem(675) < 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you have no even 1 Bronze Coin... Come back later.";
                emotion e_sry;
                close;
            }
            if( countitem(675) < 10 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you dont have enought Silver Coins to exchange for our today course. You must have at least 10 Silver Coins.";
                close;
            }
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "Do you want to exchange all your Bronze Coins or just step by step 10 to 1?";
            next;
            switch( select( "Exchange all my Silver Coins", "Exchange 10 to 1" ) ) {
                case 1:
                //set .@curr_gc_count, countitem(675);
                set .@exchanged_coins, ( countitem(675) / 10 );
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 675, .@exchanged_coins * 10;
                getitem 671, .@exchanged_coins;
                close;
                
                case 2:
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 675, 10;
                getitem 671, 1;
                close;
            }
            
        GoC2PlC:
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "I want to note, that 1 Platinum Coin cost 10 Gold Coins, so do you want to continue?";
            next;
            if( select( "No, i want to leave", "Yes, exchange please" ) == 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "So, see you next time, and good luck!";
                close;
            }
            if( countitem(671) < 1 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you have no even 1 Bronze Coin... Come back later.";
                emotion e_sry;
                close;
            }
            if( countitem(671) < 10 ) {
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Excuse me, but you dont have enought Silver Coins to exchange for our today course. You must have at least 10 Silver Coins.";
                close;
            }
            mes "^3363A6[ Ore Exchanger ]^000000";
            mes "Do you want to exchange all your Gold Coins or just step by step 10 to 1?";
            next;
            switch( select( "Exchange all my Gold Coins", "Exchange 10 to 1" ) ) {
                case 1:
                //set .@curr_pc_count, countitem(671);
                set .@exchanged_coins, ( countitem(671) / 10 );
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 671, .@exchanged_coins * 10;
                getitem 677, .@exchanged_coins;
                close;
                
                case 2:
                mes "^3363A6[ Ore Exchanger ]^000000";
                mes "Here you are!";
                delitem 671, 10;
                getitem 677, 1;
                close;
            }
}

I can't load this script , anything else you could do to help me ?

I want to make ore exchanger for my minning NPC , so the ore from minning can be exchange with bronze , silver , gold ,and  mithril coin

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

Omg, did you see errors? And i 100% sure, that this %TAB%s

Use next syntax:

 

prontera,155,170,4%TAB%script%TAB%Ore Exchanger%TAB%100,{

 

and all work...

and one more thing: please, dont write posts with sence as anyone here owe you anything, no help for lazy people or without correct information

 

if this freeware community - please respect others work

Edited by Phenomena
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   0
  • Joined:  01/13/14
  • Last Seen:  

Omg, did you see errors? And i 100% sure, that this %TAB%s

Use next syntax:

 

prontera,155,170,4%TAB%script%TAB%Ore Exchanger%TAB%100,{

 

and all work...

and one more thing: please, dont write posts with sence as anyone here owe you anything, no help for lazy people or without correct information

 

if this freeware community - please respect others work

oke thanks about that , but this script not what i'm looking for

why 10 bronze = 1 silver coins ? that not what i want to . I have coin exchanger to in my server

sorry because my english was bad

Edited by coconutswt
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

Please, read your FIRST post:

 

 

I want to make NPC that exchange : 10 mithril = 1 bronze coin

                                                         20 mithril = 1 silver coin

                                                         30 mithril = 1 gold coin

                                                         50 mithril = 1 mithril coin

 

 

                                                         20 mithril ore = 1 bronze coin

                                                         30 mithril ore = 1 silver coin

                                                         40 mithril ore = 1 gold coin

                                                         60 mithril ore = 1 mithril coin

 

 

 

Please help me !!

 

10 mithril = 1 bronze coin /  20 mithril ore = 1 bronze coin / 50 mithril = 1 mithril coin / 60 mithril ore = 1 mithril coin ? Where is logic???

If you want something, as i understand, you must make any TODO List like:

1. Event / Other / Etc.
2. Name of script
3. Main function
4. Suggestion
5. Requared itemd (ID's)

Yes, its not nenecessarily, buy as for me, it will be much better and more understandable and not requared +100500 posts and asks...

 

Just imagine, that a man come to my work and ask me to sell them part to auto.... without telling what auto, what year, what engine, what part and etc. maybe he want a bulb for 0,99% or Bearing Hub at cadillac DTS Limousine at ~1300$....

Edited by Phenomena
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   0
  • Joined:  01/13/14
  • Last Seen:  

I want to create a script for converting ore into (bronze, silver, gold, mithril) coins, like this:
10 Mithril = 1 bronze coin

20 Mithril = 1 silver coin

30 Mithril = 1 gold coin

50 = 1 Mithril Mithril coin


20 Mithril ore = 1 bronze coin

30 Mithril ore = 1 silver coin

40 Mithril ore = 1 gold coin

  60 Mithril ore = 1 Mithril coin


explanation:
  Mithril I mean the 7757 (Mithril) & 7233 (Mithril ore)

is this enough?

 

sorry my english is very bad

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

//	Simple Ore Excange to coconutswt, user of rAthena community
//	============================================================
prontera,155,170,4	script	Ore Exchanger	100,{

	mes "^3363A6[ Ore Exchanger ]^000000";
	mes "Hello, dear Adventure! How can i help you?";
	next;
	menu	"Exchange " + getitemname(7757) + " to Coins",	ExMithril2Coins,
			"Exchange " + getitemname(7233) + " to Coins",	ExMithrilOre2Coins;
			
		ExMithril2Coins:
			if( countitem(7757) < 1 ) {
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "You dont have event 1 " + getitemname(7757) + "...";
				emotion e_heh;
				close;
			}
			if( countitem(7757) < 10 ) {
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Minimum exchange rate is: " + getitemname(7757) + " x 10 to " + getitemname(673) + " x 1 ";
				close;
			}
			switch( select( "Exchange to Bronze Coin", "Exchange to Silver Coin", "Exchange to Gold Coin", "Exchange to Mithril Coin" ) ) {
				case 1:
				if( countitem(7757) < 10 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 10 " + getitemname(7757) + " at least...";
					close;
				}
				delitem 7757, 10;
				getitem 673, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 2:
				if( countitem(7757) < 20 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 20 " + getitemname(7757) + " at least...";
					close;
				}
				delitem 7757, 20;
				getitem 675, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 3:
				if( countitem(7757) < 30 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 30 " + getitemname(7757) + " at least...";
					close;
				}
				delitem 7757, 30;
				getitem 671, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 4:
				if( countitem(7757) < 50 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 50 " + getitemname(7757) + " at least...";
					close;
				}
				delitem 7757, 50;
				getitem 674, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
			}
			
		ExMithrilOre2Coins:
			if( countitem(7233) < 1 ) {
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "You dont have event 1 " + getitemname(7233) + "...";
				emotion e_heh;
				close;
			}
			if( countitem(7233) < 20 ) {
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Minimum exchange rate is: " + getitemname(7233) + " x 10 to " + getitemname(673) + " x 1 ";
				close;
			}
			switch( select( "Exchange to Bronze Coin", "Exchange to Silver Coin", "Exchange to Gold Coin", "Exchange to Mithril Coin" ) ) {
				case 1:
				if( countitem(7233) < 20 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 20 " + getitemname(7233) + " at least...";
					close;
				}
				delitem 7233, 20;
				getitem 673, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 2:
				if( countitem(7233) < 30 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 30 " + getitemname(7233) + " at least...";
					close;
				}
				delitem 7233, 30;
				getitem 675, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 3:
				if( countitem(7233) < 50 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 50 " + getitemname(7233) + " at least...";
					close;
				}
				delitem 7233, 50;
				getitem 671, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 4:
				if( countitem(7233) < 60 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 60 " + getitemname(7233) + " at least...";
					close;
				}
				delitem 7233, 60;
				getitem 674, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
			}
			
}

And dont forget about this: prontera,155,170,4%TAB%script%TAB%Ore Exchanger%TAB%100,{

Edited by Phenomena
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   0
  • Joined:  01/13/14
  • Last Seen:  

//	Simple Ore Excange to coconutswt, user of rAthena community
//	============================================================
prontera,155,170,4	script	Ore Exchanger	100,{

	mes "^3363A6[ Ore Exchanger ]^000000";
	mes "Hello, dear Adventure! How can i help you?";
	next;
	menu	"Exchange " + getitemname(7757) + " to Coins",	ExMithril2Coins,
			"Exchange " + getitemname(7233) + " to Coins",	ExMithrilOre2Coins;
			
		ExMithril2Coins:
			if( countitem(7757) < 1 ) {
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "You dont have event 1 " + getitemname(7757) + "...";
				emotion e_heh;
				close;
			}
			if( countitem(7757) < 10 ) {
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Minimum exchange rate is: " + getitemname(7757) + " x 10 to " + getitemname(673) + " x 1 ";
				close;
			}
			switch( select( "Exchange to Bronze Coin", "Exchange to Silver Coin", "Exchange to Gold Coin", "Exchange to Mithril Coin" ) ) {
				case 1:
				if( countitem(7757) < 10 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 10 " + getitemname(7757) + " at least...";
					close;
				}
				delitem 7757, 10;
				getitem 673, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 2:
				if( countitem(7757) < 20 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 20 " + getitemname(7757) + " at least...";
					close;
				}
				delitem 7757, 20;
				getitem 675, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 3:
				if( countitem(7757) < 30 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 30 " + getitemname(7757) + " at least...";
					close;
				}
				delitem 7757, 30;
				getitem 671, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 4:
				if( countitem(7757) < 50 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 50 " + getitemname(7757) + " at least...";
					close;
				}
				delitem 7757, 50;
				getitem 674, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
			}
			
		ExMithrilOre2Coins:
			if( countitem(7233) < 1 ) {
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "You dont have event 1 " + getitemname(7233) + "...";
				emotion e_heh;
				close;
			}
			if( countitem(7233) < 20 ) {
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Minimum exchange rate is: " + getitemname(7233) + " x 10 to " + getitemname(673) + " x 1 ";
				close;
			}
			switch( select( "Exchange to Bronze Coin", "Exchange to Silver Coin", "Exchange to Gold Coin", "Exchange to Mithril Coin" ) ) {
				case 1:
				if( countitem(7233) < 20 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 20 " + getitemname(7233) + " at least...";
					close;
				}
				delitem 7233, 20;
				getitem 673, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 2:
				if( countitem(7233) < 30 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 30 " + getitemname(7233) + " at least...";
					close;
				}
				delitem 7233, 30;
				getitem 675, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 3:
				if( countitem(7233) < 50 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 50 " + getitemname(7233) + " at least...";
					close;
				}
				delitem 7233, 50;
				getitem 671, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
				
				case 4:
				if( countitem(7233) < 60 ) {
					mes "^3363A6[ Ore Exchanger ]^000000";
					mes "Oops, where is your items? You need 60 " + getitemname(7233) + " at least...";
					close;
				}
				delitem 7233, 60;
				getitem 674, 1;
				mes "^3363A6[ Ore Exchanger ]^000000";
				mes "Here you are!";
				close;
			}
			
}

And dont forget about this: prontera,155,170,4%TAB%script%TAB%Ore Exchanger%TAB%100,{

 

when i click exchange mithril ore to coins , it appear : minimum exchange rate is : mithril ore x 10 bronze coin x 1 , why ? I have 10 mithril coin in my inventory

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

when i click exchange mithril ore to coins , it appear : minimum exchange rate is : mithril ore x 10 bronze coin x 1 , why ? I have 10 mithril coin in my inventory

 

Mithril Ore (7233) IS NOT Mithril (7757) AND NOT Mithril Coin (674)!

 

Omg.... Okey.... Lets do another way:

 

1. YOU CAN EXCHANGE ONLY ITEM WITH ID 7757 TO :

Bronze Coin (need 10 items with ID 7757)

Silver Coin (need 20 items with ID 7757)

Gold Coin (need 30 items with ID 7757)

Mithril Coin (need 60 items with ID 7757)

 

2. YOU CAN EXCHANGE ONLY ITEM WITH ID 7233 TO :

Bronze Coin (need 20 items with ID 7233)

Silver Coin (need 30 items with ID 7233)

Gold Coin (need 40 items with ID 7233)

Mithril Coin (need 50 items with ID 7233)

 

3. ITEM WITH ID 7757 - Mithril

4. ITEM WITH ID 7233 - Mithril Ore

Edited by Phenomena
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

prontera,100,200,3	script	Coin Trader	90,{

mes .Npc_Name$;
mes "What do you want to do today "+strcharinfo(0)+"?";
menu "Exchange Zeny to "+getitemname(.Coin_Cfg[0]),L_zc,"Exchange "+getitemname(.Coin_Cfg[0])+" to Zeny",L_cz;
L_zc:
	next;
	mes .Npc_Name$;
	if(.CDelay && CDelay < gettimetick(2)) {
		mes "You can only exchange coins every 1 hr!";
		close;				
		}
	mes "How much "+getitemname(.Coin_Cfg[0])+" do you need?";
	mes getitemname(.Coin_Cfg[0])+" costs "+.Coin_Cfg[2]+"z";
	input .@coin;
	if(Zeny/.Coin_Cfg[2] < .@coin || !.@coin) goto L_NotEnough;
	next;
	mes .Npc_Name$;
	mes "Here you go!";
	set Zeny,Zeny-(.@coin*.@Coin_Cfg[2]);
	getitem .Coin_Cfg[0],.@coin;
	CDelay = gettimetick(2)+.Coin_Cfg[3];
	close;

L_cz:
	next;
	mes .Npc_Name$;
	mes "I can buy your "+getitemname(.Coin_Cfg[0])+" for "+.Coin_Cfg[1]+"z a piece, how much would you want to sell?";
	input .@coin;
	if(countitem(.Coin_Cfg[0]) < .@coin || !.@coin) goto L_NotEnough;
	next;
	mes .Npc_Name$;
	mes "Here you go!";
	delitem .Coin_Cfg[0],.@coin;
	set Zeny,Zeny+(.@coin*.@Coin_Cfg[1]);
	close;
	
L_NotEnough:
mes .Npc_Name$;
mes "Are you trying to fool me?";
close;


OnInit:
	set .Npc_Name$,"[^0000FF "+strnpcinfo(1)+" ^000000]";
	
	setarray .Coin_Cfg[0],674,1000000,1050000,3600;
	/* Configure the coin id, conversion rate, and delay using the array above
	Defaults:
		.Coin_Cfg[0] = Item ID of Coin (Mithril Coin)
		.Coin_Cfg[1] = Coin to Zeny Rate (1m)
		.Coin_Cfg[2] = Zeny to Coin Rate (1.05m)
		.Coin_Cfg[3] = Delay when exchanging Zeny to Coins*/
	
	//Enable Delay? Default: 1hr.
	.CDelay = 1;
end;
}

Edit to your liking

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   0
  • Joined:  01/13/14
  • Last Seen:  

prontera,100,200,3	script	Coin Trader	90,{

mes .Npc_Name$;
mes "What do you want to do today "+strcharinfo(0)+"?";
menu "Exchange Zeny to "+getitemname(.Coin_Cfg[0]),L_zc,"Exchange "+getitemname(.Coin_Cfg[0])+" to Zeny",L_cz;
L_zc:
	next;
	mes .Npc_Name$;
	if(.CDelay && CDelay < gettimetick(2)) {
		mes "You can only exchange coins every 1 hr!";
		close;				
		}
	mes "How much "+getitemname(.Coin_Cfg[0])+" do you need?";
	mes getitemname(.Coin_Cfg[0])+" costs "+.Coin_Cfg[2]+"z";
	input .@coin;
	if(Zeny/.Coin_Cfg[2] < .@coin || !.@coin) goto L_NotEnough;
	next;
	mes .Npc_Name$;
	mes "Here you go!";
	set Zeny,Zeny-(.@coin*.@Coin_Cfg[2]);
	getitem .Coin_Cfg[0],.@coin;
	CDelay = gettimetick(2)+.Coin_Cfg[3];
	close;

L_cz:
	next;
	mes .Npc_Name$;
	mes "I can buy your "+getitemname(.Coin_Cfg[0])+" for "+.Coin_Cfg[1]+"z a piece, how much would you want to sell?";
	input .@coin;
	if(countitem(.Coin_Cfg[0]) < .@coin || !.@coin) goto L_NotEnough;
	next;
	mes .Npc_Name$;
	mes "Here you go!";
	delitem .Coin_Cfg[0],.@coin;
	set Zeny,Zeny+(.@coin*.@Coin_Cfg[1]);
	close;
	
L_NotEnough:
mes .Npc_Name$;
mes "Are you trying to fool me?";
close;


OnInit:
	set .Npc_Name$,"[^0000FF "+strnpcinfo(1)+" ^000000]";
	
	setarray .Coin_Cfg[0],674,1000000,1050000,3600;
	/* Configure the coin id, conversion rate, and delay using the array above
	Defaults:
		.Coin_Cfg[0] = Item ID of Coin (Mithril Coin)
		.Coin_Cfg[1] = Coin to Zeny Rate (1m)
		.Coin_Cfg[2] = Zeny to Coin Rate (1.05m)
		.Coin_Cfg[3] = Delay when exchanging Zeny to Coins*/
	
	//Enable Delay? Default: 1hr.
	.CDelay = 1;
end;
}

Edit to your liking

 

no , this is not the script i looking for , but i'm looking for script ore exchanger that can exchange ore from sanbox mining NPC

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