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!

[RunUO 2.0 RC1] XmlSpawner2

Status
Not open for further replies.

tass23

Page
XMLSpawners can spawn containers with a spawner inside that will spawn something. Setting the skeleton to be double-clicked I believe is going to require a special script to make it clickable. Check out some of the other clickable item scripts for a better idea of what I mean. You might even find a good example in there.

As for the speech triggered spawner, do all of the above, just leave Set Item and TriggerOnCarried null and set the SpeechTrigger to the text you want to activate the spawner.
 

Erucid

Sorceror
yeah, anything you can change in props you can do with xmlspawner. look through arte's forums in the link i posted a couple of posts ago.
I'm not seeing the link you are referring to. Unless it is to arte's forum. And I did search there. I don't see anything about the syntax to add a random attribute to an item like ARMOR,1,3 but a specific item like katana,1,2. Unless katana has to be capital also...?
 
I'm not seeing the link you are referring to. Unless it is to arte's forum. And I did search there. I don't see anything about the syntax to add a random attribute to an item like ARMOR,1,3 but a specific item like katana,1,2. Unless katana has to be capital also...?
some searches through the xmlspawnerfan forum might help you get more of a feel for the proper wording for a lot of stuff, just make sure if you use the search function on that forum set the "Search posts from..." is set to any date
the blue words click on there
 
XMLSpawners can spawn containers with a spawner inside that will spawn something. Setting the skeleton to be double-clicked I believe is going to require a special script to make it clickable. Check out some of the other clickable item scripts for a better idea of what I mean. You might even find a good example in there.

As for the speech triggered spawner, do all of the above, just leave Set Item and TriggerOnCarried null and set the SpeechTrigger to the text you want to activate the spawner.

where are these clickable item scripts at is there a serten place they would be located?
 

Phr3d13

Sorceror
RNDLIST, not sure as to the exact syntax for your case, but hiryu/hue/RNDLIST,333,444,555 will spit out hiryus in those three colors or hiryu/name/RNDLIST,Curly,Moe,Larry will randomly spit out hiryus named either Curly, Moe, or Larry
 

tass23

Page
dagriz011679 said:
where are these clickable item scripts at is there a serten place they would be located?
dagriz, check out any script that involves something you click, or double click in this case. Try something like ClockworkAssembly.cs (Scripts->Items->Misc), basically you're just looking for the OnDoubleClick method. It starts around line 26. Get a feel for how that looks and how it works. That should point you in the right direction. Towards the end of that method, you'll see where all the items get combined and spawn the Golem into the world around line 105. It's very possible that's the only section you need.
 

tass23

Page
Add it to the spawner. You'll need to know the type and direction in order to do it though. Like MetalDoor NorthCCW.
 
tass you are saying for my skeleton i need to make a script for it something along the lines of
Code:
[Constructable]
        public skeleton() : base( 0x#### )
                {
                  Weight = 5.0;
                  Hue = ####;
                }
and so on and so forth till i get a working dbl clickable skeaton
 

tass23

Page
Not exactly. Here's what you should really focus on:
Code:
     Golem g = new Golem( true, scalar );
     if ( g.SetControlMaster( from ) )
     {
      Delete();
      g.MoveToWorld( from.Location, from.Map );
      from.PlaySound( 0x241 );
     }
This is the code that brings forth the golem and puts it in the world. I used this as a basis for a script I put together for creating an item my players need to enter a dungeon:
Code:
    {
     RainbowToken r = new RainbowToken(); //This is the new item that is created and drop on the ground next to the player.
     r.MoveToWorld( from.Location, from.Map );
     from.PlaySound( 0x241 );
     break;
    }
Looks familiar, right? Very similar to the Golem creation, but it doesn't involve any skills to make the item, nor does the created item have a master, so those things were left out. I would think you could just as easily have the above chunk of code and change it to a skeleton. It can even be the distro skeleton, no need to create a new one.
 

Erucid

Sorceror
some searches through the xmlspawnerfan forum might help you get more of a feel for the proper wording for a lot of stuff, just make sure if you use the search function on that forum set the "Search posts from..." is set to any date
the blue words click on there
I searched on that site and can find no specifics on how I can get "katana,1,3" to work. i tried making katana all caps. :-(
 

tass23

Page
Yeah, I dunno if there is a metaldoor, that was just an example you could try. Place a door using the [adddoor gump, then [props it and get the info from it, then add that to the spawner with the proper facing. That should do it.
 

Phr3d13

Sorceror
I searched on that site and can find no specifics on how I can get "katana,1,3" to work. i tried making katana all caps. :-(

cause you can't do it like that, you might be able to do a "WEAPON,1,3" or "katana/maxdamage/20/mindamage/10/attributes.luck/RND,10,15"
 

Erucid

Sorceror
or script them with the bonuses and just have the xmlspawner spawn it

I thought about scripting it...
http://www.runuo.com/community/threads/how-do-i-add-random-magic-attributes-to-items.477262/#post-3704865
But I ran into a wall there too.

cause you can't do it like that, you might be able to do a "WEAPON,1,3" or "katana/maxdamage/20/mindamage/10/attributes.luck/RND,10,15"
Ahh, see that is not what I want to do. I'm still looking for a way to spawn simply randomly assigned attributes, but to specific items.

It is starting to look like I'm going to have to do something like what you suggest.
like
bag/ADD,0.1/<katana/maxdamage/20/mindamage/10/attributes.luck/RND,10,15>
bag/ADD,0.1/<katana/maxdamage/20/mindamage/10/attributes.hitchanceincrease/RND,10,15>
etc for each item and attribute. Which can be very time consuming in that stupid little book.

Which brings up another question. I can open my /runuo/devel/XmlQuestNPC/NPCname.npc files with a text editor and modify stuff. It is much easier to add bulk items or copy and paste things than using the in game [xmledit. How can I do a similar thing with an xmlspawner? Where are those files kept? If I could copy and paste the above lines in a text editor it would be quicker and easier.
 

Erucid

Sorceror
Yeah, I dunno if there is a metaldoor, that was just an example you could try. Place a door using the [adddoor gump, then [props it and get the info from it, then add that to the spawner with the proper facing. That should do it.
the type is 'basedoor' but I can't spawn that with xmlspawner. :-(
syntax is half the battle
 

Phr3d13

Sorceror
I thought about scripting it...
http://www.runuo.com/community/threads/how-do-i-add-random-magic-attributes-to-items.477262/#post-3704865
But I ran into a wall there too.

Ahh, see that is not what I want to do. I'm still looking for a way to spawn simply randomly assigned attributes, but to specific items.

It is starting to look like I'm going to have to do something like what you suggest.
like
bag/ADD,0.1/<katana/maxdamage/20/mindamage/10/attributes.luck/RND,10,15>
bag/ADD,0.1/<katana/maxdamage/20/mindamage/10/attributes.hitchanceincrease/RND,10,15>
etc for each item and attribute. Which can be very time consuming in that stupid little book.

Which brings up another question. I can open my /runuo/devel/XmlQuestNPC/NPCname.npc files with a text editor and modify stuff. It is much easier to add bulk items or copy and paste things than using the in game [xmledit. How can I do a similar thing with an xmlspawner? Where are those files kept? If I could copy and paste the above lines in a text editor it would be quicker and easier.

you can copy/paste/type them all out into a text editor, then copy/paste them into the book
 

tass23

Page
Erucid said:
the type is 'basedoor' but I can't spawn that with xmlspawner. :-(
No, that's not right. Each DOOR is a basedoor. If you open Doors.cs you'll see ALL the doors listed in there, and at the top it will showing you the different facing values as well. If you wanted to spawn a short iron gate it would be:
IronGateShort/facing/WestCW.
 
Status
Not open for further replies.
Top