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
Loading dll

 
Post new topic   Reply to topic Printable version
 View previous topic  Cannot load plugin.. Post :: Post Ball or Setting  View next topic  
Author Message
O'Shovah
Newbie


Gender:Gender:Male
Joined: Feb 19 2005
Posts: 4
Location: Canada
Offline

PostPosted: Sat Feb 19, 2005 8:53 am    Post subject: Loading dll Reply to topic Reply with quote

I'm making a plugin that when a mod pms it !host <event>, it will load the event plugin and go the the proper arena. When the event is done it unloads that event plugin and goes back to a priv arena. I was able to make it work by editing the core, but I want it to be a plugin. This is the code from the core in command.cpp, does anyone know what I need to do to make it work as a plugin.
Code: Show/Hide

if (h->imports->importLibrary(c.final))   
         {
            String s;
            
            bool seen = false;

            for (int slot = 0; slot < DLL_MAX_LOADED; ++slot)
            {
               char *name = h->imports->getPlugin(slot);
               if (!name) continue;

               if (seen) s += ", ";
               s += name;
               seen = true;
            }

            h->botInfo.setSpawn(s.msg);
         }
Back to top
View users profile Send private message Add User to Ignore List
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sat Feb 19, 2005 11:00 am    Post subject: Reply to topic Reply with quote

Have you tried adding the bot to the operators list and have it priv message itself?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
D1st0rt
Miss Directed Wannabe


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

PostPosted: Sat Feb 19, 2005 11:56 am    Post subject: Reply to topic Reply with quote

That would probably be the easiest, having it pm itself !load event
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sat Feb 19, 2005 3:49 pm    Post subject: Reply to topic Reply with quote

Talk to Catid. He could probably make an event for it.
_________________
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
View users profile Send private message Add User to Ignore List Visit posters website
O'Shovah
Newbie


Gender:Gender:Male
Joined: Feb 19 2005
Posts: 4
Location: Canada
Offline

PostPosted: Sat Feb 19, 2005 4:25 pm    Post subject: Reply to topic Reply with quote

thx i did what smong said.
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Sat Feb 19, 2005 10:25 pm    Post subject: Reply to topic Reply with quote

did it work? I had trouble making a bot pm itself commands
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sat Feb 19, 2005 11:00 pm    Post subject: Reply to topic Reply with quote

I would suggest making the MERV core setup so it assumes a command from "self" is at full access level. This is safe as long as you trust your module builders.
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
O'Shovah
Newbie


Gender:Gender:Male
Joined: Feb 19 2005
Posts: 4
Location: Canada
Offline

PostPosted: Mon Feb 21, 2005 2:54 pm    Post subject: Reply to topic Reply with quote

All you have to do is make the bot login as sop to itself. Then it can pm itself commands.
Back to top
View users profile Send private message Add User to Ignore List
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Mon Feb 21, 2005 3:30 pm    Post subject: Reply to topic Reply with quote

Yes, but that's a silly way to do it. It means you have to add all bot names as ops. Every time you add more bots, you need to add them as ops. Bots should be ops by default.
Back to top
View users profile Send private message Add User to Ignore List
Underlord
Novice


Gender:Gender:Male
Joined: Feb 17 2004
Posts: 55
Offline

PostPosted: Tue Feb 22, 2005 5:02 am    Post subject: Reply to topic Reply with quote

to avoid dealing with operators.txt, add in the below 'me->access = OP_Owner;' line to spawn.cpp

Code: Show/Hide

case EVENT_ArenaEnter:
{
         arena = (char*)event.p[0];
         me = (Player*)event.p[1];   
         bool biller_online = *(bool*)&event.p[2];

         me->access = OP_Owner;  // add this
}
break;
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Tue Feb 22, 2005 1:46 pm    Post subject: Reply to topic Reply with quote

That looks ugly. icon_sad.gif
Back to top
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Tue Feb 22, 2005 1:53 pm    Post subject: Reply to topic Reply with quote

Ah but it really isn't.
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Feb 22, 2005 6:27 pm    Post subject: Reply to topic Reply with quote

It's actually a lot better than putting it in Operators.txt. Just get Catid to add it to the core, it's not that hard.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Tue Feb 22, 2005 8:54 pm    Post subject: Reply to topic Reply with quote

should do it in the constructor of the bot, rather than on arenaenter
Back to top
View users profile Send private message Add User to Ignore List AIM Address
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: 116 page(s) served in previous 5 minutes.

phpBB Created this page in 0.558707 seconds : 38 queries executed (76.7%): GZIP compression disabled