zIFBoards - Free Forum Hosting
Free Forums. Reliable service with over 8 years of experience.

Learn More · Register Now
Welcome to UnReal World forums. We hope you enjoy your visit.
You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use.
If you are a new visitor click register at top left corner to create an account and join in at UnReal World forums.


If you're already a member please log in to your account to access all of our features:

Name:   Password:


UnReal World RPG homepage

 

 Scripting Random Numbers?
wolfman00
Posted: Feb 13 2012, 08:56 PM



Group Icon

Group: Honorary Lifetime Supporter
Posts: 53
Member No.: 1,177
Joined: 20-July 09



What about having a scripting command that would generate a random number and check it against a user defined success/fail number?
This would work pretty well with gathering bog iron with Rains Iron Weapons mod (just my opinion) wink.gif

So, it could work something like this:

.Bog Iron. "Stone" /90/ RANDOM(<=25, 0, 99)
{Shovel}
{[TERRAIN:spruce_mire pine_mire open_mire]} 'Be in a Mire'

Definition:
RANDOM(Success Parameter, Min Number, Max Number)
Gets a number from 0 to 99, if it is less than or equal to 25 we get Bog Iron!!! smile.gif)

I realize i have only thought about one use for this new scripting feature (digging bog iron) but maybe some other people have some ideas on how this could be used as well. Maybe we can get enough ideas and uses for this feature to make it worthwhile to impliment it in the scripting system. smile.gif)
Top
Rain
Posted: Feb 16 2012, 09:51 PM


Othobrithol
Group Icon

Group: Honorary Lifetime Supporter
Posts: 628
Member No.: 301
Joined: 15-July 06



Don't forget using them to get random results

CODE

.Bog Iron. (RNG,1,3) "Stone" /90/

digs up 1-3 bog iron per action
Top
« Next Oldest | Modding | Next Newest »
zIFBoards - Free Forum Hosting
Enjoy forums? Start your own community for free.
Learn More · Register Now

Topic Options



Hosted for free by zIFBoards* (Terms of Use: Updated 2/10/2010) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Archive