would like to implement this so players are given the option to duel for gold with an x amount option. Would also like to know if it would be possible to add a 1k limit difference so the opponents can't try scamming each other when someone isn't paying attention. Any help would be much appreciated :)
 
The easiest way, without creating entirely new gumps and ways of starting a duel, would be to use the existing Entry Fee system. You could create several arenas, each with it's own entry fee amount posted. Players would know going in how much was being staked. Then you just modify the DoWinEffects(PlayerMobile pm) method in ArenaDuel.cs to give the winning player the amount of the Entry Fees combined.
 
That makes sense, if only I was knowledgeable enough to go about making them changes. I'm only decent at making existing modifications but next to last when it comes to creating new coding :D
 
Something like this:

C#:
        public void DoWinEffects(PlayerMobile pm)
        {
            Point3D loc = pm.Location;
            Map pmmap = pm.Map;

            if (pmmap != Map.Internal && pmmap != null)
            {
                for (int i = 0; i < 5; i++)
                {
                    Timer.DelayCall(TimeSpan.FromMilliseconds(i * 100), index =>
                        {
                            Misc.Geometry.Circle2D(loc, pmmap, index, (pnt, map) =>
                            {
                                Effects.SendLocationEffect(pnt, map, 0x3709, 0x1E, 0x14, 0x5DE, 0x4);
                            });
                        }, i);
                }
            }
            
            // THIS IS ADDED TO GIVE ALL ENTRY FEES TO THE WINNER
            int amount = this.EntryFee * ParticipantCount;
            pm.Account.DepositGold(amount);
            pm.SendMessage("{0} Gold was deposited into your account.", amount);
        }
 
I'm lost in the sauce on where plug this in at. I only saw an arena.cs file but no duelarena.cs file, I'm assuming its the same thing you were mentioning. Just curious to what line this is suppose to go under to fit in properly
Post automatically merged:
 
Last edited:
Sorry, I am just now seeing that you are on RunUO 2.6. This method is in a file on the ServUO server. It was the only PVP Arena I am familiar with. Perhaps you can post a link to the ConPVP scripts you are using?
 
Sure can.
Post automatically merged:


Post automatically merged:

 

Attachments

  • AcceptDuelGump.cs
    9.7 KB · Views: 3
  • Arena.cs
    18.3 KB · Views: 3
  • ArenaGump.cs
    7.2 KB · Views: 2
  • BeginGump.cs
    3.7 KB · Views: 1
  • LadderGump.cs
    6.7 KB · Views: 2
  • Ladder.cs
    7.9 KB · Views: 1
  • DuelTeleporterAddon.cs
    2.7 KB · Views: 1
  • DuelContextGump.cs
    3.6 KB · Views: 1
  • DuelContext.cs
    65.7 KB · Views: 2
  • RulesetGump.cs
    3.4 KB · Views: 1
  • Ruleset.cs
    2.4 KB · Views: 1
  • ReadyUpGump.cs
    5.1 KB · Views: 1
  • ReadyGump.cs
    2.3 KB · Views: 1
  • Preferences.cs
    7 KB · Views: 2
  • PickRulesetGump.cs
    3.2 KB · Views: 1
  • ParticipantGump.cs
    7.4 KB · Views: 1
  • Participant.cs
    5.1 KB · Views: 1
  • SafeZone.cs
    1.8 KB · Views: 2
  • RulesetLayout.cs
    24.5 KB · Views: 1
  • StakesContainer.cs
    2.8 KB · Views: 3
  • Tournament.cs
    102.5 KB · Views: 3
  • Trophy.cs
    2.5 KB · Views: 1
I see there is a StakesContainer.cs file. Do you know how that container works? Is that where people currently put stakes?
 
No I'm not quite sure how that container works. If I had to guess, it would have to be for tournament payouts
Post automatically merged:

Only reason I assumed that is because I don't see a stake option when I [props the arena controller.
 

Attachments

  • arena controller props.png
    arena controller props.png
    46.5 KB · Views: 8
Last edited:

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back