The forum

[Script] Wizard 101

Author Replies
jhersey Wednesday 29 January 2014 at 23:26
jherseyAnonymous

Description (From MMORPG.com): Wizard101 is a free-to-play fantasy MMORPG from KingsIsle Entertainment that allows players to take the role of students at a school for wizards. Players create a character and then enter one of seven magical schools, learning the ropes and some new skills, then plunging into the magical, sometimes humorous storyline.

Anything done outside of wine: When downloading the file from the internet, I used the mv command to rename it to an .exe file. Sometimes it will get a feature transfer error if you do not do this.

Extra Notes: See anything done outside of Wine above.

[code language=playonlinux]
#!/bin/bash
# Date : (2014-01-29 17-22)
# Wine version used : 1.7.11 x86
# Distribution used to test : Ubuntu 13.10 x86_64
# PlayOnLinux : 4.2.1
# Author : Joseph Hersey
 
# CHANGELOG

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

PREFIX="Wizard101"
TITLE="Wizard 101"
EDITOR="KingsIsle Entertainment, Inc."
GAME_URL="https://www.wizard101.com"
AUTHOR="Joseph Hersey"
 
# Initialization
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_Debug_Init
 
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
# Create Prefix
POL_System_SetArch "x86" # Game crashes if installed with x86_64
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_WaitBefore "$TITLE"
POL_Wine_PrefixCreate

# Installation - Determine if user wants to download or use a local copy.

POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD" # Choose method of installation
 if [ "$INSTALL_METHOD" = "LOCAL" ]
    then
     POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE" # Browse for File
 
     POL_Wine_WaitBefore "$TITLE"
     POL_Wine start /unix "$APP_ANSWER" # Install Application
     POL_Wine_WaitExit "$TITLE"
 
 elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]
    then
     POL_System_TmpCreate "$PREFIX" # Create temp folder
     cd "$POL_System_TmpDir"
     POL_Download "https://www.wizard101.com/downloadGame/OtherDownload" # Download the installer
     mv OtherDownload InstallWizard101.exe # Sometimes you get a feature transfer error if you do not rename this file to an .exe

     POL_Wine_WaitBefore "$TITLE"
     POL_Wine start /unix "InstallWizard101.exe" # Install Application
     POL_Wine_WaitExit "$TITLE"
 
     POL_System_TmpDelete # Delete Temp Directory
fi
 
# Create Shortcuts
POL_Shortcut "Wizard101.exe" "$TITLE" "" "" "Game;RolePlaying;"
 
POL_SetupWindow_Close
exit 0
[/code]

Screenshots
[img]http://s22.postimg.org/yjiv4q2zh/wizard101_1.jpg[/img]
[img]http://s22.postimg.org/yjiv4q2zh/wizard101_1.jpg[/img]
[img]http://s22.postimg.org/h3op3140t/wizard101_3.jpg[/img]
[img]http://s22.postimg.org/shb8e8ejh/wizard101_4.jpg[/img]

Left Image
[img]http://s22.postimg.org/pw5nqpp5p/left.jpg[/img]

44x44
[img]http://s22.postimg.org/6odxgdhgd/Wizard101_44x44.png[/img]

22x22
[img]http://s22.postimg.org/8u88avkwt/Wizard101_22x22.png[/img]

Edited by jhersey

petch Sunday 2 February 2014 at 15:30
petch

Hi,
Your script looks nice, no problem with renaming the installer after download, it's actually done by several scripts already.

POL_System_SetArch "x86" # Game crashes if installed with x86_64

That's the default so you can omit it. Doesn't hurt though.

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_WaitBefore "$TITLE"
POL_Wine_PrefixCreate

I don't understand why you used WaitBefore here, shouldn't be necessary

     POL_Wine_WaitBefore "$TITLE"
     POL_Wine start /unix "$APP_ANSWER" # Install Application
     POL_Wine_WaitExit "$TITLE"


"start /unix" is usually not necessary, and it has side effects (cancelling the installation does not immediately kill the windows installer), so it's better to remove it if possible.
POL_Wine_WaitBefore and POL_Wine_WaitExit should never be necessary simultaneously. If you remove start /unix, the WaitBefore statement should be sufficient.

About the images:

Images for the installer should be 150x356 px (for left) and 64x64 (for top).
Image for list is 22x22 px indeed, image for shortcut can be anything from 32x32 to 256x256 (48x48 is the most common, but PoL should be able to use anything square). The latter is mainly for future uses (creating larger list icons in the future?) as POL_Shortcut, as you used it, will take the icon directly from the executable.
Screenshots should be full size, the web server will take care of creating thumbnail versions

So, beside maybe this strange WaitBefore between SelectPrefix and PrefixCreate, your script looks ok for validation.

Regards,
Pierre.
petch Thursday 6 February 2014 at 19:39
petch

Script validated, but without the gfx resources that do not have the required dimensions.

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmcayonlinux.com