|
||
|
|||||||
| New Join Forum So your new to RunUO and looking to work with people that are new, this is the place. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
Join Date: Jun 2006
Location: Somewhere very cold in the winter...
Age: 28
Posts: 607
|
FOREWARD: I'm still kind of a newbie at this sort of thing, but thanks to everyone on these forums, I've been able to progress and get my server up and running. Thanks to everyone who has helped me get this far!
QUESTION 1: I was just working on putting some items on vendors, and I came across the awesome XML Cannon script. I got it working ok, and I have the deeds available at respective vendors, but how do I add the individual cannonballs to the vendor? They are like the individual beverages (ale, wine, liquor) in that they are stored within the SiegeCannonBalls.cs script, and this is the line I'm using to put them in: Add( new GenericBuyInfo( typeof( SiegeCannonball ) SiegeCannonball.LightCannonBall, 7, 20, 0x99F, 0 ) ); And it give me this error upon compiling: +Mobiles/Vendors/SBInfo/SBWeaponSmith.cs CS0117: Line 102: 'Server.Items.SiegeCannonball' does not contain a definition for 'LightCannonBall' I've tried looking at the beverage script to see how it handles the sub-items, but I can't seem to get it to work. QUESTION 2: Also, the cannons within this script move around on the boats and cause the boats to stop. You can attach them to mobiles, but I don't know how to make it attach to a boat, since its a multi...this is pretty much the last question I will hopefully ever bother you guys with. THANK YOU TO EVERYONE WHO HAS HELPED ME GET THIS FAR, MY SHARD WOULD BE NOTHING WITHOUT YOU. ~Thanks! Makaar |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Nov 2003
Location: Illinois, USA
Age: 22
Posts: 2,911
|
try
Code:
Add( new GenericBuyInfo( typeof(SiegeCannonball.LightCannonBall), 7, 20, 0x99F, 0 ) );
__________________
Useful links (Use them or die in a fire!!!): Ultimate Little Guide, C# Tutorials & Docs, RunUO Basic Scripts, Run UO How to..., Configure server for connections, Scripting for Dummies, Common Problem Solutions, FAQ Forum, RunUO Wiki, Basic Generics, Xml Tutorial |
|
|
|
|
|
#3 (permalink) |
|
Forum Novice
Join Date: Jun 2006
Location: Somewhere very cold in the winter...
Age: 28
Posts: 607
|
Now it gave me this error:
+Mobiles/Vendors/SBInfo/SBWeaponSmith.cs CS0426: Line 102: The type name 'lightcannonball' does not exist in the type 'server.items.siegecannonball' Am I doing something wrong? I got the non-type weapons like the normal cannon deeds to go perfectly. I appreciate this help, in advance. |
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
Join Date: Nov 2003
Location: Illinois, USA
Age: 22
Posts: 2,911
|
what namespace is the siegecannonball in?
__________________
Useful links (Use them or die in a fire!!!): Ultimate Little Guide, C# Tutorials & Docs, RunUO Basic Scripts, Run UO How to..., Configure server for connections, Scripting for Dummies, Common Problem Solutions, FAQ Forum, RunUO Wiki, Basic Generics, Xml Tutorial |
|
|
|
|
|
#5 (permalink) |
|
Forum Novice
Join Date: Jun 2006
Location: Somewhere very cold in the winter...
Age: 28
Posts: 607
|
Sorry, I'm kind of a noob at most things still, this is what I know:
There are several types of cannonballs (just trying to get one to work for now) LightCannonBall FieryCannonBall IronCannonball Grapeshot (??) ExplosiveCannonBall All of their attributes and damage are in the script "SiegeCannonballs.cs" There is also another script for the projectiles called "BaseSingleProjetile" Then, lastly, there are the XML files for the whole siege system including the cannons and catapults called "XMLChestSiege", "XMLDrag", and "XMLSiege". If I put "SiegeCannonballs" instead of "SiegeCannonball" (singular as opposed to plural) it still doesn't work. And I've inserted BaseSingleProjectile for the heck of it too and nothing, still.... Hope you can decipher my babble! ![]() |
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
Join Date: Nov 2003
Location: Illinois, USA
Age: 22
Posts: 2,911
|
hmmm can you post the siegecannballs.cs in [ code] tags? then we'll see what we can do, cause im pretty sure we just arent getting the namespace right on that add method
__________________
Useful links (Use them or die in a fire!!!): Ultimate Little Guide, C# Tutorials & Docs, RunUO Basic Scripts, Run UO How to..., Configure server for connections, Scripting for Dummies, Common Problem Solutions, FAQ Forum, RunUO Wiki, Basic Generics, Xml Tutorial |
|
|
|
|
|
#7 (permalink) |
|
Forum Novice
Join Date: Jun 2006
Location: Somewhere very cold in the winter...
Age: 28
Posts: 607
|
Code:
using System;
using Server;
using Server.Targeting;
using Server.Network;
using System.Collections;
using Server.ContextMenus;
using Server.Engines.XmlSpawner2;
namespace Server.Items
{
public abstract class SiegeCannonball : BaseSiegeProjectile
{
public SiegeCannonball()
: this(1)
{
}
public SiegeCannonball(int amount)
: base(amount, 0xE74)
{
}
public SiegeCannonball(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class LightCannonball : SiegeCannonball
{
[Constructable]
public LightCannonball()
: this(1)
{
}
[Constructable]
public LightCannonball(int amount)
: base(amount)
{
Range = 17;
Area = 0;
AccuracyBonus = 0;
PhysicalDamage = 80;
FireDamage = 0;
FiringSpeed = 35;
Name = "Light Cannonball";
}
public LightCannonball(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
/*
public override Item Dupe(int amount)
{
LightCannonball s = new LightCannonball(amount);
return this.Dupe(s, amount);
}
* */
}
public class IronCannonball : SiegeCannonball
{
[Constructable]
public IronCannonball()
: this(1)
{
}
[Constructable]
public IronCannonball(int amount)
: base(amount)
{
Range = 15;
Area = 0;
AccuracyBonus = 0;
PhysicalDamage = 100;
FireDamage = 0;
FiringSpeed = 25;
Name = "Iron Cannonball";
}
public IronCannonball(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
/*
public override Item Dupe(int amount)
{
IronCannonball s = new IronCannonball(amount);
return this.Dupe(s, amount);
}
* */
}
public class ExplodingCannonball : SiegeCannonball
{
[Constructable]
public ExplodingCannonball()
: this(1)
{
}
[Constructable]
public ExplodingCannonball(int amount)
: base(amount)
{
Range = 11;
Area = 1;
AccuracyBonus = -10;
PhysicalDamage = 10;
FireDamage = 40;
FiringSpeed = 20;
Hue = 46;
Name = "Exploding Cannonball";
}
public ExplodingCannonball(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
/*
public override Item Dupe(int amount)
{
ExplodingCannonball s = new ExplodingCannonball(amount);
return this.Dupe(s, amount);
}
* */
}
public class FieryCannonball : SiegeCannonball
{
// use a fireball animation when fired
public override int AnimationID { get { return 0x36D4; } }
public override int AnimationHue { get { return 0; } }
[Constructable]
public FieryCannonball()
: this(1)
{
}
[Constructable]
public FieryCannonball(int amount)
: base(amount)
{
Range = 8;
Area = 2;
AccuracyBonus = -20;
PhysicalDamage = 0;
FireDamage = 30;
FiringSpeed = 10;
Hue = 33;
Name = "Fiery Cannonball";
}
public FieryCannonball(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
/*
public override Item Dupe(int amount)
{
FieryCannonball s = new FieryCannonball(amount);
return this.Dupe(s, amount);
}
* */
}
public class GrapeShot : SiegeCannonball
{
// only does damage to mobiles
public override double StructureDamageMultiplier { get { return 0.0; } } // damage multiplier for structures
[Constructable]
public GrapeShot()
: this(1)
{
}
[Constructable]
public GrapeShot(int amount)
: base(amount)
{
Range = 17;
Area = 1;
AccuracyBonus = 0;
PhysicalDamage = 20;
FireDamage = 0;
FiringSpeed = 35;
Name = "Grape Shot";
}
public GrapeShot(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
|
|
|
|
|
|
#8 (permalink) |
|
Forum Expert
Join Date: Nov 2003
Location: Illinois, USA
Age: 22
Posts: 2,911
|
ok try
Code:
Add( new GenericBuyInfo( typeof(LightCannonBall), 7, 20, 0x99F, 0 ) );
__________________
Useful links (Use them or die in a fire!!!): Ultimate Little Guide, C# Tutorials & Docs, RunUO Basic Scripts, Run UO How to..., Configure server for connections, Scripting for Dummies, Common Problem Solutions, FAQ Forum, RunUO Wiki, Basic Generics, Xml Tutorial |
|
|
|
|
|
#9 (permalink) |
|
Forum Novice
Join Date: Jun 2006
Location: Somewhere very cold in the winter...
Age: 28
Posts: 607
|
I've tried that one, and it still gives me the error:
+Mobiles/Vendors/SBInfo/SBWeaponSmith.cs: CS0246: Line 102: The type or namespace name ' lightcannonball' could not be found <are you missing a using directive or an assembly reference?> I feel like either I'm doing something really wrong, or perhaps there's something complicated with these cannonballs. I've gotten them to import into the game through the [admin / [add features...just not compiling on vendors. |
|
|
|
|
|
#10 (permalink) | |
|
Account Terminated
|
Quote:
|
|
|
|
|
|
|
#12 (permalink) |
|
Forum Novice
Join Date: Jun 2006
Location: Somewhere very cold in the winter...
Age: 28
Posts: 607
|
No way, it worked...it was just a simple typo...THANK YOU MALAPERTH!
I apologize for wasting all your time...it was just because I was capitalizing "ball" as "Ball"....so simple yet so dumb! Thank you for pointing that out, and I appreciate the time you guys took to help. But as for my second question, do you perhaps think you could point me in the right direction for attaching the cannon to a multi like a boat? Because it rolls around, and you can only attach it to mobiles. Last edited by Makaar; 01-19-2007 at 05:44 PM. |
|
|
|
|
|
#13 (permalink) | |
|
Forum Expert
Join Date: Nov 2003
Location: Illinois, USA
Age: 22
Posts: 2,911
|
Quote:
(grr too much karma given in the last 24 hours)
__________________
Useful links (Use them or die in a fire!!!): Ultimate Little Guide, C# Tutorials & Docs, RunUO Basic Scripts, Run UO How to..., Configure server for connections, Scripting for Dummies, Common Problem Solutions, FAQ Forum, RunUO Wiki, Basic Generics, Xml Tutorial |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|