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!

XML Pvp Point System on 2.4

Twlizer

Sorceror
Code:
Warnings:
+ Misc/Assistants.cs:
    CS0162: Line 99: Unreachable code detected
    CS0162: Line 155: Unreachable code detected
+ Misc/Notoriety.cs:
    CS0162: Line 230: Unreachable code detected
Errors:
+ Customs/XmlPoints-20-v124b-1of2/XmlAttachments/XmlPoints.cs:
    CS0029: Line 561: Cannot implicitly convert type 'System.Collections.Gener
.List<Server.Engines.XmlSpawner2.XmlAttachment>' to 'System.Collections.ArrayL
t'
    CS0029: Line 574: Cannot implicitly convert type 'System.Collections.Gener
.List<Server.Engines.XmlSpawner2.XmlAttachment>' to 'System.Collections.ArrayL
t'
    CS0029: Line 587: Cannot implicitly convert type 'System.Collections.Gener
.List<Server.Engines.XmlSpawner2.XmlAttachment>' to 'System.Collections.ArrayL
t'
    CS0029: Line 605: Cannot implicitly convert type 'System.Collections.Gener
.List<Server.Engines.XmlSpawner2.XmlAttachment>' to 'System.Collections.ArrayL
t'
    CS1502: Line 629: The best overloaded method match for 'Server.Engines.Xml
awner2.XmlAttach.FindAttachments(object, System.Type, string)' has some invali
arguments
    CS1503: Line 629: Argument 2: cannot convert from 'Server.Mobile' to 'Syst
.Type'
    CS1503: Line 629: Argument 3: cannot convert from 'System.Type' to 'string
    CS0029: Line 1120: Cannot implicitly convert type 'System.Collections.Gene
c.List<Server.Engines.XmlSpawner2.XmlAttachment>' to 'System.Collections.Array
st'
    CS0029: Line 1135: Cannot implicitly convert type 'System.Collections.Gene
c.List<Server.Engines.XmlSpawner2.XmlAttachment>' to 'System.Collections.Array
st'
    CS0029: Line 1156: Cannot implicitly convert type 'System.Collections.Gene
c.List<Server.Engines.XmlSpawner2.XmlAttachment>' to 'System.Collections.Array
st'
    CS0029: Line 1194: Cannot implicitly convert type 'System.Collections.Gene
c.List<Server.Engines.XmlSpawner2.XmlAttachment>' to 'System.Collections.Array
st'
    CS0029: Line 1634: Cannot implicitly convert type 'System.Collections.Gene
c.List<Server.Engines.XmlSpawner2.XmlAttachment>' to 'System.Collections.Array
st'
    CS1502: Line 1655: The best overloaded method match for 'Server.Engines.Xm
pawner2.XmlAttach.FindAttachments(object, System.Type, string)' has some inval
arguments
    CS1503: Line 1655: Argument 2: cannot convert from 'Server.Mobile' to 'Sys
m.Type'
    CS1503: Line 1655: Argument 3: cannot convert from 'System.Type' to 'strin
 
    CS0029: Line 1938: Cannot implicitly convert type 'System.Collections.Gene
c.List<Server.Engines.XmlSpawner2.XmlAttachment>' to 'System.Collections.Array
st'
+ Misc/Notoriety.cs:
    CS1002: Line 426: ; expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

I have not installed a Runuo server in many years and have not been active here in a few years also. I installed XML Spawner2 succesfully with no errors. I installed this Pvp Point system and am getting this error im not sure what its asking me to do. My C Sharp is a little rusty but with correct direction im sure i can hammer this out.

Anyone who can point me in the correct direction to resolve this?

Thanks,
 

Attachments

  • XmlPoints.cs
    95.7 KB · Views: 2

Twlizer

Sorceror
Code:
 + Misc/Assistants.cs:
    CS0162: Line 99: Unreachable code detected
    CS0162: Line 155: Unreachable code detected
+ Misc/Notoriety.cs:
    CS0162: Line 230: Unreachable code detected
Errors:
+ Customs/XmlPoints-20-v124b-1of2/XmlAttachments/XmlPoints.cs:
    CS1502: Line 630: The best overloaded method match for 'Server.Engines.XmlSp
awner2.XmlAttach.FindAttachments(object, System.Type, string)' has some invalid
arguments
    CS1503: Line 630: Argument 2: cannot convert from 'Server.Mobile' to 'System
.Type'
    CS1503: Line 630: Argument 3: cannot convert from 'System.Type' to 'string'
    CS1502: Line 1656: The best overloaded method match for 'Server.Engines.XmlS
pawner2.XmlAttach.FindAttachments(object, System.Type, string)' has some invalid
arguments
    CS1503: Line 1656: Argument 2: cannot convert from 'Server.Mobile' to 'Syste
m.Type'
    CS1503: Line 1656: Argument 3: cannot convert from 'System.Type' to 'string'
 
+ Misc/Notoriety.cs:
    CS1002: Line 426: ; expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Change This to:
List<XmlAttachment> list = XmlAttach.FindAttachments(m,typeof(XmlPoints));

From This:
ArrayList list = XmlAttach.FindAttachments(m,typeof(XmlPoints));

Still no Cigar
 

Attachments

  • XmlPoints.cs
    95.8 KB · Views: 3

fcondon

Sorceror
This is one of my favorite systems from older versions of RunUO and too would love a working version. Im actually a little surprised no one has ironed out the bugs. Ive tried but my abiltiies are not good enough. :(
 

Twlizer

Sorceror
This is one of my favorite systems from older versions of RunUO and too would love a working version. Im actually a little surprised no one has ironed out the bugs. Ive tried but my abiltiies are not good enough. :(


I gave it my best shot also and finally removed it...
 

UOExtreme

Sorceror
I gave it my best shot also and finally removed it...
Ok guys im lost mine works 100% my only issue is that I dont know how to setup the arena's I recoded mine and it boots right up with np and you can [challenge with no issue ive tested it fully
 

fcondon

Sorceror
Any chance you can share? I use 2.5 as well. Its been years since I played with the system but if I can get a working copy and figure it out again I will definitely let you know how to set up the arena's.
 

UOExtreme

Sorceror
ok I attached My copy of XMLpoints add this WHOLE folder to your Custom folder DO NOT TAKE ANYTHING OUT OF IT follow the steps in the XmlPoints Install NEW Text do Step 1,2,3,4,8 I never used step 9 so It Might Not work after your done loading it into your game use [addallpoints and you should be good to so also make sure you add "" using Server.Engines.XmlSpawner2; "" to the top of your CharacterCreation.cs / Notoriety.cs / PlayerMobile.cs File's and just for your info MobileNotoriety.cs is the same as Notoriety.cs * I Hope This Work's For you Guys!!!!!*
 

Attachments

  • XmlPoints.7z
    62.8 KB · Views: 17

fcondon

Sorceror
UOE, You're issue is trying to define new arena's right? I got the system incorporated and working so Im going to be playing with it for quite a while. :)
 

UOExtreme

Sorceror
UOE, You're issue is trying to define new arena's right? I got the system incorporated and working so Im going to be playing with it for quite a while. :)
Yes I cant figure out how to set them up as events the whole player running an event is just weird to me
 

fcondon

Sorceror
In XMLPoints.cs starting at line 662 I changed all the games that I didnt want players running themselves to be run by GMs and up. This is the new code.


Code:
            CommandSystem.Register( "PointsLanguage", AccessLevel.Player, new CommandEventHandler( Language_OnCommand ) );
            CommandSystem.Register( "Challenge", AccessLevel.Player, new CommandEventHandler( Challenge_OnCommand ) );
            CommandSystem.Register( "LMSChallenge", AccessLevel.GameMaster, new CommandEventHandler( LMSChallenge_OnCommand ) );
            CommandSystem.Register( "TeamLMSChallenge", AccessLevel.GameMaster, new CommandEventHandler( TeamLMSChallenge_OnCommand ) );
            CommandSystem.Register( "Deathmatch", AccessLevel.GameMaster, new CommandEventHandler( Deathmatch_OnCommand ) );
            CommandSystem.Register( "TeamDeathmatch", AccessLevel.GameMaster, new CommandEventHandler( TeamDeathmatch_OnCommand ) );
            CommandSystem.Register( "DeathBall", AccessLevel.GameMaster, new CommandEventHandler( DeathBall_OnCommand ) );
            CommandSystem.Register( "KingOfTheHill", AccessLevel.GameMaster, new CommandEventHandler( KingOfTheHill_OnCommand ) );
            CommandSystem.Register( "TeamDeathBall", AccessLevel.GameMaster, new CommandEventHandler( TeamDeathBall_OnCommand ) );
            CommandSystem.Register( "TeamKotH", AccessLevel.GameMaster, new CommandEventHandler( TeamKotH_OnCommand ) );
            CommandSystem.Register( "CTFChallenge", AccessLevel.GameMaster, new CommandEventHandler( CTFChallenge_OnCommand ) );
            CommandSystem.Register( "SystemBroadcastKills", AccessLevel.GameMaster, new CommandEventHandler( SystemBroadcastKills_OnCommand ) );
            CommandSystem.Register( "SeeKills", AccessLevel.Player, new CommandEventHandler( SeeKills_OnCommand ) );
            CommandSystem.Register( "BroadcastKills", AccessLevel.Player, new CommandEventHandler( BroadcastKills_OnCommand ) );
            CommandSystem.Register( "CheckPoints", AccessLevel.Player, new CommandEventHandler( CheckPoints_OnCommand ) );
            CommandSystem.Register( "TopPlayers", AccessLevel.Player, new CommandEventHandler( TopPlayers_OnCommand ) );
            CommandSystem.Register( "AddAllPoints", AccessLevel.Administrator, new CommandEventHandler( AddAllPoints_OnCommand ) );
            CommandSystem.Register( "RemoveAllPoints", AccessLevel.Administrator, new CommandEventHandler( RemoveAllPoints_OnCommand ) );
            CommandSystem.Register( "LeaderboardSave", AccessLevel.Administrator, new CommandEventHandler( LeaderboardSave_OnCommand ) );

So basically players can only [challenge other players now, and staff can set up there own area's and run there own events like CTF without worry of players ever being able to do it.

Is that what you were trying to fix?
 

fcondon

Sorceror
Also in xmlpoints.cs find this code around 2955

Code:
                    // add the last man standing challenge button
                    AddLabel( x2 + 30, 190, 55, a.Text(200230) );  // "LMS"
                    AddButton( x2, 190, 0xFAB, 0xFAD, 401, GumpButtonType.Reply, 0);
 
                    // add the deathmatch challenge button
                    AddLabel( x3 + 30, 190, 55, a.Text(200231) );  // "Deathmatch"
                    AddButton( x3, 190, 0xFAB, 0xFAD, 403, GumpButtonType.Reply, 0);
 
                    // add the kingofthehill challenge button
                    AddLabel( x1 + 30, 215, 55, a.Text(200232) );  // "KotH"
                    AddButton( x1, 215, 0xFAB, 0xFAD, 404, GumpButtonType.Reply, 0);
 
                    // add the deathball challenge button
                    AddLabel( x2 + 30, 215, 55, a.Text(200233) );  // "DeathBall"
                    AddButton( x2, 215, 0xFAB, 0xFAD, 405, GumpButtonType.Reply, 0);
 
                    // add the teamlms challenge button
                    AddLabel( x3 + 30, 215, 55, a.Text(200234) );  // "Team LMS"
                    AddButton( x3, 215, 0xFAB, 0xFAD, 406, GumpButtonType.Reply, 0);
 
                    // add the team deathmatch challenge button
                    AddLabel( x1 + 30, 240, 55, a.Text(200235) );  // "Team DMatch"
                    AddButton( x1, 240, 0xFAB, 0xFAD, 407, GumpButtonType.Reply, 0);
 
                    // add the team deathball challenge button
                    AddLabel( x2 + 30, 240, 55, a.Text(200236) );  // "Team DBall"
                    AddButton( x2, 240, 0xFAB, 0xFAD, 408, GumpButtonType.Reply, 0);
 
                    // add the team KotH challenge button
                    AddLabel( x3 + 30, 240, 55, a.Text(200237) );  // "Team KotH"
                    AddButton( x3, 240, 0xFAB, 0xFAD, 409, GumpButtonType.Reply, 0);
                   
                    // add the CTF challenge button
                    AddLabel( x1 + 30, 265, 55, a.Text(200238) );  // "CTF"
                    AddButton( x1, 265, 0xFAB, 0xFAD, 410, GumpButtonType.Reply, 0);

and change it to

Code:
                    if (from.AccessLevel >= AccessLevel.GameMaster)
                    {
                    // add the last man standing challenge button
                    AddLabel( x2 + 30, 190, 55, a.Text(200230) );  // "LMS"
                    AddButton( x2, 190, 0xFAB, 0xFAD, 401, GumpButtonType.Reply, 0);
 
                    // add the deathmatch challenge button
                    AddLabel( x3 + 30, 190, 55, a.Text(200231) );  // "Deathmatch"
                    AddButton( x3, 190, 0xFAB, 0xFAD, 403, GumpButtonType.Reply, 0);
 
                    // add the kingofthehill challenge button
                    AddLabel( x1 + 30, 215, 55, a.Text(200232) );  // "KotH"
                    AddButton( x1, 215, 0xFAB, 0xFAD, 404, GumpButtonType.Reply, 0);
 
                    // add the deathball challenge button
                    AddLabel( x2 + 30, 215, 55, a.Text(200233) );  // "DeathBall"
                    AddButton( x2, 215, 0xFAB, 0xFAD, 405, GumpButtonType.Reply, 0);
 
                    // add the teamlms challenge button
                    AddLabel( x3 + 30, 215, 55, a.Text(200234) );  // "Team LMS"
                    AddButton( x3, 215, 0xFAB, 0xFAD, 406, GumpButtonType.Reply, 0);
 
                    // add the team deathmatch challenge button
                    AddLabel( x1 + 30, 240, 55, a.Text(200235) );  // "Team DMatch"
                    AddButton( x1, 240, 0xFAB, 0xFAD, 407, GumpButtonType.Reply, 0);
 
                    // add the team deathball challenge button
                    AddLabel( x2 + 30, 240, 55, a.Text(200236) );  // "Team DBall"
                    AddButton( x2, 240, 0xFAB, 0xFAD, 408, GumpButtonType.Reply, 0);
 
                    // add the team KotH challenge button
                    AddLabel( x3 + 30, 240, 55, a.Text(200237) );  // "Team KotH"
                    AddButton( x3, 240, 0xFAB, 0xFAD, 409, GumpButtonType.Reply, 0);
                   
                    // add the CTF challenge button
                    AddLabel( x1 + 30, 265, 55, a.Text(200238) );  // "CTF"
                    AddButton( x1, 265, 0xFAB, 0xFAD, 410, GumpButtonType.Reply, 0);
                    }

This will disable players from being able to choose any games themselves from the points gump, allowing the events to be run by only staff members.
 

UOExtreme

Sorceror
In XMLPoints.cs starting at line 662 I changed all the games that I didnt want players running themselves to be run by GMs and up. This is the new code.


Code:
            CommandSystem.Register( "PointsLanguage", AccessLevel.Player, new CommandEventHandler( Language_OnCommand ) );
            CommandSystem.Register( "Challenge", AccessLevel.Player, new CommandEventHandler( Challenge_OnCommand ) );
            CommandSystem.Register( "LMSChallenge", AccessLevel.GameMaster, new CommandEventHandler( LMSChallenge_OnCommand ) );
            CommandSystem.Register( "TeamLMSChallenge", AccessLevel.GameMaster, new CommandEventHandler( TeamLMSChallenge_OnCommand ) );
            CommandSystem.Register( "Deathmatch", AccessLevel.GameMaster, new CommandEventHandler( Deathmatch_OnCommand ) );
            CommandSystem.Register( "TeamDeathmatch", AccessLevel.GameMaster, new CommandEventHandler( TeamDeathmatch_OnCommand ) );
            CommandSystem.Register( "DeathBall", AccessLevel.GameMaster, new CommandEventHandler( DeathBall_OnCommand ) );
            CommandSystem.Register( "KingOfTheHill", AccessLevel.GameMaster, new CommandEventHandler( KingOfTheHill_OnCommand ) );
            CommandSystem.Register( "TeamDeathBall", AccessLevel.GameMaster, new CommandEventHandler( TeamDeathBall_OnCommand ) );
            CommandSystem.Register( "TeamKotH", AccessLevel.GameMaster, new CommandEventHandler( TeamKotH_OnCommand ) );
            CommandSystem.Register( "CTFChallenge", AccessLevel.GameMaster, new CommandEventHandler( CTFChallenge_OnCommand ) );
            CommandSystem.Register( "SystemBroadcastKills", AccessLevel.GameMaster, new CommandEventHandler( SystemBroadcastKills_OnCommand ) );
            CommandSystem.Register( "SeeKills", AccessLevel.Player, new CommandEventHandler( SeeKills_OnCommand ) );
            CommandSystem.Register( "BroadcastKills", AccessLevel.Player, new CommandEventHandler( BroadcastKills_OnCommand ) );
            CommandSystem.Register( "CheckPoints", AccessLevel.Player, new CommandEventHandler( CheckPoints_OnCommand ) );
            CommandSystem.Register( "TopPlayers", AccessLevel.Player, new CommandEventHandler( TopPlayers_OnCommand ) );
            CommandSystem.Register( "AddAllPoints", AccessLevel.Administrator, new CommandEventHandler( AddAllPoints_OnCommand ) );
            CommandSystem.Register( "RemoveAllPoints", AccessLevel.Administrator, new CommandEventHandler( RemoveAllPoints_OnCommand ) );
            CommandSystem.Register( "LeaderboardSave", AccessLevel.Administrator, new CommandEventHandler( LeaderboardSave_OnCommand ) );

So basically players can only [challenge other players now, and staff can set up there own area's and run there own events like CTF without worry of players ever being able to do it.

Is that what you were trying to fix?


I use the ConPvP for dueling is there a way to fully disable [challenge?
 

fcondon

Sorceror
The easiest way without breaking a lot of the rest of the system is to just set

CommandSystem.Register( "Challenge", AccessLevel.Player, new CommandEventHandler( Challenge_OnCommand ) );

to

CommandSystem.Register( "Challenge", AccessLevel.Administrator, new CommandEventHandler( Challenge_OnCommand ) );

disabling anyone from using that function either.
 
Top