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!

PaintBallGame v1.0

Help With Teams

If someone would be kind enough to help....

I have an issue with the paintball script. When single people are on teams it works fine and gives tokens, but if more than one person is on a team the other team members still have they're armor on after the game with no tokens. But the first person that joins the team has no problems. Did anyone have the same problem? If so how do I fix it?
 
Team Ammo

U can change it by adding this to the PainballEquipment.cs:

PHP:
[Constructable]
 
public TeamArrow( int amount, int hue ) : base( 0xF7A )
 
{
 
Name = "Team Ammo";		 // <---   add this line to Team Arrow
 
this.Hue = hue;
 
Stackable = true;
 
Weight = 0.1;
 
Amount = amount;
 
}


Hope this helps!

BTW does anyone now how to disable criminal action in the game?
 
Modifications

Here are some modifications that I made to PaitballTeam.cs:

-Fixed criminal action window.
-Players are peaced when game is over.
-Tokens are placed in bankbox for winners.
-And this is most IMPORTANT: I fixed the problem with players being left behind with armor.

I am currently working on the problem with Archery and Dex advantages. If anyone already has that fix or has any ideas please let me know. In the meantime I will be working on the fix myself.
 

Attachments

  • PaintBallTeam.cs
    12.1 KB · Views: 49
i did everything the readme said now im getting this error .. do you have to have a QuestSystem in your scripts for this to work? :confused:


Scripts: Compiling C# scripts...failed (2 errors, 0 warnings)
- Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 1820, column 11) The ty
pe or namespace name 'QuestSystem' could not be found (are you missing a using d
irective or an assembly reference?)
- Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 1823, column 10) The ty
pe or namespace name 'QuestSystem' could not be found (are you missing a using d
irective or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 
Equipment

Here is a small modification for PaintBallEquipment.cs. I was having problems with an Archery advantage in the game. I tried on many occasions to find help with this and couldn't. After countless attempts I finally figured out a way....and here it is. If anyone thinks they have a better way to fix it I am willing to listen. However, this does work! I simply added best weapon skill to the bow and the problem vanished. Hope this helps someone.

Cheers.....and Merry Xmas.
 

Attachments

  • PaintBallEquipment.cs
    7 KB · Views: 34

Icebat

Wanderer
i got an error:
- Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 80, column 11) The ty
pe or namespace name 'TeamType' could not be found (are you missing a using d
irective or an assembly reference?)
- Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 93, column 10) The ty
pe or namespace name 'TeamType' could not be found (are you missing a using d
irective or an assembly reference?)

This is a part of my playermobile:
using System;
using System.Collections;
using Server;
using Server.Misc;
using Server.Items;
using Server.Gumps;
using Server.Multis;
using Server.Engines.Help;
using Server.ContextMenus;
using Server.Network;
using Server.Spells;
using Server.Spells.Fifth;
using Server.Spells.Seventh;
using Server.Targeting;
using Server.Engines.Quests;

namespace Server.Mobiles
{
[Flags]
public enum PlayerFlag // First 16 bits are reserved for default-distro use, start custom flags at 0x00010000
{
None = 0x00000000,
Glassblowing = 0x00000001,
Masonry = 0x00000002,
SandMining = 0x00000004,
StoneMining = 0x00000008,
ToggleMiningStone = 0x00000010,
KarmaLocked = 0x00000020,
AutoRenewInsurance = 0x00000040,
UseOwnFilter = 0x00000080,
PublicMyRunUO = 0x00000100,
PagingSquelched = 0x00000200
}

public enum NpcGuild
{
None,
MagesGuild,
WarriorsGuild,
ThievesGuild,
RangersGuild,
HealersGuild,
MinersGuild,
MerchantsGuild,
TinkersGuild,
TailorsGuild,
FishermensGuild,
BardsGuild,
BlacksmithsGuild
}

public class PlayerMobile : Mobile
{
private class CountAndTimeStamp
{
private int m_Count;
private DateTime m_Stamp;

public CountAndTimeStamp()
{
}

public DateTime TimeStamp { get{ return m_Stamp; } }
public int Count
{
get { return m_Count; }
set { m_Count = value; m_Stamp = DateTime.Now; }
}
}

private DesignContext m_DesignContext;

private NpcGuild m_NpcGuild;
private DateTime m_NpcGuildJoinTime;
private TimeSpan m_NpcGuildGameTime;
private PlayerFlag m_Flags;
private int m_StepsTaken;


private TeamType m_Team = TeamType.None;
private int m_PaintHits = 0;
private PaintBallGame game;

public PaintBallGame PaintBall{ get{ return game;} set{ game = value;}}
[CommandProperty(AccessLevel.Counselor)]
public int PaintBallHits
{
get{return m_PaintHits;}
set{m_PaintHits = value;}
}

[CommandProperty( AccessLevel.GameMaster ) ]
public TeamType Team
{
get { return m_Team; }
set { m_Team = value; }
}
public int GetPaintPoints(){ return m_PaintHits; }
public void AddPaintHit(){ m_PaintHits++; }
 

AlienX2

Wanderer
I have problem about this script. I got crash log. look this log: :confused:

Code:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Games.PaintBall.PBGameItem.OnLocationChange(Point3D oldLoc)
   at Server.Item.MoveToWorld(Point3D location, Map map)
   at Server.Targets.MoveTarget.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)
 
Top