User File #23486382159800017

Upload All User Files

#23486382159800017 - Tekken 3 Lua

Tekken3J - v1.1b PSXjin.lua
1 comment, 1116 downloads
Uploaded 6/15/2015 4:45 PM by samurai_goroh (see all 1)
This is a Lua file for Tekken 3 made by Spikestuff & simplified by samurai goroh
Mmm, seems that I made an error on lines 59 & 63. Instead of:
   gui.text (  16, 85, character.moku1 )
It should be:
   gui.text (  16, 85, character*moku1* )
Note: Change asterisk for brackets
And similar on line 63 (change dot for brackets)...
-- Tekken 3 PSXjin lua v1.1 PSXjin
-- This is Community Work Please Help
-- Join in add updates of your own and add your name

-- Values found by: Spikestuff
-- Script Edited by: Spikestuff
-- Script simplified by: samurai goroh

character = { [0]  = "Paul",
              [1]  = "Law",
              [2]  = "Lei",
              [3]  = "King",
              [4]  = "Yoshimitsu",
              [5]  = "Nina",
              [6]  = "Hwoarang",
              [7]  = "Xiaoyu",
              [8]  = "Eddy",
              [9]  = "Jin",
              [10] = "Julia",
              [11] = "Kuma/Panda",
              [12] = "Bryan",
              [13] = "Heihachi",
              [14] = "Ogre?",
              [15] = "Mokujin",
              [16] = "Gun Jack",
              [17] = "Gon",
              [18] = "Anna",
              [19] = "Doctor Bosconovitch"
}

while true do
    check  = memory.readbyte(0xBA42F) -- For Mokujin
    pcheck = memory.readbyte(0xAF3A8) -- Player Check

    if 1 == check or check == 49 then
        gui.text( 182, 10, memory.readbyte(0x992DE) ) -- Difficulty Check 0/1/2

    elseif check == 36 then -- In Fight
        timer = memory.readword(0xAF064) -- Center Timer
        moku1 = memory.readbyte(0xAA6D6) -- Player 1 Mokujin
        moku2 = memory.readbyte(0xABF62) -- Player 2 Mokujin
        p1hp  = memory.readword(0x990F2) -- Player 1 Health
        p2hp  = memory.readword(0x99102) -- Player 2 Health

        gui.text( 146, 90, string.format("%3i", p1hp) )     -- HP player 1
        gui.text( 211, 90, string.format("%3i", p2hp) )     -- HP player 2

        if pcheck == 2 then
            gui.text( 260, 101, "Total Stage Time: " .. memory.readword(0xB0F4C), "yellow" ) -- Full Fight Timer
            gui.text( 260, 109, "Round Full Time: "  .. memory.readword(0x968B8), "red" )    -- Round Timer
        else
            gui.text(   8, 101, "Total Stage Time: " .. memory.readword(0xB0F4C), "yellow" ) -- Full Fight Timer
            gui.text(   8, 109, "Round Full Time: "  .. memory.readword(0x968B8), "red" )    -- Round Timer
        end

        gui.text( 176, 70, string.format("%4i", timer), "#FF92F1" )     -- Timer

        if memory.readbyte(0x994DE) == 15 then -- Checks if Player 1 is Mokujin
            gui.text (  16, 85, character.moku1 )
        end

        if memory.readbyte(0x994DF) == 15 then -- Checks if Player 2 is Mokujin
            gui.text ( 300, 85, character.moku2 )
        end
    end 

    emu.frameadvance() 
end
Spikestuff
on 6/15/2015 4:49 PM
Thank You so very much, I didn't know how to do that.
Can confirm that it works.
Edit: Whoops, loaded wrong lua.
lua:59: bad argument #3 to 'text' (string expected, got nil)