Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Bounty Command

 
Post new topic   Reply to topic Printable version
 View previous topic  BLOB into Database Post :: Post TW MER /!buy <item> doesn't work...  View next topic  
Author Message
xsp0rtsfanx
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Dec 27 2004
Posts: 168
Location: California
Offline

PostPosted: Sun Sep 11, 2005 10:28 pm    Post subject: Bounty Command Reply to topic Reply with quote

Is there a command or a way to make a bot or something prize you when you have a certain amount of bounty? I'm trying to make a mini plugin and I could figure out the code if I knew if there was a command to check for bounty through the bot.
Back to top
View users profile Send private message Add User to Ignore List MSN Messenger
Purge
Episode I > Eposide III
Jar-Jar is kool


Age:35
Gender:Gender:Male
Joined: Sep 08 2004
Posts: 2019
Offline

PostPosted: Sun Sep 11, 2005 10:45 pm    Post subject: Reply to topic Reply with quote

In MERV, you'd do something like this:
Code: Show/Hide
if (p->bounty == x)
{
      sendPrivate(p, *prize ##);
}
Back to top
View users profile Send private message Add User to Ignore List
xsp0rtsfanx
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Dec 27 2004
Posts: 168
Location: California
Offline

PostPosted: Mon Sep 12, 2005 12:41 am    Post subject: Reply to topic Reply with quote

yea i'm using merv. i thought something like that wouldnt work because i didnt think it would detect the bounty. so if i wanted an arena message to say when a person got killed with a lot of bounty or whatever it would look like this

Code: Show/Hide

If {p->bounty => x}
            sendPublic{p, *arena %tickname was killed by %name after having                   x bounty};
}

or is that like way off.. also how would it detect if a person got killed

(ps is it => or >= for greater than or equal to)
Back to top
View users profile Send private message Add User to Ignore List MSN Messenger
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Mon Sep 12, 2005 1:04 am    Post subject: Reply to topic Reply with quote

it's just like it's said, greater than or equal to (>=). Nonetheless you could have tested this out instead of asking, as only one of them will compile
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Mon Sep 12, 2005 6:28 am    Post subject: Reply to topic Reply with quote

If you want to have it detect bounty reliable, set 'NoisySpectator' to 1 in mervbot.ini. (And then you can detect the bounty in the EVENT_PlayerMove Event)

However, beware of the warnings given by 50% Packetloss about NoisySpectator in this topic.

Can a mod please move this topic to Bot Questions forum icon_confused.gif
_________________
Nickname: Maverick (I changed my name!)
TWCore developer | Subspace statistics
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Mon Sep 12, 2005 8:33 pm    Post subject: Reply to topic Reply with quote

NoisySpectator is almost always a bad idea. However, bounty only goes up during kills and prizes (right?) so all you have to do is check on EVENT_PlayerDeath and EVENT_PlayerPrize. Come on, Mav, use your brain.

The one possible circumstance in which this might not work is the smod command *prize, I'm not sure whether that sends a player prize packet. Of course, you could always check on EVENT_PlayerPosition without NoisySpectator if you want.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Mon Sep 12, 2005 8:33 pm    Post subject: Reply to topic Reply with quote

:/
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
xsp0rtsfanx
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Dec 27 2004
Posts: 168
Location: California
Offline

PostPosted: Mon Sep 12, 2005 9:37 pm    Post subject: Reply to topic Reply with quote

ok so literally heres how my code should look.. or would this be way wrong

Code: Show/Hide


If {p >= x}
{
         sendPrivate {*prize #};
}

If {EVENT_playerdeath p >= x}
{
        sendPublic {*arena Player has been killed after having x bounty};
}


also would this go under a .cpp file or .c file?
Back to top
View users profile Send private message Add User to Ignore List MSN Messenger
Muskrat
Server Help Squatter


Age:38
Joined: Aug 24 2004
Posts: 829
Location: Swamp
Offline

PostPosted: Mon Sep 12, 2005 9:46 pm    Post subject: Reply to topic Reply with quote

That would be WAY wrong. First you have braces, { and } where there should be parentheses, ( and ). Also, dont capitalize keywords (if not If). You need a player argument first, then a string in the sendPrivate function. Also, get the capitalizing on EVENT_PlayerDeath right. And in your first conditional p isnt going to compare with any integer x, so I'd suggest p->bounty, that looks liek what you are going for.


jesus... lol I don't even think thats everything.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Mon Sep 12, 2005 10:04 pm    Post subject: Reply to topic Reply with quote

I would use something like..
String s;
s += "arena ";

blah blah blah
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
xsp0rtsfanx
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Dec 27 2004
Posts: 168
Location: California
Offline

PostPosted: Mon Sep 12, 2005 10:18 pm    Post subject: Reply to topic Reply with quote

alright thanks for the help thus far.. i'm still trying to learn c++ so i'm getting there gradually tongue.gif
Back to top
View users profile Send private message Add User to Ignore List MSN Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Mon Sep 12, 2005 11:05 pm    Post subject: Reply to topic Reply with quote

Learn C++ before you make a bot plugin. Look at some other plugins or read stuff on http://www.cplusplus.com/doc/.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Muskrat
Server Help Squatter


Age:38
Joined: Aug 24 2004
Posts: 829
Location: Swamp
Offline

PostPosted: Mon Sep 12, 2005 11:50 pm    Post subject: Reply to topic Reply with quote

Or better yet, take an Intro to C class at your school or nearby university.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
xsp0rtsfanx
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Dec 27 2004
Posts: 168
Location: California
Offline

PostPosted: Mon Sep 12, 2005 11:56 pm    Post subject: Reply to topic Reply with quote

my school: highschool that has a java course they wouldnt let me in

nearby university/community college: no class i dont believe...

i'd have to search to find a class.. i have books so i'm gradually learning..
Back to top
View users profile Send private message Add User to Ignore List MSN Messenger
Purge
Episode I > Eposide III
Jar-Jar is kool


Age:35
Gender:Gender:Male
Joined: Sep 08 2004
Posts: 2019
Offline

PostPosted: Tue Sep 13, 2005 3:21 pm    Post subject: Reply to topic Reply with quote

Yeah, C++ for Dummies is helping me much.
Back to top
View users profile Send private message Add User to Ignore List
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Wed Sep 14, 2005 10:37 pm    Post subject: Reply to topic Reply with quote

If you can't understand at least the first several sections of this, stop until you do:

http://computer.howstuffworks.com/c.htm
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 103 page(s) served in previous 5 minutes.

phpBB Created this page in 0.948767 seconds : 39 queries executed (97.0%): GZIP compression disabled