Got a gacha script and need to edit it. - SLUniverse Forums
Navigation » SLUniverse Forums > Development Discussion and Support > Scripting » Got a gacha script and need to edit it.


Scripting Discuss scripting and programming for SL and other platforms

 
Reply
 
LinkBack Thread Tools Display Modes
Old 07-14-2017, 04:41 PM   #1 (permalink)
Junior Member
 
Join Date: Jul 2017
Posts: 1
Got a gacha script and need to edit it.

I have a gacha script that I got and I noticed that I can't seem to add multiple rares to the script. I've been trying to figure out how to get it to accept multiple rares but it's not working. I'm at a loss of what to put in to change the script, any help would be appreciated. The lines in question are:

integer price = 50; //SET PRICE HERE
string rare_item = ""; //SET RARE ITEM HERE
integer rare_multiplier = 2; //SET RARE MUTLIPIER HERE

Can I not just type RARE in the string rare_item like I've seen in other scripts, when I do it presents me with a string error.
leeseohyun is offline   Reply With Quote
Old 07-14-2017, 04:53 PM   #2 (permalink)
Not as dumb as I look
 
Rolig Loon's Avatar
More coffee, please
 
Join Date: Sep 2009
Location: In a TP
Posts: 320
SL Join Date: March 2007
It's going to be significantly more complicated than that, although still not a challenging script. The string named rare_item is just that ... a string ... a variable with one value. What you need is a list variable that will hold more than one value. (The values will either be the actual names of the items in inventory or you'll have to create some way to grab the names and feed them to the list.) Then you need to rewrite your script to handle the list, give the items (presumably at random) to whoever touches your gacha vendor, and then update the list as items are given away. It's hard to say anything more specific, since you didn't post the entire script. If you are not a scripter, I'd suggest either hiring someone to modify your script or getting a script that is already designed for your purpose.
__________________
I'm awake ... I think.

Look for my scripted tools and my mesh items for the home and garden in SL's Marketplace at https://marketplace.secondlife.com/stores/12305
Rolig Loon is offline   Reply With Quote
3 Users Agreed:
Old 07-14-2017, 06:32 PM   #3 (permalink)
kortee'nea
 
Adeon Writer's Avatar
 
Join Date: Apr 2010
Posts: 9,990
SL Join Date: May 2007

Awards: 2
SLU Creepy Avatar Competition 2014 Participant 
Send a message via Skype™ to Adeon Writer
You'll need to actually edit the body of the code to make the change you want it's not in the lines you posted.
Adeon Writer is offline   Reply With Quote
Old 07-20-2017, 03:14 AM   #4 (permalink)
Member
script me an avatar pic XD
 
Join Date: Oct 2015
Posts: 56
integer rare_multiplier = 2; //SET RARE MUTLIPIER HERE

What does that mean exactly ? To my simple mind it seems to suggest the rare will be dished out twice as often ?
winkdinkerson is offline   Reply With Quote
Old 07-20-2017, 01:58 PM   #5 (permalink)
Not as dumb as I look
 
Rolig Loon's Avatar
More coffee, please
 
Join Date: Sep 2009
Location: In a TP
Posts: 320
SL Join Date: March 2007
Quote:
Originally Posted by winkdinkerson View Post
integer rare_multiplier = 2; //SET RARE MUTLIPIER HERE

What does that mean exactly ? To my simple mind it seems to suggest the rare will be dished out twice as often ?
In this context, it usually means that if the item is identified as RARE, the price is multiplied by 2. Without seeing the script itself, though, it's anyone's guess.
Rolig Loon is offline   Reply With Quote
1 User Said Thanks:
Old 07-20-2017, 06:20 PM   #6 (permalink)
Just call me Beth
 
Aribeth Zelin's Avatar
Singing along with old music
 
Join Date: Mar 2011
Location: Out in the mists
Posts: 8,351
My Mood:
SL Join Date: Oct 4 2009
Business: Moondrops ; Tempus Fugit; Faerycat Designs; sPunk
Client: Firestorm
Also, its possible that its supposed to be a %, so a 2 would mean a 2% chance of giving a rare - again, without seeing a whole script, no telling.
__________________

Aribeth Zelin is online now   Reply With Quote
1 User Said Thanks:
Old 07-20-2017, 07:14 PM   #7 (permalink)
*blink*
 
Soen Eber's Avatar
Vatican mole
 
Join Date: Oct 2009
Location: Minneapolis, Minnesota, USA
Posts: 6,546
My Mood:

Awards: 1
SLU Creepy Avatar Competition 2014 Participant 
Are there any public domain gacha scripts out there? I've always had a thought that I could create a "fair" gacha, one that would weight outcomes towards gachas not already received until after enough pulls all gachas would be purchased.

EDIT: found one
__________________
Hey troll, don't you have a rapture to pray for or some poor people to run over or some beatitudes to ignore or newspapers to burn or something?

You can wish-list items and return to SLU to purchase through the affiliate link.
Note: Some people refuse to buy from Amazon due to predatory tactics against publishers as noted here and here by Jacqueline Trudeau.

Last edited by Soen Eber; 07-20-2017 at 10:09 PM.
Soen Eber is online now   Reply With Quote
Old 07-21-2017, 03:51 AM   #8 (permalink)
Member
script me an avatar pic XD
 
Join Date: Oct 2015
Posts: 56
Quote:
Originally Posted by Soen Eber View Post
Are there any public domain gacha scripts out there? ...

EDIT: found one
If you can find it within your wallet to part with a Linden this full perm gatcha and the related fp script item could be of interest to you ...
https://marketplace.secondlife.com/p...-Drink/7749383
winkdinkerson is offline   Reply With Quote
1 User Said Thanks:
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On




SEO by vBSEO