Aya Posted October 19, 2012 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 125 Reputation: 2 Joined: 08/27/12 Last Seen: June 7, 2023 Share Posted October 19, 2012 can someone make me an npc where in valor badges (or any other BG Badges) will be exchange to cash points? Thank you! Quote Link to comment Share on other sites More sharing options...
Euphy Posted October 19, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted October 19, 2012 prontera,155,177,6 script Badge Exchange 725,{ mes "[badge Exchange]"; mes "I can exchange your badges for Cash Points."; mes "Which would you like to exchange?"; next; set .@i, select(.Menu$)-1; mes "[badge Exchange]"; setarray .@j, .Items[.@i*2], .Items[.@i*2+1], countitem(.Items[.@i*2]); if (.@j[2]) { mes "You have "+.@j[2]+"x "+getitemname(.@j[0])+"."; mes "They are worth "+.@j[1]+" Cash Points each."; mes "How many would you like to exchange?"; next; input .@k,0,.@j[2]; mes "[badge Exchange]"; if (.@k) { delitem .@j[0],.@k; set #CASHPOINTS, #CASHPOINTS+(.@k*.@j[1]); mes "Traded "+.@k+"x "+getitemname(.@j[0])+"."; dispbottom "Total Cash Points: "+#CASHPOINTS; } else mes "Okay, come back later."; close; } mes "You don't have any "+getitemname(.@j[0])+"."; close; OnInit: // Format: ItemID,Points,ItemID2,Points2,... setarray .Items[0],7829,1,7828,1; set .Menu$,""; for(set .@i,0; .@i<getarraysize(.Items); set .@i,.@i+2) set .Menu$, .Menu$+getitemname(.Items[.@i])+":"; end; } uPaste: http://upaste.me/raw/c91613307a10fb12 Quote Link to comment Share on other sites More sharing options...
Aya Posted October 20, 2012 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 125 Reputation: 2 Joined: 08/27/12 Last Seen: June 7, 2023 Author Share Posted October 20, 2012 Thanks Euphy! =) I'll try it ;D Sir Euphy it works perfectly but this is not what I want. Im sorry I didn't specify. Cash Point in my server is an item. My players can use this to obtain items. =) It's like I made an NPC where people can exchange Cash Points. Sorry .. can you make me a script like this? Thank you! =) btw the ID of Cashpoint is 30000 =) Quote Link to comment Share on other sites More sharing options...
Emistry Posted October 20, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted October 20, 2012 change set #CASHPOINTS, #CASHPOINTS+(.@k*.@j[1]); to getitem 30000,(.@k*.@j[1]); Quote Link to comment Share on other sites More sharing options...
Aya Posted October 20, 2012 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 125 Reputation: 2 Joined: 08/27/12 Last Seen: June 7, 2023 Author Share Posted October 20, 2012 Worked perfectly, thanks Emistry and Euphy =) Quote Link to comment Share on other sites More sharing options...
Question
Aya
can someone make me an npc where in valor badges (or any other BG Badges) will be exchange to cash points?
Thank you!
Link to comment
Share on other sites
4 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.