Page 34 of 40 FirstFirst ... 24 32 33 34 35 36 ... LastLast
Results 331 to 340 of 400

Thread: API Requests

  1. #331
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,776
    For debugging:

    If possible, add a new variable to _G so we can check (i.e. in a local env) whether or not the script crashed sometime (f.e. to issue termination or a DebugPause() as to avoid false prints of the last executable code every frame).
    I was thinking of _G.bError = false/true set by the VScript VM. I know about pcall and xpcall but those are not an option. A way better handling would be from the sandbox.
    A function wouldn't help too much I think. But your choice
    Last edited by The Nomad; 09-03-2017 at 10:23 AM.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  2. #332
    Basic Member
    Join Date
    Oct 2016
    Posts
    212
    Quote Originally Posted by DzeeRay View Post
    maybe:
    local Shukuchi = npcBot:GetModifierRemainingDuration(npcBot:GetModi fierByName("modifier_weaver_shukuchi"));
    (didnt try it just guessing)
    Thanks ill give it a try, but i think the npcBot is parameter 1.
    i thought maybe the other way, but the logic wouldnt work out in my mind.
    npcBot:HasModifier(GetModifierRemainingDuration("m odifier_weaver_shukuchi")) - seems even more stupid logic wise, but its almost closer to what it is asking for i think.

    Edit: Thanks Dzee, it seems to work, i think thats a very weird way of doing it.
    Last edited by Yavimaya; 04-15-2017 at 07:54 PM.

  3. #333

    HELP ME

    dude... i try to edit abilitties but it works only in demo and lobby..its not working in normal game ... i want to use it in normal game but how?? please help me

  4. #334
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,776
    alexis, this is a forum for bot scripting, not ability editing.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  5. #335
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,776
    Got some new ones:

    Unit-scoped:
    • IsIdle() : bool which should return true if the unit (including human players, lane, neutrals and minions) is not attacking, moving, channeling, casting spells etc. Towers too (if not attacking). A little similar to GetVelocity() except instant.
    • GetBottledRuneType() : int (no param) which should check the rune that the owner has inside thier bottle and return the rune type enum (similar to GetRuneType()) and -1 if the owner doesn't have a bottle (not purchased or it's in their backpack/stash/courier instead of in their inventory) or if the bottle doesn't have a rune inside it.
    • ActionImmediate_ShareItem(hItem, hTarget) that lets us pass items between teammates (i.e. tps, shared tangos etc. and it should fail if used on enemies) and lets couriers and heroes exchange items (i.e. an empty bottle)
    • TimeSinceDamagedByType(eDamageType): float to return the time since receiving a certain type of damage (using the damage type enum: magical, physical, pure or all - all meaning "any") ignoring the source (creep, hero, tower etc)
    • WasRecentlyDamagedByType(eDamageType, fTime): bool to return whether the bot received a certain type of damage (magical, physical etc.) in the specified time frame ignoring the source (creep, hero, tower etc)
    • GetRecentIncomingDamageFromHeroes (fTime): int to return the latest damage (not just phyiscal) taken within fTime from hero sources (similar to fight recaps during replay or after dying)
    • GetRecentIncomingDamageFromCreeps (fTime): int to return the latest damage (not just phyiscal) taken within fTime from creeps/minions (similar to fight recaps during replay or after dying)
    • GetRecentIncomingDamageFromTowers (fTime): int to return the latest damage taken within fTime from towers (similar to fight recaps during replay or after dying)
    • GetRecentIncomingDamage (fTime): int to return the latest damage taken within fTime regardless of the source or damage type (similar to fight recaps during replay or after dying)
    • TimeSinceDamaged(): float to return the time since receiving a damage (regardless from what source of the type of damage)


    Global scope:
    • GetRoshan() : handle (when visible, obviously, otherwise returns nil)
    • GetRoshanStatus() : int (no param, obviously since I don't think we can have more than one Rosh) similar to GetRuneStatus() (as in alive, dead and unknown - default unknown when not visible).
    • IsItemPurchasedFromHomeShop(szItemName) : bool which tells us if the item can be bought from our base
    Last edited by The Nomad; 09-03-2017 at 10:24 AM.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  6. #336
    Would be good, if there was a tab for 'recently updated' bots.

  7. #337
    Default bots should be allowed to automatically update for the new names for talents, plus choose them randomly, instead of fixed imo.

  8. #338
    Basic Member
    Join Date
    Oct 2016
    Posts
    212
    Quote Originally Posted by DreadedGhoul575 View Post
    Default bots should be allowed to automatically update for the new names for talents, plus choose them randomly, instead of fixed imo.
    That would kind of suck IMO, mostly because no one has worked out how to code different talent choice based on situation yet and if the defaults did it but scripter added bots didnt that wouldnt be very good at all.
    a function that we could use to make them do it would be nice, but i dont see how they would do it.

  9. #339
    Basic Member
    Join Date
    Dec 2016
    Posts
    644
    Quote Originally Posted by Yavimaya View Post
    That would kind of suck IMO, mostly because no one has worked out how to code different talent choice based on situation yet and if the defaults did it but scripter added bots didnt that wouldnt be very good at all.
    a function that we could use to make them do it would be nice, but i dont see how they would do it.
    He said random though. It's not hard to pick the choices... just so many other things to do.

  10. #340
    Basic Member
    Join Date
    Oct 2016
    Posts
    212
    i skipped over the random part sorry.
    im not a fan of them choosing talents at random, to me most have a clearly better choice at all tree levels.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •