Full Version : Randomized RunicTool Drop
xmlspawner >>Q&A >>Randomized RunicTool Drop
<< Prev | Next >>
olsyke- 04-02-2006
hello its me again
i was tryin to find out here on the forums but had no luck with that
/ADD,0,5/<Runichammer,valorite,10>
how would i go about randomizing the ressource "valorite" and the uses available ?
thx in advance
ArteGordon- 04-02-2006
you could use the RND, RNDLIST, or RNDSTRLIST keywords to substitute values into the entry string like this.
orc/ADD,0.5/<Runichammer,{RNDSTRLIST,valorite,verite,gold,agapite},{RNDLIST,10,20,25,30}>
Anything between the curly braces {} gets evaluated and the results substituted in the substitution pass of the parser that happens before the entry actually gets parsed, so you can put them anywhere to modify the raw entry string.
from xmlspawner2.txt

QUOTE
- added the RNDLIST,int1[,int2,....] and RNDSTRLIST,val1[,val2,....] keywords that can be used to assign values or test properties against randomly selected elements of a list. The only difference between RNDLIST and RNDSTRLIST, is that RNDLIST can be used in integer value tests and the list elements must be integers while the elements of RNDSTRLIST can by any string.
For example, to spawn a mob and set its hue to one of 4 random values, and name to one of 3 different strings you could use something like
orc/hue/RNDLIST,100,120,300,500/name/RNDSTRLIST,Gomer,Gubgub,Glorm

QUOTE
The syntax for RND is /RND,min,max/ For example "ogre/hue/RND,1,500/ADD,0.1/<katana/hue/500/attributes.luck/RND,50,100>" would spawn a randomly colored ogre with a 10% chance of dropping a blue katana with random luck values between 50 and 100.