Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Releases

Custom Script Releases This forum is where you can release your custom scripts for other users to use.

Please note: By releasing your scripts here you are submitting them to the public and as such agree to make them public domain. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO.

Reply
 
Thread Tools Display Modes
Old 02-08-2007, 04:53 AM   #76 (permalink)
Forum Novice
 
Prohor Meletevich's Avatar
 
Join Date: Jan 2006
Location: Ashkelon, Israel
Age: 27
Posts: 143
Send a message via ICQ to Prohor Meletevich Send a message via Skype™ to Prohor Meletevich
Default

Quote:
Originally Posted by ABTOP View Post
Please somebody explaim to me WHERE i need change map and mobile.cs???? What is it a files? I cant found they....
This is a core mod. So you need to have RunUO core files to modify it. Download it from the site or install SVN software to download latest SVN release.
Prohor Meletevich is offline   Reply With Quote
Old 02-08-2007, 05:18 AM   #77 (permalink)
Forum Expert
 
Pyro-Tech's Avatar
 
Join Date: Oct 2003
Location: Carbondale, IL
Age: 24
Posts: 1,805
Send a message via MSN to Pyro-Tech
Default

is there any way to make this apply to NPC's too? or do they run under a LOS system as it is??
__________________

Pyro-Tech is offline   Reply With Quote
Old 02-08-2007, 10:21 PM   #78 (permalink)
Forum Novice
 
ABTOP's Avatar
 
Join Date: Sep 2006
Location: Ukraine
Posts: 930
Default

Quote:
Originally Posted by Prohor Meletevich View Post
This is a core mod. So you need to have RunUO core files to modify it. Download it from the site or install SVN software to download latest SVN release.
Please can you give me link what i need load because i never use SVN and i dont know what need load...
ABTOP is offline   Reply With Quote
Old 02-09-2007, 04:58 PM   #79 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

<i>is there any way to make this apply to NPC's too? or do they run under a LOS system as it is??</i>

You want the NPC's to have limited visibility? Or you want the players to not see NPC's? For the latter, the system is already in place, and I recall can be configured. I do recall toying around with NPC-to-PC LOS. This isn't as bad as it sounds, because generally any NPC lossing a PC represents a PC that will have to LOS the NPC. With the cacheing mechanism it's kind of a wash. I have been totally swamped at work, but my memory tells me that there might actually be a config option in the Xml file...

C//
Courageous is offline   Reply With Quote
Old 02-20-2007, 06:41 AM   #80 (permalink)
Forum Novice
 
Join Date: Jul 2005
Location: Finland! <3<3
Age: 17
Posts: 116
Default

When i try to compile i get:

Code:
Error	1	Operator '!' cannot be applied to operand of type 'void'	D:\Mobile.cs	3749	14	Server
Error	2	Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' to 'System.Collections.Generic.List<Server.Gumps.Gump>'. An explicit conversion exists (are you missing a cast?)	D:\Mobile.cs	6512	24	Server
Error	3	'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' does not contain a definition for 'Remove'	D:\Mobile.cs	6551	24	Server
Error	4	Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' to 'System.Collections.Generic.List<Server.Gumps.Gump>'. An explicit conversion exists (are you missing a cast?)	D:\Mobile.cs	6579	24	Server
Error	5	'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' does not contain a definition for 'Remove'	D:\Mobile.cs	6592	16	Server
Error	6	Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' to 'System.Collections.Generic.List<Server.Gumps.Gump>'. An explicit conversion exists (are you missing a cast?)	D:\Mobile.cs	6621	24	Server
__________________
All i can do is this.

Last edited by D-Eagle; 02-20-2007 at 07:18 AM.
D-Eagle is offline   Reply With Quote
Old 02-20-2007, 07:45 PM   #81 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

D:\Mobile.cs is definitely not the right place for Mobile.cs

This is a core mod. It's tricky.

You need to have the original source code for the runuo executable. Part of the source replaces a couple of key runuo classes, part of it is unique.

C//
Courageous is offline   Reply With Quote
Old 02-21-2007, 03:52 AM   #82 (permalink)
Forum Newbie
 
Kissakoira's Avatar
 
Join Date: Aug 2006
Age: 23
Posts: 44
Default

I have the SVN version of the core source.
I made the core project file with that one project program.
When i tryed to compile, it whined that D:\mobile.cs and some other scripts doesn't exist, so i moved those scripts to my D:\ root.
Kissakoira is offline   Reply With Quote
Old 02-21-2007, 10:19 PM   #83 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

What is the "it" that whined?

You must follow the instructions given.

Mobile.cs cannot go in D:, it must go in the core source directory. It's been a while, so it's not clear to me that it is compatible with the most current version of svn. Possibly not. At a minimum this works against the release version of source code.

The required edits are all prominently marked.

C//
Courageous is offline   Reply With Quote
Old 02-21-2007, 10:48 PM   #84 (permalink)
Forum Novice
 
Join Date: Nov 2003
Age: 33
Posts: 208
Send a message via ICQ to Gembone Send a message via AIM to Gembone Send a message via MSN to Gembone
Default

I know this works up to rev 93-94. but has problems with the latest svn that have to be manually worked out before the core will compile.
__________________
Death comes for us ALL

Last edited by Gembone; 02-21-2007 at 10:50 PM.
Gembone is offline   Reply With Quote
Old 02-21-2007, 10:53 PM   #85 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

When I get back into it, I'll touch 'er up. May be a while yet. We're rehearsing for orals on that big proposal I was talking about. Lots of overtime and what not. Plus, I've been playing Medieval II: Total War.

C//
Courageous is offline   Reply With Quote
Old 02-22-2007, 11:04 AM   #86 (permalink)
Forum Novice
 
Join Date: Dec 2005
Posts: 206
Default

I have a q.

Can this be set up in such a way that it can be activated only for a region and only during a certain event? I guess it can, if it is a function as I think.. I could change it to something like
Code:
public bool InTrueLOS(Mobile x, Mobile y)
{
    if( x.Region is EventRegion && ((EventRegion)x.Region).EventRunning )
        //courageous code....
    
    return InLOS( x, y );
}
I think this should be doable.. am I right? It would be an interesting scenario for some events

<3
__________________
11010101 me.
the nico is offline   Reply With Quote
Old 02-22-2007, 06:25 PM   #87 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

It surely could, but it was danged hard figuring out all the correct insertion points, and when even one of them is off, the system malfunctions in terrible ways. One player being able to see one, and not vice versa, is a major system meltdown. I believe the system can have LOS turned on and off dynamically, by the way. While this is global, how big is your server anyway?

C//
Courageous is offline   Reply With Quote
Old 02-23-2007, 09:56 AM   #88 (permalink)
Forum Expert
 
Kenko's Avatar
 
Join Date: Dec 2004
Location: Land of the Poor
Posts: 1,828
Send a message via MSN to Kenko
Default

About 60 onlines average.. (I'm the nico, old acct) why?

btw,..

Code:
        for( int j = 0; j < m_SpiralPattern.Length; j++)
        {
            int xOffset = m_SpiralPattern[j][0];
            int yOffset = m_SpiralPattern[j][1];

            int x       = locX + xOffset;
            int y       = locY + yOffset;

            //------------------------------------------------------------------
            //  the spiral pattern could make us walk off the edge of the
            //  map; break out of that here:
            //------------------------------------------------------------------

            if( x < 0 || x > m_map.Width || y < 0 || y > m_map.Height )
                goto cutpoint;

            //------------------------------------------------------------------
            //  Here we optimize by skipping the pulling up of tiles in the
            //  event we are in a shadow; it turns out that in certain diagonal
            //  'L' cases (corners), this doesn't work perfectly, hence the check
            //  for matching abs. x/y offsets ... we don't cut point those.
            //------------------------------------------------------------------

            if  ( 
                    !v.IsVisible( beholder, x, y )
                    &&
                    Math.Abs( xOffset - yOffset ) <= 1
                )
                goto cutpoint;

            //------------------------------------------------------------------
            //  Now process statics:
            //------------------------------------------------------------------

            Tile[] staticTiles = m_map.Tiles.GetStaticTiles( x, y, true );

            foreach( Tile staticTile in staticTiles )
            {
                if( TileBlocksVis( staticTile, eyelevel, x, y, beholder ) ) 
                {
                    v.ProcessObstructionAt( beholder, x, y );
                    goto cutpoint; // further obstructions irrelevant
                }
            }

            //------------------------------------------------------------------
            //  Now process land:
            //------------------------------------------------------------------

            Tile landTile = m_map.Tiles.GetLandTile( x, y );

            if( LandBlocksVis( landTile, x, y, eyelevel+5, beholder ) )
            {
                v.ProcessObstructionAt( beholder, x, y );
                goto cutpoint; // further obstructions irrelevant
            }

            //------------------------------------------------------------------
            //  Now process "invalid" tiles (the black areas in dungeons):
            //------------------------------------------------------------------

            if( IsVizBlockingInvalidLand( landTile, staticTiles, x, y ) )
            {
                v.ProcessObstructionAt( beholder, x, y );
                goto cutpoint; // further obstructions irrelevant
            }

            //------------------------------------------------------------------
            //  Items left deliberately out here (that's a follow up stage)
            //------------------------------------------------------------------
            
            //------------------------------------------------------------------
cutpoint:;  // sorry about the evil goto; please leave this alone for now
            // think of it this way; this is like a destionation for "continue",
            // where code can be if needed.
            //------------------------------------------------------------------
why not use else if and elses instead of a goto!?!

Last edited by Kenko; 02-23-2007 at 09:58 AM.
Kenko is offline   Reply With Quote
Old 02-23-2007, 02:43 PM   #89 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

why not use else if and elses instead of a goto!?!

Don't believe everything your professor tells you.

You might wish to read the original work that started it all, "Go To Statement Considered Harmful," by Edsger W. Dijkstra:

Go To Statement Considered Harmful

You'll note in the original work not all cases of goto were recommended to be avoided, in spite of your professor's abridged retelling of Dijkstra's words; in particular, the "abortion" case (also known as "fall through") is still, today, considered a clean (and clear, to the reader) use of goto.

C//
Courageous is offline   Reply With Quote
Old 02-24-2007, 04:18 AM   #90 (permalink)
Forum Newbie
 
Kissakoira's Avatar
 
Join Date: Aug 2006
Age: 23
Posts: 44
Default

Quote:
Originally Posted by Courageous View Post
What is the "it" that whined?

You must follow the instructions given.

Mobile.cs cannot go in D:, it must go in the core source directory. It's been a while, so it's not clear to me that it is compatible with the most current version of svn. Possibly not. At a minimum this works against the release version of source code.

The required edits are all prominently marked.

C//

The core compiles fine without the LOS changes, and i use the latest SVN version.
Is there any way someone could make it work with the latest SVN?
Kissakoira is offline   Reply With Quote
Old 02-24-2007, 01:50 PM   #91 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

The correct way to do this has always been to look into the two replacement files and find the well marked edits and move them over the most recent stuff in svn. You may wish to try winmerge. It's pretty good.

(you'll notice that all the LOS changes are very well marked in the files).
Courageous is offline   Reply With Quote
Old 09-30-2007, 02:17 PM   #92 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

Updated to 1.4B. Fixes an issue where items in a players pack with Visible==FALSE were being inappropriately displayed.
Courageous is offline   Reply With Quote
Old 09-30-2007, 06:48 PM   #93 (permalink)
Newbie
 
Join Date: Mar 2006
Posts: 30
Default

would like to know which shard is using it so could see it in action on live shard. if cant post here private msg me?
JeBu is offline   Reply With Quote
Old 09-30-2007, 06:56 PM   #94 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

I know there are people using it, I just don't know their shards.

C//
Courageous is offline   Reply With Quote
Old 10-05-2007, 05:03 PM   #95 (permalink)
Forum Novice
 
sicron's Avatar
 
Join Date: Jun 2003
Location: hudson valley ny
Age: 38
Posts: 442
Default

Just a crazy little question...
Does anyone know if this will work on 1.0?
Im sure it could probably be made to work with it, but Im just curious if anyone has attempted it and what results they had...
This is something I would really love to add to my server, but I know there are a great deal of differences between the 1.0 and 2.0 (insert svn or rc# here), which is the reason why I havent upgraded to 2.0. I have way too many mods to even consider moving to 2.0...
I dont have any reservations about modding the core files, I just wouldnt want to spend months of rewriting code and researching things that work in one version but not another...
Thanks
Sciron
__________________
I dont hate all people...just stupid people...it just turns out most people are stupid!

Trying hard to fight the urge to come back to UO!... Too late... I'm back!
sicron is offline   Reply With Quote
Old 10-05-2007, 06:02 PM   #96 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

Does anyone know if this will work on 1.0?

It won't even compile on 1.0. It makes use of language features from later version of C#; its use of these features isn't easily substituted. To change it, and have the same level of efficiency, I would have to generate CLR instruction codes directly (like a compiler). It's the anonymous delegates that are the main problem.

C//
Courageous is offline   Reply With Quote
Old 10-05-2007, 07:35 PM   #97 (permalink)
Forum Novice
 
sicron's Avatar
 
Join Date: Jun 2003
Location: hudson valley ny
Age: 38
Posts: 442
Default

*sigh*
such is the story of my life

Well... I guess on the positive side of things... it does tend go give me more of a reason to attempt to convert the shard to 2.0... not gonna happen any time in the near future... but still an added reason to move up
__________________
I dont hate all people...just stupid people...it just turns out most people are stupid!

Trying hard to fight the urge to come back to UO!... Too late... I'm back!
sicron is offline   Reply With Quote
Old 10-05-2007, 08:28 PM   #98 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

Quote:
Originally Posted by sicron View Post
*sigh*
such is the story of my life

Well... I guess on the positive side of things... it does tend go give me more of a reason to attempt to convert the shard to 2.0... not gonna happen any time in the near future... but still an added reason to move up
It's probably not that much work to get RUNUO 1.0 to compile under C# 2.0. After that, the hooks into Mobile.cs and Map.cs would probably be a bit off, but not by much. It's the C# 2.0 part that is required. I think I recall compiling Runuo 1.0 under C# 2.0 before Runuo 2.0 was out...

C//
Courageous is offline   Reply With Quote
Old 10-20-2007, 01:59 PM   #99 (permalink)
Lurker
 
Join Date: Mar 2006
Posts: 2
Default

Is there a way I could isolate certain mobs to be uneffected by TrueLOS?

I'd like to enable it for mobs but I think certain predatory monsters ought to not be fooled as easily as ducking behind a corner, where as most arnt really equipped to sniff out a player.

Or if not, could you recomend an edit to the BaseAI to make them pursue the last known location of their focus mob?
Steelcap is offline   Reply With Quote
Old 10-20-2007, 08:36 PM   #100 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

Quote:
Originally Posted by D-Eagle View Post
When i try to compile i get:

Code:
Error    1    Operator '!' cannot be applied to operand of type 'void'    D:Mobile.cs    3749    14    Server
Error    2    Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' to 'System.Collections.Generic.List<Server.Gumps.Gump>'. An explicit conversion exists (are you missing a cast?)    D:Mobile.cs    6512    24    Server
Error    3    'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' does not contain a definition for 'Remove'    D:Mobile.cs    6551    24    Server
Error    4    Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' to 'System.Collections.Generic.List<Server.Gumps.Gump>'. An explicit conversion exists (are you missing a cast?)    D:Mobile.cs    6579    24    Server
Error    5    'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' does not contain a definition for 'Remove'    D:Mobile.cs    6592    16    Server
Error    6    Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' to 'System.Collections.Generic.List<Server.Gumps.Gump>'. An explicit conversion exists (are you missing a cast?)    D:Mobile.cs    6621    24    Server
While I am not at home and cannot therefore check the code, I do know it compiles. I therefore wonder if you are using runuo 2 rc 1 and have a recent dotnet compiler.

C//
Courageous is offline   Reply With Quote
Reply

Bookmarks