Blizzhackers

Return of the Jedi

* Login   * Register    * FAQ    * Search

Join us on IRC: #bh@irc.synirc.net (or Mibbit Web IRC)


MuleFactory


It is currently Thu May 23, 2013 8:03 am


All times are UTC [ DST ]





Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: API Requests
PostPosted: Sun Dec 14, 2008 5:44 pm 
 
Moderator Gold
Moderator Gold
User avatar

Joined: Thu Aug 16, 2007 8:36 pm
Please describe the commands and the use well.

Top
 Profile  
 Post subject:
PostPosted: Fri Jan 09, 2009 11:33 pm 
 
D2BS Scripter
D2BS Scripter

Joined: Tue Nov 23, 2004 1:01 am
Hello, time to make a request..
unit.getMinionCount   Function

Summary: returns the # of minions of this type you currently have

Syntax:
int minionCount = unit.getMinionCount( int minionType );

Description:
Returns the # of minions of this type you currently have

Here's the ID list taken from PetType table:
pet type        idx
none             0
single           1
valkyrie         2
golem            3
skeleton         4
skeletonmage     5
revive           6
hireable         7
dopplezon        8
invis            9
raven            10
spiritwolf       11
fenris           12
totem            13
vine             14
grizzly          15
shadowwarrior    16
assassintrap     17
pettrap          18
hydra            19


Example:
me.getMinionCount( 4 ); // returns the number of necro skeletons you have

Top
 Profile  
 Post subject:
PostPosted: Sun Jan 25, 2009 9:17 am 
 
D2BS Scripter
D2BS Scripter

Joined: Tue Nov 23, 2004 1:01 am
getMouseCoords   Function
Summary: Returns Screen Relative X Y coordinates of mouse cursor
Syntax: int[] = getMouseCoords( [optional 1] );
Description:
Returns Screen Relative X Y coordinates of mouse cursor

If paramater is 1, will return Game Relative X Y coordinates of mouse cursor.

The returned value is a 2 member array, containing the X and Y coordinate
Example:      mouseCoords = getMouseCoords();
      mx = parseInt(me.x + ((mouseCoords[0]-400)*13/400) ,10);
      my = parseInt(me.y + ((mouseCoords[1]-300)*20/300) ,10);
      MouseXY_sh.text = "Mouse: " + mx + "," + my;

Usable: [In Game]

Top
 Profile  
 Post subject:
PostPosted: Mon Mar 16, 2009 5:25 pm 
 
Moderator Gold
Moderator Gold
User avatar

Joined: Thu Aug 16, 2007 8:36 pm
Added both functions to the Core.

Top
 Profile  
 Post subject:
PostPosted: Sun Aug 02, 2009 4:13 pm 
 
User
User
User avatar

Joined: Sun Aug 02, 2009 2:52 pm
Location: Paris
monster.IsAvailableCorpse() and monster.IsRevivableCorpse(skillId) ?

The first one would tell you if you can interact with a dead monster (like using CorpseExplosion skill, or FindItem, or Redemption, etc...).

The second one would tell you if you can use skillId on a corpse (monster.IsRevivableCorpse(95) would return true if the monster can be revived using the skill Revive, or monster.IsRevivableCorpse(70) would return true if you can raise a skeleton).

Maybe a combination of both methods in a single one monster.CanUseSkill(SkillId) (that would check if the monster is dead, if the corpse is not frozen or already used by a corpse explosion etc...)?

Top
 Profile  
 Post subject:
PostPosted: Sun Aug 02, 2009 4:16 pm 
 
User
User
User avatar

Joined: Sun Aug 02, 2009 2:52 pm
Location: Paris
unit.getMinionCount still working on D2NT 1.8.5 ? I can't use it in my NTBOT 3.7.4 script ...

Top
 Profile  
 Post subject:
PostPosted: Sun Aug 02, 2009 8:23 pm 
 
D2BS Scripter
D2BS Scripter

Joined: Tue Nov 23, 2004 1:01 am
D2oD wrote:
unit.getMinionCount still working on D2NT 1.8.5 ? I can't use it in my NTBOT 3.7.4 script ...


...


this is the D2BS forum..... NOT D2NT!!!!

i have no idea if kimsout even reads this let alone adds the features like we can in d2bs..

TechnoHunter

Top
 Profile  
 Post subject:
PostPosted: Sun Aug 02, 2009 10:38 pm 
 
Moderator
Moderator

Joined: Thu Dec 09, 2004 8:48 am
whats the point of getting the mouse cords if you cant move it?

Top
 Profile  
 Post subject:
PostPosted: Mon Aug 03, 2009 9:02 am 
 
D2BS Scripter
D2BS Scripter

Joined: Tue Nov 23, 2004 1:01 am
bobite wrote:
whats the point of getting the mouse cords if you cant move it?
eh?

clickMap moves the mouse.. and the request was for helping to get a better starter written (getting locations for clicking controls and whatnot..)

TechnoHunter

Top
 Profile  
 Post subject:
PostPosted: Thu Feb 18, 2010 1:06 am 
 
User
User

Joined: Thu Jan 21, 2010 2:27 am
transmute() should return the items from the result of the cubing

Top
 Profile  
 Post subject:
PostPosted: Tue May 11, 2010 4:44 am 
 
Section Leader
Section Leader

Joined: Fri Jul 05, 2002 8:51 pm
Location: /sbin/
Cleaned up to this point. I'll look into how feasible it is to make transmute() return the resultant item(s).

_________________
D2BS
Programming motherfuckers... DO YOU SPEAK IT?!
I, for one, welcome our new black overlo... I mean, president!
  1. Create signature generator.
  2. ???
  3. Profit!

Top
 Profile  
 Post subject:
PostPosted: Sat Sep 04, 2010 1:00 pm 
 
User
User

Joined: Sat Feb 06, 2010 10:16 am
I. Added supprt of Other Multiplayer->TCP/IP in the function login(Profile)

Calling login() with a profile set to Other Multiplayer TCP_IP will create a hosted game or join a hosted game based on the given profile.

Three choices of Other Multiplayer:
Other Multilayer OPEN
Other Multiplayer TCP_IP Host
Other Multiplayer TCP_IP Join

II. New global function, hostTcpipGame(charName, difficulty)

Will create a hosted TCP/IP game using the with the given name, at the given difficulty. Different difficulties: Normal, Nightmare, Hell and chose the highest available difficulty.

III. New global function, joinTcpipGame(charName, Address)

Will join a hosted TCP/IP game using a char with the given name connecting to the given IP-address.

Reason and motivation:
Be able to create or join a hosted TCP/IP game will greatly increase the efficiency of testing leader-leecher scripts and team-botting scripts. It will not only increase the efficiency but also in the end can result in scripts of higher quality.

Edit: Added support for Cannot Connect to Server
I. Patch against branches/patch-113 for login() support: http://pastebin.com/dMG0LHwT.
Example of profiles in a d2bs.ini file: http://pastebin.com/t54rqX9j

Known issues:
I.1. Joining a hosted game triggers Invalid character name at select character screen, though, this happens for all non-bnet logins, so not unique. But, it is more frequent than for other login methods.

However, since this is intended for test purpose the issues is not critical but should be fixed. Will have a look at it when times permit.

Top
 Profile  
 Post subject:
PostPosted: Thu Oct 07, 2010 7:40 pm 
 
Banned
Banned

Joined: Thu Aug 07, 2008 2:45 am
i need a channel timeout thing, for example, if bot is in channel for more than 3 minutes, have it shut down d2 and start it up again.

Top
 Profile  
 Post subject:
PostPosted: Thu Oct 07, 2010 9:16 pm 
 
Section Leader
Section Leader

Joined: Fri Jul 05, 2002 8:51 pm
Location: /sbin/
Setiner wrote:
...


Much appreciated! I'll be committing this momentarily, along with a fix for screenhook clicking that makes the click function execute within the context of the screenhook that it was assigned to.

[EDIT] The two global functions are missing from your patch, FYI.

[EDIT 2]
AA wrote:
i need a channel timeout thing, for example, if bot is in channel for more than 3 minutes, have it shut down d2 and start it up again.


This would be the responsibility of the game manager, not D2BS.

_________________
D2BS
Programming motherfuckers... DO YOU SPEAK IT?!
I, for one, welcome our new black overlo... I mean, president!
  1. Create signature generator.
  2. ???
  3. Profit!

Top
 Profile  
 Post subject:
PostPosted: Thu Oct 07, 2010 10:05 pm 
 
Banned
Banned

Joined: Thu Aug 07, 2008 2:45 am
lord2800 wrote:
Setiner wrote:
...


Much appreciated! I'll be committing this momentarily, along with a fix for screenhook clicking that makes the click function execute within the context of the screenhook that it was assigned to.

[EDIT] The two global functions are missing from your patch, FYI.

[EDIT 2]
AA wrote:
i need a channel timeout thing, for example, if bot is in channel for more than 3 minutes, have it shut down d2 and start it up again.


This would be the responsibility of the game manager, not D2BS.


what is the game manager?

Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron