Forum

[Script] Hearthstone

Författare Svar
Jump to the page: 1 - 2 - 3 - 4
kweepeer2 Sunday 9 February 2014 at 1:22
kweepeer2Anonymous

Enjoy. Will submit soon, but would be nice if some people can test it.

#!/bin/bash
# Date : 2014-02-08 14:54
# Last revision : 2014-02-09 00:46
# Wine version used : 1.6.2
# Distribution used to test : Ubuntu 13.10 x64
# Author : kweepeer2
# Depend : 

# Known Issues : 
# - Some of the buttons in the submenus of the Battle.net launcher seem to work only sporadically.

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Hearthstone"
PREFIX="hearthstone"
 
POL_SetupWindow_Init
POL_SetupWindow_presentation "$TITLE" "Blizzard" "http://us.battle.net/hearthstone/en/" "kweepeer2" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "1.6.2" # Latest stable Wine version.

# http://appdb.winehq.org/objectManager.php?sClass=version&iId=29747
POL_Call POL_Install_wininet
POL_Wine_OverrideDLL "disabled" "dbghelp"
POL_Wine_OverrideDLL "native,builtin" "msvcp100"
 
# Download & Install the game.
# Multiple Language support. See https://eu.battle.net/account/download/?show=hearthstone&style=hearthstone
POL_SetupWindow_menu "$(eval_gettext 'What language do you want to install?')" "Language Selection" \
    "English (US)|Español (AL)|Português (BR)|English (EU)|Deutsch|Español(EU)|Português (EU)|Français|Русский|Italiano|Polski|한국어|繁體中文|简体中文" "|"
case "$APP_ANSWER" in
    "English (US)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-enUS.exe";;
    "Español (AL)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-esMX.exe";;
    "Português (BR)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-ptBR.exe";;
    "English (EU)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-enGB.exe";;
    "Deutsch")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-deDE.exe";;
    "Español(EU)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-esES.exe";;
    "Português (EU)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-ptPT.exe";;
    "Français")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-frFR.exe";;
    "Русский")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-ruRU.exe";;
    "Italiano")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-itIT.exe";;
    "Polski")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-plPL.exe";;
    "한국어")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-koKR.exe";;
    "繁體中文")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-zhTW.exe";;
    "简体中文")
        DOWNLOAD_LINK="http://client01.pdl.wow.battlenet.com.cn/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/beta.1/Hearthstone-Beta-Setup-zhCN.exe";;
    *)
        exit 1;;
esac

POL_System_TmpCreate "$PREFIX"
cd "$POL_System_TmpDir"
POL_Download "$DOWNLOAD_LINK"
POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
EXE_FILE="${DOWNLOAD_LINK##*/}" # Get everything after last slash.
POL_Wine "$POL_System_TmpDir/${EXE_FILE}"
POL_System_TmpDelete

POL_SetupWindow_VMS "64"
POL_Wine_reboot

POL_Shortcut "Battle.net.exe" "$TITLE"
POL_SetupWindow_Close

exit 0

Ändrat av kweepeer2

monban Wednesday 12 February 2014 at 18:46
monban

Been playing for the past few days thanks to this script, zero additional configuration, zero problems. Fun game too!

Ändrat av monban

petch Wednesday 19 February 2014 at 20:10
petch
Developer

kweepeer2 Friday 21 February 2014 at 14:50
kweepeer2Anonymous

Thanks monban & petch. I try to provide some images soon!
Kossak2 Friday 14 March 2014 at 21:55
Kossak2Anonymous

Hello,
I installed the game using this script (english version, but i'm located in Poland), but when i try to launch it i only see battle.net launcher with the error "Battle.net agent went to sleep. Attempting to wake it up...". I tried deleteing agent.db file but it didn't help. Any ideas how to fix it? Thank you in advance.

My specs:
System: Host: kossak-lpc Kernel: 3.11.10-03111005-generic x86_64 (64 bit) Desktop: N/A Distro: Linux Mint 16 Petra
Machine: Mobo: ASRock model: Z77 Pro3 Bios: American Megatrends version: P1.90 date: 12/04/2012
CPU: Quad core Intel Core i5-3570K CPU (-MCP-) clocked at 3688.867 MHz
Graphics: Card: Advanced Micro Devices [AMD/ATI] Barts PRO [Radeon HD 6850]
X.Org: 1.14.5 driver: fglrx Resolution: 1680x1050@60.0hz
GLX Renderer: AMD Radeon HD 6800 Series GLX Version: 4.2.12337 - CPC 13.251
Network: Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
Card-2: Microsoft Xbox 360 Wireless Adapter
Drives: HDD Total Size: 2500.5GB (85.6% used)
Info: Processes: 241 Uptime: 47 min Memory: 2523.8/7872.6MB Client: Shell inxi: 1.8.4
AlexxanderX Sunday 16 March 2014 at 14:28
AlexxanderXAnonymous

Open an console and type:


wine /home/[USERNAME]/.PlayOnLinux/wineprefix/hearthstone/drive_c/users/Public/Application
Data/Battle.net/Agent/Agent.exe --nohttpauth


But if your wine version is not 1.6.2 you will have errors when you will try to open Hearthstone so I downgradet wine to 1.6.2 and everything work perfect. Almost everytime I need to open Hearthstone, kill it and restart it.
I created a bash script for Hearthstone:


#!/bin/bash
killall Agent.exe
wine /home/[USERNAME]/.PlayOnLinux/wineprefix/hearthstone/drive_c/users/Public/Application Data/Battle.net/Agent/Agent.exe --nohttpauth > logtext.txt 2>&1 &
sleep 2
/usr/share/playonlinux/playonlinux --run "Hearthstone" %F > logBattleNet.txt 2>&1 &
sleep 5
killall Battle.net.exe
sleep 2
/usr/share/playonlinux/playonlinux --run "Hearthstone" %F > logBattleNet.txt 2>&1 &

Ändrat av AlexxanderX

Kossak2 Tuesday 18 March 2014 at 21:10
Kossak2Anonymous

Unfortunately no luck for me.

I created script:
--------------------------------
#!/bin/bash
killall Agent.exe
wine /home/kossak/.PlayOnLinux/wineprefix/hearthstone/drive_c/users//Public/Application\ Data/Battle.net/Agent/Agent.exe --nohttpauth > logtext.txt 2>&1 &
sleep 2
/usr/share/playonlinux/playonlinux --run "Hearthstone" %F > logBattleNet.txt 2>&1 &
sleep 5
killall Battle.net.exe
sleep 2
/usr/share/playonlinux/playonlinux --run "Hearthstone" %F > logBattleNet.txt 2>&1 &
--------------------------------

But when i run it the result was dialog box saying wine had crashed and to ignore it if the app is running. When i closed the diolg box battle.net launcher appeared and after several seconds the error "Whoops! We're having problems loading some content. Please try reloading this page using the button below (...)". Reloading doesn't help anything and the tab doesn't have any play/install buttton.

My global wine version (the one installed in Linux MInt, not in PoL) is 1.6.1. The prefix in PoL is installed with wine 1.6.2.

I run it in terminal:

$ wine --version
wine-1.6.1


i also tried updating my wine with:

$ sudo apt-get install wine1.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
wine1.6 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.


my logBattleNet.txt - http://pastebin.com/HsqKxppB
and logtext.txt - http://pastebin.com/wcKJ6x7j

Ändrat av Kossak2

AlexxanderX Friday 21 March 2014 at 20:34
AlexxanderXAnonymous

After some problems with ArchLinux( scripts were created for ArchLinux) and installed Linux Mint 16 and I didn't need any aditional scripts or to change wine version.

Ändrat av AlexxanderX

KillerRobot007 Saturday 22 March 2014 at 0:25
KillerRobot007Anonymous

I'm having the same difficulty as Kossak2. I'm running Linux Mint 15 and located in the United States. My log files look relatively similar to his as well. Any thoughts?
AlexxanderX Saturday 22 March 2014 at 7:31
AlexxanderXAnonymous

Try to open playonlinux->configure->hearthstone->Miscellaneous->'Open a shell' and type
[script]users/Public/Application\ Data/Battle.net/Agent/Agent.exe --nohttpauth[/script]
And now with the shell opened try to start Hearthstone.
KillerRobot007 Saturday 22 March 2014 at 14:12
KillerRobot007Anonymous

Thanks AlexxanderX for the quick reply. I have run that command in a shell and then when I try to run Hearthstone (from the PlayOnLinux program) it crashes, I believe saying that my wine version is already running.

Running wine-1.6.2 Battle.net.exe
wine client error:0: version mismatch 431/447.
Your wineserver binary was not upgraded correctly,
or you have an older one somewhere in your PATH.
Or maybe the wrong wineserver is still running?

I'm assuming that I'm misunderstanding, but I run the script in the shell, leave it open, then try to open the program and it believes that the wineserver is already running. Is there a way to run the program from the shell that you're wanting me to do?

Now I have run "/home/dan/.PlayOnLinux/wineprefix/hearthstone/drive_c/users//Public/Application\ Data/Battle.net/Agent/Agent.exe --nohttpauth" from a normal terminal and then opened Hearthstone, and I get a little further - I can actually see the list of games on the left. But then none of the game content loads and I get BLZBNTBNA000003E8 errors ("An Error Occurred Retrieving Content"). But I can't get any further from there.

Ändrat av KillerRobot007

AlexxanderX Sunday 23 March 2014 at 11:16
AlexxanderXAnonymous

If you get that error then the system version of wine( used in shell console) differ the Hearthstone version of wine( 1.6.2). Try how I said to downgrade or upgrade system wine version to 1.6.2.
About the second error I don't know exactly from what it is, but maybe is also from Agent.exe.

Ändrat av AlexxanderX

KillerRobot007 Tuesday 25 March 2014 at 19:50
KillerRobot007Anonymous

I have now updated my system wine version to 1.6.2 (sorry I didn't understand this before), and now when using the --nohttpauth command, I am also getting links to "Buy Game" in Diablo III and links to install World of Warcraft and Starcraft II (both I own already). I have installed Starcraft II and can play it successfully now - yay!

However, I am still getting messages saying that content cannot be loaded on every page (BLZBNTBNA000003E8), and on Hearthstone I have no links other than "Learn More" available.

Any ideas?

Edit:  perhaps I cannot install Hearthstone from Battle.Net - in which case, how should it be installed?

Ändrat av KillerRobot007

AlexxanderX Wednesday 26 March 2014 at 15:24
AlexxanderXAnonymous

Me too I can't see slides from Battle.net, but I don't care about them.
I don't think you can install Hearthstone from other sources.
kweepeer2 Friday 28 March 2014 at 10:14
kweepeer2Anonymous

We can get the "slides" working by changing the wine version to 1.7.15. Then it works, but as this is just showing advertising from Blizzard, you are not missing much...

The problem with Agent.exe are more annoying and I hope they will be fixed soon by Blizzard. I would strongly advise against running things from system wine. When you make a script and just run "wine", it will of course use system wine. What you should do instead is open a shell from POL (click Hearthstone then configure -> from one of the tabs you can open a shell) and then just cd to the right path and run POL_Wine Agent.exe --nohttpauth

This way it will use the wine version which is configured for the Hearthstone prefix.

I hope the problems with Agent will be fixed soon. Once we are back to a stable situation, I will update the script (since new download links are out for release version, but these still work too).
theclunkymonkey Friday 28 March 2014 at 16:59
theclunkymonkeyAnonymous

Hi all, I am having some problems with Hearthstone using Ubuntu 13.10.  It used to work fine, but it seems since the game has been out of beta it no longer starts properly.  I can get to the Battle.net launcher and everything using the Agent --nohttpauth command, but once i click play now, the game closes before it starts.  Here is what it tells me: Closed
Oops! Playful Sprites have disrupted Hearthstone as it was linking up to the Battle.net service. Please wait a few minutes for them to disperse and try re-launching the game.

Any tricks/tips?
kweepeer2 Saturday 29 March 2014 at 18:15
kweepeer2Anonymous

theclunkymonkey: Try with this script, maybe it will work. I tried it on Ubuntu 13.10 x64. You will still have to do the Agent thing (most likely)...

#!/bin/bash
# Date : 2014-02-08 14:54
# Last revision : 2014-03-29 18:04
# Wine version used : 1.6.2, 1.7.15
# Distribution used to test : Ubuntu 13.10 x64
# Author : kweepeer2
# Depend : 

# Known Issues : 
# - (Wine Bug 33943) Battle.net client dropdown menus won't appear until you hover over them.

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Hearthstone"
PREFIX="hearthstone"

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_presentation "$TITLE" "Blizzard" "http://us.battle.net/hearthstone/en/" "kweepeer2" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "1.7.15"

# Download & Install the game.
# Multiple Language support. See https://eu.battle.net/account/download/?show=hearthstone&style=hearthstone
POL_SetupWindow_menu "$(eval_gettext 'What language do you want to install?')" "Language Selection" \
    "English (US)|Español (AL)|Português (BR)|English (EU)|Deutsch|Español(EU)|Português (EU)|Français|Русский|Italiano|Polski|한국어|繁體中文|简体中文" "|"
case "$APP_ANSWER" in
    "English (US)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-enUS.exe";;
    "Español (AL)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-esMX.exe";;
    "Português (BR)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-ptBR.exe";;
    "English (EU)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-enGB.exe";;
    "Deutsch")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-deDE.exe";;
    "Español(EU)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-esES.exe";;
    "Português (EU)")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-ptPT.exe";;
    "Français")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-frFR.exe";;
    "Русский")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-ruRU.exe";;
    "Italiano")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-itIT.exe";;
    "Polski")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-plPL.exe";;
    "한국어")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-koKR.exe";;
    "繁體中文")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-zhTW.exe";;
    "简体中文")
        DOWNLOAD_LINK="http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-zhCN.exe";;
    *)
        exit 1;;
esac

POL_System_TmpCreate "$PREFIX"
cd "$POL_System_TmpDir"
POL_Download "$DOWNLOAD_LINK"
POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
EXE_FILE="${DOWNLOAD_LINK##*/}" # Get everything after last slash.
POL_Wine "$POL_System_TmpDir/${EXE_FILE}"
POL_System_TmpDelete

POL_SetupWindow_VMS "64"
POL_Wine_reboot

POL_Shortcut "Battle.net.exe" "$TITLE" "$TITLE.png" ""
POL_SetupWindow_Close

exit 0

Ändrat av kweepeer2

hoshpack Thursday 24 April 2014 at 16:11
hoshpackAnonymous

hey guys,
hearthstone used to run just fine on my system, but recently i updated ubuntu
to 14.04 and nothing worked anymore. i tried to reinstall the game with the script and ran the shell command to get the agent working and it let me install the game, but then i clicked the play button and it showed me this:

GL: failed to choose pixel format for dc 2d004b
GLContext warn: failed to setup offscreen pixel format: Success.
GLContext: failed to create offsceen context: Success.
Failed to initialize Direct3D 9.
Make sure you have DirectX 9.0c installed, have drivers for your
graphics card and have not disabled 3D acceleration
in display settings.
InitializeEngineGraphics failed

I tried to install some components but nothing worked. Do you think it might be something with the new ubuntu update?..

here my specs:
ubuntu 14.04 LTS 64bit
Intel® Core™ i5-2410M CPU @ 2.30GHz × 4
Intel® Sandybridge Mobile
monban Saturday 3 May 2014 at 17:47
monban

hoshpack: my guess would be either that you don't have the Direct3D library override installed, or else your video card drivers aren't loaded.

What video card are you using? (try: lspci | grep VGA)

Is hardware rendering working in your os? Try glxgears, does is run fast? try glxinfo | grep "direct rendering" does it say yes?

Were you using proprietary video drivers before you upgraded? Have you reinstalled / reactivated them since the update?

daveood Wednesday 7 May 2014 at 16:47
daveoodAnonymous

Hi there, i have same problem with agent went to sleep. I use POL, wine version 1.6.2.. i tried to write --nohttpauth command to POL shell, but it writes than folder doestnt exist.. have u got some advises for me?...
hmm.. maybe i have another path.. but im totally linux noob.. how i can know right path?

when i try to find agent.exe with ubuntu 13.04 (thats my distro) browser, it shows nothing to me

Ändrat av daveood