Author Topic: Bot able to use Destructo wand, Help please.  (Read 679 times)

Well, Im trying to make a code, that spawns a bot with a destructowand. I got the bot to spawn, equip the wand, and swing, but, i need help makeing the bot admin so it will be able to destroy bricks. Here is the code i have:
Code: [Select]
new AIPlayer(botabc)
{
datablock="PlayerStandardArmor";
position=localclientconnection.camera.getPosition();
};
botabc.mountImage("adminWandImage",0);
botabc.isAdmin = "1";
botabc.isSuperAdmin = "1";
botabc.setImageTrigger(0,1);
botabc.client = "95825";
botabc.client.isAdmin = "1";
botabc.client.isSuperAdmin = "2";
commandToServer('setAdminLevel',"botabc","2");

Thanks for spending your time to help me.

You can't just make up a client number and have it understand. Clients are listed to the server and all that.

Then how should i make the client?

Then how should i make the client?

As I have been mostly inactive, and barring on the side Ephialtes (or someone else) would know better, or a better method than me, I am obligated to keep out of the actual coding process and only exclaim minor reasons for why your code may not work.

Code: [Select]
botabc.client = new AiConnection()
{
   isAdmin = 1;
   name = "botabc";
   player = botabc.getID();
};

« Last Edit: May 24, 2010, 05:52:36 PM by FOX TAIL »

Give it to me or show me what to do when you are done okay?
It's funny how you don't really notice the fact that the whole code is being posted on the thread and instead treat this like a suggestions and requests thread.. Oh well.

Amade is the one that you should listen to, he knows what he's doing. (Mega, don't take this personally, I just haven't seen any of your mods and I don't find your posts helpful to the topic subject)

It's funny how you don't really notice the fact that the whole code is being posted on the thread and instead treat this like a suggestions and requests thread.. Oh well.

Amade is the one that you should listen to, he knows what he's doing. (Mega, don't take this personally, I just haven't seen any of your mods and I don't find your posts helpful to the topic subject)

I'm sorry, but I haven't coded in a while, and digging up stuff to remember how to do what he's asking isn't really my priority. All I could do was tell him that how he's doing it seems more complex than needed. Sorry.

I'm sorry, but I haven't coded in a while, and digging up stuff to remember how to do what he's asking isn't really my priority. All I could do was tell him that how he's doing it seems more complex than needed. Sorry.
I wasn't blaming you, i was just pointing it out for future advice ._.