• 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.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

NarutoActor

The rocks cry out to me
1,974
Posts
15
Years
  • 1) 'givepokemon' has the correct amount of paramounts (6).
    2) I've tried two separate offsets, which were both free.
    3) I was 3 tiles away from the person who I wanted to move, so I doubt 'waitmovement' failed.
    4)It wasn't a Tile Script.

    Can somebody please, please help me. If you haven't read my earlier post, when I activate this script by standing on a tile, the person who I wish to move just still stands there, and I can't move. The person's number in Advance Map is the same as the Script's 'applymovement' command. SO I don't know what is wrong. Here is the Script:

    Spoiler:
    you said when the character steps and the script activates this is what I ment by tile script it not a person event make sure it says unknow 3 var vallue 4050 and sometimes this helps var number 1
     

    Q-Bone

    Musician and Pixel Artist
    243
    Posts
    15
    Years
  • you said when the character steps and the script activates this is what I ment by tile script it not a person event make sure it says unknow 3 var vallue 4050 and sometimes this helps var number 1

    Oh sorry. I thought you meant Tile Script by changing a map tile via Script. I'll try it out now. Fingers crossed.
     

    trebornosliw

    Learning
    516
    Posts
    14
    Years
    • Seen Jul 22, 2012
    Hey there, I'm back!
    And this whole level script thing has come back to bite me painfully in the rear.
    Below is the script I want to use. Basically, the whole thing freezes when I enter the room, and I don't know why... I've already fixed that 0xFFFF byte that A-map always messes with, so I'm kind of at a loss...
    Anyway, thanks in advance for helping.
    Spoiler:

    Oh, and let me know if you need the compiled version instead, though so far it looks fine to me.
     
    6
    Posts
    14
    Years
    • Seen Aug 25, 2009
    nevermind my previous question... well anyway i am in quite a pickle with this new problem... After i compile this code in XSE and try to edit it, the code is all wrong and when i try to test it the rom crashes... what did i do wrong here?


    #dynamic 0x800000
    #org @start
    lockall
    faceplayer
    checkflag 0x200
    if 0x0 goto @first
    if 0x1 goto @next

    #org @first
    lockall
    msgbox @text1 MSG_NORMAL '"Want a master ball?!"
    lockall
    faceplayer
    msgbox @text2 MSG_NORMAL '"Here you go."
    lockall
    faceplayer
    giveitem 0x1 0x999 MSG_OBTAIN
    fanfare 0x13E
    waitfanfare
    closeonkeypress
    setflag 0x200
    release
    end
    #org @next
    lockall
    faceplayer
    msgbox @text3 MSG_NORMAL
    release
    end
    #org @text1
    = Want a master ball?!
    #org @text2
    = Here you go.
    #org @text3
    = How do you like it?

    When i reopen the event this script comes up...


    '---------------
    #org 0x800000
    lockall
    faceplayer
    checkflag 0x200
    if 0x0 goto 0x8800DA7
    if 0x1 goto 0x8800D9F
    setpkmnpp 0x0 0x80 0x908
    if 0x69 goto 0x88E795A
    goto 0x80000B8
    '---------------
    #org 0x800DA7
    callstd 0x6
    release
    end
    '---------------
    #org 0x800D9F
    lockall
    faceplayer
    msgbox 0x8800114 MSG_NORMAL '"How do you like it? "
    release
    end
    '---------------
    #org 0x8E795A
    '---------------
    #org 0xB8
    nop
    nop
    nop
    nop
    nop
    closeonkeypress
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    '---------
    ' Strings
    '---------
    #org 0x800114
    = How do you like it?
     
    Last edited:

    NintendoWalkthrudude

    Creator of Pokemon Ninja!
    49
    Posts
    14
    Years
  • Code:
    #org @start
    msgbox @talk 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @yespoke
    msgbox @notxt 0x6 [B]'You can write a script what happens here when you select no[/B]
    release
    end
    
    #org @yespoke '[B]You can write a script here to tell what happens when Yes is selected[/B]
    msgbox @yestxt 0x6
    release
    end
    
    #org @talk
    = Do you choose yes or no?
    
    #org @yestxt
    = I chose Yes to the question.
    
    #org @notxt
    = I chose No to the question.[/FONT][/FONT][FONT=Segoe UI]

    The "#org @yespoke" is the script that is executed when you select yes. And since I wrote "msgbox @yestxt 0x6" there, that means when I select yes to the question It will display the text "I chose Yes to the question". And same for No, it will display "I chose No to the question". Get it?

    This is the way you wrote it:

    Code:
    #org @text
    = Do you want the Pokemon?
    if 0x1 goto @yespoke
    if 0x0 goto @nopoke

    Which is incorrect. The script I posted above it the real way to write the script you're trying to create.



    Try it now. You got an error because it was "@dynamic" instead of "#dynamic"


    but i want to givepokemon depending on different answers, andfor some answers to lead to more questions
     

    cooley

    ///Keepin' it simple
    1,148
    Posts
    17
    Years
  • but i want to givepokemon depending on different answers, andfor some answers to lead to more questions
    I can't make this anymore easier to understand. Which is why I said to start with the small scripts first.

    It doesn't matter what you want to do, like givepokemon or answer more questions. All you have to do is point to it... You're really not reading the script correctly.

    Okay, You want to givepokemon based on a question:

    Code:
    #Org @start
    lock
    faceplayer
    msgbox @do_you_want 0x5 [B]'Asks the question, "Do you want the Pokemon?"[/B]
    compare LASTRESULT 0x1
    if 0x1 goto @chose_yes [B]'If 0x1 means if Yes, if you chose yes then goto pointer "chose_yes"[/B]
    msgbox @I_chose_no 0x6 [B]'If you chose no then the message will appear[/B]
    release
    end
    
    #org @chose_yes
    msgbox @Here_is_the_pokemon 0x6 [B]'This is what happens when you choose yes, a msg appears and you receive a pokemon[/B]
    givepokemon ... ... ...
    release
    end
    
    #org @do_you_want
    = Do you want this Pokemon?
    
    #org @I_chose_no
    = Oh, you don't want it?\nToo bad[.]
    
    #org @Here_is_the_pokemon
    = Here you go!\pTake good care of it!

    What I've been trying to explain to you is that you don't have to strictly follow those guidelines to script. You can customize the script like this:

    Code:
    #org @start
    lock
    faceplayer
    msgbox @Hello 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @yes_choice
    msgbox @hate 0x6
    applymovement 0x1 @move_away 'Of course, if you select no, the person will say I hate you, then move away
    waitmovement 0x1
    release
    end
    
    #org @yes_choice
    msgbox @thanks 0x6
    release
    end
    
    #org @Hello
    = Hi! Am I pretty?
    
    #org @hate
    = I hate you! You're ugly...
    
    #org @move_away
    #raw (movements to move the person off the map)
    
    #org @thanks
    = Thank you, you're pretty cute\nyourself!

    And by testing out these different customizations you can write scripts the way you want, like when selecting Yes/no points to another question.

    For the sake of understanding this "lesson", here's making a question lead to another question:
    Code:
    #org @start
    msgbox @ready 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @question_2
    msgbox @take_time 0x6
    release
    end
    
    #org @question_2
    msgbox @sure_ready 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @next_statement
    msgbox @well 0x6
    release
    end
    
    #org @next_statement
    msgbox @good 0x6
    release
    end
    
    #org @ready
    = [player] are you ready?
    
    #org @take_time
    = Take your time[.]
    
    #org @sure_ready
    = [player] are you sure you're\nready?
    
    #org @well
    = Well, stop wasting my time!
    
    #org @good
    = Good for you!\pHahah!

    If you still don't understand, please don't hesitate to ask. I'm probably like the only one attempting to help you.
     

    NatureKeeper

    Guest
    0
    Posts
    Help with another script.

    XSE 1.1.1, Ruby AXVE, OW script.

    Spoiler:


    When it compiles....

    Spoiler:


    I see the distortion world affecting my script.

    I know it is a problem with Free Space but I atleast gave it 1000 bytes! What's wrong?

    By the way, these faliures costed me offsets from 800D60 to 802B00. So, I really need help while I tend to Waste Cleaning.
     
    74
    Posts
    14
    Years
    • Age 29
    • USA
    • Seen Aug 22, 2010
    Spoiler:


    Well, that's my script. You see a sleeping grunt for the evil team in the game, and take two Potions from his hand. Can you tell me what the problem is?

    It is a FireRed ROM, and I'm using it as a signpost event.
     

    NarutoActor

    The rocks cry out to me
    1,974
    Posts
    15
    Years
  • Help with another script.

    XSE 1.1.1, Ruby AXVE, OW script.

    Spoiler:


    When it compiles....

    Spoiler:


    I see the distortion world affecting my script.

    I know it is a problem with Free Space but I atleast gave it 1000 bytes! What's wrong?

    By the way, these faliures costed me offsets from 800D60 to 802B00. So, I really need help while I tend to Waste Cleaning.
    I think you overlaped offsets make sure your using free space

    Spoiler:


    Well, that's my script. You see a sleeping grunt for the evil team in the game, and take two Potions from his hand. Can you tell me what the problem is?

    It is a FireRed ROM, and I'm using it as a signpost event.

    for one thers no lock and release and I am pretty sure there suld be a line after give item (i just forgot)
     
    Last edited:
    74
    Posts
    14
    Years
    • Age 29
    • USA
    • Seen Aug 22, 2010
    It tells me that there is Too less perimeters on line 6. The correct number is 3.

    Here is the script again.

    #dynamic 0x800400

    #org @start
    lock
    msgbox @sleepinggrrunt3 0x3
    giveitem 0xD 0x2
    release
    end

    #org @sleepinggrunt3
    = He appears to be sleeping.\pWhat's that in his hand?\nLet's take it!
     

    cooley

    ///Keepin' it simple
    1,148
    Posts
    17
    Years
  • It tells me that there is Too less perimeters on line 6. The correct number is 3.

    Here is the script again.

    #dynamic 0x800400

    #org @start
    lock
    msgbox @sleepinggrrunt3 0x3
    giveitem 0xD 0x2
    release
    end

    #org @sleepinggrunt3
    = He appears to be sleeping.\pWhat's that in his hand?\nLet's take it!
    It's common sense, the giveitem command has 3 parameters:

    Giveitem (Item) (Amount) (Type of msg)

    And you only wrote the first two. At least try to check out the problem first, instead of assuming every error msg is for "technical support". Sorry for answering this way..
     
    43
    Posts
    15
    Years
  • Does anyone know what the command is to change the movement type for a person on advance map. I saw it awhile back i believe, but i cant seem to find it again. Would you put changemovement or changebehavior? I want to change their movement type from hidden to No Movement.
     

    NarutoActor

    The rocks cry out to me
    1,974
    Posts
    15
    Years
  • this is not a script question more a simple question click on the persone evernt and there should be a drop down button and change it from invisable to no movement
     
    43
    Posts
    15
    Years
  • I know that, but i want it to start off as one movement type and then change to another when a script is activated.
     

    NarutoActor

    The rocks cry out to me
    1,974
    Posts
    15
    Years
  • oh okay will this is a script help thread not a script creation thread but since I am such a nice guy i will make you a base script (the basic Idea and you need to add somethings and offsets)
    at first set it to no movement
    when the script is activated
    but set flag(persons id)
    this will make the person disapear
    if you want it the other way arround
    affter what you want put setflag 0x300
    then in the script put this
    org
    lock
    check flag 0x300
    if so jump 305
    release
    end

    305
    make sprite(sprite event number) appear
    release
    end
     
    Last edited:
    Status
    Not open for further replies.
    Back
    Top