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 give creds via another bot

 
Post new topic   Reply to topic Printable version
 View previous topic  What is EVENT_Tick in spawn.cpp? Post :: Post PlayerList & Zone Pop uploaded to ...  View next topic  
Author Message
Guest



Offline

PostPosted: Mon Nov 28, 2005 9:37 am    Post subject: Bot give creds via another bot Reply to topic Reply with quote

Can a TWCore bot give creds via another bot? I already have a bot that gives out creds and I am going to use a twcore bot to run an event that has a reward of creds and I want to give out the creds with the twcore bot but i'm not sure if it can do the cred command for the other bot?

thax
Back to top
Cerium
Server Help Squatter


Age:42
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Mon Nov 28, 2005 3:00 pm    Post subject: Reply to topic Reply with quote

I assume 'creds' is short for 'credits' as in a generic term for 'money', probably to buy something in your arena.

I also assume the 'creds' bot has an operator command which allows zone/arena staff to grant players x number of credits. If this is the case, simply have your other bot use this command, as it will be the easiest way to add it.

Another option would be to transfer the data through the TWCores InterProcessCommunicator class. Ill let Distort describe this one, as I have never used it myself. I do know that this will require both bots to run from the same hub, but will be a far more reliable/safe method of doing what I assume youre trying to do.

For future reference, when you request technical help on a programming related forum, it would be best to use as little AOL-sp33k as possible.
_________________
There are 7 user(s) ignoring me right now.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Mon Nov 28, 2005 5:20 pm    Post subject: Reply to topic Reply with quote

Oooook. IPC basics. First thing you have to do is establish a channel. This is done with
Code: Show/Hide
m_botAction.ipcSubscribe("channel name");
//This cannot be done in the constructor, btw (doing it on LoggedOn works though)

Once both bots have joined the channel, you can send Objects (such as the IPCMessage class) back and forth with
Code: Show/Hide
m_botAction.ipcTransmit("channel name", object);

To receive them, you have to handle the InterProcessCommunicatorEvent. You do not have to request that event, you just have to be subscribed to the channel it will be sent from.

When you kill a bot that is connected to a channel, be sure to unsubscribe it as part of the pre-death tasks with
Code: Show/Hide
public void ipcUnSubscribe("channel name");

_________________

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: 169 page(s) served in previous 5 minutes.

phpBB Created this page in 0.465113 seconds : 28 queries executed (94.6%): GZIP compression disabled