GameSpector

Community site

GameSpector Home and Downloads

[GS 7.2] A little script template

General questions and conversations

[GS 7.2] A little script template

Postby kingkaste9 » Mon Jul 21, 2014 3:34 pm

This little template is from here http://gsforum.vistabug.com/viewtopic.php?f=3&t=116
That's the only thing I found here. Possibly I will add later something, but at the moment I'm a noob :D, so don't expect too much :lol:

Basic style
Code: Select all
Patch {
  target_package : "com.sample.package.name"
  target_version : 123
  title          : "Sample patch"
  author         : "patch writer"
  revision       : 2

  Apply {
    FileReplaceHex("00123456:AA:BB")
  }

  Remove {
    RestoreFiles()
  }
}


More comprehensive
Code: Select all
Patch {
  target_package : "com.sample.package.name"
  target_version : 123
  title          : "This patch does nothing useful"
  author         : "patch writer"
  revision       : 2

  Apply {

    sample_message : "GSL supports both global and local variables"

    Message("Title", sample_message)
 
    OpenZip("asasd.zip")
    SelectFile("files/sample.bin")
    FileCheckSize(12345)
    FileReplaceStr(0x12345, "Old String", "new string")
    CloseZip(0)

    SetProgress("Display this progress messaage")

    SetCpu("x86") // actions below will only be executed for selected CPU
    SelectFile("") // when no file is selected, package DEX cache is used
    FileReplaceAllStr("Old String", "new string")

    SetCpu("all") // actions below will be executed for any CPU

    SetFailOnError(0)

    SelectFile("files/sample2.bin")
    FileReplaceHex("00123456:AA:BB, 0054321:00??11??33:44??22??99")
    FileReplaceAllHex("AABBCCDD", "BBCCDDAA")

    SelectFile("files/sample3.txt")
    FileSedScript("s/rank=1/rank=99/g")
 
    ShellExec("cat /proc/cpuinfo")
 
    SelectFile("databases/dbsample.sqlite")
    FileQuery("update preferences set money=99999")

  }

  Remove {
   RestoreFiles()
  }

}
kingkaste9
 
Posts: 6
Joined: Sun Jul 20, 2014 11:23 pm

Return to General



Who is online

Users browsing this forum: Baidu [Spider] and 1 guest

cron