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
Bot !help function

 
Post new topic   Reply to topic Printable version
 View previous topic  3 Questions MervBot Post :: Post logicbot++ not specing players  View next topic  
Author Message
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: Tue Aug 19, 2003 6:29 pm    Post subject: Bot !help function Reply to topic Reply with quote

I'm programming a little plugin right now and I did this:
case OP_Player:
{ // Player-level commands
// sendPrivate(p, "!about (query me about my function)");
sendPrivate(p, "!about !ship !capital");
}

But it won't show the lines when I do !help.
I checked !plugin and it says it was loaded, anyone have any idea why it didn't work?

Also: How do you make operatives in commands?
Like !ship [#].
_________________
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
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Wed Aug 20, 2003 2:52 pm    Post subject: Reply to topic Reply with quote

Read this MervBot tutorial by .

You have to be careful because bit's and pieces of code are left out such in the case to use atoi (your !ship [#]) you need to include

#include <stdlib.h>

in command.cpp, in the top portion like so:

#include "spawn.h"
#include <stdlib.h>
#include "..\algorithms.h"


To address how to do a command here's another code sniplet

if (c->check("lt_on")) { // !lt_on [#]
int temp = 500; // default value incase [#] is not a number.

if (isNumeric(c->final))
temp = atoi(c->final); // change text number into int (stdlib)
}



Hopes this helps, if not just IM me, it was a pain to post code on here icon_smile.gif

- cyp
Back to top
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Wed Aug 20, 2003 2:54 pm    Post subject: Reply to topic Reply with quote

CypherJF wrote:
Read this MervBot tutorial by .

Sorry I lost my mind icon_smile.gif I totally forgot to stick the URL and name in there... OY!

Quote:

Working on a simple MERVBot Tutorial:

http://www.dueling.net/MERVbot_tutorial.html

just started on it so it's not done yet, hopefully it'll be helpful to new bot programmers

Underlord
DZ Sysop


It has missing code here and there, formatting isn't very nice but at least it explains some stuff ... C++ definately a needed knowledge (w/ experience coding helps a lot ...)

Like i said any help just IM me
-cyp
Back to top
View users profile Send private message Add User to Ignore List
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: Wed Aug 20, 2003 6:01 pm    Post subject: Reply to topic Reply with quote

Cool! Thanks that helped. I got it all working now!
Any idea with the !help info though?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Thu Aug 21, 2003 2:53 pm    Post subject: Reply to topic Reply with quote

Are you sure plugins say "!about (query me about my function)"? If you had more than one plugin loaded and someone did !help they would get the message several times.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website 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: Thu Aug 21, 2003 6:01 pm    Post subject: Reply to topic Reply with quote

Yeah I know, but it's not the problem.
Now I've just changed it to !myship but it still doesn't display... So weird :-/
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
ExplodyThingy
Server Help Squatter


Age:38
Gender:Gender:Male
Joined: Dec 15 2002
Posts: 528
Location: Washington DC
Offline

PostPosted: Fri Aug 22, 2003 10:52 pm    Post subject: Reply to topic Reply with quote

Read the above switch statement above it, and make sure the break statements arent preventing it from working. Take out al the breaks up to the first message sent.
_________________
There are no stupid question, but there are many inquisitive idiots.
Loot

Dr Brain> I hate clean air and clean water. I'm a member of Evil Conservitive Industries
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
ShortyMatt
Seasoned Inquisitor


Age:35
Gender:Gender:Male
Joined: Aug 05 2003
Posts: 383
Location: Manassas, VA, USA
Offline

PostPosted: Fri Aug 22, 2003 11:26 pm    Post subject: Reply to topic Reply with quote

sooo dam confusing
_________________
User Status = Offline! ..
^^ thats garbage
Back to top
View users profile Send private message Add User to Ignore List AIM Address 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: Fri Aug 22, 2003 11:52 pm    Post subject: Reply to topic Reply with quote

OMG, I feel so stupid now.
Explody that was the prob icon_razz.gif Thanks!

No I'm wondering, why were there breaks there in the first place...
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: 158 page(s) served in previous 5 minutes.

phpBB Created this page in 0.459472 seconds : 33 queries executed (93.9%): GZIP compression disabled