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!

Simple Player Dueling.

Alex21

Sorceror
jeremias123;817766 said:
thx for reply
srry for my bad eng
player continue BLUE
how i can make enemy.. where i set script?



in other arena



CAN YOU SEND ME SCRIPT?

Have you made the correct changes specified for Misc/Notoiriety.cs?
 

jeremias123

Wanderer
Alex21;818037 said:
Have you made any other mods to the script?

send me your copy of the script files, either via pm or to [email protected].

thx again
im using runuo 2.0 RC2
i copied deluings folder to script folder
and configured arena .. my configs are right but duel script doesn't make enemy status in arena
srry .. my eng is bad

in onsite duel funct enemy status
 

Attachments

  • Dueling.rar
    32.2 KB · Views: 16
  • Notoriety.cs
    16.8 KB · Views: 11

nadious

Sorceror
Alex,

Great looking package here. I do have a question, though. I've looked (and perhaps I overlooked it on accident), but I'm not sure on the following:

I'm running Cal2k's UO package (SVN #101). I've got the scripts to compile just fine without any problems. I've added my controller and set my props, rebooted the server.

What are the functions (differences) between 'SpawnMap', 'SpawnPoint' and 'ThisRegionMap' and 'ThisRegionPoint'?

I've got the controller setup in the dueling pit, do I need to define BOTH of these sets of values? Or, just one? I'm not sure what the difference between them are.
 

Alex21

Sorceror
nadious;818169 said:
Alex,

Great looking package here. I do have a question, though. I've looked (and perhaps I overlooked it on accident), but I'm not sure on the following:

I'm running Cal2k's UO package (SVN #101). I've got the scripts to compile just fine without any problems. I've added my controller and set my props, rebooted the server.

What are the functions (differences) between 'SpawnMap', 'SpawnPoint' and 'ThisRegionMap' and 'ThisRegionPoint'?

I've got the controller setup in the dueling pit, do I need to define BOTH of these sets of values? Or, just one? I'm not sure what the difference between them are.

Its been a long time since i wrote it, to be honest i don't remember. I believe you would have to set everything though.
 

nadious

Sorceror
You are correct. The Region parts are to define the fighting arena region, while the spawn points are where you actually come into the arena to fight.

I am running into one small problem, though:

If a duel takes place, whoever attacks first (if both players were blue at the beginning of duel acceptance) gets flagged as a criminal and when the duel is over, if the loser of the duel didn't go aggro first, then he / she can report the winner as a murder. I have done this twice now.

Any ideas on what would cause that? I've looked through here and I haven't been able to find anyone that is having that same issue.

I'm running Cal2k's SVN (#101), which is RunUO SVN #429 and ML #53.
 

Murzin

Knight
its very simple, DO NOT EDIT NOTO

some methods you SHOULD be using:
mobile.cs

(static) AllowHarmfulHandler AllowHarmfulHandler( get; set; )
List<AggressorInfo> Aggressed( get; )
List<AggressorInfo> Aggressors( get; )
Mobile Combatant( get; set; )
virtual void AggressiveAction( Mobile aggressor, bool criminal )
virtual bool CanBeHarmful( Mobile target, bool message, bool ignoreOurBlessedness )
virtual void DoHarmful( Mobile target, bool indirect )

playermobile.cs
virtual bool CanBeHarmful( Mobile target, bool message, bool ignoreOurBlessedness )


now, what would be the best way to do this?

1) create a tile that whomever walks over or double clicks it, it flags them criminal
a) easily controlled because must be placed by staff
b) cannot claim ignorance if the tile is hued/named/graphiced appropriately
c) can peform many checks such as inventory checks
d) removes ability to report murders

2) edit notoriety.cs
a) distro file, on any "official" update would require merging code
b) code is "always on" and unable to be shut off
c) numerous systems modify this file, can be very complicated

3) create a region type that whoever enters or performs harmful action, flags them as criminal before any checks/damage done
a) requires no distro edits, preseves upgradeability and independant method
b) easy to implement but harder than tile method above
c) using criminal timer prevents murdercounts
 

Alex21

Sorceror
Murzin;818269 said:
its very simple, DO NOT EDIT NOTO

some methods you SHOULD be using:
mobile.cs

(static) AllowHarmfulHandler AllowHarmfulHandler( get; set; )
List<AggressorInfo> Aggressed( get; )
List<AggressorInfo> Aggressors( get; )
Mobile Combatant( get; set; )
virtual void AggressiveAction( Mobile aggressor, bool criminal )
virtual bool CanBeHarmful( Mobile target, bool message, bool ignoreOurBlessedness )
virtual void DoHarmful( Mobile target, bool indirect )

playermobile.cs
virtual bool CanBeHarmful( Mobile target, bool message, bool ignoreOurBlessedness )


now, what would be the best way to do this?

1) create a tile that whomever walks over or double clicks it, it flags them criminal
a) easily controlled because must be placed by staff
b) cannot claim ignorance if the tile is hued/named/graphiced appropriately
c) can peform many checks such as inventory checks
d) removes ability to report murders

2) edit notoriety.cs
a) distro file, on any "official" update would require merging code
b) code is "always on" and unable to be shut off
c) numerous systems modify this file, can be very complicated

3) create a region type that whoever enters or performs harmful action, flags them as criminal before any checks/damage done
a) requires no distro edits, preseves upgradeability and independant method
b) easy to implement but harder than tile method above
c) using criminal timer prevents murdercounts

This system use to flag both players as criminals, but then observers could attack them. This is what notoriety fixed, im trying to figure out a better way to handle notoriety though, where one handler can be initialized over the other without temporarily destroying the previous.
 

nadious

Sorceror
Do you still have the previous method available? I can always put the arena in an area that can't be accessed, except by those that are transported to the duel area.
 

jeremias123

Wanderer
i tried

nadious;818331 said:
Do you still have the previous method available? I can always put the arena in an area that can't be accessed, except by those that are transported to the duel area.

i maked other arena only duel player have access
dont functioned

srry for my bad eng :eek:
thx for reply
 

jeremias123

Wanderer
look again

Murzin;818465 said:
there are invisible LOS blockers you can use if you are having that problem

i tested create other arena without los blocker and i have same error
no players enemy on new arena without los blocker
 

jeremias123

Wanderer
hey

nadious;818169 said:
Alex,

Great looking package here. I do have a question, though. I've looked (and perhaps I overlooked it on accident), but I'm not sure on the following:

I'm running Cal2k's UO package (SVN #101). I've got the scripts to compile just fine without any problems. I've added my controller and set my props, rebooted the server.

What are the functions (differences) between 'SpawnMap', 'SpawnPoint' and 'ThisRegionMap' and 'ThisRegionPoint'?

I've got the controller setup in the dueling pit, do I need to define BOTH of these sets of values? Or, just one? I'm not sure what the difference between them are.

can you send me one example how configure arena?
 

crameep

Sorceror
Crash log

I got this crash log

Code:
RunUO Version 2.0, Build 3490.1232
Operating System: Microsoft Windows NT 6.0.6002 Service Pack 2
.NET Framework: 2.0.50727.4016
Time: 12/17/2009 10:15:52 PM
Mobiles: 4809
Items: 125672
Exception:
System.InvalidCastException: Unable to cast object of type 'System.String' to type 'Server.Mobiles.PlayerMobile'.
   at Server.Dueling.Duel.EchoMessage(String msg) in c:\Users\Crameep\Desktop\Test Center\Scripts\Customs\Dueling\Base\Classes\Duel.cs:line 291
   at Server.Dueling.Duel.SendControllerSetup() in c:\Users\Crameep\Desktop\Test Center\Scripts\Customs\Dueling\Base\Classes\Duel.cs:line 178
   at Server.Dueling.DuelSetup_Rules_View.OnResponse(NetState sender, RelayInfo info) in c:\Users\Crameep\Desktop\Test Center\Scripts\Customs\Dueling\Gumps\Duel_ViewRules.cs:line 102
   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)
 

Alex21

Sorceror
crameep;821927 said:
I got this crash log

Code:
RunUO Version 2.0, Build 3490.1232
Operating System: Microsoft Windows NT 6.0.6002 Service Pack 2
.NET Framework: 2.0.50727.4016
Time: 12/17/2009 10:15:52 PM
Mobiles: 4809
Items: 125672
Exception:
System.InvalidCastException: Unable to cast object of type 'System.String' to type 'Server.Mobiles.PlayerMobile'.
   at Server.Dueling.Duel.EchoMessage(String msg) in c:\Users\Crameep\Desktop\Test Center\Scripts\Customs\Dueling\Base\Classes\Duel.cs:line 291
   at Server.Dueling.Duel.SendControllerSetup() in c:\Users\Crameep\Desktop\Test Center\Scripts\Customs\Dueling\Base\Classes\Duel.cs:line 178
   at Server.Dueling.DuelSetup_Rules_View.OnResponse(NetState sender, RelayInfo info) in c:\Users\Crameep\Desktop\Test Center\Scripts\Customs\Dueling\Gumps\Duel_ViewRules.cs:line 102
   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)

Ill fix my system up as soon as i can, sorry for the lack of updates.
 

crameep

Sorceror
Cool I've even added gumps and rules for Spellweaving to the script.

Edit:

I think i've isolated the cause of the crash its in the EchoMessage method

if i comment out both of these lines.

Code:
// EchoMessage("A player has left the duel, duel start has been delayed.");
Code:
// EchoMessage("The duel has been cancelled.");

I no longer get a crash when a player declines after the rules are set or declines rematch. I'll assume that when a player leaves a duel that it would have crashed as well though i didn't test it.
 

Alex21

Sorceror
crameep;821995 said:
Cool I've even added gumps and rules for Spellweaving to the script.

Edit:

I think i've isolated the cause of the crash its in the EchoMessage method

if i comment out both of these lines.

Code:
// EchoMessage("A player has left the duel, duel start has been delayed.");
Code:
// EchoMessage("The duel has been cancelled.");

I no longer get a crash when a player declines after the rules are set or declines rematch. I'll assume that when a player leaves a duel that it would have crashed as well though i didn't test it.

So the crash must be in EchoMessage(), so rather then commenting it out you should fix that method. :D
 
Top