Jump to content

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


ImportBot

Recommended Posts

Originally Posted by ronin*:

 

I have an idea for a feature for the plugin . Its to add a Respect to a player it was firsst used on css a few years back on something called final battleground . on there they were called UP's and DOWNS so if you like a player you would give him an UP and if you didn't like them you would give them a DOWN . Now i know you can add this to the plugin just like add the buy a beer but what i would like it also to do was store the info on the db and then the player be able to get it up in game and i would also like it to be show the final tally like this

 

ronin gets 3 ups in one round

ronin gets 4 downs in the same round

 

so it would show

 

ronin is on -1

 

and just keep on like that adding and subtracting from the db .

 

Im a little tired so not sure if i have explained as well as i should have but what do you think ? .

* 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 Athlon*:

 

I have an idea for a feature for the plugin . Its to add a Respect to a player it was firsst used on css a few years back on something called final battleground . on there they were called UP's and DOWNS so if you like a player you would give him an UP and if you didn't like them you would give them a DOWN . Now i know you can add this to the plugin just like add the buy a beer but what i would like it also to do was store the info on the db and then the player be able to get it up in game and i would also like it to be show the final tally like this

 

ronin gets 3 ups in one round

ronin gets 4 downs in the same round

 

so it would show

 

ronin is on -1

 

and just keep on like that adding and subtracting from the db .

 

Im a little tired so not sure if i have explained as well as i should have but what do you think ? .

I like the concept, but wouldn't that make it an entirely different plugin?

 

Reputation Points perhaps?

 

I think it would need to be a separate plugin. Otherwise I could take away your currency whenever I'd want to.

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

Originally Posted by Sponge*:

 

Hey athlon hope you might be able to give me a few pointers till you get time to add the weapon required to collect bounty to you plugin

 

looked at the code and have changed line 3411 to

 

"if (Weapon weaponUsed="Melee" && m_dicPlayersAndBounties.ContainsKey(Victim.Soldier Name) && m_dicPlayersAndBounties[Victim.SoldierName] > 0 && Killer.SoldierName != Victim.SoldierName ) "

 

This does not seem to work can you give me a few points where I could change the code to only pay bounty on a melee kill

 

Thanks

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

Originally Posted by ronin*:

 

Hey Ronin hope you might be able to give me a few pointers till you get time to add the weapon required to collect bounty to you plugin

 

looked at the code and have changed line 3411 to

 

"if (Weapon weaponUsed="Melee" && m_dicPlayersAndBounties.ContainsKey(Victim.Soldier Name) && m_dicPlayersAndBounties[Victim.SoldierName] > 0 && Killer.SoldierName != Victim.SoldierName ) "

 

This does not seem to work can you give me a few points where I could change the code to only pay bounty on a melee kill

 

Thanks

Im a little confused lol i am not the developer for this plugin you need to speak to athlon :smile: .
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Athlon*:

 

Hey athlon hope you might be able to give me a few pointers till you get time to add the weapon required to collect bounty to you plugin

 

looked at the code and have changed line 3411 to

 

"if (Weapon weaponUsed="Melee" && m_dicPlayersAndBounties.ContainsKey(Victim.Soldier Name) && m_dicPlayersAndBounties[Victim.SoldierName] > 0 && Killer.SoldierName != Victim.SoldierName ) "

 

This does not seem to work can you give me a few points where I could change the code to only pay bounty on a melee kill

 

Thanks

Unfortunately I don't have a lot of time right now to test stuff :sad:

 

But - try 'weaponUsedName' instead

 

Or try:

 

Code:

if (m_lstMuggingWeapons.Contains(weaponUsedName) && m_dicPlayersAndBounties.ContainsKey(Victim.SoldierName) && m_dicPlayersAndBounties[Victim.SoldierName] > 0 && Killer.SoldierName != Victim.SoldierName)
And set your Mugging weapon to Melee
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Sponge*:

 

Thanks Athlon tried your code did not quite work as intended but had an interesting side effect

 

The bounty was paid out for shooting me and I added another bounty then the melee kill got both lots of the bounty the next bounty was just paid out as normal.

 

Thanks for trying to help I understand your busy ill keep reading the code and trying a few things out.

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

Originally Posted by Athlon*:

 

Thanks Athlon tried your code did not quite work as intended but had an interesting side effect

 

The bounty was paid out for shooting me and I added another bounty then the melee kill got both lots of the bounty the next bounty was just paid out as normal.

 

Thanks for trying to help I understand your busy ill keep reading the code and trying a few things out.

Thanks for letting me know. Interesting.

 

If you come up with anything, please pass it along. You can customize it as much as you would like!

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

Originally Posted by Sabn0ck*:

 

I would really like to use this. I'm having problems setting everything after the msql.

I have remote Procon Layer and a retail webhost/mqls.

Anyone care to help me out?

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

Originally Posted by Sponge*:

 

Thanks for the code line I got it going just had to change two lines

 

The new code is

 

Code:

//*****************************************
            //Player Bounties
            //*****************************************
            if (m_lstMuggingWeapons.Contains(weaponUsedName) && m_ebynEnablePlayerBounties == enumBoolYesNo.Yes && Killer.SoldierName != Victim.SoldierName)
and

 

Code:

//*****************************************
            //Bounty Payoff
            //*****************************************
            if (m_lstMuggingWeapons.Contains(weaponUsedName) && m_dicPlayersAndBounties.ContainsKey(Victim.SoldierName) && m_dicPlayersAndBounties[Victim.SoldierName] > 0 && Killer.SoldierName != Victim.SoldierName)

Unfortunately I don't have a lot of time right now to test stuff :sad:

 

But - try 'weaponUsedName' instead

 

Or try:

 

Code:

if (m_lstMuggingWeapons.Contains(weaponUsedName) && m_dicPlayersAndBounties.ContainsKey(Victim.SoldierName) && m_dicPlayersAndBounties[Victim.SoldierName] > 0 && Killer.SoldierName != Victim.SoldierName)
And set your Mugging weapon to Melee
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Athlon*:

 

@Sponge

 

Great work. Glad you got it working for you. I may incorporate something like that in a future release when I get more time.

 

 

@Sabn0ck

 

I will help, but I don't know what problems you are having. I need more information from you. Where do I start with the little you told me?

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

Originally Posted by Sabn0ck*:

 

@Sabn0ck

 

I will help, but I don't know what problems you are having. I need more information from you. Where do I start with the little you told me?

I was able to create db with my hosting account at godaddy and created it with 'remote access' permissions. The next step in tutorial is the Workbench. The first instructions from that part don't jive with what I'm seeing. I can connect with Workbench but I don't see the file that is to be edited.

 

This is where i stoppped and asked for help, mainly because I don't want to screw up beyond the point of no return, lol

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

Originally Posted by Athlon*:

 

I was able to create db with my hosting account at godaddy and created it with 'remote access' permissions. The next step in tutorial is the Workbench. The first instructions from that part don't jive with what I'm seeing. I can connect with Workbench but I don't see the file that is to be edited.

 

This is where i stoppped and asked for help, mainly because I don't want to screw up beyond the point of no return, lol

But what is it you are trying to do, or what has gone wrong?

 

I'm not familiar with Workbench (it's optional anyway), so I cannot tell what 'step' you are on in getting the plugin installed and working.

 

Where are you stuck?

 

Which step are you on in my instructions on page one?

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

Originally Posted by Athlon*:

 

I was able to create db with my hosting account at godaddy and created it with 'remote access' permissions. The next step in tutorial is the Workbench. The first instructions from that part don't jive with what I'm seeing. I can connect with Workbench but I don't see the file that is to be edited.

 

This is where i stoppped and asked for help, mainly because I don't want to screw up beyond the point of no return, lol

But what is it you are trying to do, or what has gone wrong?

 

I'm not familiar with Workbench (it's optional anyway), so I cannot tell what 'step' you are on in getting the plugin installed and working.

 

Where are you stuck?

 

Which step are you on in my instructions on page one?

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

Originally Posted by Sabn0ck*:

 

But what is it you are trying to do, or what has gone wrong?

 

I'm not familiar with Workbench (it's optional anyway), so I cannot tell what 'step' you are on in getting the plugin installed and working.

 

Where are you stuck?

 

Which step are you on in my instructions on page one?

I'm sorry, I was not on your instructions, I clicked the link in the 2nd line, "Setting up a MySQL database is simple: if you need instructions on what to do, or have no idea what MySQL means, see the great Howto blactionhero made here."

 

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

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

at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcCo nnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)

at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConn ection outerConnection, OdbcConnectionString connectionOptions)

at System.Data.Odbc.OdbcConnectionFactory.CreateConne ction(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)

at System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)

at System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

at System.Data.Odbc.OdbcConnection.Open()

at PRoConEvents.Currency.SetCurrency(Int32 strCC, String strSoldierName)

 

Does this mean something's wrong?

 

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

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

Originally Posted by Athlon*:

 

I'm sorry, I was not on your instructions, I clicked the link in the 2nd line, "Setting up a MySQL database is simple: if you need instructions on what to do, or have no idea what MySQL means, see the great Howto blactionhero made here."

 

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

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

at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcCo nnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)

at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConn ection outerConnection, OdbcConnectionString connectionOptions)

at System.Data.Odbc.OdbcConnectionFactory.CreateConne ction(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)

at System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)

at System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

at System.Data.Odbc.OdbcConnection.Open()

at PRoConEvents.Currency.SetCurrency(Int32 strCC, String strSoldierName)

 

Does this mean something's wrong?

 

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

If you followed the tutorial perfectly it should work. Sorry, I'm not good enough with MySql to be able to help you properly. That error you are getting means something is missing and/or you did something incorrectly.

 

Did you give your database at GoDaddy permission to receive information from where your Procon Layer is? Where the tables created on your database?

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

Originally Posted by KTwo*:

 

Does this mean something's wrong?

 

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

I think you forgot to do this step in the blactionhero tutorial: MySQL Connector/ODBC Installation and Configuration.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Sabn0ck*:

 

I think you forgot to do this step in the blactionhero tutorial: MySQL Connector/ODBC Installation and Configuration.

Besides forgetting, that's exactly the problem due to not using the free mysql as shown in the mysql tutorial. Nothing jives from that point on and I don't know how to set up on my retail hosting account.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Athlon*:

 

Besides forgetting, that's exactly the problem due to not using the free mysql as shown in the mysql tutorial. Nothing jives from that point on and I don't know how to set up on my retail hosting account.

Will your provider help?

 

I took a quick look on GoDaddy's web site and did a search there, but did not find much help. Try and contact their support to see if they will help you with that step.

 

Who hosts your Procon layer, by the way?

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

Originally Posted by Athlon*:

 

Thanks for looking into it. I will put in a support ticket today and see if they can help.

 

Procon Layer hosted by gameservers.com

Bad news - None of the Procon plugins that use databases will work with Gameservers. They do not allow it. :mad:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Sabn0ck*:

 

From gameservers.com support:

"We do allow plugins to connect to databases. However configuration of the plugins is up to you."

 

Haven't heard from GoDaddy support yet.

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

Originally Posted by Wambo*:

 

Can you not setup a separate database from your website host and link it to your server via typing in the details? servers dont come with database but webhosts do.... surely its same thing? or would it cause lag?

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

Originally Posted by Athlon*:

 

@Wambo - Of course, and no lag at all.

 

@Sabn0ck - Unfortunately Gameservers will not allow the necessary stuff you need to make it work. Check more of the thread I referenced above for many statements about that. I gave you just one example. I use them for our game servers and TS, but we host our own MySql database.

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

Originally Posted by Sabn0ck*:

 

After asking gameservers.com support a more direct question, this is their reply:

"We do not block sql connections as many of our servers run plugins that connect to websites to upload game stats to sql databases etc. Now I do not see any requirements on the plugins homepage, but if it requires odbc installed on the machine then you are correct and it will not function. Note this is not due to us blocking the connection, but more of a compatibility and reliability issue with regards to the odbc service."

 

So I guess I have to move my Procon

 

I will probably have to call GoDaddy as the support emails are getting me no useful information.

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

Originally Posted by Athlon*:

 

I have no first hand experience w/GoDaddy, but I've heard their support is spotty at best.

 

I use InMotion Hosting, and they will always answer my emails within an hour. I needed them on the 4th of July Wednesday morning, and they responded right away! (I've only had to contact them 3 times in two years, and one of those times was during the initial set up.)

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

Originally Posted by Athlon*:

 

Oh they answer quickly but since I don't know what I'm doing, I don't understand their answers.

Ha! Well, when you have the provider you need, we're here to help. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.