MoP beta - enabling /run /script menu

User Tag List

Results 1 to 14 of 14
  1. #1
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MoP beta - enabling /run /script

    Copy-paste to chatbox or place in a macro
    Code:
    /dump (function() RunScript=function(a) loadstring(a)(); end; end)()

    MoP beta - enabling /run /script
  2. #2
    bu_ba_911's Avatar Elite User
    Reputation
    552
    Join Date
    May 2006
    Posts
    1,638
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by _Mike View Post
    Copy-paste to chatbox or place in a macro
    Code:
    /dump (function() RunScript=function(a) loadstring(a)(); end; end)()
    life saver right here!!!!

    was SOOOO annoying having to run all my tests through PQR when it was just a sime thing like /script print(GetShapeshiftForm()) that i wanted to test XD <3 Repped for sure
    ^0^Team Nova's PQR NCC ^0^

    If you think someone did something good, take the time to show your appreciation!

  3. #3
    cam1020's Avatar Member
    Reputation
    1
    Join Date
    Apr 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how does this work then?

  4. #4
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the beta the /script and /run commands are disabled. This is a workaround to enable them. Just paste it in the chat input box and the commands are enabled until the UI is reloaded.

  5. #5
    Ssateneth's Avatar Contributor
    Reputation
    141
    Join Date
    May 2008
    Posts
    866
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you translate your code to english, or mostly english? I know enough lua to write entire rotations in devpad pages, complete with automatic decisions for aoe or applying debuffs to arbitrary enemies, but I can't, for the life of me, read your code.
    KuRIoS is awesome!

  6. #6
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Ssateneth View Post
    Could you translate your code to english, or mostly english? I know enough lua to write entire rotations in devpad pages, complete with automatic decisions for aoe or applying debuffs to arbitrary enemies, but I can't, for the life of me, read your code.
    Well I can try to explain at least

    First you need to know about RunScript..
    /script sometext is actually an "alias" for RunScript('sometext')
    In live, RunScript points to a C function which, as the name implies, runs the script. In beta, RunScript is nil.

    Secondly, you need to know about /dump.
    Arguments
    value
    The name of the global variable, table value, or function result you wish to show.
    Forget the details on what it does for now, the only thing important is the bolded part of the quote. It tells us that /dump can call lua functions.

    Thirdly; loadstring()
    loadstring is a standard lua function that parses a string and creates a function out of it.

    The rest is just plain lua..
    Code:
    (function() RunScript=function(a) loadstring(a)(); end; end)()
    The red parts creates a function which runs the green stuff, which creates another function and assigns it to RunScript

    So in the end /script sometext ends up very similar to
    anonymous_function = loadstring('sometext')
    anonymous_function()

  7. #7
    Vengfull's Avatar War is Coming - Warmonger VPS & Hosting Services
    CoreCoins Purchaser
    Reputation
    782
    Join Date
    Jan 2012
    Posts
    662
    Thanks G/R
    162/80
    Trade Feedback
    8 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nicely done Mike +Rep

  8. #8
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha, forgot /dump actually would let you run things in it. GJ reminding me

    Now I can get some addons working again. *cough*

  9. #9
    BuloZB's Avatar Active Member
    Reputation
    20
    Join Date
    Nov 2008
    Posts
    263
    Thanks G/R
    25/4
    Trade Feedback
    17 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    very nice find thanks for share!

  10. #10
    bu_ba_911's Avatar Elite User
    Reputation
    552
    Join Date
    May 2006
    Posts
    1,638
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh noes!!! The great beast has fixed this!!! :-O
    ^0^Team Nova's PQR NCC ^0^

    If you think someone did something good, take the time to show your appreciation!

  11. #11
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you mean fixed? It still works fine for me.

  12. #12
    bu_ba_911's Avatar Elite User
    Reputation
    552
    Join Date
    May 2006
    Posts
    1,638
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by _Mike View Post
    What do you mean fixed? It still works fine for me.
    me and a friend both tried it and this is what i got

    Dump: value=(function() RunScript=function(a) loadstring(a)(); end; end()
    empty result
    ^0^Team Nova's PQR NCC ^0^

    If you think someone did something good, take the time to show your appreciation!

  13. #13
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it's supposed to say that. Now try to use /run

  14. #14
    bu_ba_911's Avatar Elite User
    Reputation
    552
    Join Date
    May 2006
    Posts
    1,638
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol before it never returned "empty result"

    and i have tried many time, i get the exact same lua error that i get before i dumped the function

    *edit*
    i'll live without it.... i'm going to experiment on my end, since it's obvious it works for u lol so with that in mind i tank you again for the code and i'll continue to use PQR as my code testing medium till i get this worked out
    Last edited by bu_ba_911; 04-07-2012 at 09:53 PM.
    ^0^Team Nova's PQR NCC ^0^

    If you think someone did something good, take the time to show your appreciation!

Similar Threads

  1. Any ways to enable addons/scripts in Legion Beta?
    By icyblade in forum WoW Memory Editing
    Replies: 0
    Last Post: 12-03-2015, 02:17 AM
  2. [Tool] Any ways to enable addons/scripts in WoD Beta?
    By pcmdxx in forum WoW Memory Editing
    Replies: 50
    Last Post: 07-25-2014, 02:22 PM
  3. [Release] MoP beta - Enabling addons
    By _Mike in forum World of Warcraft Bots and Programs
    Replies: 224
    Last Post: 08-05-2012, 03:11 AM
  4. PayPal API run script after successful transaction
    By Ezikielth in forum Programming
    Replies: 2
    Last Post: 06-24-2009, 03:37 AM
All times are GMT -5. The time now is 06:36 AM. 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