WhatFT Posted April 2, 2012 Posted April 2, 2012 (edited) /*** ** Script Request (Cash Trader NPC) ** Link: http://rathena.org/board/topic/57101-request-cash-trader/ ** By Slim ***/ belagio,155,124,5 script Points Trader 107,{ //,677 set .@coinid,677; mes "[^0000FFCash Trader^000000]"; mes "Hi ^ff8800"+strcharinfo(0)+"^000000,"; mes "~ Exchange Avenger Coins into Avenger Points"; mes "~ Exchange Avenger Points into Avenger Coins"; mes "Your Avenger Points: [^ff0000"+#CASHPOINTS+"^000000]"; switch(select("^ff0000>^000000 Cancel:^0000ff>^000000 Exchange to Avenger Points:^0000ff>^000000 Exchange to Avenger Coins")) { case 1: break; case 2: next; mes "[^0000FFCash Trader^000000]"; mes "Please input the amount of coins that you want to exchange."; mes "Note: Put ^0000ff0^000000 to exit."; L_inpcoin: input @hcoins; set @hhcoins,@hcoins; if(@hhcoins == 0) { break; } if(countitem(.@coinid) < @hhcoins) { mes "* ^ff0000Please input a valid amount^000000"; mes "(Put ^0000ff0^000000 to exit)."; goto L_inpcoin; } next; delitem .@coinid,@hhcoins; set #CASHPOINTS,#CASHPOINTS+@hhcoins; mes "[^0000FFCash Trader^000000]"; mes "You've exchanged (^ff0000"+@hhcoins+"^000000) "+getitemname(.@coinid)+"(s). Total Avenger Points: [^0000ff"+#CASHPOINTS+"^000000]"; dispbottom "[Cash Trader] You've exchanged ("+@hhcoins+") "+getitemname(.@coinid)+"(s). Total Avenger Points: ["+#CASHPOINTS+"]"; break; case 3: next; mes "[^0000FFCash Trader^000000]"; mes "Please input the amount of cash that you want to exchange."; mes "Note: Put ^0000ff0^000000 to exit."; L_inpcash: input @hcash; set @hhcash,@hcash; if(@hhcash == 0) { break; } if(#CASHPOINTS < @hhcash) { mes "* ^ff0000Please input a valid amount^000000"; mes "(Put ^0000ff0^000000 to exit)."; goto L_inpcash; } //I know they weight 0 but just in case you change its weight if (!checkweight(.@coinid,@hhcash)) { mes "* ^ff0000You're overweight please store some items.^000000"; dispbottom "[Cash Trader] You're overweight please store some items."; break; } next; set #CASHPOINTS,#CASHPOINTS - @hhcash; getitem .@coinid,@hhcash; mes "[^0000FFCash Trader^000000]"; mes "You've exchanged (^ff0000"+@hhcash+"^000000) AvengerPoints to "+getitemname(.@coinid)+"(s). Total Avenger Points: [^0000ff"+#CASHPOINTS+"^000000]"; dispbottom "[Cash Trader] You've exchanged ("+@hhcash+") AvengerPoints to "+getitemname(.@coinid)+"(s). Total Avenger Points: ["+#CASHPOINTS+"]"; break; } close; } You can change this belagio,155,124,5 to anything you wanted map name,<x>,<y>,<direction> change this item id set .@coinid,677; to your ID desired, this is Proof of Donation set .@coinid,7179; You can change the Avenger words in anything you wanted. Because I've been using this script in my server Edited April 2, 2012 by Paulinds Quote
sneakz Posted April 2, 2012 Author Posted April 2, 2012 Thanks a lot man. Really appreciate this script. Quote
Yudax Posted December 21, 2012 Posted December 21, 2012 how to change the amount of coins to points? Quote
Question
sneakz
Does anyone has this kind of converter?
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.