DoString Trouble menu

User Tag List

Page 2 of 7 FirstFirst 123456 ... LastLast
Results 16 to 30 of 96
  1. #16
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SetSelectedBattlefield / GetSelectedBattlefield maybe not sure. Im gonna sleep now it's 4 in the morning here

    DoString Trouble
  2. #17
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lanman92 View Post
    There must be a way to do it with the new join anywhere system. I guess I could just resort to...pixel scanning...PostMessage.../wrist.
    JoinBattlefield will queue for the last battleground you've manually selected in the battleground tab of the PvP panel when there's no battlemaster window open.
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  3. #18
    schlumpf's Avatar Retired Noggit Developer

    Reputation
    755
    Join Date
    Nov 2006
    Posts
    2,759
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Didn't they add the possiblity to join a battleground from everywhere? What about looking up the functions used by them?

  4. #19
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by schlumpf View Post
    Didn't they add the possiblity to join a battleground from everywhere? What about looking up the functions used by them?
    Other than JoinBattlefield there's no available API for queuing up, I guess they still want some interaction on the users part (either with a battlemaster or selecting the battleground tab)
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  5. #20
    jjaa's Avatar Contributor
    Reputation
    245
    Join Date
    Dec 2006
    Posts
    562
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    Other than JoinBattlefield there's no available API for queuing up, I guess they still want some interaction on the users part (either with a battlemaster or selecting the battleground tab)
    You don't need the UI open for,
    /run JoinBattlefield(0);
    wait for pop...
    /run AcceptBattlefieldPort(1,1);

  6. #21
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by jjaa View Post
    You don't need the UI open for,
    /run JoinBattlefield(0);
    wait for pop...
    /run AcceptBattlefieldPort(1,1);
    Aye, horrible wording on my part. You need to have queued once manually before JoinBattlefield will work though. Do a clean login and run that macro, it won't queue.
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  7. #22
    testout's Avatar Member
    Reputation
    7
    Join Date
    May 2008
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by jjaa View Post
    You don't need the UI open for,
    /run JoinBattlefield(0);
    wait for pop...
    /run AcceptBattlefieldPort(1,1);
    Yes, but this doesn't let you select *which* battleground. I also read somewhere they were allowing you to join battlegrounds from anywhere, without talking to a battle master. Must have scrapped that idea...

  8. #23
    testout's Avatar Member
    Reputation
    7
    Join Date
    May 2008
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's in the pvp frame (see Warcraft: Legends - Dan Jolley - WoW.com ).

    Might be worth looking at the LUA/frame xml

  9. #24
    jjaa's Avatar Contributor
    Reputation
    245
    Join Date
    Dec 2006
    Posts
    562
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by testout View Post
    Yes, but this doesn't let you select *which* battleground. I also read somewhere they were allowing you to join battlegrounds from anywhere, without talking to a battle master. Must have scrapped that idea...
    Its already been implemented. Also you may be able to select(API JoinBattlefield - WoWWiki - Your guide to the World of Warcraft). I can't test it, my highest level character on a test account is 14

    Originally Posted by Robske View Post
    Aye, horrible wording on my part. You need to have queued once manually before JoinBattlefield will work though. Do a clean login and run that macro, it won't queue.
    JoinBattlefield works fine for me on a fresh login. :S

  10. #25
    testout's Avatar Member
    Reputation
    7
    Join Date
    May 2008
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, so Blizzards UI doe this:

    When you choose your Battlground type,

    RequestBattlegroundInstanceInfo(BGindex)

    is called. (id is probably like 0=wsg, 1=ab, 2=ab ... but i cant confirm these yet).

    EDIT
    names can be got with
    localizedName, canEnter, isHoliday, minlevel = GetBattlegroundInfo(BGindex);
    END EDIT

    Then the isntance list is populated when an event is recieved.

    Then the usual

    JoinBattlefield(instance);

    is done. So

    RequestBattlegroundInstanceInfo(battlegroundid);
    Sleep(100);
    JoinBattlefield(0);

    should queue you for your selected BG.

    Source of PVPBattlegroundFrame.lua:
    FrameXML/PVPBattlegroundFrame.lua at 3191e048d861341b042320f18b0d1853c0bc95a5 from tekkub's wow-ui-source - GitHub

    Please give rep if this helps. Been contributing for ages n still a "site n00b"
    Last edited by testout; 06-04-2009 at 07:56 AM.

  11. #26
    tanis2000's Avatar Active Member
    Reputation
    39
    Join Date
    Feb 2009
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Has any of you guys been able to run a piece of code like this with DoString and get the result with GetLocalizedText?

    Code:
                  found = false
                  for bag = 0,4 do
                    for slot = 1,GetContainerNumSlots(bag) do
                      item = GetContainerItemLink(bag,slot)
                      if item and item:find(""{0}"") then
                        found = true
                      end
                    end
                  end
    Whenever I query the found variable I get an empty string, no matter if it finds or not what I'm looking for. :-P

    I know for certain that my found variable becomes true at some point because if I put something like a DoEmote("dance") in there I'll see it acting. So I guess the script runs fine but I can't seem to be able to read that global variable :-P

  12. #27
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by tanis2000 View Post
    Has any of you guys been able to run a piece of code like this with DoString and get the result with GetLocalizedText?

    Code:
                  found = false
                  for bag = 0,4 do
                    for slot = 1,GetContainerNumSlots(bag) do
                      item = GetContainerItemLink(bag,slot)
                      if item and item:find(""{0}"") then
                        found = true
                      end
                    end
                  end
    Whenever I query the found variable I get an empty string, no matter if it finds or not what I'm looking for. :-P

    I know for certain that my found variable becomes true at some point because if I put something like a DoEmote("dance") in there I'll see it acting. So I guess the script runs fine but I can't seem to be able to read that global variable :-P
    Why are you using getlocalized text? :S

    Not only are you polluting the global scope by creating non-local named variables (which in turn could lead to UI taint), theres a much better alternative already documented which is to register a callback and pass all your LUA calls through it. Your callback then grabs all the return values off the LUA stack and passes them back to your module.

    Faster and safer.

  13. #28
    tanis2000's Avatar Active Member
    Reputation
    39
    Join Date
    Feb 2009
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been using global variables because GetLocalizedText can return only global variables. I don't like it either but I didn't know there was any alternative without having to redo all the LUA functions and have my own stack management for it.

    To be honest I've never heard of being able to register a callback to route all the LUA calls. Time to do some research then

  14. #29
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by tanis2000 View Post
    I've been using global variables because GetLocalizedText can return only global variables. I don't like it either but I didn't know there was any alternative without having to redo all the LUA functions and have my own stack management for it.

    To be honest I've never heard of being able to register a callback to route all the LUA calls. Time to do some research then

    Read this:
    http://www.mmowned.com/forums/wow-me...callbacks.html

  15. #30
    tanis2000's Avatar Active Member
    Reputation
    39
    Join Date
    Feb 2009
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    I've read that thread and some more and it's pretty obvious how to implement lua_tostring and lua_gettop but I can't find the function that is used to register our own function in LUA. Any hint at what's its name supposed to be?

Page 2 of 7 FirstFirst 123456 ... LastLast

Similar Threads

  1. Glider Trouble
    By Kirin in forum World of Warcraft General
    Replies: 3
    Last Post: 01-05-2007, 07:06 AM
  2. Glider trouble
    By Kirin in forum World of Warcraft Bots and Programs
    Replies: 0
    Last Post: 01-04-2007, 06:00 PM
  3. trouble finding .blp
    By yellowsn in forum WoW ME Questions and Requests
    Replies: 5
    Last Post: 11-23-2006, 12:06 AM
  4. Blizz is in some trouble. youll love this :)
    By WoWLegend in forum World of Warcraft General
    Replies: 23
    Last Post: 09-26-2006, 08:01 AM
  5. Idea to get people you dont like in trouble!!!
    By paypal in forum WoW Scam Prevention
    Replies: 10
    Last Post: 08-30-2006, 09:43 PM
All times are GMT -5. The time now is 05:35 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search