• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Archive] Script help thread

Status
Not open for further replies.

Pikachu™

Pika Pika!
  • 199
    Posts
    16
    Years
    • Seen Sep 8, 2019
    #org $start
    lock
    faceplayer
    checkflag 0x828
    if B_true goto $other
    message $1
    $1 1 =Ah \v\h01\ I guess your \nhere to get your \lBirthday Present.
    boxset 6
    message $2
    $2 1=Here take your Birthday Present!
    boxset 6
    givepokemon 115 5 0
    fanfare 0x13E
    message $4
    $3 1 =\v\h01\ received a \nChimchar!
    boxset 4
    waitfanfare
    #raw 0x68
    setflag 0x828
    message $4
    $4 1 =\v\h01\ Would you \nlike to rename Chimchar?
    boxset 5
    compare LASTRESULT 0x1
    if b_true gosub $name
    message $5
    $5 1 =Now that you have your \nown pokemon you must \llook after it \pwith love and care.
    boxset 6
    message $6
    $6 1=If you do treat this \nChimchar with love and care \lI might let you \ptravel the region.
    boxset 6
    message $7
    $7 1=But before you \ngo I have something \lto tell you.
    boxset 6
    message $8
    $8 1=I Will be leaving \ntomorrow to travel \lthe Region so that \pI may continue my research.
    boxset 6
    message $9
    $9 1=While I am gone my assistant \nwill take care of the lab.
    boxset 6
    setweather 0x3
    #raw 0x00
    doweather
    message $10
    $10 1=It looks like it \nstarted raining you \lbetter go home \pto keep dry
    boxset 6
    release
    end

    #org $name
    call 0x1A74EB
    return

    #org $other
    lock
    faceplayer
    message $11
    $11 1 =you better \ngo home to keep dry
    release
    end


    it still dosen't work it keeps on repeating the same thing over and over now
     

    linkandzelda

    Ex-rom hacker turned indie game developer
  • 777
    Posts
    17
    Years
    Hello People. I need help with a scripting command (if it exists).
    Is there a way to read your highest pokemons level and put it into a variable so it can be read? I know its possible because thats what happens in the trainer tower in FR.

    Thanks in advance
    link
     

    Geeked

    Pokemon Crimson Version
  • 352
    Posts
    17
    Years
    • Seen Oct 9, 2012
    For future Reference, keep your Texts at the bottom.. It Compiles Better..

    Code:
    #org $start
    lock
    faceplayer
    checkflag 0x828
    if B_true goto $other
    message $1
    boxset 6
    message $2
    boxset 6
    givepokemon 115 5 0
    fanfare 0x13E
    message $4 
    boxset 4
    [b]#raw 0x76[/b]
    waitfanfare
    #raw 0x68
    message $3
    boxset 5
    compare LASTRESULT 0x1
    if b_true gosub $name
    message $5
    boxset 6
    message $6
    boxset 6
    message $7
    boxset 6
    message $8
    boxset 6
    message $9
    boxset 6
    setweather 0x3
    #raw 0x00
    doweather
    message $10
    boxset 6
    [b]setflag 0x828[/b]
    release
    end
     
    #org $name
    call 0x1A74EB
    return
     
    #org $other
    lock
    faceplayer
    message $11
    [b]boxset 6[/b] 
    release
    end
    
    [b]#org $1
    $1 1 = Ah \v\h01\ I guess your\nhere to get your \lBirthday Present.
    
    #org $2 
    $2 1 = Here take your Birthday Present!
    
    #org $3
    $3 1 =\v\h01\ Would you \nlike to rename Chimchar?
    
    #org $4
    $4 1 =\v\h01\ received a \nChimchar!
    
    #org $5
    $5 1 = Now that you have your \nown pokemon you must \llook after it \pwith love and care.
    
    #org $6
    $6 1 = If you do treat this \nChimchar with love and care \lI might let you \ptravel the region.
    
    $7 1= But before you \ngo I have something \lto tell you.
    
    #org $8
    $8 1 = I Will be leaving \ntomorrow to travel \lthe Region so that \pI may continue my research.
    
    #org $9
    $9 1 = While I am gone my assistant \nwill take care of the lab.
    
    #org $10 
    $10 1 = It looks like it \nstarted raining you \lbetter go home \pto keep dry 
    
    #org $11
    $11 1 = you better \ngo home to keep dry[/b]
     

    Geeked

    Pokemon Crimson Version
  • 352
    Posts
    17
    Years
    • Seen Oct 9, 2012
    No Problem, Next time don't Post your problem after every post, it gets annoying :o
     
  • 857
    Posts
    15
    Years
    Is there anything wrong with this script?
    it doesn't work properly for me...
    Spoiler:
     

    Master_Track

    ROM Reaverz Scripter
  • 916
    Posts
    16
    Years
    well, if it's written like this, it'll only activate after you already got the pokemon (setflag 0x828).
    But you only get the pokemon if it's activated, so...simply nothing happens, right?

    the problem is at the beginning:

    checkflag 0x828
    if 0x0 goto

    that means, if it is NOT set, it ends. and if it IS set, it continues. But the flag will be set later in the script.
    so use
    checkflag 0x828
    if 0x1 goto

    or

    if B_true goto.

    that should do it.
     
  • 136
    Posts
    15
    Years
    • Seen Dec 27, 2010
    I was trying to test a flag script,:
    Spoiler:


    But when I compile it using XSE it comes up as this:
    Spoiler:
     
  • 162
    Posts
    15
    Years
    I don't know what's wrong with this...

    Spoiler:
     

    Master_Track

    ROM Reaverz Scripter
  • 916
    Posts
    16
    Years
    I don't know what's wrong with this...

    Spoiler:

    Try it like this, and take a closer look on the structure. It's much easier like this ;)
    Also you missed a compare lastresult line after the boxset 5.
     
  • 162
    Posts
    15
    Years
    I was trying to test a flag script,:
    Spoiler:


    But when I compile it using XSE it comes up as this:
    Spoiler:

    Try this
    Spoiler:


    That works on mine: I think it was the exp1 was written expl the second time.

    And thanks M_T that works now :D
     

    Ninja Caterpie

    AAAAAAAAAAAAA
  • 5,979
    Posts
    16
    Years
    Ok, I made a script, but when I compile it, half of it disappears.
    Is it my bad, or is it XSE's problem?

    Here's the script, if you need it.
    Code:
    #dynamic 0x7266CC
    
    #org 0x7266CC
    checkflag 0x829
    if 0x0 goto @end
    message @moveit
    boxset 6
    playsong 0x112 0x0
    applymovement 0xFF @wha
    applymovement 0x3 @run
    waitmovement 0x0
    trainerbattle 0x1 0x1 0x0 @getoutoftheway @after @later
    end
    
    #org @later
    message @damn
    boxset 6
    fadescreen 0x1
    hidesprite 0x3
    setflag 0x200
    fadescreen 0x0
    fadedefault
    applymovement 0x4 @aide
    waitmovement 0x0
    message @this
    boxset 6
    message @gotdex
    fanfare 0x13E
    boxset 4
    waitfanfare
    closeonkeypress
    setflag 0x829
    message @bye
    boxset 6
    applymovement 0x4 @aideback
    waitmovement 0x0
    hdiesprite 0x4
    setflag 0x202
    end
    
    #org @end
    release
    end
    
    #org @moveit
    = Move it!
    
    #org @wha
    #raw 0x53
    #raw 0x00
    #raw 0xFE
    
    #org @run
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @aide
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @aideback
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0xFE
    
    #org @getoutoftheway
    = ???: Get out of my way!\pWhat? But I haven't done anything\nwrong!\pAIDE: Stop that man, v\h01!\nHe stole something!\p???: Ah, damn it!\nI didn't want it to come to this[.]
    
    #org @after
    = What in the? \nHow'd I lose?
    
    #org @damn
    = Fine, take this useless red box\nthen!\p[green_fr]You received a strange red box!\p[black_fr]I'm going. Don't follow.
    
    #org @this
    = Great job v\h01!\nI watched the battler from here!\pAnyway, that thing there is a\nPokedex! It records data on Pokemon\ponce you've caught them! You're\nbecoming a trainer, right?\pI'll give this one to you so you\ncan help us get information on the\pdifferent Pokemon in Rolok!
    
    #org @gotdex
    = [green_fr]You got the Pokedex!
    
    #org @bye
    = See you later, v\h01! \nI'm going back to the lab!

    But it becomes
    Code:
     '-----------------------
    #org 0x7266CC
    checkflag 0xF
    hidesprite2 0x7268 0x8 0x9
    if 0x97 goto 0x8035301
    setflag 0x200
    fadescreen 0x0
    fadedefault
    applymovement 0x4 0x872676C
    waitmovement 0x0
    msgbox 0x87268CB '"Great job [player]!\nI watched the ..."
    callstd 0x6
    msgbox 0x87269E3 '"[green_fr]You got the Pokedex!"
    fanfare 0x13E
    callstd 0x6
    setflag 0x829
    msgbox 0x8726A03 '"See you later, [player]. \nI'm goin..."
    callstd 0x6
    applymovement 0x4 0x8726780
    waitmovement 0x0
    hidesprite 0x4
    setflag 0x202
    end
    
    '-----------------------
    #org 0x35301
    comparefarbytetofarbyte 0x28004008 0x2053D102
    setmapfooter 0x59F1
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x72676C
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
     
  • 136
    Posts
    15
    Years
    • Seen Dec 27, 2010
    Try this
    Spoiler:


    That works on mine: I think it was the exp1 was written expl the second time.

    And thanks M_T that works now :D
    Thanks, that made me really confused:tired:
     
  • 857
    Posts
    15
    Years
    Yet another script...
    This one freezes when it starts
    Its pretty complicated,and Huge, but I would appreciate Help
    Spoiler:
     

    Master_Track

    ROM Reaverz Scripter
  • 916
    Posts
    16
    Years
    That's exactly the problem, no callstd or boxset there :\
    also, you may need "lock" before the message. dunno if you want it or not.
     
  • 857
    Posts
    15
    Years
    NVM My old post, can someone re-order the \n,\p, and \l's in these text boxes to fit?
    Spoiler:
     
    Last edited:
    Status
    Not open for further replies.
    Back
    Top