Thread: Development: The Follow Me Script
View Single Post
  #107    
Old July 2nd, 2011 (8:13 AM).
sab's Avatar
sab sab is offline
Now too much of a life.
     
    Join Date: Jul 2008
    Location: Midgar
    Age: 21
    Gender: Male
    Nature: Timid
    Posts: 995
    I don't know if this is actually useful, but in ruby the bytes that change when buttons are pressed are at 4000130 and 4000131. For example if I pressed up it would put BF at 4000130 and 03 at 4000131. Down would be 7F at 4000130 and 03 at 4000131. Left would be DF at 4000130, and right would be EF at 4000130. From what I can tell, 4000131 is used for "A" and "B", but not much else. I tried to use this to get a script to work on ruby but it failed misserably. This was meant to start when the player was standing on top of the person following.
    Spoiler:

    #org @youroffset
    Msgbox @message1offset MSG_NORMAL
    waitkeypress
    pause 0x20
    goto @youroffset2

    #org @youroffset2
    comparefarbytetobyte 0x4000130 0xFF
    if 0x1 goto @youroffset2
    comparefarbytetobyte 0x4000130 0xFE
    if 0x1 goto @end
    comparefarbytetobyte 0x4000130 0xFD
    if 0x1 goto @end
    comparefarbytetobyte 0x4000130 0xF7
    if 0x1 goto @end
    comparefarbytetobyte 0x4000130 0xFC
    if 0x1 goto @end
    comparefarbytetobyte 0x4000130 0xFB
    if 0x1 goto @end
    comparefarbytetobyte 0x4000130 0x7f
    if 0x1 goto @down
    comparefarbytetobyte 0x4000130 0xBF
    if 0x1 goto @up
    comparefarbytetobyte 0x4000130 0xDf
    if 0x1 goto @left
    comparefarbytetobyte 0x4000130 0xEF
    if 0x1 goto @right
    goto @youroffset2

    #org @yetanotheroffset
    comparefarbytetobyte 0x4000130 0xFF
    if 0x1 goto @yetanotheroffset
    comparefarbytetobyte 0x4000130 0xFE
    if 0x1 goto @end
    comparefarbytetobyte 0x4000130 0xFD
    if 0x1 goto @end
    comparefarbytetobyte 0x4000130 0xF7
    if 0x1 goto @end
    comparefarbytetobyte 0x4000130 0xFC
    if 0x1 goto @end
    comparefarbytetobyte 0x4000130 0xFB
    if 0x1 goto @end
    comparefarbytetobyte 0x4000130 0x7f
    if 0x1 goto @down2
    comparefarbytetobyte 0x4000130 0xBF
    if 0x1 goto @up2
    comparefarbytetobyte 0x4000130 0xDf
    if 0x1 goto @left2
    comparefarbytetobyte 0x4000130 0xEF
    if 0x1 goto @right2
    goto @yetanotheroffset

    #org @right2
    applymovement 0xff @rightmovement
    writebytetooffset 0xEF 0x087F0000
    comparefarbytetobyte 0x087F0001 0x7F
    if 0x1 goto @down2otherperson
    comparefarbytetobyte 0x087F0001 0xBF
    if 0x1 goto @up2otherperson
    comparefarbytetobyte 0x087F0001 0xDf
    if 0x1 goto @left2otherperson
    comparefarbytetobyte 0x087F0001 0xEF
    if 0x1 goto @right2otherperson
    goto @right2

    #org @left2
    applymovement 0xff @leftmovement
    writebytetooffset 0xDF 0x087F0000
    comparefarbytetobyte 0x087F0001 0x7F
    if 0x1 goto @down2otherperson
    comparefarbytetobyte 0x087F0001 0xBF
    if 0x1 goto @up2otherperson
    comparefarbytetobyte 0x087F0001 0xDf
    if 0x1 goto @left2otherperson
    comparefarbytetobyte 0x087F0001 0xEF
    if 0x1 goto @right2otherperson
    goto @left2

    #org @up2
    applymovement 0xff @upmovement
    writebytetooffset 0xBF 0x087F0000
    comparefarbytetobyte 0x087F0001 0x7F
    if 0x1 goto @down2otherperson
    comparefarbytetobyte 0x087F0001 0xBF
    if 0x1 goto @up2otherperson
    comparefarbytetobyte 0x087F0001 0xDf
    if 0x1 goto @left2otherperson
    comparefarbytetobyte 0x087F0001 0xEF
    if 0x1 goto @right2otherperson
    goto @up2

    #org @down2
    applymovement 0xff @downmovement
    writebytetooffset 0x7f 0x087F0000
    comparefarbytetobyte 0x087F0001 0x7F
    if 0x1 goto @down2otherperson
    comparefarbytetobyte 0x087F0001 0xBF
    if 0x1 goto @up2otherperson
    comparefarbytetobyte 0x087F0001 0xDf
    if 0x1 goto @left2otherperson
    comparefarbytetobyte 0x087F0001 0xEF
    if 0x1 goto @right2otherperson
    goto @down2

    #org @right
    applymovement 0xff @rightmovement
    writebytetooffset 0xEF 0x087F0001
    checkflag 0x2d0
    if 0x0 goto @setflag
    comparefarbytetobyte 0x087F0000 0x7F
    if 0x1 goto @downotherperson
    comparefarbytetobyte 0x087F0000 0xBF
    if 0x1 goto @upotherperson
    comparefarbytetobyte 0x087F0000 0xDf
    if 0x1 goto @leftotherperson
    comparefarbytetobyte 0x087F0000 0xEF
    if 0x1 goto @rightotherperson
    goto @right

    #org @left
    applymovement 0xff @leftmovement
    writebytetooffset 0xDF 0x087F0001
    checkflag 0x2d0
    if 0x0 goto @setflag
    comparefarbytetobyte 0x087F0000 0x7F
    if 0x1 goto @downotherperson
    comparefarbytetobyte 0x087F0000 0xBF
    if 0x1 goto @upotherperson
    comparefarbytetobyte 0x087F0000 0xDf
    if 0x1 goto @leftotherperson
    comparefarbytetobyte 0x087F0000 0xEF
    if 0x1 goto @rightotherperson
    goto @left

    #org @up
    applymovement 0xff @upmovement
    writebytetooffset 0xBF 0x087F0001
    checkflag 0x2d0
    if 0x0 goto @setflag
    comparefarbytetobyte 0x087F0000 0x7F
    if 0x1 goto @downotherperson
    comparefarbytetobyte 0x087F0000 0xBF
    if 0x1 goto @upotherperson
    comparefarbytetobyte 0x087F0000 0xDf
    if 0x1 goto @leftotherperson
    comparefarbytetobyte 0x087F0000 0xEF
    if 0x1 goto @rightotherperson
    goto @up

    #org @down
    applymovement 0xff @downmovement
    writebytetooffset 0x7F 0x087F0001
    checkflag 0x2d0
    if 0x0 goto @setflag
    comparefarbytetobyte 0x087F0000 0x7F
    if 0x1 goto @downotherperson
    comparefarbytetobyte 0x087F0000 0xBF
    if 0x1 goto @upotherperson
    comparefarbytetobyte 0x087F0000 0xDf
    if 0x1 goto @leftotherperson
    comparefarbytetobyte 0x087F0000 0xEF
    if 0x1 goto @rightotherperson
    goto @down

    #org @right2otherperson
    applymovement 27 @rightmovement
    goto @youroffset2

    #org @left2otherperson
    applymovement 27 @leftmovement
    goto @youroffset2

    #org @down2otherperson
    applymovement 27 @downmovement
    goto @youroffset2

    #org @up2otherperson
    applymovement 27 @upmovement
    goto @youroffset2

    #org @rightotherperson
    applymovement 27 @rightmovement
    goto @yetanotheroffset

    #org @leftotherperson
    applymovement 27 @leftmovement
    goto @yetanotheroffset

    #org @downotherperson
    applymovement 27 @downmovement
    goto @yetanotheroffset

    #org @upotherperson
    applymovement 27 @upmovement
    goto @yetanotheroffset

    #org @end
    msgbox @message2offset MSG_NORMAL
    writebytetooffset 0x0 0x087F0001
    writebytetooffset 0x0 0x087F0000
    clearflag 0x2d0
    end

    #org @setflag
    setflag 0x2d0
    applymovement 222 @downmovement
    goto @yetanotheroffset

    #org @message1offset
    = some text stating that the person will follow you.

    #org @message2offset
    = some text stating that the person will stop following you because you didn't press an arrow key.

    #org @rightmovement
    #raw 0x0B
    #raw 0xFE

    #org @leftmovement
    #raw 0x0A
    #raw 0xFE

    #org @upmovement
    #raw 0x09
    #raw 0xFE

    #org @downmovement
    #raw 0x08
    #raw 0xFE
    __________________
    Reply With Quote