Author |
Message |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Tue Aug 19, 2003 6:29 pm Post subject: Bot !help function |
 |
|
|
|
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 |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Wed Aug 20, 2003 2:52 pm Post subject: |
 |
|
|
|
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
- cyp |
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Wed Aug 20, 2003 2:54 pm Post subject: |
 |
|
|
|
CypherJF wrote: | Read this MervBot tutorial by . |
Sorry I lost my mind I totally forgot to stick the URL and name in there... OY!
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 |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Wed Aug 20, 2003 6:01 pm Post subject: |
 |
|
|
|
Cool! Thanks that helped. I got it all working now!
Any idea with the !help info though? |
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Thu Aug 21, 2003 2:53 pm Post subject: |
 |
|
|
|
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 |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Thu Aug 21, 2003 6:01 pm Post subject: |
 |
|
|
|
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 |
|
 |
ExplodyThingy Server Help Squatter
Age:38 Gender: Joined: Dec 15 2002 Posts: 528 Location: Washington DC Offline
|
Posted: Fri Aug 22, 2003 10:52 pm Post subject: |
 |
|
|
|
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 |
|
 |
ShortyMatt Seasoned Inquisitor

Age:35 Gender: Joined: Aug 05 2003 Posts: 383 Location: Manassas, VA, USA Offline
|
Posted: Fri Aug 22, 2003 11:26 pm Post subject: |
 |
|
|
|
sooo dam confusing _________________ User Status = Offline! ..
^^ thats garbage |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Fri Aug 22, 2003 11:52 pm Post subject: |
 |
|
|
|
OMG, I feel so stupid now.
Explody that was the prob Thanks!
No I'm wondering, why were there breaks there in the first place... |
|
Back to top |
|
 |
|