manabeast Posted December 4, 2011 Posted December 4, 2011 (edited) Need a coin exchange coin npc. any script also can as long using coin exchange coin. i dun wan use the zeny for coin. can you give me a npc that exchange coin? 1xSilver Coin =Need 5 Bronze coin (to trade silver coin) 1xGold Coin =Need 4 Silver coin (to trade Gold coin) 1xPlatinum Coin =Need 3 Platinum coin (to trade Platinum coin) 1xMithril Coin = Need 2 Platinum coin (to trade Mithril coin) if can tq ^^ Edited May 25, 2012 by manabeast Quote
Z3R0 Posted December 5, 2011 Posted December 5, 2011 Untested (because I'm at work) prontera,158,173,4 script Coin Exchanger 88,{ mes .npc$; mes "What would you like to do?"; switch(select("Info:Trade for Coin")) { case 1: // Get Info next; mes .npc$; for (set .@a, 0; .@a < getarraysize(.coin_id); set .@a, .@a + 1) { mes "1 " + getitename(.coin_id[.@a]) + " = " + .coin_trade_amount[.@a] + " " + getitemname(.coin_trade_coin[.@a]) + "s"; } close; case 2: // Trade Coin next; mes "Please select which coin you would like..."; // Build Menu for (set .@a, 0; .@a < getarraysize(.coin_id); set .@a, .@a + 1) { set .@menu$, .@menu$ + (.@menu$ == "" ? "" : ":") + getitemname(.coin_id[.@a]); } set .@coin_choice, select(.@menu$) - 1; if (countitem(.coin_trade_coin[.@coin_choice]) < .coin_trade_amount[.@coin_choice]) { mes "You do not have enough items..."; close; } mes "Ok! Let me do a little magic..."; next; mes "and.... Here you go..."; delitem .coin_trade_coin[.@coin_choice], .coin_trade_amount[.@coin_choice]; getitem .coin_id[.@coin_choice], 1; mes "Enjoy!"; close; } OnInit: set .npc$, "[Coin Exchanger]"; setarray .coin_id[0],silver,gold,plat,mithril; setarray .coin_trade_amount[0],5,4,3,2; setarray .coin_trade_coin[0],bronze,silver,gold,plat; end; } 1 Quote
manabeast Posted December 5, 2011 Author Posted December 5, 2011 which one is the right syntax? platinum is first or third? Quote
Z3R0 Posted December 5, 2011 Posted December 5, 2011 Bronze, Silver, Gold, Plat, Mithril is the order JGuy Quote
manabeast Posted December 6, 2011 Author Posted December 6, 2011 (edited) oh. i see.. thank you very much. and ok. after test i let you know @@" , me now also working hehe~ ned wait tonight. Edited December 6, 2011 by manabeast Quote
manabeast Posted December 6, 2011 Author Posted December 6, 2011 (edited) prontera,158,173,4 script Coin Exchanger 88,{ mes .npc$; mes "What would you like to do?"; switch(select("Info:Trade for Coin")) { case 1: // Get Info next; mes .npc$; for (set .@a, 0; .@a < getarraysize(.coin_id); set .@a, .@a + 1) { mes "1 " + getitename(.coin_id[.@a]) + " = " + .coin_trade_amount[.@a] + " " + getitemname(.coin_trade_coin[.@a]) + "s"; } close; case 2: // Trade Coin next; mes "Please select which coin you would like..."; // Build Menu for (set .@a, 0; .@a < getarraysize(.coin_id); set .@a, .@a + 1) { set .@menu$, .@menu$ + (.@menu$ == "" ? "" : ":") + getitemname(.coin_id[.@a]); } set .@coin_choice, select(.@menu$) - 1; if (countitem(.coin_trade_coin[.@coin_choice]) < .coin_trade_amount[.@coin_choice]) { mes "You do not have enough items..."; close; } mes "Ok! Let me do a little magic..."; next; mes "and.... Here you go..."; delitem .coin_trade_coin[.@coin_choice], .coin_trade_amount[.@coin_choice]; getitem .coin_id[.@coin_choice], 1; mes "Enjoy!"; close; } OnInit: set .npc$, "[Coin Exchanger]"; setarray .coin_id[0],silver,gold,plat,mithril; setarray .coin_trade_amount[0],5,4,3,2; setarray .coin_trade_coin[0],bronze,silver,gold,plat; end; } npc no appear in game. i warp and mapmove there also no sew npc. ok thx, i try it tonight. Edited December 7, 2011 by manabeast Quote
Z3R0 Posted December 6, 2011 Posted December 6, 2011 You need to use TABS int eh header prontera,158,173,4<TAB BUTTON>script<TAB BUTTON>Coin Exchange<TAB BUTTON>88.{ Also be sure to modify setarray .coin_id[0],silver,gold,plat,mithril; setarray .coin_trade_amount[0],5,4,3,2; setarray .coin_trade_coin[0],bronze,silver,gold,plat; change the words to the item id's of the coins... 1 Quote
manabeast Posted December 11, 2011 Author Posted December 11, 2011 well, i already test and i try click the npc but nothing happen. like clicking him like clicking nothing ?? this is how many coin will change? if i wan change amount for first one is 10 second is 9 third is 8 four 7 so will be setarray .coin_trade_amount[0],5,4,3,2; setarray .coin_trade_amount[0],10,9,8,7; ? Quote
manabeast Posted December 13, 2011 Author Posted December 13, 2011 can you put in txt and attach send to me? if put here the tab will gone. waiting you fix. bump Quote
Arcenciel Posted December 13, 2011 Posted December 13, 2011 He already did the whole thing for you and you can't take the script yourself and add in a Tab? Come on now. It's not that hard. 2 Quote
manabeast Posted December 13, 2011 Author Posted December 13, 2011 not only tab. the script no working @.@" i cannot talk to the npc just can see him stand there .~,~" by the way. the tab only for the first line only? other no need tab? prontera,158,173,4<TAB BUTTON>script<TAB BUTTON>Coin Exchange<TAB BUTTON>88.{ Quote
Emistry Posted December 13, 2011 Posted December 13, 2011 not only tab. the script no working @.@" i cannot talk to the npc just can see him stand there .~,~" check for the Error =='' by the way. the tab only for the first line only? other no need tab?prontera,158,173,4<TAB BUTTON>script<TAB BUTTON>Coin Exchange<TAB BUTTON>88.{ yes...it only apply in Header ..unles in your script have other header type stuffs... like Function...... Quote
manabeast Posted December 13, 2011 Author Posted December 13, 2011 http://rathena.org/board/topic/54002-wing-evolution/page__gopid__60219#entry60219 the second one is for coin exchange npc problem. the first one i hv post in other place request other help. becos is evole wing problem. Quote
Emistry Posted December 13, 2011 Posted December 13, 2011 just like what they told you =='' the getitemname command wrong spelled =='' it should be getitemname NOT getitename for the above error...i guess there might be somekind of script has end while you have still added another "Unfinished" script into the text files... Quote
Z3R0 Posted December 13, 2011 Posted December 13, 2011 lol I always mispell that... MN are too close together 1 Quote
manabeast Posted December 14, 2011 Author Posted December 14, 2011 oh ... no wonder i cannot find the getitem in wing.evo. it's in coin x.x" thx i go my friend house try tonight. Quote
manabeast Posted December 15, 2011 Author Posted December 15, 2011 forgot leave msg . it's work !! thank you very much . thx thx Quote
Question
manabeast
Need a coin exchange coin npc. any script also can as long using coin exchange coin.
i dun wan use the zeny for coin. can you give me a npc that exchange coin?
1xSilver Coin =Need 5 Bronze coin (to trade silver coin)
1xGold Coin =Need 4 Silver coin (to trade Gold coin)
1xPlatinum Coin =Need 3 Platinum coin (to trade Platinum coin)
1xMithril Coin = Need 2 Platinum coin (to trade Mithril coin)
if can tq ^^
Edited by manabeast16 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.