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!

A few basic questions!

Soulmancer

Sorceror
Here is a good question! How do you make it so certain NPC's will provide a service to red players. Such as banks, town vendors, healers and so forth. Similar to how the NPC's of Bucaneers Den function. Are these specific unique NPC's in buc's den? or do you just have to enable a specific property on the current NPC's?
 

Pure Insanity

Sorceror
Check in BaseVendor, imagine it restricts stuff based on where the vendor spawns. Never really bothered looking through. All npc's inherit this class though, so the most likely place for it to go.
 

Soulmancer

Sorceror
I can't seem to find anything in the BaseVendor.cs that relates to this exception other than this; if this is even related.

Code:
public virtual bool OnSellItems( Mobile seller, List<SellItemResponse> list )
        {
            if ( !IsActiveBuyer )
                return false;

            if ( !seller.CheckAlive() )
                return false;

            if ( !CheckVendorAccess( seller ) )
            {
                Say( 501522 ); // I shall not treat with scum like thee!
                return false;
            }
 

Soulmancer

Sorceror
Pretty simple; it's just guarded regions. NPC's will sell to a murderer outside of a guarded region. but not inside a guarded region...
 

Soulmancer

Sorceror
On my router for port forwarding is there anything specific I should to that will ensure players will connect?

Add port 2593 under TCP & UDP for IP address 192.168.0.100 ???

Also, why does my "toggleguarded" settings disable when I save and restart the server? I have enabled and disabled guarded zones in paticular areas but they all reset back to default when I shut the server down even when I save.
 

Talow

Sorceror
The toggleguarded is controled by the regeons(sp?) there's a bunch of xml. The command is more for testing or events.
 

Soulmancer

Sorceror
Great, that works is if you just add <guards disabled="true or false" /> in any given region.

I am also curious. In the same XML for regions <music name="value" /> where can I find a reference to these specific values for names of songs. I have tried just adding the names of the MP3's in the digital music directory like "Void" or "Honor" but it doesn't recognize them as valid names of songs. The only thing I can find that has any reference to music names is dawns music box
 

Thagoras

Sorceror
Music is a whole topic unto itself. It's funny how someone asks a question not long after I've figured it out. Like when someone brought up something about factions and maps and it had only been about a month since I figured it out so it was still fresh on my mind.

Music. This will require a core edit. RunUO, in its present state, only supports, I believe, 58 MP3s (The client and OSI support 88). It's found in the Region.cs file. These are all Enums so they can be called easily whenever you enter a region. It might be possible to add enumerations after they've been declared (so you could just edit the scripts, rather than the core) but I haven't found anything to support this. This is, of course, only suggested for those who are confident enough to edit the core. Alternately you could just edit the Config.txt.

The Config.txt file is found in the UO\Music\Digital folder. This is where the client determines what the MP3s actually are. It's an easy edit but it might make more sense to just rename your MP3s to match this file and then just call them up when you enter the corresponding region (as per the Regions.xml). Bear in mind that only your client will be playing the new MP3s reguardless...unless you copy your client data to all other clients on your server. ALSO, not all MP3s are equal. You may run into some which need to be as a certain bitrate. I have one that is playing funny and I'm not sure which yet as I haven't had time to hunt it down.
 

Soulmancer

Sorceror
So is it possible to replace any music on the list in the server/regions.cs file rather then trying to add new ones? Such as if I replaced tavern04 with Void, would that then make the Void.mp3 playable? As there is a lot of music on this list I probably wouldn't use so could I just customize it rather then adding new entries ay the bottom?

Edit: Just tried this and it still quotes a Could not parse server.musicname enum attribute duing server start up :( Yet it will still find tavern04 on the list if I attempt to use that entry even though I replaced it with Void... So this is essentially hardcoded?
 

Thagoras

Sorceror
You can replace any music. When you replace it in the server\regions.cs, you're merely changing how the server handles the mp3. In other words, it just makes it so we, scripters, can more easily choose which music is played by selecting a more descriptive name. When you change them in the config.txt file, you associate that reference with whatever mp3 you chose.

If I were to change tavern04 to void, this is what I'd do.
1. Edit server\region.cs and change tavern04 to void. and recompile the server.
2. Edit music\digital\config.txt and change tavern4 to void
3. Edit data\regions.xml and um....not sure what needs to be done here yet....maybe make the void region and associate the void music to it.
4. Edit dawns music box and change the reference to tavern04 to void. Additionally, you might need to change the cliloc references to tavern04, as Dawns music box uses it.

And, actually, that's about it.

IMPORTANT: Some references are hard coded into the client. DeathTune is hard coded at 42 and cannot change. I mean, you can chose whichever music you want for DeathTune, but when you die, #42 plays. Combat 38, 39, and 40 are hard coded, as is login.
 

Thagoras

Sorceror
Edit: Just tried this and it still quotes a Could not parse server.musicname enum attribute duing server start up Yet it will still find tavern04 on the list if I attempt to use that entry even though I replaced it with Void... So this is essentially hardcoded?

So what exactly did you do? I have this on the server I'm working on right now...but it's because I haven't updated the Regions.xml yet.
 

Soulmancer

Sorceror
I hadn't done anything with the config.txt; I was just changing the value in the regions.cs, though this does not seem to do anything... changing the config.txt file works, I guess this isn't an option though for the enhanced client since there is no music dir.
 

Thagoras

Sorceror
As I said, changing the region.cs merely aids us when we're scripting. If we change the mp3s and adjust the config.txt to match. So long as we remember what we've done, scripting the music is easy. The only thing that editing the region.cs can assist with is adding more music; up to 87 mp3s as this number seems to be hard coded in the client.
 

Soulmancer

Sorceror
Thanks for the info; moving to something unrelated. I am looking into Ilshenar champion spawns. Any idea how I can make it so Ilshenar champ spawns produce the power scrolls, also can make it so all 4 locations are random champions? I believe 2 of the champion spawns in Ilshenar are always the same.
 
Top