This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

NS Plugin - Number of active RT's - Need offset


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ebag333
New Member
Join Date: May 2005
Old 05-02-2005 , 03:45   NS Plugin - Number of active RT's - Need offset
Reply With Quote #1

OK, I have the following code. The problem is that with the way the code is now, it gets broken with whichbot, or if a player 'tricks' it. Apparently (and I'm just guessing here) if an RT build fails, it still counts for get_build("alienresourcetower", 0).

Anyone know (or know how to get) the offset for this? The old offset was 27 (PRIVATE_ACTIVE_RES).


Code:
get_num_active_rt() {

//Poor mans hack to get number of RTs.
//gets all rts that have been attempted to be built
//so it breaks with WhichBot and if an RT build fails.
new num = get_build("alienresourcetower", 0)

/* REMOVED DUE TO BAD OFFSET.
new num
new numrt = get_build("alienresourcetower", 0)
for (new i = 1; i <= numrt; ++i) {
 new id = get_build("alienresourcetower", i)
 if ( get_private_i(id, PRIVATE_ACTIVE_RES, 4) ) // Resource towers have an activation time of about 5 secs after
  num++     // they are built before they start giving res out.
}
*/
return num
}
Ebag333 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode