Server Help

Bot Questions - how do i ?

Anonymous - Sat Feb 15, 2003 8:43 am
Post subject: how do i ?
what files do i need to edit to add fxns to bot?
.h and .cpp, just name them.
Mine GO BOOM - Sat Feb 15, 2003 2:01 pm
Post subject:
Fxns = functions? You don't actually need to create new files to add functions to the bot, you can just edit other files and add to it. If you need to know more about it, jb_google.gif for some help sites.
ExplodyThingy - Sat Feb 15, 2003 3:23 pm
Post subject:
assuming you mean the source for merv, look in commands.cpp. its essentially a gigantic version of commands.cpp that exists in the empty plugin source. thatll let you add some !commands to yer bot directly.
mister_manners - Sun Feb 16, 2003 6:26 pm
Post subject:
Code: Show/Hide

case OP_Player:
      {   // Player-level commands
         if (c->check("about"))
         {
            sendPrivate(p, "I am a plain vanilla flavored bot.  Yup, just as plain and useless as can be.");
         }
                        if (c->check("killme"))
                        {       
                                sendPrivate(p, *shipreset);

                        }
      }
   }
}

what would this do?
Anonymous - Mon Feb 17, 2003 4:14 am
Post subject:
This would give an error =P

Code: Show/Hide
sendPrivate(p, "*shipreset");


u have to put the text to send in ""...

and it would reset the ship to inital bounty when player sends "!killme"
mister_manners - Mon Feb 17, 2003 1:04 pm
Post subject:
so thats all to add a fxn (function)?
mister_manners - Mon Feb 17, 2003 1:05 pm
Post subject:
so fukin eZ, i m a 13 yearold! : )
ExplodyThingy - Mon Feb 17, 2003 5:22 pm
Post subject:
Good for you.
It really is quite simple. Generally the reason for a lack of coders is because many people are instantly overwhelmed. Had more people just sat down to look a little harder, they woudl see that its nat as hard as youd think.

And just for future reference, get in the habbit of doing "else if" after your first "if"
mister_manners - Wed Feb 19, 2003 1:00 pm
Post subject:
Code: Show/Hide

case OP_Player:
      {   // Player-level commands
         if (c->check("about"))
         {
            sendPrivate(p, "I am a plain vanilla flavored bot.  Yup, just as plain and useless as can be.");
         }
/*************else if **********/(c->check("killme"))
                        {       
                                sendPrivate(p, *shipreset);

                        }
      }
   }
}

like that without comment? new_let_it_all_out.gif
SOS - Wed Feb 19, 2003 2:44 pm
Post subject:
yup
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group