Jump to content
Sign in to follow this  
Aeromesi

Ragnarok Gacha System

Do you use my scripts for your Server?  

13 members have voted

  1. 1. Do you use this for your Server?



Recommended Posts

[Ragnarok Gacha System]
Pull for Weapons.
Pull for Armor.
Pull for Cards.
Simply Gacha.

 

 

 

 

New features:

1) Be able to cycle back to main menu and quickly select new item to roll for.

2) Sound is disabled by default, so if you don't want to add client files, don't worry about it. Just put the script in server and test it out.

3) If your weight is above or equal to 50% you won't be able to gacha pull. Just imagine hitting 100% weight and your gacha item drops and someone snatches it real quick, that would be horrible.

 

Default values (Edit OnInit Label):

    .gachaPulls = 20; // How many gacha pulls they need until they can pull for a card
    .weaponChance = 2; // Weapon chance 2%
    .armorChance = 2; // Armor chance 2%
    .weaponFee = 500000; // Weapon fee
    .armorFee = 400000; // Armor fee
    .cardFee = 900000; // Card fee

$@godItems is an array of item ID's, these item ID's cannot be pulled (god items, super rare cards like gtb, etc, basically any item you don't want pulled add to the array).

Link to download:
https://github.com/Aeromesi/AeromesiCodes/blob/master/Scripts/customnpc/gacha.txt



 

 

Share this post


Link to post
Share on other sites

In the 1.3 update im going to make the value for fumb20 variable whatever you want. Instead of having it be 20 you can configure what you want.

UPDATE:
 

1.3 Update (1/24/2015)
 
Added Server Name variable .@ServName$ so you may set your server name when Fumbi specifies him coming to your Server
 
Made the script more customizable, now you are able to choose what amount of fumbi roll attempts you want, instead of 20 fumbi rolls, you can simply edit it from the fumbirolls variable!
Edited by Aeromesi

Share this post


Link to post
Share on other sites

This is a nice system.



But I like the pvp. It can replace the bg system. Hope you would release it to the public.  :D

Share this post


Link to post
Share on other sites

OMFGWTFBBQ FINALLY A COMMENT! RIGHT WHEN I WAS ABOUT TO DELETE THIS POST!

Well my script is based off Vykimo's script that's not on the internet anymore, I fixed it up, if I have it fully featured and working I'll release it

EDIT: Updating fumbi to 1.3. I realized a lot of outdated code I need to switch out, especially the menu's with switch(select())

Edited by Aeromesi

Share this post


Link to post
Share on other sites

I'm hoping to use the latest revision! Thanks for this! and I hope you can fix the PVP/BG script sooner!

1.4 Update is available now :D

 

 

Scratch that, found a few errors..

Edited by Aeromesi

Share this post


Link to post
Share on other sites

 

I'm hoping to use the latest revision! Thanks for this! and I hope you can fix the PVP/BG script sooner!

1.4 Update is available now :D

 

 

Scratch that, found a few errors..

Just take your time ! :)

Share this post


Link to post
Share on other sites

 

 

I'm hoping to use the latest revision! Thanks for this! and I hope you can fix the PVP/BG script sooner!

1.4 Update is available now :D

 

 

Scratch that, found a few errors..

Just take your time ! :)

 

 

Enjoy the 1.5 update to the Fumbi System, everything is grinded out, correctly programmed for Hercules!

Share this post


Link to post
Share on other sites

 

 

 

I'm hoping to use the latest revision! Thanks for this! and I hope you can fix the PVP/BG script sooner!

1.4 Update is available now :D

 

 

Scratch that, found a few errors..

Just take your time ! :)

 

 

Enjoy the 1.5 update to the Fumbi System, everything is grinded out, correctly programmed for Hercules!

Is the map of custom BG included?

Share this post


Link to post
Share on other sites

I skimmed through your script and I think it needs optimizing, you have like 10+ same cases.

Try to use callsub/callfuncs to shorten your script.

Share this post


Link to post
Share on other sites

I skimmed through your script and I think it needs optimizing, you have like 10+ same cases.

Try to use callsub/callfuncs to shorten your script.

I wanted to but the function for the array on goditems makes it so i cant call upon one label

 

This code:

 

.@item = callfunc ("Fumbi_Roll",1101,1190);

 

Makes it so there needs to be multiple cases, this function is very important in the script, it calls the function fumbi_roll that contains the array $GodItems, every id stated in that array is excluded in the 1101-1190 item IDs, that would be the swords if I am correct

Edited by Aeromesi

Share this post


Link to post
Share on other sites

Example:

 

 

- 775 Lines. ^^

 

// Fumbi System// Developed by: Aeromesi // old alias Aeromas// Enlightenment goes to Grunger for helping me, Kit the Baby Fox for more enlightenment, & Crayu my friend for the idea =P// Version: 1.4 (3/16/2015// Compatible emulator: Hercules// What it does:// It's based off the game S4 League, basically you fumbi a armor or weapon and you get a random armor or weapon.// After 20 Fumbi's you get the chance to get a card for 10,000,000 If you don't want to fumbi a card, you can decline, but it resets your Fumbi counts// http://www.s4league.com Try it out!// Newest additions in 1.4 are: Totally customizable! Everything can be changed by simply editing values .wpnfee, .armfee, and .carfee, before it was all stated through default of what I set the integers to, aka 200,000 Zeny, 100,000 Zeny, and 2,000,000 Zeny for Fumbi, he now displays whatever integer you put. Switched out all old commands with the new ones./* Configuration method:                                Server Side:                                [1.5 Update]        Just small minor errors, such as the fact I put the cases in wrong numerical order for the Armors... -.-        Fixed OnInit: was labelled OnInt instead so that array $GodItems actually didn't work, sorry about that!                                [1.4 Update]        One less option, Fumbi just says which would you like to try and Fumbi, Weapon or Armor.        Switched out old/ soon being depreciated commands like menu with switch(select())        Overall made the script more efficient                                [1.3 Update]        .ServName$, for configuring your Server Name in the Fumbi's text        .fumbirolls variable added for more options, able to choose the MAX Fumbi Roll attempt to whatever you want. [Default Fumbi Roll attempt: 20]        .ArmChance handles the success rate of which you fumbi an Armor        .WpnChance handles the success rate of which you fumbi an Weapon        ..wpnfee handles the fee amount for attempting to fumbi an Weapon        ..armfee handles the fee amount for attempting to fumbi an Armor        ..carfee handles the fee amount for attempting to fumbi an Card        .fname$ = The NPC's name, hence Fumbi        fumb20 is the variable at which you gain Fumbi points for playing        Edit the header script to your own map and add in the view ID 10099 for the Fumbi sprite.                                Client Side:        What's included is the wav files for the sound effects of the actual Fumbi, and the Sprites of the Fumbi        There is a still sprite of the Fumbi and a moving sprite of the fumbi, so you can choose what you want to use        Repack your customgrf.grf with the fumbi.grf, I also left in the raw data for some reason                                Last but not least, enjoy! */                                    prontera,150,150,4    script    Fumbi    100,{    mes .fname$;    if(fumb20 == .fumbirolls) {        soundeffect "fumbi_fail.wav",0;        mes "Congratulations!";        mes "You are at "+.fumbirolls+" Fumbis";        next;        mes .fname$;        mes "Would you like to Fumbi a card for "+.carfee+" Zeny?";        next;        if(select("Yes","No") == 1) {            if(Zeny < .carfee) {                mes .fname$;                mes "Sorry, but you need "+.carfee+" Zeny to Fumbi a card.";                close;            } // its okay not to use 'else'                mes .fname$;                mes "Are you sure you want to Fumbi a card for "+.carfee+" Zeny?";                    if(select("Yes","No") == 1) {                        next;                        mes .fname$;                        mes "Alright then, we will now commence the Fumbi roll!";                        mes "Now let's start this up.";                        next;                        mes .fname$;                        mes "Fumbi roll is commencing...";                        callsub Fumbi_Snd;                        switch(rand(1,4)) {                            case 1:                                soundeffect "s4miss_start.wav",0;                                mes "Sorry, but it seems you failed the roll.";                                mes "Better luck next time!";                                fumb20 = 0; Zeny-=.carfee;                                close;                            default:                                mes "Congratulations! You've successfully Fumbid a card!";                                .@item = callfunc ("Fumbi_Roll",4001,4453);                                getitem .@item,1;                                 fumb20 = 0; Zeny-=.carfee;                                close;                        }                    close;                }        }                mes .fname$;                soundeffect "fumbi_fail.wav",0;                mes "Oh okay.";                mes "Do you want to reset your Fumbi count or wait until you have "+.carfee+" zeny?";                next;                switch(select("I'll reset my Fumbi count.:I changed my mind."))    {                    case 1:                        mes .fname$;                        mes "Oh okay, your Fumbi count will now be reset!";                        mes "1...";                        sleep2 1000;                        mes "2...";                        sleep2 1000;                        mes "3...";                        sleep2 1000;                        mes "Your Fumbi count is now reset.";                        fumb20 = 0;                        close;                    case 2:                        mes .fname$;                        mes "All right";                        mes "Come back to me when you're prepared to try and Fumbi.";                        close;                }}    soundeffect "fumbi_fail.wav",0;    mes "Hello, my name is Fumbi.";    mes "You have probably seen me being snatched up by players on S4 League, Fumbing Weapons and Armor for players.";    next;    mes .fname$;    mes "Well I decided to come on over to "+.ServName$+" and help you guys out too!";    next;    mes .fname$;    mes "You have the option to Fumbi a Weapon for "+.wpnfee+" zeny or an Armor for "+.armfee+" zeny.";    next;    mes .fname$;    mes "Once you Fumbi at least "+.fumbirolls+" times, you will have the option to Fumbi a card for "+.carfee+" zeny.";    next;    mes .fname$;    mes "So, what would you like to try and Fumbi, a Weapon or Armor?";    next;    if(select("Weapon","Armor") == 1) {            mes .fname$;            mes "Weapons Category:";            switch(select("- Sword:- Daggers:- Katars:- Maces:- Staffs:- Guns:- Bows:- Knuckles:- Whips:- Books:- Axes:- Spears:- Instruments")) {                case 1:  callsub Fumbi, 1101, 1190, .WpnChance, .wpnfee; break; //callfunc ("Fumbi_Roll",1101,1190); etc                case 2:  callsub Fumbi, 1201, 1249, .WpnChance, .wpnfee; break;                case 3:  callsub Fumbi, 1250, 1282, .WpnChance, .wpnfee; break;                case 4:  callsub Fumbi, 1501, 1546, .WpnChance, .wpnfee; break;                case 5:  callsub Fumbi, 1601, 1641, .WpnChance, .wpnfee; break;                case 6:  callsub Fumbi, 1101, 1190, .WpnChance, .wpnfee; break;                case 7:  callsub Fumbi, 1701, 1743, .WpnChance, .wpnfee; break;                case 8:  callsub Fumbi, 1801, 1827, .WpnChance, .wpnfee; break;                case 9:  callsub Fumbi, 1950, 1981, .WpnChance, .wpnfee; break;                case 10: callsub Fumbi, 1550, 1577, .WpnChance, .wpnfee; break;                case 11: callsub Fumbi, 1351, 1382, .WpnChance, .wpnfee; break;                case 12: callsub Fumbi, 1401, 1471, .WpnChance, .wpnfee; break;                case 13: callsub Fumbi, 1901, 1927, .WpnChance, .wpnfee; break;            }    }        next;        mes .fname$;        mes "Armor Category:";            switch(select("- Shields:- Armors:- Footgear:- Garments:- Accessories")) {                case 1: callsub Fumbi, 2101, 2135, .ArmChance, .armfee; break; //callfunc ("Fumbi_Roll",1101,1190); etc                case 2: callsub Fumbi, 2301, 2391, .ArmChance, .armfee; break;                case 3: callsub Fumbi, 2401, 2441, .ArmChance, .armfee; break;                case 4: callsub Fumbi, 2501, 2546, .ArmChance, .armfee; break;                case 5: callsub Fumbi, 2601, 2762, .ArmChance, .armfee; break;            }Fumbi: // 1 label for the 18 cases    next;    mes .fname$;    mes "All right, so would you like to try and Fumbi?";    if(select("Yes","No") == 1) {        if(Zeny < getarg(3)) {            mes "I'm sorry, but it seems you don't have "+getarg(3)+"z.";            mes "Please come again when you have "+getarg(3)+"z.";            close;        }        Zeny -= getarg(3); ++fumb20;        mes "You have "+ getarg(3) +" zeny! We will now start the Fumbing process.";        next;        callsub Fumbi_Snd;        if ( rand(100) < getarg(2) ) {            mes "You have failed to Fumbi a Weapon.";            mes "Fumbi Points: (^CD3333"+fumb20+"^000000/^003EFF"+.fumbirolls+"^000000)  to Fumbi a card for "+.carfee+" Zeny.";            close;        }        soundeffect "fumbi_wpn.wav",0;        .@item = callsub (Fumbi_Roll, getarg(0), getarg(1));        getitem .@item, 1;        mes "You got your weapon! Please come again to try and Fumbi!";        mes "You have (^CD3333"+ fumb20 +"^000000/^003EFF"+.fumbirolls+"^000000)  to attempt to Fumbi a card for "+.carfee+" zeny!";        close;    }    next;    mes .fname$;    mes "Okay, please come back if you'd like to try and Fumbi a Weapon.";    close;    Fumbi_Roll: // function converted to label    .@item = rand(getarg(0),getarg(1));    for( .@i = 0; .@i<getarraysize(.GodItems); .@i+=1)        if(.@item == .GodItems[.@i]) callsub Fumbi_Roll;    return (.@item);Fumbi_Snd:        sleep2 1000;        soundeffect "fumbi_run.wav",0;        mes "1..";        soundeffect "fumbi_start.wav",0;        sleep2 1000;        mes "2...";        soundeffect "fumbi_start.wav",0;        sleep2 1000;        mes "3...";        soundeffect "fumbi_start.wav",0;        sleep2 1000;        soundeffect "fumbi_start.wav",0;        mes "4...";        sleep2 1000;        return;OnInit: // Config    .fumbirolls = 20;    .WpnChance = 10;    .ArmChance = 50;    .wpnfee = 2000000;    .armfee = 1000000;    .carfee = 10000000;    .fname$ = "^FF0000[Fumbi]^000000";    .ServName$ = "^00ff00MyRO^000000";    setarray .GodItems[0],2410,2629,1530,1161,5013,2630,4121,4128,4129,4131,4132,4134,4135,4137,4142,4143,4144,4145,4146,4147,4148,4168,4263,4276,4302,4305,4318,4324,4330,4342,4352,4357,4359,4361,4363,4365,4367,4372,4374,4376,4386,4399,4403,4407,4408,4419,4425,4430,4441;    end;}

 

 

Edited by quesoph

Share this post


Link to post
Share on other sites

Nice revised version of the Fumbi system quesoph. though I have to say I changed the sleep2 counter back to 2000, as its part of the Fumbi system in s4 league with the same wait in between when they Fumbi. Also the card system didn't work with whatever you used, so I had to put the function back in for the card system. Other then that I kept all the callsubs. New final update coming soon. (I hope xD!)

Share this post


Link to post
Share on other sites

Updated to 1.7, for those using the Fumbi system, I recommend you switch over to 1.7, it's better than ever~!

Remember, if you like my work/intend to use it, rep me up or view my signature below :)

Share this post


Link to post
Share on other sites

 

[Fumbi System Version 1.7]

Now, what exactly is the Fumbi System?

 

Fumbi explanation: You are able to "Fumbi" an Weapon or Armor in this NPC for an x amount of Zeny, it randomly gives you the chances of getting any Weapon or Armor in Ragnarok, and after whatever Fumbi roll attempts you configured, you get the chance to try and Fumbi a card. This is a fool-proof system though, you CANNOT attempt to Fumbi ANY god Weapons or Armors, or cards like Maya Purple or GTB and so forth. All those "banned" from the Fumbi roll, is located in the array .GodItems

 

This idea as long as the sprite animations are consisted of a game called S4League, a third person shooter with amazing platforming, give it a try you won't be disappointed!

 

PS: The Weapons and Armor have every category, like maces, spears, swords, etc and for armors, accessories, garments, boots, etc... Forgot to include that in this post, it has multiple options for you to choose from!

 

Instructions which is included in the fumbisystem.txt:

 

/* Configuration method:								Server Side:		.ArmChance handles the success rate of which you fumbi an Armor		.WpnChance handles the success rate of which you fumbi an Weapon		.wpnfee handles the fee amount for attempting to fumbi an Weapon		.armfee handles the fee amount for attempting to fumbi an Armor		.carfee handles the fee amount for attempting to fumbi an Card		.fname$ = The NPC's name, hence Fumbi		fumb_attempts is the variable at which you gain Fumbi points for playing towards getting a chance to Fumbi a card!		Edit the header script to your own map and add in the view ID 10099 for the Fumbi sprite.								Client Side:		What's included is the wav files for the sound effects of the actual Fumbi, and the Sprites of the Fumbi		There is a still sprite of the Fumbi and a moving sprite of the fumbi, so you can choose what you want to use		Repack your customgrf.grf with the fumbi.grf, I also left in the raw data for some reason								Last but not least, enjoy! */

 

Here's a video that visually details more about the Fumbi System:

 

 

 

Enjoy 1.7 Hercules!

 

Regards,

 

Aeromesi

HI do u have the touch down script ?

Share this post


Link to post
Share on other sites

Yes I have two versions one that @@vykimo made for me and his old version that my friend Garr helped me recode. I won't release the new version because I paid for it but maybe the old one garr helped me fix

Share this post


Link to post
Share on other sites

I updated this script, made it more clean feeling switching through the menus. Rerolling is quick and easy now. I also renamed the file and text to a gacha system.

New features:
1) Be able to cycle back to main menu and quickly select new item to roll for.
2) Sound is disabled by default, so if you don't want to add client files, don't worry about it. Just put the script in server and test it out.
3) If your weight is above or equal to 50% you won't be able to gacha pull. Just imagine hitting 100% weight and your gacha item drops and someone snatches it real quick, that would be horrible.

Default values (Edit OnInit Label):

    .gachaPulls = 10; // How many gacha pulls they need until they can pull for a card
    .weaponChance = 12; // Weapon chance 2%
    .armorChance = 12; // Armor chance 2%
    .weaponFee = 500000; // Weapon fee
    .armorFee = 400000; // Armor fee
    .cardFee = 900000; // Card fee

 

$@godItems is an array of item ID's, these item ID's cannot be pulled (god items, super rare cards like gtb, etc, basically any item you don't want pulled add to the array).


Link to download:
https://github.com/Aeromesi/AeromesiCodes/blob/master/Scripts/customnpc/gacha.txt

Share this post


Link to post
Share on other sites

For anyone that downloaded the new version yesterday I highly suggest using the update I just uploaded, there were errors I overlooked but now are fixed.

The check for getting weapons or armor at their desired % rate was inaccurate, now it's good to go!
Also a couple changes were made to the default config:
1) Have to pull 10 times to try and gacha a card.
1) 12% for weapons and armor
1) 10% for a card.

View the changes here:
https://github.com/Aeromesi/AeromesiCodes/commit/4e0decf974ddf95ab60cf264c642e28fcc374d50


 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.