MuffinEater Posted April 8 Share Posted April 8 NPC Stats Randomizer that requirements red pots and 10mil zeny that can give Random value upto 200 of at random combination of (str,agi,vit,int,dex,luk) and low chance 5% for all stats 100 upto 500 with corresponding icon buff of this Quote TIA. Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted May 1 Share Posted May 1 something like this ? prontera,155,181,5 script Sample 757,{ mes "You need 20 "+getitemname(501); mes "You need "+F_InsertComma(10000000)+" Zeny"; if (select("Confirm", "Cancel") == 1) { if (countitem(501) >= 20 && Zeny >= 10000000) { delitem 501, 20; Zeny -= 10000000; // random assign 200 stats for ([email protected] = 0; [email protected] <= 200; [email protected]++) { [email protected] = rand(bStr, bLuk); [email protected][[email protected] - bStr]++; } // 5% to get 100 stats each. for ([email protected] = bStr; [email protected] <= bLuk; [email protected]++) { if (rand(100) < 5) [email protected][[email protected] - bStr] = 100; } for ([email protected] = bStr; [email protected] <= bLuk; [email protected]++) sc_start (SC_STRFOOD + [email protected] - 1), 1200000, [email protected][[email protected] - bStr]; } } close; } Quote Link to comment Share on other sites More sharing options...
0 Krampus Posted May 6 Share Posted May 6 is there a way to be an item doing this function? example: a Potion. Quote Link to comment Share on other sites More sharing options...
0 RikuTzy Posted May 6 Share Posted May 6 1 hour ago, Krampus said: is there a way to be an item doing this function? example: a Potion. item_db.yml: - Id: 1234567 AegisName: MUFFIN_EATER Name: Muffin Eater Type: Healing Weight: 10 Script: | callfunc "Func_Randomizer"; Function Script: function script Func_Randomizer { for([email protected] = 0; [email protected] <= 200; [email protected]++) { [email protected] = rand(bStr, bLuk); [email protected][[email protected] - bStr]++; } for([email protected] = bStr; [email protected] <= bLuk; [email protected]++) { if (rand(100) < 5) // 5% Chances [email protected][[email protected] - bStr] = 100; } for( [email protected] = bStr; [email protected] <= bLuk; [email protected]++ ) { sc_start (SC_STRFOOD + [email protected] - 1), 1200000, [email protected][[email protected] - bStr]; } end; } Credits to Above Didn't test, try it for yourself. Quote Link to comment Share on other sites More sharing options...
0 MuffinEater Posted May 7 Author Share Posted May 7 (edited) On 5/1/2022 at 1:28 PM, Emistry said: something like this ? prontera,155,181,5 script Sample 757,{ mes "You need 20 "+getitemname(501); mes "You need "+F_InsertComma(10000000)+" Zeny"; if (select("Confirm", "Cancel") == 1) { if (countitem(501) >= 20 && Zeny >= 10000000) { delitem 501, 20; Zeny -= 10000000; // random assign 200 stats for ([email protected] = 0; [email protected] <= 200; [email protected]++) { [email protected] = rand(bStr, bLuk); [email protected][[email protected] - bStr]++; } // 5% to get 100 stats each. for ([email protected] = bStr; [email protected] <= bLuk; [email protected]++) { if (rand(100) < 5) [email protected][[email protected] - bStr] = 100; } for ([email protected] = bStr; [email protected] <= bLuk; [email protected]++) sc_start (SC_STRFOOD + [email protected] - 1), 1200000, [email protected][[email protected] - bStr]; } } close; } the stats are not working and the stats icon is different Quote into this Edited May 7 by MuffinEater Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted May 7 Share Posted May 7 sc_start (SC_STRFOOD + [email protected] - 1), 1200000, [email protected][[email protected] - bStr]; change to sc_start (SC_STRFOOD + [email protected] - 1 - bStr), 1200000, [email protected][[email protected] - bStr]; Quote Link to comment Share on other sites More sharing options...
0 Krampus Posted May 7 Share Posted May 7 On 06/05/2022 at 00:04, RikuTzy said: item_db.yml: Script de função: Credits to AboveNão testei, experimente você mesmo. thanks I will test it when I get back from work Quote Link to comment Share on other sites More sharing options...
NPC Stats Randomizer that requirements red pots and 10mil zeny that can give Random value upto 200 of at random combination of (str,agi,vit,int,dex,luk) and low chance 5% for all stats 100 upto 500 with corresponding icon buff of this
TIA.
Link to comment
Share on other sites