dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
|
| 17 Oct 2013 09:58 PM |
Well it's hard to put this in a question but, how do I make like a item drop rarity, like for examp;e, 25% item drop (within the 25% is either like a 50% chance of getting a potion or a 50% chance of getting a sword or something) Thank you if you can help. |
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
|
| 17 Oct 2013 09:59 PM |
example* and this script goes under the monster's humanoid this happens when it hits 0 (of course)
|
|
|
| Report Abuse |
|
|
|
| 17 Oct 2013 10:02 PM |
| honestly I use math.random for this |
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
|
| 17 Oct 2013 10:11 PM |
I don't know how to do that and I'm learning how to script when I get the chance, but thanks anyways |
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
| |
|
Raphael7
|
  |
| Joined: 03 Dec 2008 |
| Total Posts: 2479 |
|
|
| 17 Oct 2013 10:27 PM |
| Since % is out of 100, divide it by chance of getting this item. So let's say you want 25%, you would divide 25 by 25 and divide 100 by 25, you would get 1/4. This is the range you're going to get chance = math.random(1, 4). Hoping this makes sense. |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2013 10:28 PM |
mythicrare = 0.001 --bronze drops rare = 0.01 -- gold drops uncommon = 0.1 -- silver drops common = 1 -- black drops
MTG.Cards:GetMythics()["Wurmcoil Engine"].Chance = math.random(1,6) * mythicrare
Example for MTG.
|
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
|
| 17 Oct 2013 10:46 PM |
thanks, but i'm a NOOB at scripting so do I just put all this into a script like that or no? xD |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2013 10:48 PM |
>Comes to Scripting Helpers >Asks for help >Doesn`t try to learn You know nothing and should attempt to learn before you ask for help. |
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
|
| 17 Oct 2013 10:50 PM |
you're the one to judge and say I noot trying to learn, If you read my previous comments before I said, I will when I have the time, ok. |
|
|
| Report Abuse |
|
|
XAXA
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 6315 |
|
|
| 17 Oct 2013 10:51 PM |
function dropItem() if math.random(1,100) < 25 then -- 25% chance of an item actually dropping print[[Dropped something!]] if math.random(1,100) <= 50 then -- if the random number generated is from 1 to 50 out of 100, which is a 50% probability --drops sword print[[Dropped a sword]] else --drops potion print[[Dropped a potion]] end end end |
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
| |
|
|
| 17 Oct 2013 10:56 PM |
The thing is: You`re not supposed to ask for help unless you`ve actually tried it. Who knows, You might be a natural. |
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
|
| 17 Oct 2013 10:58 PM |
i think the script needs something else to it..
|
|
|
| Report Abuse |
|
|
XAXA
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 6315 |
|
|
| 17 Oct 2013 11:00 PM |
I already gave you a basic script that does something out of chance. See the --drops sword and --drops potion comments? Fill those in with the appropriate code. You can try cloning something out of storage and place it on top of the killed monster. |
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
|
| 17 Oct 2013 11:12 PM |
| Like with the lighting clone part |
|
|
| Report Abuse |
|
|
XAXA
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 6315 |
|
|
| 17 Oct 2013 11:14 PM |
Use replicatedstorage
http://wiki.roblox.com/index.php/RBX.lua.ReplicatedStorage_(Object) |
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
|
| 17 Oct 2013 11:18 PM |
| Ok and I'm going to sleep I try that tomorrow and thanks you are a big help |
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
| |
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
|
| 18 Oct 2013 09:50 AM |
| Oh I can just place things there ohhhh ok |
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
|
| 18 Oct 2013 10:03 AM |
It appears i did something wrong..... How do I do it the correct way? |
|
|
| Report Abuse |
|
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
| |
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
| |
|
dkeams12
|
  |
| Joined: 21 Jun 2012 |
| Total Posts: 1992 |
|
| |
|
Meleos
|
  |
| Joined: 13 Oct 2013 |
| Total Posts: 171 |
|
|
| 18 Oct 2013 11:45 AM |
Please, don't make more than one post on the same question.
Yours truly, Meleos |
|
|
| Report Abuse |
|
|