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!

Bounty System 1.3

Konnar

Wanderer
Code:
Exception:
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
   at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at Server.BountySystem.BountyBoard.NotifyBountyEnd(BountyBoardEntry be)
   at Server.BountySystem.BountyBoard.RemoveEntry(BountyBoardEntry be, Boolean refund)
   at Server.BountySystem.BountyBoardGump.OnResponse(NetState sender, RelayInfo info)
   at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)

when you accept someones request for a bounty and then delete the bounty the server crashes
 

apollo_in

Wanderer
Konnar said:
Code:
Exception:
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
   at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at Server.BountySystem.BountyBoard.NotifyBountyEnd(BountyBoardEntry be)
   at Server.BountySystem.BountyBoard.RemoveEntry(BountyBoardEntry be, Boolean refund)
   at Server.BountySystem.BountyBoardGump.OnResponse(NetState sender, RelayInfo info)
   at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)

when you accept someones request for a bounty and then delete the bounty the server crashes

Fixed and Updated. Thanks.
 

malgrimace

Sorceror
Could you please post the alterations you made to dovplayermobile - cause I have a modified version and would really like to implement this script.
 

apollo_in

Wanderer
malgrimace said:
Could you please post the alterations you made to dovplayermobile - cause I have a modified version and would really like to implement this script.

They are marked in PlayerMobile.cs by //Bounty System, //End Bounty System
 
C

Cri

Guest
A little help to all newcomers!

***For all newcomers that want to use this script!***

To install the script you must replace files to successfully use it! But wait... How to find them? ;)

The files are located in the following destinations:

PlayerMobile.cs is located in Scripts/Mobiles/

Head.cs is located in Scripts/Items/Body Parts/

Corpse.cs is located in Scripts/Items/Misc/Corpses/

OrderGuard.cs is located in Scripts/Mobiles/Special/

ReportMurder.cs is located in Scripts/Gumps/

Notoriety.cs is located in Scripts/Misc/
 

Konnar

Wanderer
there was a bull and a sheep in the list and when you want to remove it
crash .. day before it was a gargoyle and something other lol?

Code:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.BountySystem.BountyBoardGump.OnResponse(NetState sender, RelayInfo info)
   at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)


also bounty removal / finish has no write in the xml file.. so after a save/restart the bounty appears again in the list
 

apollo_in

Wanderer
Konnar said:
there was a bull and a sheep in the list and when you want to remove it
crash .. day before it was a gargoyle and something other lol?

Code:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.BountySystem.BountyBoardGump.OnResponse(NetState sender, RelayInfo info)
   at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)


also bounty removal / finish has no write in the xml file.. so after a save/restart the bounty appears again in the list

Fixed and updated.
 

Dracarus

Wanderer
Bounty System 1.4 *updated 6/29/04*

--------------------------------------------------------------------------------

Summary:
My take on how the OSI bounty system should have worked.
Post here or icq me (2998088) any bugs, suggestions, or comments.

Thanks.

Description:


Installation:
Install:

copy the folder to your custom script folder.
Create a .\Data\Bounty System directory and copy
BountySchema.xsd into it.
Replace PlayerMobile.cs, Head.cs, Corpse.cs, OrderGuard.cs, ReportMurder.cs, Notoriety.cs.

[Add BountyBoard

--------------------------------------------------------------------------------
Last edited by apollo_in : 07-04-2004 at 03:29 PM.
Dont see any download links in there.
 
G

gordy

Guest
This may sound like a dumb question but how does the person approve the bounty?
 
G

gordy

Guest
When I open the bounty board I see the bounty just issued but I don't see anything to press to accept.
 

plus

Sorceror
Hi,

Where in your script does the gold get withdrawn from the peron's bank?

Code:
int price = Convert.ToInt32( te.Text, 10 );
if( price < BountyBoardEntry.DefaultMinBounty )
	{
	from.SendMessage( "The bounty must be at least {0} gold.", BountyBoardEntry.DefaultMinBounty );
	from.SendGump( new AddBountyGump( from, m_Killer ) );
	return;
	}

if( m_Killer != null && !m_Killer.Deleted )
{
//remove bounty gold
I can't find anywhere, that I know, where gold is determined to be withdrawn. Can you show me please?
 

apollo_in

Wanderer
Just missed it. Around line 74 of AddBountyGump.cs

Code:
if( m_Killer != null && !m_Killer.Deleted )
{
	//remove bounty gold
							
	[B]if ( !Banker.Withdraw( from, price ) )
	{
		from.SendMessage( "You cannot afford a bounty of {0}!", price );
		from.SendGump( new AddBountyGump( from, m_Killer ), false );
		return;
	}[/B]

	BountyBoard.AddEntry( from, m_Killer, price, DateTime.Now + BountyBoardEntry.DefaultDecayRate );
	m_Killer.SendMessage( "A bounty hath been issued for thee!" );
}
 

plus

Sorceror
I see but where has "price" been determined to withdraw gold from the bank? Instead of withdrawing something else like a different kind of currency.
 

apollo_in

Wanderer
plus said:
I see but where has "price" been determined to withdraw gold from the bank? Instead of withdrawing something else like a different kind of currency.

The price is retrieved from the Gump a player gets after they are murdered.

int price = Convert.ToInt32( te.Text, 10 );
 

plus

Sorceror
I'm really sorry if i'm being dumb or annoying I just can't figure out this. Say if I wanted to change what is withdrawn from the person's bank.

So instead of it withdrawing gold from the bank it withdraws, say, silver or tokens.

What line would handle this?
 
Top