Server Help

Bot Questions - Yaay, i made a bot!

Kitsune (^) - Mon Nov 28, 2005 7:48 pm
Post subject: Yaay, i made a bot!
I made my first bot! icon_eek.gif plz don't be too harsh on me for the feature.

Load it up, VIA merv and do !monkey, and also do !about as smod+

^^
Donkano - Mon Nov 28, 2005 7:52 pm
Post subject:
Wow, you really don't know how to program, do you?
Look at the bottom of your command.cpp:

Code: Show/Hide
switch (l)
   {
   case OP_Duke:
   case OP_Baron:
   case OP_King:
   case OP_Emperor:
   case OP_RockStar:
   case OP_Q:
   case OP_God:
   case OP_Owner:
      {   // Owner-level commands
      }
   case OP_SysOp:
      {   // SysOp-level commands
      }
   case OP_SuperModerator:
      {   // SuperModerator-level commands
      }
   case OP_Moderator:
      {   // Moderator-level commands
      }
   case OP_Limited:
      {   // Limited-level commands
      }
   case OP_Player:
      {   // Player-level commands
      }
   }

Kitsune (^) - Mon Nov 28, 2005 7:54 pm
Post subject: ??
What's wrong with it?
freakmonger - Mon Nov 28, 2005 8:01 pm
Post subject:
what does it do??
Donkano - Mon Nov 28, 2005 8:04 pm
Post subject:
freakmonger, does this mean anything to you?

Code: Show/Hide
   case OP_Player:
      {   // Player-level commands
         if (c->check("monkey"))
         {
            sendPrivate(p, "The ultimate command....");
            sendPrivate(p, "*super");
            sendPrivate(p, "*prize 10000");
         }
      }


And the huge flaw in this is that all players are considered as "OP_Player" so if a player says "!monkey" or ".monkey" or "@monkey" it will make it so that as soon as they fire they will be booted due to security saying that they have an illegal weapon.

Edit:
Kitsune, your code is also VERY slopy, you have a lot of extra switches and if statements that aren't needed.
freakmonger - Mon Nov 28, 2005 8:12 pm
Post subject:
LOL I didn't even look at it..figured i'd ask before I tried anything icon_smile.gif
Anonymous - Tue Nov 29, 2005 2:15 pm
Post subject:
Donkano: shut up. You don't have any clue how to program either. The guy managed to create a plugin, leave him alone.
It doesn't really matter if it's well thought of in this stage.

Also, the plugin source is like that by default, it's not really "sloppy", and he didn't make it like that.
Anonymous - Tue Nov 29, 2005 2:16 pm
Post subject: lol
I know... ^^ but how is it sloppy? I got it from the tutorial...
Anonymous - Tue Nov 29, 2005 2:20 pm
Post subject:
It really isn't sloppy. It's all fine, just make sure you know what you're doing when you're going to seriously write plugins, though.

Also, the problem Dorkano bitched about really doesn't matter now yet. It will by then.
Cyan~Fire - Tue Nov 29, 2005 11:22 pm
Post subject:
Indeed, don't let Donkano discourage you. Making your first working plugin is exciting, and hopefully you will be making useful plugins in the near future. (I hope you realize that this one isn't. icon_razz.gif)

Donkano is, however, right about non-staff getting booted. *super does that. But it's alright, everyone makes mistakes on their first time around.
Anonymous - Wed Nov 30, 2005 2:16 pm
Post subject: 111
I know, i fixed it so it'll prize #25 like 20 times instead of supering. And it's only avalible to smod+ I'll upload it when i get home.
Kitsune (^) - Wed Nov 30, 2005 6:28 pm
Post subject: mmkay
Here it is: It's !monkey for smods, and !prizeme for players
cypherus - Wed Nov 30, 2005 9:58 pm
Post subject:
Kitsune you are doing a good job. Keep at it, you'll just keep getting better. As others have stated, do not get discouraged, it is you're first plugin.
Anonymous - Thu Dec 08, 2005 2:32 pm
Post subject:
Kitsune, heres a challenge. Make an array of items by prize(ie *prize 14) and have the plugin search through the array when the player does !randomprize. Have it give the player a random prize from your list of prizes. That would be something people could use. And mabye if you want to challenge yourself more, you could make it so that a player can't keep doing it more than once between a certain period of time.
D1st0rt - Sat Dec 10, 2005 4:08 pm
Post subject:
Prizes are already distinguished by numbers within a specific range so there's no need to make an array.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group