Thread: [Tutorial] Basics of Scripting
View Single Post
  #19    
Old December 14th, 2011 (5:14 PM). Edited December 25th, 2011 by AustinWolff.
AustinWolff's Avatar
AustinWolff AustinWolff is offline
has left
     
    Join Date: Aug 2011
    Location: LA, California
    Age: 20
    Gender: Male
    Nature: Brave
    Posts: 100
    I have another scripting problem, this one includes the money commands.

    I am using ruby and it is a script box script. The point is a guy walks up to you, gives you money, then walks away. however, here are the problems:

    Spoiler:
    1. the showmoney command doesnt work, meaning the money box never appears.

    2. the person ID is 0211 in Amap, and in my script I setflag 0x211 but he doesnt disapear


    Here is the script:

    Spoiler:
    #dynamic 0x800000

    #org @start
    checkflag 0x212
    if 0x1 goto @done
    applymovement 0x3 @move
    waitmovement 0x0
    msgbox @1 0x6
    showmoney 0x00 0x00 0x00
    givemoney 0x1F4 0x00
    updatemoney 0x00 0x00 0x00
    hidemoney 0x00 0x00
    msgbox @2 0x6
    msgbox @3 0x6
    applymovement 0x3 @move2
    waitmovement 0x0
    setflag 0x212
    setflag 0x211
    release
    end

    #org @move
    #raw 0x56
    #raw 0x0A
    #raw 0x0A
    #raw 0xFE

    #org @move2
    #raw 0x16
    #raw 0x16
    #raw 0x16
    #raw 0x16
    #raw 0x16
    #raw 0x16
    #raw 0x16
    #raw 0xFE

    #org @1
    = Hi trainer! I feel the need\nto share my money!

    #org @2
    = [red_rs]\v\h01: Thanks!

    #org @3
    = [blue_rs]Savings Guy: No problem
    !
    __________________
    I have left. Feel free to disable my account.
    Reply With Quote