VladimirCastro Posted July 14, 2014 Group: Members Topic Count: 114 Topics Per Day: 0.02 Content Count: 298 Reputation: 4 Joined: 03/13/12 Last Seen: September 18, 2016 Share Posted July 14, 2014 hi i would like to have an npc that will exchange my custom points to an item id 7350 Quote Link to comment Share on other sites More sharing options...
Missingno Posted July 16, 2014 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 135 Reputation: 41 Joined: 02/05/14 Last Seen: December 23, 2022 Share Posted July 16, 2014 /*========================================================= Points to Item Exchanger by Mumbles =========================================================== Request: http://goo.gl/MplDtF =========================================================== Preview: =========================================================== Description: Exchanges items for points and vice-versa at a fixed rate. =========================================================== Compatibility: Optimised for rAthena emulators. =========================================================== Changelog: v1.0 - First version. v1.0.1 - Added changelog. v1.0.2 - Removed reverse transactions. [Missingno] v1.0.3 - Adjusted rates. [Missingno] v1.1 - Compatibilised for rAthena emulators. [Missingno] =========================================================*/ prontera,164,169,3 script Point Exchanger::points2item 871,{ /*----------------------------------------------------- Script -----------------------------------------------------*/ mes .npc_name$; mes "Hello there, ^FF8800"+ strcharinfo(0) +"^000000! "+ "Would you exchange your "+ .points_name$ +" "+ "for "+ .pod_name$ +"?"; mes " "; mes "Exchange Rate: "+ .rate +":1"; mes .points_name$ +": [^FF0000"+ getd(.points_var$) +"^000000]"; next; switch (select(implode(.menu_options$, ":"))) { case 1: mes .npc_name$; mes "Okay, come back if you change your mind!"; break; case 2: mes .npc_name$; mes "Please enter the amount of "+ .points_name$ +" that you want to exchange."; do { mes " "; mes "Input ^0000FF0^000000 to cancel."; next; input .@amount; .@total = .@amount / .rate; // Check break input if (!.@amount) { message strcharinfo(0), strnpcinfo(1) +" : Exchange terminated."; close; } // Check amount against points if (getd(.points_var$) < .@amount) { mes .npc_name$; mes "^FF0000Please enter a valid amount.^000000"; } } while (getd(.points_var$) < .@amount); // Check weight if (!checkweight(.pod_id, .@total)) { mes .npc_name$; mes "^FF0000You're overweight; please store some items.^000000"; break; } setd .points_var$, getd(.points_var$) - .@amount; getitem .pod_id, .@total; mes .npc_name$; mes "You've exchanged "+ .@amount +" "+ .points_name$ +" for "+ .@total +" "+ .pod_name$ +". "+ "You now have "+ getd(.points_var$) +" "+ .points_name$ +" and "+ countitem(.pod_id) +" "+ .pod_name$ +"."; break; } close; /*----------------------------------------------------- Configuration -----------------------------------------------------*/ OnInit: .npc_name$ = "[^0000FFPoint Exchanger^000000]"; .rate = 20; // Exchange rate (rate = 1 PoDs) .pod_id = 7350; // Proof of Donation item ID or constant .pod_name$ = getitemname(.pod_id) +"(s)"; // Proof of Donation item name .points_name$ = "Cash Point(s)"; // Points name .points_var$ = "#CASHPOINTS"; // Points variable // Modifying these options requires updates to the corresponding case setarray .menu_options$[0], "^FF0000>^000000 Cancel", "^0000FF>^000000 Exchange "+ .points_name$ +" for "+ .pod_name$; end; } 2 Quote Link to comment Share on other sites More sharing options...
1 EL Dragon Posted July 14, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Share Posted July 14, 2014 prontera,155,155,4 script Converter 83,{ .@name$ ="[^FF0000Converter^000000]"; mes .@name$; mes "Hello, 1 cashpoints is equals to 1 Pass."; mes "What would you like to do?"; next; switch( select("Cash to Pass","Pass to Cash") ) { case 1: mes .@name$; mes "How many pass(s) do you want?"; input .@num; next; if( .@num <= 0 || #CASHPOINTS < .@num * 1 ) { mes .@name$; mes "Sorry, you don't have enough cashpoints!"; close; } mes .@name$; mes "This will cost ^FF0000" +(.@num * 1)+ " cashpoints^000000."; next; if( select("Proceed:Nevermind") -1 ) { mes .@name$; mes "Goodbye!"; close; } set #CASHPOINTS, #CASHPOINTS - .@num * 1; dispbottom "Lost: " +(.@num * 1)+ " cashpoints. Total: " +#CASHPOINTS+" cashpoints."; getitem 7350 , .@num; break; case 2: mes .@name$; mes "How many Pass(s) will you give?"; input .@num; next; if( .@num <= 0 || countitem(7350 ) < .@num ) { mes .@name$; mes "Sorry, you don't have enough Pass !"; close; } mes .@name$; mes "I can give you ^FF0000" +(.@num * 1)+ " cashpoints^000000 for this."; next; if( select("Proceed:Nevermind") -1 ) { mes .@name$; mes "Goodbye!"; close; } set #CASHPOINTS, #CASHPOINTS + .@num * 1; dispbottom "Gained: " +(.@num * 1)+ " cashpoints. Total: " +#CASHPOINTS+" cashpoints."; delitem 7350 ,.@num; } close; } chnage all #CASHPOINTS to your #Points 1 Quote Link to comment Share on other sites More sharing options...
Skorm Posted July 14, 2014 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: 9 hours ago Share Posted July 14, 2014 chnage all #CASHPOINTS to your #Points Why space it out so hard to read. xD Quote Link to comment Share on other sites More sharing options...
VladimirCastro Posted July 15, 2014 Group: Members Topic Count: 114 Topics Per Day: 0.02 Content Count: 298 Reputation: 4 Joined: 03/13/12 Last Seen: September 18, 2016 Author Share Posted July 15, 2014 well i want something like no vice versa just an npc that u can redeem ur pass if u have 20 points Quote Link to comment Share on other sites More sharing options...
Missingno Posted July 15, 2014 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 135 Reputation: 41 Joined: 02/05/14 Last Seen: December 23, 2022 Share Posted July 15, 2014 Here's a useful script from another board that would suit your needs (with a little tweaking for compatibility): Points to Item Exchanger Quote Link to comment Share on other sites More sharing options...
VladimirCastro Posted July 15, 2014 Group: Members Topic Count: 114 Topics Per Day: 0.02 Content Count: 298 Reputation: 4 Joined: 03/13/12 Last Seen: September 18, 2016 Author Share Posted July 15, 2014 Here's a useful script from another board that would suit your needs (with a little tweaking for compatibility): Points to Item Exchanger as i said no vice versa . i want something like he will talk and at the end will give the pass. if he meet the requirment of 20points Quote Link to comment Share on other sites More sharing options...
Missingno Posted July 16, 2014 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 135 Reputation: 41 Joined: 02/05/14 Last Seen: December 23, 2022 Share Posted July 16, 2014 as i said no vice versa . i want something like he will talk and at the end will give the pass. if he meet the requirment of 20points Why not take the script and simply remove the reversed transaction? You'd literally comment out two blocks of code. o_o Quote Link to comment Share on other sites More sharing options...
VladimirCastro Posted July 16, 2014 Group: Members Topic Count: 114 Topics Per Day: 0.02 Content Count: 298 Reputation: 4 Joined: 03/13/12 Last Seen: September 18, 2016 Author Share Posted July 16, 2014 as i said no vice versa . i want something like he will talk and at the end will give the pass. if he meet the requirment of 20points Why not take the script and simply remove the reversed transaction? You'd literally comment out two blocks of code. o_o sorry but im really noob with script im here for request. im requesting if someone can do it. so if someone can provide me the script then really appreciate it Quote Link to comment Share on other sites More sharing options...
Question
VladimirCastro
hi i would like to have an npc that will exchange my custom points to an item id 7350
Link to comment
Share on other sites
8 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.