RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[swap command

sirens song

Wanderer
[swap command

randomizing floor tiles is a pain, this could also be used in other applications. A command to swap the location of 2 items/mobiles/etc..
 

Phantom

Knight
sirens song said:
randomizing floor tiles is a pain, this could also be used in other applications. A command to swap the location of 2 items/mobiles/etc..

You could just use [move :p
 

sirens song

Wanderer
i scripted one myself this afternoon, but it would be a good addition to stock-RUO. and [move requires moving tiles out of the way then replacing them etc.. big pain
 

Kamron

Knight
Your best bet for randomization of floor tiles, is to make a giant array of all Dirt tiles (for example). Then when you do the command, and effect all items of that type with an itemid in that array, it will randomly choose 1 of those itemids, and change it to that. So you could add 300 of all of the same type of dirt... use the command, and the dirt is instantly randomized.

If you want to have multiple arrays, my best suggestion, is to make an array of structs, and have the struct contain an array of all of the itemids of that type. Then have the command reference that literal struct array.
 

ASayre

RunUO Developer
Randomization of floor tiles

Commonly, (most of the time), the different ItemIDs that yas would choose from to make it random are right next to eachother. Concurrent ItemIDs.

Static has a constructor that allows you to specify the starting ItemID and how many to randomize from.

example -> [tile static 1234 4

That'll tile statics randomly from -> 1234, 1235, 1236, 1237 .
 
Top