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
p->flash

 
Post new topic   Reply to topic Printable version
 View previous topic  InvBot version 0.7 Post :: Post Dieng Bots?  View next topic  
Author Message
guest
Guest


Offline

PostPosted: Mon Aug 30, 2004 10:32 pm    Post subject: p->flash Reply to topic Reply with quote

is there a simple way to have the bot react only when a player warps, and not when the player changes ships or teams or something?
Back to top
D1st0rt
Miss Directed Wannabe


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

PostPosted: Mon Aug 30, 2004 11:36 pm    Post subject: Reply to topic Reply with quote

lol, somebody get creative with title editing? or was it like that?
_________________



Last edited by D1st0rt on Mon Aug 30, 2004 11:44 pm, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
guest
Guest


Offline

PostPosted: Mon Aug 30, 2004 11:40 pm    Post subject: Reply to topic Reply with quote

what?
Back to top
CypherJF
I gargle nitroglycerin


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

PostPosted: Mon Aug 30, 2004 11:47 pm    Post subject: Reply to topic Reply with quote

You'll need a custom plugin, I'd imagine.
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
guest
Guest


Offline

PostPosted: Tue Aug 31, 2004 12:13 am    Post subject: Reply to topic Reply with quote

im making one, im just seeing if there's any code tricks to detect if someone flagged p->flash because they were warping, rather than freq switching or ship switching
Back to top
D1st0rt
Miss Directed Wannabe


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

PostPosted: Tue Aug 31, 2004 12:26 am    Post subject: Reply to topic Reply with quote

Just check for p->flash whenever you get a position packet
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Mr Ekted
Movie Geek


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

PostPosted: Tue Aug 31, 2004 1:31 am    Post subject: Reply to topic Reply with quote

Save their previous ship/freq. When you get p->flash, compare old to current. If they are the same, then it's a warp. You also need to know if they died, so you can differentiate a warp from a spawn.
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Tue Aug 31, 2004 9:55 am    Post subject: Reply to topic Reply with quote

Don't forget about cloak.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
guest
Guest


Offline

PostPosted: Tue Aug 31, 2004 12:05 pm    Post subject: Reply to topic Reply with quote

do any of you know where theres a good tutorial or sample bot dll of how to set up linklists of players in the bot? i guess thats the only way to do it, even though i was trying to avoid it (im not that good at programming yet)
Back to top
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Tue Aug 31, 2004 12:58 pm    Post subject: Reply to topic Reply with quote

Most people use catid's linklist class, but creating your own linklist is the best solution and most efficient. But since you dont know how, ill explain the class.

struct Bob
{
int joe;
};

_linkedlist <Bob> BobList;

//to add a node
Bob *NewBob= new Bob;
NewBob->joe=2;
BobList.append(NewBob);

//then to cycle through the list

_listnode <Bob> *parse= BobList.head;
while(parse != NULL)
{
printf("%i\n",parse->item->joe);
parse= parse->next;
}

//to delete a node

_listnode <Bob> *parse= BobList.head;
while(parse != NULL)
{
if(parse->item->joe == 2)
{
BobList.kill(parse);
break;
}
parse= parse->next;
}
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Bak
?ls -s
0 in


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

PostPosted: Wed Sep 01, 2004 8:42 pm    Post subject: Reply to topic Reply with quote

50% Packetloss wrote:
creating your own linklist is the best solution and most efficient.


a hash table or a binary search tree is faster lookup than a linked list

an expanding array (vector) uses less space than a linked list
Back to top
View users profile Send private message Add User to Ignore List AIM Address
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Thu Sep 02, 2004 12:48 am    Post subject: Reply to topic Reply with quote

It depends on what you are doing, if you have an unknown number of "items" that you have to keep track of, then linklist might be the best solution. Arrays are fast but not if you have to keep allocating/deallocating memory to fit everything in it. We are talking about a PC, a bot using a linklist isnt exactly going to take up cpu cycles unless you are managing a huge amount of data. Huge amounts of data should be handled efficiently by mysql or something, you cant have a lot of data taking up memory.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
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: Thu Sep 02, 2004 6:19 am    Post subject: Reply to topic Reply with quote

Vectors take longer appending data and linkedlists take longer accessing data. So basically, you should almost always use vectors unless you're constantly adding/deleting objects.
_________________
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
CypherJF
I gargle nitroglycerin


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

PostPosted: Thu Sep 02, 2004 10:06 am    Post subject: Reply to topic Reply with quote

Shrug, for bot's, I just use w/e works... :-p
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: Fri Sep 03, 2004 1:31 pm    Post subject: Reply to topic Reply with quote

vectors shouldn't take longer appending data on average.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
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: Fri Sep 03, 2004 2:17 pm    Post subject: Reply to topic Reply with quote

Why not? With a vector, even when you have extra allocated space, you're still going to have to reallocate and copy some later. With a linkedlist, you just keep on appending items or changing some pointers to insert.
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: 323 page(s) served in previous 5 minutes.

phpBB Created this page in 0.511833 seconds : 40 queries executed (94.0%): GZIP compression disabled