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!

Doom Lever Puzzel + Doom Poison Room

will_man

Sorceror
ok.....
@GoldDraco13: that is something to do with killing a monster with a weapon, i dont think its to dow ith this script.

@devilsam: there was a bug where i forgot to set the chest to movable false, i fixed that now, if you got the old version, update, if you have the new version can you please provide some more info for me.

@SphericalSolaris: GenGuardian.cs is not one of my scripts so.... you must have added something else.

@manofwar: you got them from this system? i will have a look at it tommorow when im more awake, probably to do with them not being serialised, i thought that would mean that htey arnt saved, but the server might try to load them ( how if they arnt saved... hmmmmm... ) and as there is no data to load for them it would just leave blank items? i have no idea, just grasping at straws as i cant see the core and how it saves.

also as they are not referenced will the system throw out thing not just pick them up ( unless they are in your Items arraylist which might pervent it from doing so ).

Let me think on this alittle, i will post again tommorow.
 
A

AdrianBloodrain

Guest
ok got the levers went in room bunch of gas so far working great.. But isnt there supose to be something to steal? im not sure did i do something worng or did u not make it spawn stealble rares? .. If im supose to set that up my self can some one help me out on that
 

smoksalot

Wanderer
post the old one back this new one dont work I get this from a fresh install of runuorco

Server Crash Report
===================

Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.HashtableEnumerator.MoveNext()
at Server.Items.DeleteingItem.Initialize()
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Server.ScriptCompiler.Compile(Boolean debug)
at Server.Core.Main(String[] args)

I think it has somethign to do with deleting something in the game before spawning it.. Anyone have any idea
 

manofwar

Sorceror
Ok now with new cs files shard wont start up!

ok i put the new cs files in and now it will load up to point right before the ip addresses show. It throws exception about not being able to delete the items that are null. So what im gonna do is try and get rid of items then load up new cs files and see if it still throws that exception. First got to figure out how to get rid of the items that are not items(levers,switches,and so on)before i can try your new cs files. I will get back at yas let you know if it worked. :confused: Just dont see how things get in that null map file? But if i can figure that out i think what you did will work fine :D


just noticed new post one up,^ thats what i am getting!
 

devilsam

Wanderer
I've used the lastest version .
when i go in the secret room , nothing happen .....
no chestbox , no posion , only a few lich running around.

I'm using RunuoPro...Any info. you need more?
 

devilsam

Wanderer
sorry..i type wrongly :p
is RunUO 1.0 RC0 ~~

I've download the one which you posted ,
however , it seems nothing changed for me :(

No Box in the posion room , only a few lich .
 

will_man

Sorceror
wrong room m8, thats the north most poison room, this is the one that is really small and doesnt have any spawn in it :)
 

devilsam

Wanderer
the room that i go have :

(1) many firehead inside around
(2) have a star in the centre of the room
(3) 2 bloody ankh
 

kodle

Wanderer
I hate to ask this because everything seems to work fine when I load up my server... What is the sequence to pushing levers to make sure it works?
 

Wyatt

Wanderer
On Stratics: "In addition the that the statues will give you a little clue about what you did wrong."
In your script:

if ( correct == 4 )
PublicOverheadMessage( 0, 0, false, "You may pass to the secret room" );
else
PublicOverheadMessage( 0, 0, false, "You only got " + correct.ToString() + ". The gate remains Closed" );

So, if we have 4 right levers, we'll get message? But where is information about directions of levers? f.e: if north lever is wrong, we'll get message that north is wrong and other levers right.
 

x-ray

Wanderer
I analyze your script alittle and its a pity to consider i has hurried with setting it up on my real shard...
Lets see the things i dont understand:

1. You create a DoomBox in the lamp room, but there is one thing - you forgot to make it non decay. As result after of hour there is no box in the room. As i see unimportant items decays too... Just override the decay... One line of code only...

2. I dont understand so many "if'"s in code, dont you think this TOO redundant ?

Code:
		public void CheckWanderer()
		{
[b]			if ( Wanderer == null )
				return;[/b]
			if ( this.Mobiles.Count == 0 )
			{
[b]				if ( Wanderer != null )
				{
					if ( !Wanderer.Deleted )
						Wanderer.Delete();
					Wanderer = null;[/b]
			                       }
			}
			for ( int i = 0; i < Mobiles.Count; ++i )
			{
				if ( Mobiles[i] is PlayerMobile )
				{
					if ( ((PlayerMobile)Mobiles[i]).AccessLevel == AccessLevel.Player && ((PlayerMobile)Mobiles[i]).CheckAlive() )
						return;
				}
			}
[b]			if ( Wanderer != null )
			{
				if ( !Wanderer.Deleted )
					Wanderer.Delete();
				Wanderer = null;
			}[/b]
		}

I think you can think a little and reoptimise this code even if this section is not critical.

3. I think this is unlogical to create the items EVERY initialization and DONT serealize them, only deserialize...

4. As i said before your script produce about 80-100 items (your leverpuzzle for example) at my shard with Map==null, i used [xmlfind command from ArteGordon xmlspawner2...

This is only quick analyze, i think there are other issue with this scripts...
 

will_man

Sorceror
x-ray: you seem to have the original version, there have been 2 upgrades since then, but if you have the newest version then, answers to your questions:

1. Movable = false on the box, hence it doesnt decay.
dito to Unimportant item.

2.
Code:
		public void CheckWanderer()
		{
			if ( Wanderer == null )
				return;
			if ( this.Mobiles.Count == 0 )
			{
				[b]if ( Wanderer != null )[/b]
				{
					if ( !Wanderer.Deleted )
						Wanderer.Delete();
					Wanderer = null;
			                      [b] }[/b]
			}
			for ( int i = 0; i < Mobiles.Count; ++i )
			{
				if ( Mobiles[ i ] is PlayerMobile )
				{
					if ( ((PlayerMobile)Mobiles[ i ]).AccessLevel == AccessLevel.Player && ((PlayerMobile)Mobiles[ i ]).CheckAlive() )
						return;
				}
			}
			[i]if ( Wanderer != null )
			{[/i]
				if ( !Wanderer.Deleted )
					Wanderer.Delete();
				Wanderer = null;
			[i]}[/i]
		}
you are right in that those in BOLD are not needed, the others in italics are, thats just abit of messy programming, and im sorry for that.

3. Serialising an item that has no properties is silly, as all a deserilise will do is load the defaul item ( hence you are serialising, which slows down the save, for no reason ). The things in Deserialising is the call to the base, which you may have seen as not being Item, ( its a custom base which is below ) which will DELETE all of the null references unon serverload, so i decided to make the LOAD longer and reduce the SAVE time, which in my opinion is better.

4. The latest version of the code stops the items from being null AFTER the world has loaded, so if you load up your world and look it should not have any items with map null ( they should have been removed automatically ).


@Wyatt:
Code:
		public static void DoAttempt()
		{
			int number = 0;
			Mobile Thief = PlayerAtPoint( Square5 );
			Mobile Player1 = PlayerAtPoint( Square1 );
			Mobile Player2 = PlayerAtPoint( Square2 );
			Mobile Player3 = PlayerAtPoint( Square3 );
			Mobile Player4 = PlayerAtPoint( Square4 );
			if ( Thief != null && Player1 != null && Player2 != null && Player3 != null && Player4 != null )
			{
				if ( Answer1 == Attempt1 )
					number++;
				if ( Answer2 == Attempt2 )
					number++;
				if ( Answer3 == Attempt3 )
					number++;
				if ( Answer4 == Attempt4 )
					number++;
				if ( number == 4 )
				{
					Thief.BoltEffect( 0 );
					StatuesTalk( 4 );
					ThiefTPortTimer t = new ThiefTPortTimer( Thief );
					t.Start();
				}
				else
				{
etc

this controls which ones were right and which were wrong.

I made this script from a bunch of screen shots from a website, i havent actually done it myself ( lack of an account ), but i was under the impression it told you how many you go right and nothing else? if it DOES infact tell you which ones were wrong then please tell me ( a screen shot would be wonderful ) so i can make it more accurate.

Any other questions/comments, please keep them coming :)

@x-ray: please do check my scripts as much as you want, it is this that will make it better ( you find for some reason when u check your own code unless there is a known problem, it all seems to look right :p )

as the only corrections from these posts have been the removal of a single IF statment i wont be updating the copy atm, but if something else occurs i will :)


- Will

*edit* Changed some grammar errors, make it half readable :p
 

x-ray

Wanderer
3. Serialising an item that has no properties is silly, as all a deserilise will do is load the defaul item ( hence you are serialising, which slows down the save, for no reason ). The things in Deserialising is the call to the base, which you may have seen as not being Item, ( its a custom base which is below ) which will DELETE all of the null references unon serverload, so i decided to make the LOAD longer and reduce the SAVE time, which in my opinion is better.

I dont think removing serializing of some items will much improve overal load time :)
Also this is a stream loading so everything are chached internaly and quick i think :)
This only my opinion sure...

@x-ray: please do check my scripts as much as you want, it is this that will make it better ( you find for some reason when u check your own code unless there is a known problem, it all seems to look right :p )

as the only corrections from these posts have been the removal of a single IF statment i wont be updating the copy atm, but if something else occurs i will

Not a single 'if' if check the code again ;) Anyway this is your choice - i just point to some strange code in my opinion.
 

brodock

Sorceror
not to mention that there is a problem with your "deletation" function...

Code:
 Server Crash Report
 ===================
 
 Operating System: Microsoft Windows NT 5.1.2600.0
 .NET Framework: 1.1.4322.573
 Time: 30/8/2004 22:23:03
 Mobiles: 21395
 Items: 223184
 Clients:
 - Count: 0
 
 Exception:
 System.Reflection.TargetInvocationException: Uma exceção foi acionada pelo destino de uma chamada. ---> System.InvalidOperationException: Coleção foi modificada; talvez a operação de enumeração não seja executada.
    at System.Collections.HashtableEnumerator.MoveNext()
    at Server.Items.DeleteingItem.Initialize() in c:\RunUO 1.0 RC0\Scripts\Custom\leverpuzzel.cs:line 388
    --- Fim do rastreamento de pilha de exceções internas ---
    at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
    at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at Server.ScriptCompiler.Compile(Boolean debug)
    at Server.Core.Main(String[] args)
 
Top