AinsLord Posted January 31, 2018 Posted January 31, 2018 anyone have a script of stat seller that has a stat point limit per character?? like 1 character can only buy 10k stat points using Pods/TCG?? thnx in advance Quote
0 gleynn Posted February 2, 2018 Posted February 2, 2018 (edited) try this PS. Stats sold from this NPC will be lost once the player use stat reset. To prevent this, you might want to edit your /conf/exp.conf and look for use_statpoint_table: yes and set it to use_statpoint_table: no EDIT: attached the updated script stat seller with limitv2.txt Edited February 6, 2018 by gleynn 1 Quote
0 AinsLord Posted February 4, 2018 Author Posted February 4, 2018 parse_callfunc: not enough arguments, expected ',' 19 : mes "Sorry, but don't have enough PODs in your inventory."; 20 : mes " Please come back when you have enough."; 21 : close; 22 : } 23 : else { * 24 : set .@StatToBe = StatBought+(.@amount*.@SellStatPOD)';' 25 : if (.@MaxStat < .@StatToBe) { 26 : mes "Sorry, but you're about to reach the max stat points that can be bought."; 27 : mes "You have already purchase "+StatBought+" stat points."; 28 : close; 29 : got error my friend Quote
0 AinsLord Posted February 4, 2018 Author Posted February 4, 2018 here is the script prontera,147,173,4 script Stat Seller 899,{ set .@SellStatPOD, 100; //Stat Points per 1 POD set .@SellStatPOD, 50; //Stat Points per 1 TCG set .@PODid, 7179; //POD item id set .@TCGid, 7227; //TCG item id set .@MaxStat, 10000; //Maximum Stat Points allowed to sell mes "Hi ^FF0000"+strcharinfo(0)+"^000000!"; mes "Do you wish to buy Stat points?"; mes "1 POD = "+.@SellStatPOD+" stat points"; mes "1 TCG = "+.@SellStatTCG+" stat points"; mes "Maximum stat points can be purchase is "+.@MaxStat+"."; switch(select(" ~ Yes, using PODs: ~ Yes, using TCGs: ~ No")) { case 1: mes "How many PODs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@PODid) < .@amount) { mes "Sorry, but don't have enough PODs in your inventory."; mes " Please come back when you have enough."; close; } else { set .@StatToBe = StatBought+(.@amount*.@SellStatPOD); if (.@MaxStat < .@StatToBe) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } else { mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatPOD); set StatBought,StatBought+(.@amount*.@SellStatPOD); close; } } case 2: mes "How many TCGs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@TCGid) < .@amount) { mes "Sorry, but don't have enough TCGs in your inventory."; mes " Please come back when you have enough."; close; } else { set .@StatToBe = StatBought+(.@amount*.@SellStatTCG); if (.@MaxStat < .@StatToBe) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } else { mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatTCG); set StatBought,StatBought+(.@amount*.@SellStatTCG); close; } } case 3: mes "I understand, Please come back to me whenever you change your mind."; close; } } and i got this error parse_callfunc: not enough arguments, expected ',' 19 : mes "Sorry, but don't have enough PODs in your inventory."; 20 : mes " Please come back when you have enough."; 21 : close; 22 : } 23 : else { * 24 : set .@StatToBe = StatBought+(.@amount*.@SellStatPOD)';' 25 : if (.@MaxStat < .@StatToBe) { 26 : mes "Sorry, but you're about to reach the max stat points that can be bought."; 27 : mes "You have already purchase "+StatBought+" stat points."; 28 : close; 29 : } thnx for the help Quote
0 Capuche Posted February 4, 2018 Posted February 4, 2018 Setting a variable is basic in NPC script. I can't help you if you don't help yourself. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L1208 1 Quote
0 AinsLord Posted February 4, 2018 Author Posted February 4, 2018 1 hour ago, Capuche said: Setting a variable is basic in NPC script. I can't help you if you don't help yourself. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L1208 i made it work thnx lastly i want it like the player can only purchase 10k stp after purchasing a total of 10k stp he cant purchase anymore on that character but he can still purchase on the other character he/she have its like 10k maximum of statpoints purchase per character prontera,147,173,4 script Stat Seller 899,{ set .@SellStatPOD, 100; //Stat Points per 1 POD set .@SellStatTCG, 50; //Stat Points per 1 TCG set .@PODid, 7179; //POD item id set .@TCGid, 7227; //TCG item id set .@MaxStat, 5000; //Maximum Stat Points allowed to sell mes "Hi ^FF0000"+strcharinfo(0)+"^000000!"; mes "Do you wish to buy Stat points?"; mes "1 POD = "+.@SellStatPOD+" stat points"; mes "1 TCG = "+.@SellStatTCG+" stat points"; mes "Maximum stat points can be purchase is "+.@MaxStat+"."; switch(select(" ~ Yes, using PODs: ~ Yes, using TCGs: ~ No")) { case 1: mes "How many PODs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@PODid) < .@amount) { mes "Sorry, but don't have enough PODs in your inventory."; mes " Please come back when you have enough."; close; } else { set .@StatToBe = "StatBought+", (.@amount*.@SellStatPOD); if (.@MaxStat < .@StatToBe) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } else { mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatPOD); set StatBought,StatBought+(.@amount*.@SellStatPOD); delitem .@PODid[.@StatBought],.@amount; close; } } case 2: mes "How many TCGs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@TCGid) < .@amount) { mes "Sorry, but don't have enough TCGs in your inventory."; mes " Please come back when you have enough."; close; } else { set .@StatToBe = "StatBought+",(.@amount*.@SellStatTCG); if (.@MaxStat < .@StatToBe) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } else { mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatTCG); set StatBought,StatBought+(.@amount*.@SellStatTCG); delitem .@TCGid[.@StatBought],.@amount; close; } } case 3: mes "I understand, Please come back to me whenever you change your mind."; close; } } thnx for helping me Quote
0 hendra814 Posted February 5, 2018 Posted February 5, 2018 7 hours ago, whodhell said: i made it work thnx lastly i want it like the player can only purchase 10k stp after purchasing a total of 10k stp he cant purchase anymore on that character but he can still purchase on the other character he/she have its like 10k maximum of statpoints purchase per character prontera,147,173,4 script Stat Seller 899,{ set .@SellStatPOD, 100; //Stat Points per 1 POD set .@SellStatTCG, 50; //Stat Points per 1 TCG set .@PODid, 7179; //POD item id set .@TCGid, 7227; //TCG item id set .@MaxStat, 5000; //Maximum Stat Points allowed to sell mes "Hi ^FF0000"+strcharinfo(0)+"^000000!"; mes "Do you wish to buy Stat points?"; mes "1 POD = "+.@SellStatPOD+" stat points"; mes "1 TCG = "+.@SellStatTCG+" stat points"; mes "Maximum stat points can be purchase is "+.@MaxStat+"."; switch(select(" ~ Yes, using PODs: ~ Yes, using TCGs: ~ No")) { case 1: mes "How many PODs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@PODid) < .@amount) { mes "Sorry, but don't have enough PODs in your inventory."; mes " Please come back when you have enough."; close; } else { set .@StatToBe = "StatBought+", (.@amount*.@SellStatPOD); if (.@MaxStat < .@StatToBe) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } else { mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatPOD); set StatBought,StatBought+(.@amount*.@SellStatPOD); delitem .@PODid[.@StatBought],.@amount; close; } } case 2: mes "How many TCGs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@TCGid) < .@amount) { mes "Sorry, but don't have enough TCGs in your inventory."; mes " Please come back when you have enough."; close; } else { set .@StatToBe = "StatBought+",(.@amount*.@SellStatTCG); if (.@MaxStat < .@StatToBe) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } else { mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatTCG); set StatBought,StatBought+(.@amount*.@SellStatTCG); delitem .@TCGid[.@StatBought],.@amount; close; } } case 3: mes "I understand, Please come back to me whenever you change your mind."; close; } } thnx for helping me i suppose change this part if (.@MaxStat < .@StatToBe) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; change into if (.@StatToBe >= .@MaxStat) { mes "Sorry, but you're already reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; Quote
0 AinsLord Posted February 5, 2018 Author Posted February 5, 2018 10 hours ago, hendra814 said: i suppose change this part if (.@MaxStat < .@StatToBe) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; change into if (.@StatToBe >= .@MaxStat) { mes "Sorry, but you're already reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; still same i can purchase multiple times eventhough i purchased total of 5k Stpoints Quote
0 hendra814 Posted February 6, 2018 Posted February 6, 2018 (edited) 10 hours ago, whodhell said: still same i can purchase multiple times eventhough i purchased total of 5k Stpoints sorry miss understanding .@statToBe with StatBought try this prontera,147,173,4 script Stat Seller 899,{ set .@SellStatPOD, 100; //Stat Points per 1 POD set .@SellStatTCG, 50; //Stat Points per 1 TCG set .@PODid, 7179; //POD item id set .@TCGid, 7227; //TCG item id set .@MaxStat, 5000; //Maximum Stat Points allowed to sell mes "Hi ^FF0000"+strcharinfo(0)+"^000000!"; mes "Do you wish to buy Stat points?"; mes "1 POD = "+.@SellStatPOD+" stat points"; mes "1 TCG = "+.@SellStatTCG+" stat points"; mes "Maximum stat points can be purchase is "+.@MaxStat+"."; switch(select(" ~ Yes, using PODs: ~ Yes, using TCGs: ~ No")) { case 1: mes "How many PODs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@PODid) < .@amount) { mes "Sorry, but don't have enough PODs in your inventory."; mes " Please come back when you have enough."; close; } set .@StatToBe = StatBought+(.@amount*.@SellStatPOD); if (.@StatToBe >= .@MaxStat) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatPOD); set StatBought,StatBought+(.@amount*.@SellStatPOD); delitem .@PODid[.@StatBought],.@amount; close; case 2: mes "How many TCGs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@TCGid) < .@amount) { mes "Sorry, but don't have enough TCGs in your inventory."; mes " Please come back when you have enough."; close; } set .@StatToBe = StatBought+(.@amount*.@SellStatTCG); if (.@StatToBe >= .@MaxStat) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatTCG); set StatBought,StatBought+(.@amount*.@SellStatTCG); delitem .@TCGid[.@StatBought],.@amount; close; case 3: mes "I understand, Please come back to me whenever you change your mind."; close; } } Edited February 6, 2018 by hendra814 Quote
0 AinsLord Posted February 6, 2018 Author Posted February 6, 2018 10 hours ago, hendra814 said: sorry miss understanding .@statToBe with StatBought try this prontera,147,173,4 script Stat Seller 899,{ set .@SellStatPOD, 100; //Stat Points per 1 POD set .@SellStatTCG, 50; //Stat Points per 1 TCG set .@PODid, 7179; //POD item id set .@TCGid, 7227; //TCG item id set .@MaxStat, 5000; //Maximum Stat Points allowed to sell mes "Hi ^FF0000"+strcharinfo(0)+"^000000!"; mes "Do you wish to buy Stat points?"; mes "1 POD = "+.@SellStatPOD+" stat points"; mes "1 TCG = "+.@SellStatTCG+" stat points"; mes "Maximum stat points can be purchase is "+.@MaxStat+"."; switch(select(" ~ Yes, using PODs: ~ Yes, using TCGs: ~ No")) { case 1: mes "How many PODs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@PODid) < .@amount) { mes "Sorry, but don't have enough PODs in your inventory."; mes " Please come back when you have enough."; close; } set .@StatToBe = StatBought+(.@amount*.@SellStatPOD); if (.@StatToBe >= .@MaxStat) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatPOD); set StatBought,StatBought+(.@amount*.@SellStatPOD); delitem .@PODid[.@StatBought],.@amount; close; case 2: mes "How many TCGs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@TCGid) < .@amount) { mes "Sorry, but don't have enough TCGs in your inventory."; mes " Please come back when you have enough."; close; } set .@StatToBe = StatBought+(.@amount*.@SellStatTCG); if (.@StatToBe >= .@MaxStat) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatTCG); set StatBought,StatBought+(.@amount*.@SellStatTCG); delitem .@TCGid[.@StatBought],.@amount; close; case 3: mes "I understand, Please come back to me whenever you change your mind."; close; } } character can still purchase statpoints even they purchase total of 5k im also trying to figure this out thnx for helping Quote
0 gleynn Posted February 6, 2018 Posted February 6, 2018 On 2/5/2018 at 4:11 AM, whodhell said: parse_callfunc: not enough arguments, expected ',' 19 : mes "Sorry, but don't have enough PODs in your inventory."; 20 : mes " Please come back when you have enough."; 21 : close; 22 : } 23 : else { * 24 : set .@StatToBe = StatBought+(.@amount*.@SellStatPOD)';' 25 : if (.@MaxStat < .@StatToBe) { 26 : mes "Sorry, but you're about to reach the max stat points that can be bought."; 27 : mes "You have already purchase "+StatBought+" stat points."; 28 : close; 29 : got error my friend ohh, apologies, it should be using comma ( , ) instead an equal sign, here i have updated the script stat seller with limitv2.txt Quote
0 AinsLord Posted February 6, 2018 Author Posted February 6, 2018 1 hour ago, gleynn said: ohh, apologies, it should be using comma ( , ) instead an equal sign, here i have updated the script stat seller with limitv2.txt just add on on ur script it wont consume TCG/PODS so heres an update on your script so once you buy STP TCG/PODS will be consume prontera,147,173,4 script Stat Seller 899,{ set .@SellStatPOD, 100; //Stat Points per 1 POD set .@SellStatTCG, 50; //Stat Points per 1 TCG set .@PODid, 7179; //POD item id set .@TCGid, 7227; //TCG item id set .@MaxStat, 10000; //Maximum Stat Points allowed to sell mes "Hi ^FF0000"+strcharinfo(0)+"^000000!"; mes "Do you wish to buy Stat points?"; mes "1 POD = "+.@SellStatPOD+" stat points"; mes "1 TCG = "+.@SellStatTCG+" stat points"; mes "Maximum stat points can be purchase is "+.@MaxStat+"."; switch(select(" ~ Yes, using PODs: ~ Yes, using TCGs: ~ No")) { case 1: mes "How many PODs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@PODid) < .@amount) { mes "Sorry, but don't have enough PODs in your inventory."; mes " Please come back when you have enough."; close; } else { set .@StatToBe, StatBought+(.@amount*.@SellStatPOD); if (.@MaxStat < .@StatToBe) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } else { mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatPOD); set StatBought, StatBought+(.@amount*.@SellStatPOD); delitem .@PODid[.@StatBought],.@amount; close; } } case 2: mes "How many TCGs do you wish to exchange for stat points?"; input .@amount; if (countitem(.@TCGid) < .@amount) { mes "Sorry, but don't have enough TCGs in your inventory."; mes " Please come back when you have enough."; close; } else { set .@StatToBe, StatBought+(.@amount*.@SellStatTCG); if (.@MaxStat < .@StatToBe) { mes "Sorry, but you're about to reach the max stat points that can be bought."; mes "You have already purchase "+StatBought+" stat points."; close; } else { mes "Here you go!"; mes "Please use your stat point wisely."; set StatusPoint, StatusPoint+(.@amount*.@SellStatTCG); set StatBought, StatBought+(.@amount*.@SellStatTCG); delitem .@TCGid[.@StatBought],.@amount; close; } } case 3: mes "I understand, Please come back to me whenever you change your mind."; close; } } thnx for your script Quote
Question
AinsLord
anyone have a script of stat seller that has a stat point limit per character??
like 1 character can only buy 10k stat points using Pods/TCG??
thnx in advance
12 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.