Jump to content



Photo

AutoIt Flash Variable Editing.


  • Please log in to reply
36 replies to this topic

#21 sheeva

sheeva

    Seeker

  • Active Members
  • 39 posts

Posted 07 December 2009 - 08:54 AM

Hi, your script doesn't work here. i think its because of $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")
so what i have ti install to make that work. i have already the flash/shockwave plugins installed but still not working. :)

Please Help.

Do you thing that we can use .swf in autoit like a GUI ?

Thank's





#22 AlmarM

AlmarM

    Programming my way.

  • Active Members
  • PipPipPipPipPipPip
  • 1,642 posts

Posted 07 December 2009 - 09:58 AM

@darkjohn20
Did you try it without the _global ?

Hi, your script doesn't work here. i think its because of $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")
so what i have ti install to make that work. i have already the flash/shockwave plugins installed but still not working. :)

Please Help.

Do you thing that we can use .swf in autoit like a GUI ?

Thank's

It does work, but the game im using updates its link. Lemme find the new one. ;)

Current link: http://www.maxgames.com/play/age-of-war.html
But it doesnt seem to work anymore. :/

Edited by AlmarM, 07 December 2009 - 10:05 AM.


#23 darkjohn20

darkjohn20

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 347 posts

Posted 07 December 2009 - 09:53 PM

@darkjohn20
Did you try it without the _global ?


I tried "_global.variable", "variable", and "global.variable".

I was looking online and I think I might have read somewhere that global variables can only be edited by another flash object?

Not quite sure, so don't assume this is right xD.

#24 AlmarM

AlmarM

    Programming my way.

  • Active Members
  • PipPipPipPipPipPip
  • 1,642 posts

Posted 08 December 2009 - 09:32 AM

Hmm, that could be true. I also have no idea how flash works. Never done it. ;)

#25 playlet

playlet

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 459 posts

Posted 08 December 2009 - 06:44 PM

Hi!

It doesn't matter if you put "ShockwaveFlash.ShockwaveFlash.1" or "ShockwaveFlash.ShockwaveFlash"

Save page or find link for swf file in page source, then just replace original line in script with this:

.Movie = @ScriptDir & "\Age of war.swf"

and put the swf file in the same directory where your game is.

That's it!

Playlet

#26 Authenticity

Authenticity

    Universalist

  • MVPs
  • 2,619 posts

Posted 08 December 2009 - 07:15 PM

You cannot set AS3 variables that way. SetVariable is for AS2.

#27 AlmarM

AlmarM

    Programming my way.

  • Active Members
  • PipPipPipPipPipPip
  • 1,642 posts

Posted 08 December 2009 - 09:47 PM

You cannot set AS3 variables that way. SetVariable is for AS2.

Realy? Thanks for telling ;)

#28 playlet

playlet

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 459 posts

Posted 08 December 2009 - 11:03 PM

AutoIt         
$GUI = GUICreate("Age of War [AutoIt Var Editing]", 870, 760, -1, -1) $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") $oGameGUI = GUICtrlCreateObj($oGame, 10, 10, 850, 650) With $oGame     .bgcolor = "#000000"     .Movie = @ScriptDir & "\Age of war.swf"     .Loop = True     .ScaleMode = 2     .wmode = "Opaque" EndWith $Money = GUICtrlCreateInput("999999999999", 10, 670, 100, 20) $SetMoney = GUICtrlCreateButton("Set Money", 120, 668, 100) $TechLevel = GUICtrlCreateInput("5", 10, 700, 100, 20) $SetTechLevel = GUICtrlCreateButton("Set Tech Level", 120, 698, 100) $XP = GUICtrlCreateInput("999999999999", 10, 730, 100, 20) $SetXP = GUICtrlCreateButton("Set XP", 120, 728, 100) $turretbutt = GUICtrlCreateButton ("Get turret places", 230, 728, 120, 25) $healthinput = GUICtrlCreateInput("999999999999", 230, 670, 100, 20) $healthbut = GUICtrlCreateButton ("Health", 340, 668, 120, 25) GUISetState() While 1     $nMsg = GUIGetMsg()     Select     Case $nMsg = -3     Exit     Case $nMsg = $SetMoney     $Read_Money = GUICtrlRead($Money)     $oGame.SetVariable("cash", $Read_Money)     Case $nMsg = $SetTechLevel     $Read_TechLevel = GUICtrlRead($TechLevel)     $oGame.SetVariable("tech_level", $Read_TechLevel)     Case $nMsg = $SetXP     $Read_XP = GUICtrlRead($XP)     $oGame.SetVariable("xp", $Read_XP)     Case $nMsg = $healthbut         $Read_health = GUICtrlRead($healthinput)         $oGame.SetVariable("game.ennemies.ennemybase1.health", $Read_health)     Case $nMsg = $turretbutt         $oGame.SetVariable("addons", 3)     EndSelect WEnd

Just a small contribution.

#29 darkjohn20

darkjohn20

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 347 posts

Posted 09 December 2009 - 02:48 AM

You cannot set AS3 variables that way. SetVariable is for AS2.


So...is there a method to do this in AS3, or can anything else be done?

Thanks!

#30 zhangfei

zhangfei

    Seeker

  • New Members
  • 1 posts

Posted 09 December 2009 - 03:16 AM

I tried that, but it didn't work.

#31 boomingranny

boomingranny

    Wayfarer

  • Active Members
  • Pip
  • 52 posts

Posted 09 December 2009 - 07:16 AM

this looks very interesting and exciting. Thanks for sharing.

I am having trouble linking to flash objects already embedded in an IE window, are you able to do this?

#32 AlmarM

AlmarM

    Programming my way.

  • Active Members
  • PipPipPipPipPipPip
  • 1,642 posts

Posted 09 December 2009 - 08:14 AM

AutoIt         
$GUI = GUICreate("Age of War [AutoIt Var Editing]", 870, 760, -1, -1) $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") $oGameGUI = GUICtrlCreateObj($oGame, 10, 10, 850, 650) With $oGame     .bgcolor = "#000000"     .Movie = @ScriptDir & "\Age of war.swf"     .Loop = True     .ScaleMode = 2     .wmode = "Opaque" EndWith $Money = GUICtrlCreateInput("999999999999", 10, 670, 100, 20) $SetMoney = GUICtrlCreateButton("Set Money", 120, 668, 100) $TechLevel = GUICtrlCreateInput("5", 10, 700, 100, 20) $SetTechLevel = GUICtrlCreateButton("Set Tech Level", 120, 698, 100) $XP = GUICtrlCreateInput("999999999999", 10, 730, 100, 20) $SetXP = GUICtrlCreateButton("Set XP", 120, 728, 100) $turretbutt = GUICtrlCreateButton ("Get turret places", 230, 728, 120, 25) $healthinput = GUICtrlCreateInput("999999999999", 230, 670, 100, 20) $healthbut = GUICtrlCreateButton ("Health", 340, 668, 120, 25) GUISetState() While 1     $nMsg = GUIGetMsg()     Select     Case $nMsg = -3     Exit     Case $nMsg = $SetMoney     $Read_Money = GUICtrlRead($Money)     $oGame.SetVariable("cash", $Read_Money)     Case $nMsg = $SetTechLevel     $Read_TechLevel = GUICtrlRead($TechLevel)     $oGame.SetVariable("tech_level", $Read_TechLevel)     Case $nMsg = $SetXP     $Read_XP = GUICtrlRead($XP)     $oGame.SetVariable("xp", $Read_XP)     Case $nMsg = $healthbut         $Read_health = GUICtrlRead($healthinput)         $oGame.SetVariable("game.ennemies.ennemybase1.health", $Read_health)     Case $nMsg = $turretbutt         $oGame.SetVariable("addons", 3)     EndSelect WEnd

Just a small contribution.

Great! Does the enemy base health work? Because I found some enemy variables but they never seemed to be good. :/

#33 Authenticity

Authenticity

    Universalist

  • MVPs
  • 2,619 posts

Posted 09 December 2009 - 01:32 PM

So...is there a method to do this in AS3, or can anything else be done?

Thanks!


Start by learning AS3. In some cases you'll need to know AVM2 which is something like Microsoft's IL which AS3 is using. You can start by reading some of this forum tutorials.

Edited by Authenticity, 09 December 2009 - 01:32 PM.


#34 playlet

playlet

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 459 posts

Posted 09 December 2009 - 04:03 PM

Great! Does the enemy base health work? Because I found some enemy variables but they never seemed to be good. :/


Yes, here it is:
AutoIt         
$GUI = GUICreate("Age of War [AutoIt Var Editing]", 1070, 760, -1, -1) $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") $oGameGUI = GUICtrlCreateObj($oGame, 10, 10, 1050, 650) With $oGame     .bgcolor = "#000000"     .Movie = @ScriptDir & "\Age of war.swf"     .Loop = True     .ScaleMode = 2     .wmode = "Opaque" EndWith $Money = GUICtrlCreateInput("999999999999", 10, 670, 100, 20) $SetMoney = GUICtrlCreateButton("Set Money", 120, 668, 100) $TechLevel = GUICtrlCreateInput("5", 10, 700, 100, 20) $SetTechLevel = GUICtrlCreateButton("Set Tech Level", 120, 698, 100) $XP = GUICtrlCreateInput("999999999999", 10, 730, 100, 20) $SetXP = GUICtrlCreateButton("Set XP", 120, 728, 100) $turretbutt = GUICtrlCreateButton ("Get turret locat", 230, 728, 120, 25) $healthinput = GUICtrlCreateInput("999999999999", 230, 670, 100, 20) $healthbut = GUICtrlCreateButton ("Health", 340, 668, 120, 25) $Moneyen = GUICtrlCreateInput("999999999999", 600, 670, 100, 20) $SetMoneyen = GUICtrlCreateButton("Set Money - Enemy", 710, 668, 100) $TechLevelen = GUICtrlCreateInput("5", 600, 700, 100, 20) $SetTechLevelen = GUICtrlCreateButton("Tech Lvl - Enemy", 710, 698, 100) $XPen = GUICtrlCreateInput("999999999999", 600, 730, 100, 20) $SetXPen = GUICtrlCreateButton("Set XP - Enemy", 710, 728, 100) $turretbutten = GUICtrlCreateButton ("Get turret - enemy", 820, 728, 120, 25) $healthinputen = GUICtrlCreateInput("999999999999", 820, 670, 100, 20) $healthbuten = GUICtrlCreateButton ("Health - Enemy", 930, 668, 120, 25) GUISetState() While 1     $nMsg = GUIGetMsg()     Select     Case $nMsg = -3     Exit     Case $nMsg = $SetMoney     $Read_Money = GUICtrlRead($Money)     $oGame.SetVariable("cash", $Read_Money)     Case $nMsg = $SetMoneyen     $Read_Moneyen = GUICtrlRead($Moneyen)     $oGame.SetVariable("ecash", $Read_Moneyen)     Case $nMsg = $SetTechLevel     $Read_TechLevel = GUICtrlRead($TechLevel)     $oGame.SetVariable("tech_level", $Read_TechLevel)     Case $nMsg = $SetTechLevelen     $Read_TechLevelen = GUICtrlRead($TechLevelen)     $oGame.SetVariable("etech_level", $Read_TechLevelen)     Case $nMsg = $SetXP     $Read_XP = GUICtrlRead($XP)     $oGame.SetVariable("xp", $Read_XP)     Case $nMsg = $SetXPen     $Read_XPen = GUICtrlRead($XPen)     $oGame.SetVariable("exp", $Read_XPen)     Case $nMsg = $healthbut         $Read_health = GUICtrlRead($healthinput)         $oGame.SetVariable("game.ennemies.ennemybase1.health", $Read_health)     Case $nMsg = $healthbuten         $Read_healthen = GUICtrlRead($healthinputen)         $oGame.SetVariable("game.ennemies.ennemybase2.health", $Read_healthen)     Case $nMsg = $turretbutt         $oGame.SetVariable("addons", 3)     Case $nMsg = $turretbutten         $oGame.SetVariable("eaddons", 3)     EndSelect WEnd


#35 darkjohn20

darkjohn20

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 347 posts

Posted 09 December 2009 - 07:57 PM

Start by learning AS3. In some cases you'll need to know AVM2 which is something like Microsoft's IL which AS3 is using. You can start by reading some of this forum tutorials.


Haha, I've been on that forum for years. Will still look more closely.

#36 cageman

cageman

    Polymath

  • Active Members
  • PipPipPipPip
  • 239 posts

Posted 11 December 2009 - 05:03 PM

i made a bot for ladderslasher once. its not bugfree yet, but maybe someone wants to play around a little. i found out a lot about itemstats reading etc..


config.ini file:
[Standaard] Minimumlifepercentage="100" Minimummanapercentage="85" Plek="2" Hit="0" Spell="1" Stoplvlup="66" MaxLifeDiff="10" LeaveAtLife="15" DropSleep="1000" Account="d2jspacc" Password="pass" GoldPassword="goldpass"


edit: i see there is a new patch, but i think the old variables will still work.. just try and see.

Attached Files


Edited by cageman, 11 December 2009 - 05:18 PM.


#37 Kalin

Kalin

    Prodigy

  • Banned (NOT IN USE)
  • 175 posts

Posted 16 October 2010 - 09:28 PM

Updated and Fixed your original post.
@AlmarM

Plain Text         
$GUI = GUICreate("Age of War [AutoIt Var Editing]", 670, 560, -1, -1) $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash") ; Removed the .1 in the ShockwaveFlash. (so Flash doesn't focus on the .1 and focuses on the main component. $oGameGUI = GUICtrlCreateObj($oGame, 10, 10, 650, 450) With $oGame $oGame.bgcolor = "#000000" $oGame.Movie = "<a href='http://farm.maxgames.com/ageofwarupdate1MzYx.swf' class='bbc_url' title='External link' rel='nofollow external'>http://farm.maxgames.com/ageofwarupdate1MzYx.swf"</a> ; Updated SWF link. $oGame.Loop = True $oGame.ScaleMode = 2 $oGame.wmode = "Opaque" EndWith $Money = GUICtrlCreateInput("Money here...", 10, 470, 100, 20) $SetMoney = GUICtrlCreateButton("Set Money", 120, 468, 100) $TechLevel = GUICtrlCreateInput("Tech Level (1 - 5) here...", 10, 500, 100, 20) $SetTechLevel = GUICtrlCreateButton("Set Tech Level", 120, 498, 100) $XP = GUICtrlCreateInput("EXP here...", 10, 530, 100, 20) $SetXP = GUICtrlCreateButton("Set EXP", 120, 528, 100) GUISetState() While 1 $nMsg = GUIGetMsg() Select     Case $nMsg = -3         Exit     Case $nMsg = $SetMoney         $Read_Money = GUICtrlRead($Money)         $oGame.SetVariable("cash", $Read_Money)     Case $nMsg = $SetTechLevel         $Read_TechLevel = GUICtrlRead($TechLevel)         $oGame.SetVariable("tech_level", $Read_TechLevel)     Case $nMsg = $SetXP         $Read_XP = GUICtrlRead($XP)         $oGame.SetVariable("xp", $Read_XP) EndSelect WEnd

Edited by Kalin, 16 October 2010 - 09:54 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users