Author |
Message |
.:IceRabbit:. Newbie
Gender: Joined: Aug 14 2006 Posts: 15 Offline
|
Posted: Tue Aug 15, 2006 2:46 am Post subject: %killer and %killed's bounty |
 |
|
|
|
I am working on a module and I want to add the following features. I marked the ones I have done, but I listed them to help convey my idea.
- Players starts with 0 bty on spawn. (Already done)
- The player picks up a green and gets 1 bty. (Already done)
- The player is killed and the %killer gets %killed exact bty added to his own. (<-- Need help)
- The player goes to a rgn and the server takes his bty, adds it to another variable (stores it) and then resets his bty to 0. (<-- Need help)
So, in essence, I want to let the players deposit their bounties, but I would rather not have to make them respawn to get the 0 bty.
I know ?prize without the "#" adds to the player's bounty and I just found out ?shipreset resets the bounty too. So all I really need to know is how can I have the server read the player's bounty properly in both when they enter a rgn and on death (I read that the int bounty in CB_KILL is what the %killer gets, not what the %killed had...)
Thanks in advanced for any assistance. |
|
Back to top |
|
 |
Chambahs Power attack

Joined: Jun 19 2005 Posts: 820 Offline
|
Posted: Tue Aug 15, 2006 8:29 am Post subject: |
 |
|
|
|
Here, go check this out:
http://forums.minegoboom.com/viewtopic.php?p=61855#61855
Download the modules and look through chit.py. There is a lot of green/bounty coding in there. Something should help you out if you look through that.
Also this brings me to my other question. Are you coding in C or Python? |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue Aug 15, 2006 10:30 am Post subject: |
 |
|
|
|
Look in the player struct for the bounty. Should be in there.
You may be able to reset bounty by sending them a position packet with 0 bounty. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
 |
.:IceRabbit:. Newbie
Gender: Joined: Aug 14 2006 Posts: 15 Offline
|
Posted: Tue Aug 15, 2006 11:07 am Post subject: |
 |
|
|
|
@ Chambahs: I went back 7 pages of topics looking for an answer before I posted and the was on of the few I skipped thinking it had nothing to do with what I was looking for. >.<
@ Dr Brain: Is it there? I use Dev-C++ and if you ever used it, you would know how it had the little referance popup with pointers, like when you type "p->" it tries to finish it. "bounty" or "bty" was not in that window, but its my fault for being lazy and not looking myself.
Thanks again for the replies. |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue Aug 15, 2006 1:11 pm Post subject: |
 |
|
|
|
I'm sure it's in there somewhere. May be part of a substructure. |
|
Back to top |
|
 |
.:IceRabbit:. Newbie
Gender: Joined: Aug 14 2006 Posts: 15 Offline
|
Posted: Tue Aug 15, 2006 3:01 pm Post subject: |
 |
|
|
|
Yup: "killed->position.bounty"
I kept trying killed->pos.bounty. >.<
Thanks for your help.
<You can close the topic now if you please. > |
|
Back to top |
|
 |
Animate Dreams Gotta buy them all! (Consumer whore)

Age:37 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Wed Aug 16, 2006 10:03 am Post subject: |
 |
|
|
|
Topics don't really get closed here, I have a theory that MGB secretly loves bumps.
Anyway, I think this is a really cool concept. I assume people will be depositing their war spoils off at a bank, or something? Anyway, you may want to look through the scoring modules as well. I won't say the scoring modules aren't good, because they do exactly what they're supposed to do which is emulating Subgame's scoring, but they definitely aren't very exciting. Anyway, if you are going to be storing the bounty that they deposit elsewhere, you may want to consider adding it to their score? Also, you may want to watch out... if your ships have items, people may abuse your region automatically ?shipresetting them. Personally, I'd just set it so you have to have at least a certain amount of bounty before you can deposit it. |
|
Back to top |
|
 |
.:IceRabbit:. Newbie
Gender: Joined: Aug 14 2006 Posts: 15 Offline
|
Posted: Tue Aug 22, 2006 2:36 am Post subject: |
 |
|
|
|
I know what you mean by the ?shipreset, but actually it will do the opposite. The ship settings will be next to blank and people will buy items to add to their ships. Only difference from other zones is this will be mixed between the two current prizing styles; the items will be one time use, but say you buy 4 bursts and use 2, you will spawn with the remaining 2 when you die/enter the zone.
So really, the shipreset will wipe the player clean of all prizes, so I'll just make a function to reprize the player and call it here, right after death, and after login.  |
|
Back to top |
|
 |
|