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!

(Nujel'm) Battle Chess

Blackette

Wanderer
I really don't even know how to play chess, but I have to say that just the clean writing and organization of the scripts has taught me more than ten tutorials.

I'm using this as a reference almost nightly. :)

Thanks!
 

sUpplier1

Wanderer
I found how to resolve the [decorate command crash.
I just renamed "Chessboard" to "Chessbrd" everywhere in the BattleChess scripts. That's all.
After that you can use [decorate command without any problems.

By the Battle Chess scritps, is awesome. Great work.
 

Broadside

Wanderer
Excellent! There have been peopleplayin chess more than anything the last few days...I had to set up a lot of boards so they do not have to wait in line....Its a big hit...
 

Arakon

Wanderer
Serious BUG

First off, your script is AWESOME. I was so surprised as I saw that even en passant was included. There is one mayor bug in it though who is easily abusable.
Maybe it has been reported or fixed already, but if not, I will state it again:

If you are in check you can still check-mate the enemy. So instead of removing the threat against your king you just check the enemy king. If the resulting situation would be a check mate for the enemy, you win the game even if you have been in check first and did not do nothing against it.

If this could be fixed that would be awesome.

Arakon
 

manofwar

Sorceror
Great Script!

man was just gonna post about the decorate error but the post above fixed it quick,thanks man, and thank you for such a great script!! :)
 
Arya said:
Who added a chessboard to the decoration command anyway? It's not supposed to be there, not to mention that the Chessboard class is NOT an item, therefore it cannot be used for decoration.

Edit: I see where the problem comes from. Possibly the decorate command looks for the Chessboard type without using the full name (Server.Items.Chessboard - the regular chessboard). For now you must uninstall the chess script before doing the decoration. I'll see into changing the class name later on.

Arya,

Great piece of work. I was curious to know if there was a fix for this problem. I removed the system, saved, restarted the server without the chess system, ran decorate and the crash happened again (same crash code as the before

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

Operating System: Microsoft Windows NT 5.1.2600.0
.NET Framework: 1.1.4322.573
Time: 9/26/2004 7:40:49 PM
Mobiles: 34379
Items: 447843
Clients:
- Count: 1
+ 192.168.1.101: (account = master) (mobile = 0x1 'Shard Administrator Adam')

Exception:
System.Exception: Bad type: Arya.Chess.Chessboard ---> System.MissingMethodException: No parameterless constructor defined for this object.
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at Server.Scripts.Commands.DecorationList.Construct()
--- End of inner exception stack trace ---
at Server.Scripts.Commands.DecorationList.Construct()
at Server.Scripts.Commands.DecorationList.Generate(Map[] maps)
at Server.Scripts.Commands.Decorate.Generate(String folder, Map[] maps)
at Server.Scripts.Commands.Decorate.Decorate_OnCommand(CommandEventArgs e)
at Server.Commands.Handle(Mobile from, String text)
at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)


Thanks,

Adam
 
sUpplier1 said:
I found how to resolve the [decorate command crash.
I just renamed "Chessboard" to "Chessbrd" everywhere in the BattleChess scripts. That's all.
After that you can use [decorate command without any problems.

By the Battle Chess scritps, is awesome. Great work.

*Grins sheepishly*

I forgot to look up :D
 

Arya

Wanderer
Just posted an update, here's what's new:

- Refactored the Chessboard class to BChessboard. This will prevent the crash occuring when using the [Decorate command.
- NPCs will be now ejected from the chessboard
- Fixed crash occuring when staff would delete a pawn in the middle of its promotion
- If the winner has no backpack they will not receive their winning certificate
- You can no longer check mate your enemy and win the game, while being checked yourself.
- Players can choose the preferred chess set when starting a game.

Hopefully this should address all the issues emerged since the last update. As usual, all feedback is appreciated :)
 

ditmar

Wanderer
Just encountered a new crash :

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Arya.Chess.ChessGame.AcceptGame(Mobile guest)
at Arya.Chess.StartGameGump.OnResponse(NetState sender, RelayInfo info)
at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
 

Karami

Wanderer
Code:
Server Crash Report
===================

Operating System: Microsoft Windows NT 5.1.2600.0
.NET Framework: 1.1.4322.573
Time: 11/19/2004 23:33:26
Mobiles: 1997
Items: 55769
Clients:
- Count: 7

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.SectorEnumerator.MoveNext()
   at Server.TypedEnumerator.MoveNext()
   at Server.Mobile.ProcessDelta()
   at Server.Effects.SendMovingParticles(IEntity from, IEntity to, Int32 itemID, Int32 speed, Int32 duration, Boolean fixedDirection, Boolean explodes, Int32 hue, Int32 renderMode, Int32 effect, Int32 explodeEffect, Int32 explodeSound, EffectLayer layer, Int32 unknown)
   at Server.Effects.SendMovingParticles(IEntity from, IEntity to, Int32 itemID, Int32 speed, Int32 duration, Boolean fixedDirection, Boolean explodes, Int32 hue, Int32 renderMode, Int32 effect, Int32 explodeEffect, Int32 explodeSound, Int32 unknown)
   at Server.Mobile.MovingParticles(IEntity to, Int32 itemID, Int32 speed, Int32 duration, Boolean fixedDirection, Boolean explodes, Int32 effect, Int32 explodeEffect, Int32 explodeSound)
   at Server.Spells.Third.FireballSpell.Target(Mobile m)
   at Server.Spells.Third.InternalTarget.OnTarget(Mobile from, Object o)
   at Server.Targeting.Target.Invoke(Mobile from, Object targeted)
   at Server.Network.PacketHandlers.TargetResponse(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
I think this crash is related to this script as this was the only thing being used on the shard when it crashed. Anyone got any pointers on how to solve this?
 

Arya

Wanderer
I honestly don't see how this can be related to the chess script. The crash occurred when someone cast a fireball spell on someone else, there is no code in my script that fiddles with spells.
 

ditmar

Wanderer
ditmar said:
Just encountered a new crash :

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Arya.Chess.ChessGame.AcceptGame(Mobile guest)
at Arya.Chess.StartGameGump.OnResponse(NetState sender, RelayInfo info)
at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)

Crashed on this again, last night and this night.
 

otimpyre

Sorceror
Best ever

Just want to say this is the best script ive seen. Ever gonna make checkers? :p If my staff and I ever get bored we always have chess. I changed the itemids and made the boards more gothic and customized the controllers for a eye popping WoW from the players. I love all the options that come with the controller in props.
 

ditmar

Wanderer
Sadly i have just encountered a new crash.

Code:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Arya.Chess.BChessboard.PushGame(ChessColor nextMoveColor, Move move)
   at Arya.Chess.BChessboard.OnMoveOver(Move move)
   at Arya.Chess.BaseChessPiece.OnMoveOver()
   at Arya.Chess.ChessMobile.OnLocationChange(Point3D oldLocation)
   at Server.Mobile.SetLocation(Point3D newLocation, Boolean isTeleport)
   at Server.Mobiles.BaseCreature.SetLocation(Point3D newLocation, Boolean isTeleport)
   at Server.Mobile.Move(Direction d)
   at Server.Mobiles.BaseAI.DoMoveImpl(Direction d)
   at Server.Mobiles.BaseAI.DoMove(Direction d, Boolean badStateOk)
   at Server.Mobiles.BaseAI.DoMove(Direction d)
   at Server.Mobiles.BaseAI.DoActionWander()
   at Server.Mobiles.MeleeAI.DoActionWander()
   at Server.Mobiles.BaseAI.Think()
   at Server.Mobiles.AITimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)
 

sirens song

Wanderer
On the first move, The npc walks to the waypoint, and goes 1 tile ahead of where he should stop, Then he pauses and walks off, to wherever he feels like it.
Perhaps Im doing something wrong?
 

otimpyre

Sorceror
Seen this bug

You have the board built on top of sumthing. Find a nice flat static free area. Like off the map like mine is or green acres. Then try. Stuff like hills ect mess up their pathing it seems.
 

sirens song

Wanderer
really

theres no hills, but i did set the map to +1 z over the level ground, Because I thought that it would build a tile board for me, And I always pit tiles 1 tile up so they never sink into the floor like carpents and rugs. Ill try it out again when I get home. Thanks for the info.
-Jamie
 

Anvil

Wanderer
Sirens Song, I too had the same problem with the way the NPC acted when you try to setup the board in Nu'Jelm where you are placing it on an existing chessboard. My only solution was to find a flat area and let the system setup the board and players itself.

Anvil
 
Top