ZoloFighter javascript APIs

Support for zoloFighter

ZoloFighter javascript APIs

Postby wowpanda » Wed Sep 05, 2007 9:06 am

The list can also be used for zoloFisher (mostly except the fighting ones).

Refer to script.js for examples
Code: Select all
properties:

             name            Your name or object/mob name
     lastErrorMsg            Last error message.  However it is not cleared after error.
     wowClassName            class config name, for example, if you are using bindings_afwarlock.cfg, it will return afwarlock
         curState            current state, could be afterFight, normal etc.
         lureName            Fisher only.
            level
       playerRace            a number identify player race
      playerClass            a number identify player class
            wowId            id of mob/object
         mobSpell            current spell mob is doing
                x            mob/obj/your cordinates
                y
                z
          heading           
          corpseX            location of player corpse
          corpseY            location of player corpse
          corpseZ            location of player corpse
waypointNoteHeading          heading recorded in waypoint note
waypointNoteComment          comment recorded in waypoint note
           health            mob/your health
        maxhealth
        happiness            pet happiness (on pet obj only)
     maxhappiness           
             mana
          maxmana
   itemDurability
itemMaxDurability
             rage            warrior only
           energy            rogue only
          catForm            durid only
         bearForm            durid only
           target            your/mob current target
        itemCount            if object is bag,
        toonCount            total number of npc/mobs
      underCursor            id of obj under your cursor
            valid            if object is valid
          numMsgs            number of messages
    myCombatReach            return combat reach
          followZ            set to true if bot need to follow Z coord (for flying, under water etc)
         jsParams            parameters.  Used to extend the bot
  jsApproachCheck            a call back, if not "" will be called during bot approach (so it won't attack tagged mobs)
     itemLootDist           
           bobber            fisher only
          curTime            time in seconds.
         timeLeft            time in seconds before timeout
runTimeOutMinutes
    containerSize            if object is bag, the size of it.
   itemStackCount            if object is a bag item, the stack count (1, 5, 10, 20 etc)
               xp            current experience
            maxXp            xp to level
             gold            coin count (100 = 1g)
      wayPointPos            current postion in waypoints
    wayPointCount            total number of waypoints
   profileRunMode            current running mode (normal, circle etc)
isAttackAbleFaction          check if mob is in your attackable faction list.
       wowFaction            get mob faction
  isSaleRepairNpc            if npc is marked as a sales npc.
saleRepairNpcCount           total number of waypoints in sales waypoint
         isPlayer            check if object is player
         inCombat            if you are in combat
        wowBotRun            true if we are running, false if you click on "stop" button
wowAbortCurFight            set to true to abort current fight or loot
           doSkin            variable reflect the skin check box on fighter
         lootable            check if corpse is lootable (not accurate)
         skinable
       wowScreenX            x position of upper left corner of WOW
       wowScreenY            y poistion of upper left corner of WOW
       wowScreenW            wow screen width
       wowScreenH            wow screen height
      fighterMode            fighter mode, can be Raid, BG, fishing etc.
           bgExit            set to true to abort current actions and waypoints
curRunPointBreak            set to true to abort current run (will not run to next waypoint, will break and adjust to next waypoint)
nearstMobInFactionDist       return distance to nearst mob in faction. Only valid after a call to wowGetNearstMobInFaction() method
      npcJobTitle            npc's title
            runic            DeathKnight runic power
  lastFightTarget            last target
botSelectedTarget            current target bot trying to select
         wowKeyUp            the key for up arrow
       wowKeyDown            default to down arrow
       wowKeyLeft            default to left arrow
      wowKeyRight            default to right arrow
     wowKeyEscape           
      wowKeyEnter            bot use this to talk
      wowKeyShift
       wowKeyCtrl
        wowKeyAlt
      wowKeySpace            bot use this to jump
        wowKeySit            bot use this to sit
       engageDist
        curtimeMs            current mill seconds
       curtimeStr            current time in yyyymmdd hh:mm:ss format
        curAction            current action's name
        lootLevel
salesWaypointCount       
orbiterMainWaypointCount
      isMobToAvoid           on mob, if mob is a mob to be avoided
    saleRepairNpcs           array of sales/repair npcs.  the objects in array has x,y,z,type,name properties
  wowWaypointNotes           get waypoint notes in array.  objects in array has x,y,z,heading,desc properties
wowNearstWaypoint           return nearest waypoint
        herbCorpse           if we should herb corpses (checkbox on UI)
        mineCorpse           if we should mine corpses (checkbox on UI)
     shutdownAtEnd           if we should shutdown at end (checkbox on UI)
         checkZPos           if we should check Z positions (checkbox on UI)
         isRunning           true if toon is running.
        isSwimming           true if toon is swiming
       isBoxLocked           on boxes only. true if box is locked.
         isWanding           true if toon is using wand.
   wowRunThreshold           run to node's threashold
wowGhostRunThreshold         threashold used on ghost waypoints
  jsWaypointCurFrom          the previous waypoint
    jsWaypointCurTo          the next waypoint
    wowPassiveFight          set to 1 to not start fights.  Used for sales/repair waypoints to avoid fight when we need go repair.






Methods:
                                wowLog      1 parameter, string to log ==>me.wowLog("test")
                      wowUnsafeRefresh          0 parameter. returns true if wow is loaded and your toon structure is available.  Need to refres me variable.
                         wowGetKeyCode          1 parameter, a char. returns char's keycode.
                    wowRunSaleWaypoint          0 parameter, try to run sales waypoint
                   wowResetCurWaypoint          0 parameter,
            wowCheckDistToSaleWaypoint          0 parameter, check current distance to sales waypoint
                        wowLoadProfile          1 parameter, string of profile to be loaded (Don't use)
                         wowRunProfile      3 parameter, profile name, running mode, running time. Last parameter optional.
                        wowProfileDist          1 parameter, profile name. check dist to that profile
                           wowOneFight          no parameter.
                          wowDoFishing      no parameter
                          wowTerminate          no parameter, kill wow process
                      wowDoFightAction      1 parameter, action name
                         wowSendString      1 parameter, a string to be typed on WOW screen
                   wowTalkViaClipboard          1 parameter, will press enter, past text and press enter again.
                            wowSendKey          2 parameter, key to be sent (in key code) and up or down (too complex, just use wowSendString instead)
                           wowSendKeys          1 parameter, array of keys to send
                          wowPlaySound          1 parameter, sound file name.
                          wowMoveMouse          2 parameter, x and y
                         wowMouseClick      1 parameter, 0/1 for right and left (maybe)
                               wowWait          no parameter, will wait for channel spell
                              wowSleep          1 parameter, sleep for xms
                           wowApproach          need doc
                    wowGetAttackingMob      no parameter, returns attacking mob
                             wowTurnTo      2 parameter, x,y to turn to
                          wowTurnToRad          1 parameter, turn to angle in radious
                              wowRunTo          x parameter(s).  pass in either mob, (x,y)
                             wowDoLoot          1 parameter, mob to loot. Will try to loot that mob
                            wowGetToon      1 parameter, number between 0 and max npcs
                      wowGetBotSetting          1 parameter, return the setting value
                    wowGetPlayerByName          1 parameter, returns the player object give his/her name
                   wowGetContainerItem          2 parameter, bag and slot number
             wowGetContainerItemByName      1 parameter, name of item (You can use it to get your main hand weapon and check for duriablity for warrior/hunter)
                       wowGetContainer          need doc
              wowGetContainerFreeSlots          1 parameter, provide bag number, return free slots in bag
           wowGetAllContainerItemCount          1 parameter, privide a item name, return total count for that item (hunter can check bullet/arrow)
                         wowGetMyItems          no parameter, return array of all items
                   wowGetAttackingMobs          no parameter, return all mobs that are taging you
                   wowGetTagingPlayers          no parameter, return array of players that have selected you
              wowGetNearstMobInFaction          no parameter, return nears mob in faction
                      wowGetWaypointAt          1 parameter, return array of position
                         wowGetPlayers          no parameter, return all players near you
                       wowGetLootables          no parameter, return all lootables near you
                            wowGetBuff          1 parameter, return true if passed buff exists
                           wowGetBuffs          no parameter, return array of buffs
                          wowGetSummon          no parameter, return your pet
                       wowAquireTarget          no parameter, aquire a target
                            wowGetItem          1 parameter, retrive an item from item list
                             wowGetMsg          1 parameter, return  msg in msg list
                        wowGetMessages          no parameter, return array of new messges
                   wowGetRemoteSockets          no parameter, return array of sockets
                       wowGetRemoteMsg      1 parameter, socket. return 1 remote command if available on that socket
                      wowSendRemoteMsg       1 parameter, socket. send a message to remote app (i.e telnet)
                  wowCloseRemoteSocket          1 parameter, socket. Close it
                           wowReadFile      1 parameter, file name, return file content as string
                               wowExec       1 parameter, executable name
                     wowExecReadOutput       need doc
                         wowExecRetVal      no parameter, return executable exit code
                          wowClearMsgs       no parameter, clears wow messages collected
                          wowIsSameObj          1 parameter, provide id, check if it is the same obj
                            wowBotStop          no parameter, stops bot
                            wowStopRun          no parameter, stops your toon (but bot is still running)
                     initOrbiterEngine          no parameter, init orbiter engine (danger, use with caution, always abort current waypoint before do this)
                       wowClearProfile          clear all profiles.
                wowGetProfileWaypoints          1 parameter.  Give profile name, return array of profile waypoints (each object is an array, with 3 floats)
                     wowOrbiterGetPath          6 parameters, fromx,fromy,fromz, tox,toy,toz. Returns array of waypoints (each object has x,y,z, dist  properties)
           wowClearWatchedMobLocations          future
              wowAddWatchedMobLocation          future
                      wowMobAvoidRoute          future
                   wowGetMobEnterCoord          future
                      wowReleaseSpirit          no parameter. tries to release spirit.
                   wowPastViaClipboard          1 string parameter.  will press enter and paste the string into wow.
                           wowRunOrbit          no parameter. Runs orbiter.
                         wowOrbitRunTo          4 parameters, x,y,[z],[level]. last 2 parameter optional.  run to x,y via orbiter. if level > 0, bot tries to avoid mobs
                            wowRunToNC          4 parameters, x,y,[timeout],[threshold].  timeout in seconds (default 15), threshold default to 5.
               wowGetOrbiterWaypointAt          1 parameter. the index of waypoint.  returns the current waypoint's node (x,y,z)
                   wowGetOrbiterNodeAt          1 parameter. the index of waypoint.  returns the node (x,y,z)
                         wowJsGetOwner          0 parameter. get the owner of current object.
            wowGetCollectableItemNames          0 parameter. return array of names (string) of items you want to collect (set via UI)
                    wowClearGlobalActs          0 parameter. Clear all global action timers (used after death to reset global actions)
                              wowAlert          1 parameter. Show an alert box.
                wowCompareScreenToFile          5 parameters.  filename, x,y w,h, [debugoutput].  compare screen x,y ->(w,h) area with filename, and if debugoutput is not empty, output captured screen to file debugoutput.
                     wowSendScreenJpeg          6 parameters, socketId,[ratio],[x,y,w,h].  capture screen (default ratio 1, default x,y,w,h entire wow window), save to screentmp.jpg and send it over to tcp/ip (4 byte length in intel order, follow by content of file)
                  wowIsCollectableItem          1 parameter. input name of item, return true if item is in your collectable item list.
                       wowCheckAndRest          0 parameter. try to rest.
                              StartWOW          0 parameter. start wow.
                               KillWOW          0 parameter, kill wow.
                    wowAddWaypointNote          4 parameters. x,y,z,heading,[note].  dynamicly add a waypoint note.
                            wowFileLog          2 parameter.  filename,string.  if string is not specified, truncate the file.  else append string to file.
                               wowMain          no parameter, main method, only call once.
0.8.5.9
      wowAddMobToExcludeList          add mob (object or guid) to exclude list
         wowGetExcludeGUIDList          get list of guid->timeInSecond hash
wowRemoveMobFromExcludeList(guid)
Last edited by wowpanda on Wed Feb 13, 2008 3:34 pm, edited 2 times in total.
wowpanda
Site Admin
 
Posts: 1585
Joined: Mon Jan 15, 2007 7:50 pm

Postby Ping » Sat Sep 08, 2007 10:35 am

i think this topic matches my question, so:
can i also declare integers?like

int Counter = 0;

my script would look like this:

int Counter = 0;
function sinister()
{
if !(me.energy > 40)
{
me.WoWLog("Sinister!");
return true;
Counter++;
}
return false;
}

that way i could use eviscerate more accurate and efficient
Ping
peon
 
Posts: 8
Joined: Sat Sep 08, 2007 4:41 am

NO!

Postby wowpanda » Sat Sep 08, 2007 6:39 pm

You can declare variables but not like int, this is javascript not C :-)

Here is what you do:

//javascript don't have int, string, char etc, but everything is var.
//so the only thing I changed is, instead of int Counter, it is var Counter.

var Counter = 0;
function sinister()
{
if !(me.energy > 40)
{
me.WoWLog("Sinister!");
return true;
Counter++;
}
return false;
}
wowpanda
Site Admin
 
Posts: 1585
Joined: Mon Jan 15, 2007 7:50 pm

Postby Ping » Sat Sep 15, 2007 3:59 am

if you have time, you may search for ComboPoints or smth. would make a rogues life WAY easier
Ping
peon
 
Posts: 8
Joined: Sat Sep 08, 2007 4:41 am

combo points and smth

Postby wowpanda » Sat Sep 15, 2007 8:04 am

Is combo points same as energy? I can't find smth ..
wowpanda
Site Admin
 
Posts: 1585
Joined: Mon Jan 15, 2007 7:50 pm

Postby Ping » Sun Sep 16, 2007 2:08 am

well, combo points are the stuff you get when you cast sinister strike^^.

they may be ENERGY_POINTS or PLAYER_COMBO_POINTS
Ping
peon
 
Posts: 8
Joined: Sat Sep 08, 2007 4:41 am

Postby wowpanda » Mon Sep 17, 2007 1:17 pm

OK, I will try to get that. However no promises, because this point seems to be set on mobs, and I am sure one player's combo point on a mob will not apply to another player, so the location of this guy must be completely independent.
wowpanda
Site Admin
 
Posts: 1585
Joined: Mon Jan 15, 2007 7:50 pm

Postby oksygen » Mon Feb 11, 2008 8:21 am

There is a function GetComboPoints("Player")

Example from some comat point counter addon:
Code: Select all
if event == EVENT_PLAYER_ENTER_COMBAT or UnitAffectingCombat("player") == 1 or (event == EVENT_UNIT_COMBAT and not(arg1 == "mouseover") and not(arg2 == "HEAL")) then
         

               if GetComboPoints("Player") == 5 then
            ComboText:SetTextColor(1.0, 0.0, 0.0);   
                   ComboText:SetText(COMBO_COUNT_DESC .. GetComboPoints("Player"));
                else
                   ComboText:SetTextColor(1.0, 1.0, 0.0);
                   ComboText:SetText(COMBO_COUNT_DESC .. GetComboPoints("Player"));
           
                end
                
             end


what it dose .. it makes an message that :
Combo Points: 5

To track the combo point on targets .. need to register CP on all targets

Hope it will help a bit ;)
oksygen
Corporal
 
Posts: 24
Joined: Sat Feb 09, 2008 12:09 pm

Re: ZoloFighter javascript APIs

Postby Pattalutt » Sun Sep 21, 2008 11:27 am

I actually dont know how u can learn java scripting^^ It so hard to understand and all that
Man får ta konsekvenserna efterpå
Pattalutt
Brigadier General
 
Posts: 257
Joined: Mon Aug 04, 2008 9:40 am

Re: ZoloFighter javascript APIs

Postby tanis » Fri Feb 27, 2009 5:04 am

panda, could you please write all the possible states that the property "curState" can have? Thx!
tanis
Corporal
 
Posts: 20
Joined: Thu Feb 26, 2009 8:37 am

Re: ZoloFighter javascript APIs

Postby spudstar99 » Fri Feb 27, 2009 5:20 am

mh .. i know there was a post with this states ... but don't know where it was ...

*scratching my head ... arg ... to much stuff in my brain

http://www.zolohouse.com/wow/phpBB2/viewtopic.php?f=7&t=1384&p=6230&hilit=curstate#p6230

http://www.zolohouse.com/wow/phpBB2/viewtopic.php?f=4&t=1339&p=6014&hilit=curstate#p6014

basicly ... the search do the thinking stuff for me :lol:

:arrow: next time ... use the same strategie :wink:
Botting :
ret paladin lvl 75
druid lvl 40
shaman lvl 2X
warrior lvl 2X

homecontry: germany
spudstar99
General
 
Posts: 319
Joined: Thu Sep 11, 2008 2:38 am

Re: ZoloFighter javascript APIs

Postby tanis » Fri Feb 27, 2009 5:57 am

Thanks spudstar. I dunno why I didn't manage to stumble on that post. :-P
tanis
Corporal
 
Posts: 20
Joined: Thu Feb 26, 2009 8:37 am

Re: ZoloFighter javascript APIs

Postby niron77 » Tue Mar 31, 2009 12:05 pm

Okej i have read all the api from post abow.. and see some new things in post around the forum that´s not in that "file".. do you have a complete list of the api to use????

or is it me that can´t read ?
niron77
newbie
 
Posts: 3
Joined: Sat Dec 27, 2008 2:25 pm

Re: ZoloFighter javascript APIs

Postby connect » Wed Apr 01, 2009 2:58 pm

One more puzzle piece :roll:

Core functions from script.js , comments later

Code: Select all
adjustWaypoint
authRemoteConnections
canLoot
chechRemoteControl
CheckAndMount
checkDistToMe
checkFollow
checkHealPet
checkMessages
checkMine
checkNeedRepair
checkStuck
checkTimeOut
declam
doRandJump
doRemoteControl
doStone
endSaleLand
fDist3D
findBestResSpot
FollowNoteFunc
followWaypointZ
fPressKey
fPressKeyStd
fRoll
getDistToMe
getDistToNearstHerbMine
getDistToNearstMob
getInventoryFreeSpace
herbMineCheck
jsZoloWaypointFarCheck
makeNpcRmtPosStr
processFindVendorToSale
processFishing
processLootCorpse
processSummon
processTryGoToVendorSale
processWowMessages
ReachCombatDistance
resetStuck
sendRemoteMsg
showInventory
sortHerbFunc
wowDoUnsafeRefresh
wowGetScreenScaledLoc
wowjs.zoloWaypointTooFar
Red man
connect
Sergeant
 
Posts: 59
Joined: Mon Mar 30, 2009 6:50 am

Re: ZoloFighter javascript APIs

Postby flo8464 » Thu Apr 02, 2009 9:52 am

Hmm, wondering about a function.

I got this error-message

File: bindings_Rogue_flo line: 329 msg: wowGetAllContainerItemCount is not defined stack: combineboreanleather()@bindings_Rogue_flo:329


using it in this function

Code: Select all
function combineboreanleather()
{
   var leathercount = wowGetAllContainerItemCount(borLeatherscraps);
   
   while(leathercount > 4)
   {
      me.wowLog("Combining Borean Leather Scraps to Borean leather !");
      wowSendString("/use "+borLeatherscraps);
      wowSleep(250);
      leathercount = wowGetAllContainerItemCount(borLeatherscraps);
   }

   return true;

}


Whats wrong ?

And what does mobSpell return if the mob isn't casting at all?
flo8464
Private
 
Posts: 12
Joined: Sat Mar 14, 2009 8:41 am

Next

Return to fighterSupport

Who is online

Users browsing this forum: No registered users and 0 guests

cron