Full Version : Help creating new PvP Arena
xmlspawner >>Scripting Support >>Help creating new PvP Arena


<< Prev | Next >>

afonso- 01-25-2007
Ok here's the deal. I figured it was time I gave it a shot at hardcore scripting with XML Spawner. SO I came up with an idea for a PvP arena

Here's how it works. The arena will be a square, divided into several other squares, all separated by XML-spawned walls. Each player stands in one square, and the all the walls are loaded. Then, the separating walls will begin disapearing, and the players that were separated can now fight each other. Lemme see if I can show you (my ascii skills suck btw, so i gave up and made a ps)

user posted image



The arena starts out like the 1st image, and each player takes it's place on the P tiles, then the walls load, total of 24 wallls

Now, what I want is, that every X seconds, 6 of those walls disappear randomly, so the first round would be something like

The players without a wall would have to fight each other, and so on, turning the match into a sort of gradual ffa.

Another option is for the referee to determine when the walls will disapear, but they have to be random. I could to this by hand, but then everyone would accuse me of fixing the matches.

I think I know how to spawn the walls, but I have no idea of how to despawn them.
The best solution would be to make a different spawner for each wall, then one that spawns them all, and then one that randomly despawns them.

What do you guys think? Is it doable?

Thanks for the help

Afonso

ArteGordon- 01-25-2007
yes, it is doable. You can use the DESPAWN or DELETE keywords to do this

QUOTE

-added the new standalone keyword "DESPAWN[,spawnername],subgroup" which can be used to remove all spawns from a particular subgroup on a particular spawner.  If the spawnername arg is omitted, then the current spawner will be used.  Note that DESPAWN will only remove spawns on entries that have the CLR flag set.  If you want to remove all spawns regardless of the CLR setting, then use the DELETE keyword like this "SETONSPAWN,subgroup/DELETE"


just spawn your random wall groups in different subgroups, and then you can systematically despawn those individual subgroups.
For example, put all of your random wall spawns on one spawner

WallSpawner

subgroup 1: static,243
subgroup 2: static, 244
etc.


and then you could have your despawn spawner set to sequential spawn like this

subgroup 1: SET,WallSpawner,xmlspawner/dorespawn/true
subgroup 2: SETONSPAWN,WallSpawner,1/DELETE
subgroup 3: SETONSPAWN,WallSpawner,2/DELETE


and then let the sequence run. It would start by spawning all of your wall segments, and then on each tick it would delete the segments in the specified subgroup of the WallSpawner.

Note that you can put multiple entries into a single subgroup, so there are lots of ways that you could spawn/despawn different assortments of walls.

Take a look at godfoods puzzle bridge in the Files section. It is similar to this idea.

afonso- 01-25-2007
Thanks for the quick reply .I'll get right into it.

Btw, and totally off-topic (if you want I'll place a new topic) do you guys know where I can find scripts for SE and ML mounts for runUO 1.0 ?

ArteGordon- 01-25-2007
dont know