Jump to content

Currency v3.0.1.1: Bounties & Mugging! (Updated: 06/06/2012)


ImportBot

Recommended Posts

Originally Posted by Nazra7*:

 

Code:

foreach (Item item in m_dicItemsForSale.Values)
                {
                    if (messageWords[0].ToLower() == item.BuyCommand.ToLower())
                    {
                        if (item.Enabled == enumBoolYesNo.Yes)
any way that you could implement shop items to only work in TDM or TDMC modes?

 

Code:

if (m_strCurrentGameMode != "tdm" && m_strCurrentGameMode != "tdmc")
We run a mixed mode server and would still like to use this plugin on the boring TDM matches to spice it up some without sacrificing our maplist.
* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 257
  • Created
  • Last Reply

Top Posters In This Topic

Originally Posted by RGFrog*:

 

We figured out a simple way to turn off the shop by game mode.

 

Essentially we check the game mode prior to the shop actions and issue a error message if the shop isn't allowed. We pretty much only want the shop to be used on death match game modes, like tdm, sqdm, etc.

 

We ran into a problem, though. The code in the plugin isn't using the correct shorthand for the game modes as passed from the server. Until we realized the issue, it was constantly blocking the shop.

 

I mention this for those looking to edit the plugin code as it seems all the lines referencing game modes is based off old BC2 names?

 

Anyway, following is the simple few lines we used. I truncated the huge amount of code between as none of that needed to be touched. The foreach line starts around line 2282 and the break belongs to the if(messageWords[0] statement.

 

Code:

foreach (Item item in m_dicItemsForSale.Values)
{
	if (messageWords[0].ToLower() == item.BuyCommand.ToLower())
	{
		if (m_strCurrentGameMode == "squaddeathmatch0" || m_strCurrentGameMode == "teamdeathmatch0" || m_strCurrentGameMode == "teamdeathmatchc0")  // custom if statement to check game mode and stop shop usage
		{
			if (item.Enabled == enumBoolYesNo.Yes)
			{
				// MORE THAN 900 LINES OF CODE IN BETWEEN
			}
		
		else // if game mode is not one of above , error message is displayed
		{
			this.ExecuteCommand("procon.protected.send", "admin.say", m_strCurrencyInstanceName + ": Error. The shop is not available in this game mode. Purchases are only allowed in Deathmatch modes.", "player", strSpeaker);
		}
		break;
	}
}
this.m_strPreviousMessage = strMessage;
Were we wanting to include most game modes and only exclude a few, the if statement could be changed to != and use && instead of || (and instead of or).
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by RGFrog*:

 

...

 

It seems that after creating a db then just putting the .cs file in procon and restart, it is working like your instructions said.

However, I'm getting this:

[17:38:34 56] Currency error: System.Data.Odbc.OdbcException: ERROR [iM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified...

 

Does this mean something's wrong?

 

Thanks and I really like the plugin and looking forward to new features/updates

We ran into this problem as well and i'm posting this as I couldn't find a solution on the interwebs.

 

There are two things that lead to this:

 

1. The plugin specifically calls for the 5.1 ODBC driver. If you don't have that installed and aren't choosing it when setting up the connector, it will fail.

 

The fix is to install the 5.1.11 driver AND choose that driver when setting up the connector -OR- go through the code and change every instance of 'DRIVER={MySQL ODBC 5.1 Driver}'; to reflect 5.2 or whatever version of the driver you've installed.

 

2. When you are setting up your connector, the name field MUST be 'Currency'.

 

The fix is to use 'Currency' as the name or change the plugin code around line 137 to reflect what you input in the name field when you setup the connector:

 

Code:

private System.Data.Odbc.OdbcConnection OdbcCon = new System.Data.Odbc.OdbcConnection("DSN=Currency");  // change 'Currency' to whatever you entered
This is for those new to the plugin, like we were, that will grab the latest MySQL install and install the latest ODBC driver.

 

Our solution was to install the 5.1.11 odbc driver and use Currency in the name field when setting up the connector. But you don't have to, just be aware that you'll have to make some changes to the code before it will work. Without using or making the changes procon will NOT connect to MySQL and the currency plugin will not be able to create tables or populate the database.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Athlon*:

 

Is the mute command a chat mute? If so I cant get it to work at all. All the other items work fine just not mute.

Yes, 'mute' should keep a player from being able to use chat. Do you get an error when trying to use it? Post your shop config for that item here so I can have a look.

 

EDIT: Never mind! Mute only works in BFBC2

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by IAF-SDS*:

 

Yes, 'mute' should keep a player from being able to use chat. Do you get an error when trying to use it? Post your shop config for that item here so I can have a look.

Wait, what?

 

I was under the belief that there is no mute ability to prevent someone from typing chat in BF3 like there is in BFBC2.

 

Does right-clicking on a player in ProCon and selecting Text Chat Moderation > Muted work for you guys to remove someone's ability to type in chat? (It doesn't work for me, that's why I ask.)

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by webster*:

 

Sorry for my error guys - wasn't fully awake when I posted that above. You are correct, BFBC2 only for mute.......

Oh right thats a shame, was looking forward to mute some certain players lol.

 

Another thing I wanted to know. Is it possible to yell the shop items 1 by 1 similar to how BF3 Chat, GUID, Stats and Map Logger yells the player stats? When someone types @shop all the items scroll so fast that no one can see the 1st couple of items.

 

One last thing sry :smile: This is a noob question but when you slit someones throat and steal their dog tags is that a melee or knife?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Athlon*:

 

Another thing I wanted to know. Is it possible to yell the shop items 1 by 1 similar to how BF3 Chat, GUID, Stats and Map Logger yells the player stats? When someone types @shop all the items scroll so fast that no one can see the 1st couple of items.

Not with Currency. There may be another plugin, however, that will give you a work-a-round. You could set the other plugin so that when someone types the command it will respond with a series of yells. If you do that, you would shut the same command off in Currency.

 

One last thing sry :smile: This is a noob question but when you slit someones throat and steal their dog tags is that a melee or knife?

Yes
* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 months later...

Originally Posted by shadow2k1*:

 

is this for a single player or for team vs team?

if it is for team vs team, is there a way you can add an option to make it 1 random person and when that person is killed another random person is choosen and without letting anyone know they are the target person?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Athlon*:

 

^^^

You may have posted your question in the wrong forum, or you are missing the point of Currency completely.

 

Currency is collected, earned, spent and taken away while you play on your server. Players collect, earn, spend and have their currency taken away while they play.

 

Other than that, it has no impact on the game. It's just an added feature available for your server.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by shadow2k1*:

 

^^^

You may have posted your question in the wrong forum, or you are missing the point of Currency completely.

 

Currency is collected, earned, spent and taken away while you play on your server. Players collect, earn, spend and have their currency taken away while they play.

 

Other than that, it has no impact on the game. It's just an added feature available for your server.

"AutoBounties are bounties that are automatically placed on player's heads for achieving a specified killstreak. For instance, you can configure Currency to put a 25 Currency bounty on someone's head if they get 10 kills in a row, then 5 more for each additional kill. The first person to kill the player with the bounty on his head claims the bounty!"

 

so what is this feature for?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by shadow2k1*:

 

^^^

 

Just what it says. What part of it do you not understand?

what im asking is does this or can this randomly select 1 person to have a bounty instead of basing it on a players kill streak or any other achievement

im looking for a "tag" type of thing this is nice but without the bells n whistles if you will.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Athlon*:

 

^^^

 

Maybe, but that would be a major undertaking for me. Real life has gotten in the way of me continuing to develop this plugin.

 

I am continuing to support it by answering questions here, however.

 

You are welcome to add new features if you would like, as a few others have done.

* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 months later...
  • 2 months later...

Originally Posted by TopClans*:

 

Hi guys, I`ve got a problem with that plugin.

First, I installed "BF3 Chat, GUID, Stats and Map Logger", and it works fine.

After that I installed the currency plugin, connected it to the same DB - and plugin won`t run.

It shows error:

Currency error: System.Data.Odbc.OdbcException: ERROR [iM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

at System.Data.Odbc.OdbcConnection.HandleError(OdbcHa ndle hrHandle, RetCode retcode)

I tried to use other database - the same result. As I see, the problem is that plugin cannot connect to DB. I tried to switch off stats plugin, but it didn`t help. I`m using procon hosting via GameServers.com. Can somebody help me?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Athlon*:

 

Unfortunately my plugin will not work with a Gameservers hosted server.

 

The other plugin you quoted will, but only the most recent version. They used to have the same problem with them. The developer of that plugin created a work-around with his latest version.

 

I have stopped work on Currency. If someone would like to add the fix for Gameservers they are welcome to do so.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TopClans*:

 

Unfortunately my plugin will not work with a Gameservers hosted server.

 

The other plugin you quoted will, but only the most recent version. They used to have the same problem with them. The developer of that plugin created a work-around with his latest version.

 

I have stopped work on Currency. If someone would like to add the fix for Gameservers they are welcome to do so.

okay, thanks for your fast answer. can you advise some other procon hosting, that would work with your plugin?
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 months later...

Originally Posted by usbigoil*:

 

Are there any new plans to make it work with BF4? I used currency with BF3 with great success, but now with the Procon layer on the Fragnet gameserver it will not connect , even with all outgoing ODBC connectors enabled. So same issue as TopClans.

Any plugin developers working on it?

* Restored post. It could be that the author is no longer active.
Link to comment
  • 1 year later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.