Fireable Cannon
LATEST UPDATE
Fixed the support for older clients. Added all six ships that are damagable by the cannon. These ships will co-exsts with the distro ships so all your old ships will remain invulnerable to cannon attacks. When they are sunk all the mobiles that are on the ship will be sent to shore according to the Strandedness script so it sends you to where ever you would end up if you logged in when in water.
____________________________________________________________________________
Well since the last one I posted was for beta 24 or 25 I thought it was time for an update. And since I learned quite a bit since then I thought I'd add a few features to it as well. Instead of listing what was fixed or added from the last one since most weren't here that long I'll just start the run down from the beginning.
There are 4 deeds, 1 for each direction, to add the cannons:
CannonNorthDeed
CannonSouthDeed
CannonEastDeed
CannonWestDeed
These will add the cannons with the person placing the deed as the owner, the deed's name will say the direction and the amount of hitpoints remaining for the cannon.
If you add the cannons directly adding one of the 4:
CannonNorth
CannonSouth
CannonEast
CannonWest
The owner will be null and only staff (Counselor and up) can use them.
OnMouseOver the Hit Points and the Owner's Name will be displayed. The Context Menu has Disassemble, which allows only the owner to re-deed the cannon, and Heal (there was no localized context string for repair), which will attempt to repair the cannon. To repair the cannon you'll need a minimum skill of 70.0 in Blacksmithing and 10 ingots (doesn't matter which type) on failed attempt you may lose up to 5 ingots.
To move a cannon you can "hitch" it to a mount. Just say hitch within 3 tiles of your cannon, then target a mount that belongs to you, to hitch it. Once hitched you can move the cannon. You can't mount the mount while it's dragging your cannon or it will unhitch, if your mount dies or is released the cannon will unhitch. To unhitch the cannon you must be in an area where the cannon is clear of obsticles and say unhitch. When unhitched the cannon will be facing the direction it was facing while hitched.
*Note: Hitched cannons still take damage. Hitched cannons won't go thru moongates.
Also added 5 mobiles, each will only attack players with negative karma and don't move. 4 of them, 1 for each direction:
CannonGuardNorth
CannonGuardSouth
CannonGuardEast
CannonGuardWest
which always have the cannons pointing in that one direction and one that turns the cannon towards his target:
TurnableCannonGuard
*Note: They don't need any ammo or sulfurous ash to fire
The Damage methods (ICannonDamage) and the Repiar methods (ICannonRepair) are interfaces so they can be easily added to any item to make them be damaged by cannons. The code that you would need to copy over are marked by the region tags. The amount of damage done can be adjusted in line 137 and 138 ( MinDamage and MaxDamage ). The firing rate is set at 10 seconds (bypassed for staff). The ammo required is 1 CannonBall and 5 SulfurousAsh. And it follows the map rules as far as who and what gets harmed. The damage is 50% physical and 50% Fire at the tile of impact with 100% of the damage points, 1 and 2 tiles away it's 100% fire damage and it's at respectively 1/2 and 1/3 of the damage points. Well I think that covers everything...Enjoy!
LATEST UPDATE
Fixed the support for older clients. Added all six ships that are damagable by the cannon. These ships will co-exsts with the distro ships so all your old ships will remain invulnerable to cannon attacks. When they are sunk all the mobiles that are on the ship will be sent to shore according to the Strandedness script so it sends you to where ever you would end up if you logged in when in water.
____________________________________________________________________________
Well since the last one I posted was for beta 24 or 25 I thought it was time for an update. And since I learned quite a bit since then I thought I'd add a few features to it as well. Instead of listing what was fixed or added from the last one since most weren't here that long I'll just start the run down from the beginning.
There are 4 deeds, 1 for each direction, to add the cannons:
CannonNorthDeed
CannonSouthDeed
CannonEastDeed
CannonWestDeed
These will add the cannons with the person placing the deed as the owner, the deed's name will say the direction and the amount of hitpoints remaining for the cannon.
If you add the cannons directly adding one of the 4:
CannonNorth
CannonSouth
CannonEast
CannonWest
The owner will be null and only staff (Counselor and up) can use them.
OnMouseOver the Hit Points and the Owner's Name will be displayed. The Context Menu has Disassemble, which allows only the owner to re-deed the cannon, and Heal (there was no localized context string for repair), which will attempt to repair the cannon. To repair the cannon you'll need a minimum skill of 70.0 in Blacksmithing and 10 ingots (doesn't matter which type) on failed attempt you may lose up to 5 ingots.
To move a cannon you can "hitch" it to a mount. Just say hitch within 3 tiles of your cannon, then target a mount that belongs to you, to hitch it. Once hitched you can move the cannon. You can't mount the mount while it's dragging your cannon or it will unhitch, if your mount dies or is released the cannon will unhitch. To unhitch the cannon you must be in an area where the cannon is clear of obsticles and say unhitch. When unhitched the cannon will be facing the direction it was facing while hitched.
*Note: Hitched cannons still take damage. Hitched cannons won't go thru moongates.
Also added 5 mobiles, each will only attack players with negative karma and don't move. 4 of them, 1 for each direction:
CannonGuardNorth
CannonGuardSouth
CannonGuardEast
CannonGuardWest
which always have the cannons pointing in that one direction and one that turns the cannon towards his target:
TurnableCannonGuard
*Note: They don't need any ammo or sulfurous ash to fire
The Damage methods (ICannonDamage) and the Repiar methods (ICannonRepair) are interfaces so they can be easily added to any item to make them be damaged by cannons. The code that you would need to copy over are marked by the region tags. The amount of damage done can be adjusted in line 137 and 138 ( MinDamage and MaxDamage ). The firing rate is set at 10 seconds (bypassed for staff). The ammo required is 1 CannonBall and 5 SulfurousAsh. And it follows the map rules as far as who and what gets harmed. The damage is 50% physical and 50% Fire at the tile of impact with 100% of the damage points, 1 and 2 tiles away it's 100% fire damage and it's at respectively 1/2 and 1/3 of the damage points. Well I think that covers everything...Enjoy!