![]() |
R99 - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: R99 (/Thread-R99) Pages: 1 2 |
R99 - Art - 04-19-2013 04:53 PM Hello. I noticed that chance for treasure maps by default is R99 in loot templates. I have a question, is it possible to use R100 or R150 for example? Will be it as 1 for 150 or how that random calculates? RE: R99 - x77x - 04-19-2013 05:40 PM the higher the number the harder to get... ,R2 = 50% chance RE: R99 - Art - 04-19-2013 05:59 PM I though function R works only when less than 100, because it was R99 in script, but not R100 ![]() Thanks. RE: R99 - UltimaAku - 04-21-2013 07:31 PM Your right Art, it stops at 99, but if you want to make an item rarer than 99, you would have to add a variance in your script. At 99, theres a 1% chance of dropping the loot (i think?) so if you want it lower add this to your npc ON=@DEATH VAR.RAND=<EVAL {1 1000}> IF (<VAR.RAND><=5) //0.5% Chance Loot Drop NEWITEM=i_something_rare ACT.BOUNCE RETURN 0 ENDIF It does add a variance on R100 but it seems to only make it more common than R99, which i dont understand... RE: R99 - x77x - 04-22-2013 07:00 AM sorry, i never knew 99 was the limit... RE: R99 - Wap - 04-22-2013 11:18 AM Mmmm... I think, there are no limit here. I will test this tomorrow. RE: R99 - Gil Amarth - 04-22-2013 09:36 PM There is no limit, I use a lot R1000 without any problem. In fact If you use only R, a R1000 is executed in his place. Note that R2 goes from 0 to 1, R99 goes from 0 to 98, R100 goes from 0 to 99, and R1000, from 0 to 999. There is always one less number that you put in the random. If you want a random who begins at other number different of zero, use: R1,10 to numbers from 1 to 10 R5,10 to numbers from 5 to 10 RE: R99 - Rattlehead - 04-27-2013 05:43 PM (04-21-2013 07:31 PM)UltimaAku Wrote: Your right Art, it stops at 99, but if you want to make an item rarer than 99, you would have to add a variance in your script. using vars is actually a bad idea, use locals instead: ON=@DEATH LOCAL.RAND=<EVAL {1 1000}> IF (<LOCAL.RAND><=5) //0.5% Chance Loot Drop SERV.NEWITEM i_something_rare NEW.CONT <SRC.FINDLAYER.21.UID> RETURN 0 ENDIF Rx is ok to use i guess, but u have better control if u use ur own algorithm, please correct me if i am wrong. RE: R99 - RanXerox - 04-28-2013 12:13 AM LOCAL.RAND=<EVAL {1 1000}> IF (<LOCAL.RAND><=5) //0.5% Chance Loot Drop has the same results as IF (<R1,1000><=5) //0.5% Chance Loot Drop which is the same as IF (<R><=5) //0.5% Chance Loot Drop ...except that in these versions, there less for the server to do since there is less script to parse, no allocation of memory for the temporary local string variable, no evaluation of the random {}, no assignment of the resulting integer to the string value, no re-evaluation of the string back to an integer in the if statement... To be fair however, this all takes place in microseconds.inside a @Death trigger that does not get called all that often. :-) RE: R99 - Art - 04-28-2013 05:18 PM Hm ![]() So, if (<r> <= 5) is same as R200 or better? And have anyone tested, is item=i_test,R200 working if R more than 99 ? |