Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub > Beginner’s Lounge
Reload this Page Script Help Thread (DO NOT REQUEST SCRIPTS)

Notices
For all updates, view the main page.

Beginner’s Lounge Where all good (and bad) ideas start. This is the Beginner’s Lounge, where if you need a helping hand or want to develop your small ideas, you bring it here. We won't bite.



Closed Thread
 
Thread Tools
  #2851    
Old January 8th, 2010 (01:04 PM).
arpeejajo's Avatar
arpeejajo arpeejajo is offline
King Of Muay Thai
 
Join Date: Mar 2008
Location: Woodbridge, ON
Gender: Male
Nature: Jolly
Posts: 36
Quote originally posted by Quickster:
Hmm,it is in a different offset.Can you tell me the steps you are doing everything in fot the original?
So I started by placing the script on the map and filling out the variables and made the offset. Then I added the person event on the map that will be part of the script and filled out the unknown.
I put in this code and compiled it.
Code:
'---------------
#org 0x800008
lock
msgbox 0x8800027 0x6 '"Hmm. Where am I?"
closeonkeypress
applymovement 0x1 0x880003A
waitmovement 0x0
setvar 0x7000 0x2
release
end


'---------
' Strings
'---------
#org 0x800027
= Hmm. Where am I?


'-----------
' Movements
'-----------
#org 0x80003A
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
After that I added your code that you gave me to a new offset and compiled it.
Code:
#dynamic 0x800044

#org @start
compare 0x7000 0x2
if 0x1 goto @end
setvar 0x7000 0x1
release
end

#org @end
release
end
Save, test, nothing.
  #2852    
Old January 8th, 2010 (01:06 PM).
Quickster's Avatar
Quickster Quickster is offline
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Posts: 350
Quote originally posted by arpeejajo:
So I started by placing the script on the map and filling out the variables and made the offset. Then I added the person event on the map that will be part of the script and filled out the unknown.
I put in this code and compiled it.
Code:
'---------------
#org 0x800008
lock
msgbox 0x8800027 0x6 '"Hmm. Where am I?"
closeonkeypress
applymovement 0x1 0x880003A
waitmovement 0x0
setvar 0x7000 0x2
release
end


'---------
' Strings
'---------
#org 0x800027
= Hmm. Where am I?


'-----------
' Movements
'-----------
#org 0x80003A
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
After that I added your code that you gave me to a new offset and compiled it.
Code:
#dynamic 0x800044

#org @start
compare 0x7000 0x2
if 0x1 goto @end
setvar 0x7000 0x1
release
end

#org @end
release
end
Save, test, nothing.

Hmm,maybe can you send me an ips file in a pm and I can take a look at it?
__________________
I laugh looking at this.

But sometimes I want to come back to it...

  #2853    
Old January 8th, 2010 (02:20 PM).
Shiny_Noctowl Shiny_Noctowl is offline
 
Join Date: Dec 2008
Age: 21
Gender: Male
Posts: 39
Quote originally posted by Congratulations, I Hate You:
there. try that, special 0x8E resets the map for it to work.
Now the tiles change, but they reset when I leave the map.
  #2854    
Old January 8th, 2010 (02:25 PM).
NarutoActor's Avatar
NarutoActor NarutoActor is offline
The rocks cry out to me
Silver Tier
 
Join Date: Jan 2009
Location: Brooklyn/Marlboro
Age: 21
Gender: Female
Nature: Bashful
Posts: 1,975
Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
you need a level map (set map tile) I knew that you where going to ask this. what you should do is after the script put setvar 0x5000 0x1 and add a level script like this
'---------------
#org @levelscript
#raw 0x1
#raw pointer @example
#raw 0x0

'---------------
#org @example
compare 0x5000 0x1
if 0x1 goto @map
release
end

'---------------
#org @map
setmaptile 0x33 0x2B 0x299 0x1
setmaptile 0x34 0x2B 0x299 0x1
setmaptile 0x35 0x2B 0x299 0x1
setmaptile 0x36 0x2B 0x299 0x1
setmaptile 0x33 0x2A 0x2E1 0x1
setmaptile 0x34 0x2A 0x2E1 0x1
setmaptile 0x35 0x2A 0x2E1 0x1
setmaptile 0x36 0x2A 0x2E1 0x1
return
__________________
~There are those people who understand hex, F the rest
  #2855    
Old January 8th, 2010 (04:26 PM).
arpeejajo's Avatar
arpeejajo arpeejajo is offline
King Of Muay Thai
 
Join Date: Mar 2008
Location: Woodbridge, ON
Gender: Male
Nature: Jolly
Posts: 36
So my script has a givepokemon but when I get the Pokemon and press start, the Pokemon option is not there.

Also, how do I get a script to activate only once?
  #2856    
Old January 8th, 2010 (04:35 PM).
Team Fail's Avatar
Team Fail Team Fail is offline
fun in the sun
Platinum Tier
 
Join Date: May 2009
Age: 20
Gender: Male
Nature: Brave
Posts: 10,505
Quote originally posted by arpeejajo:
So my script has a givepokemon but when I get the Pokemon and press start, the Pokemon option is not there.

Also, how do I get a script to activate only once?
If I'm correct, the offset is 0x828, I'm sure of it. Also, to make a script activate once, use a checkflag and a setflag.
__________________
Pair 1 Pair 2 Twitter Alt 1 Alt 2 PHO Image Source Avatar Source

"On my business card, I am a corporate president.
In my mind, I am a game developer.
But in my heart, I am a gamer."

- Satoru Iwata, 1959 - 2015
  #2857    
Old January 8th, 2010 (04:47 PM).
arpeejajo's Avatar
arpeejajo arpeejajo is offline
King Of Muay Thai
 
Join Date: Mar 2008
Location: Woodbridge, ON
Gender: Male
Nature: Jolly
Posts: 36
How would I add it to my script?
  #2858    
Old January 8th, 2010 (06:11 PM). Edited January 8th, 2010 by Team Fail.
Team Fail's Avatar
Team Fail Team Fail is offline
fun in the sun
Platinum Tier
 
Join Date: May 2009
Age: 20
Gender: Male
Nature: Brave
Posts: 10,505
Quote originally posted by arpeejajo:
How would I add it to my script?
Here's a sample script. I'm not sure where the offset for the POKEMON menu goes.

Here's a basic talking script with a checkflag/setflag:
Spoiler:
#org $test
lock
checkflag 0x200
if 0x01 goto $done
message $test 1=This is a sample script. Understand?
setflag 0x200
release
end

#org $done
$1 1 =I told you what this is? OK?
release
end

There is also a third command called clearflag that checks for flag 0x200 in the sample script above and removes it, allowing the script to be activated again. It wouldn't be useful in some cases, but there are some practical uses for it.
__________________
Pair 1 Pair 2 Twitter Alt 1 Alt 2 PHO Image Source Avatar Source

"On my business card, I am a corporate president.
In my mind, I am a game developer.
But in my heart, I am a gamer."

- Satoru Iwata, 1959 - 2015
  #2859    
Old January 8th, 2010 (06:25 PM).
Shiny_Noctowl Shiny_Noctowl is offline
 
Join Date: Dec 2008
Age: 21
Gender: Male
Posts: 39
With a scripted warp, is there any way to change the direction that the character is facing? Normally, the character is automatically facing down, regardless of the direction he was facing before.
  #2860    
Old January 8th, 2010 (06:36 PM). Edited January 8th, 2010 by arpeejajo.
arpeejajo's Avatar
arpeejajo arpeejajo is offline
King Of Muay Thai
 
Join Date: Mar 2008
Location: Woodbridge, ON
Gender: Male
Nature: Jolly
Posts: 36
Quote originally posted by Team Fail:
Here's a sample script. I'm not sure where the offset for the POKEMON menu goes.

Here's a basic talking script with a checkflag/setflag:
Spoiler:
#org $test
lock
checkflag 0x200
if 0x01 goto $done
message $test 1=This is a sample script. Understand?
setflag 0x200
release
end

#org $done
$1 1 =I told you what this is? OK?
release
end

There is also a third command called clearflag that checks for flag 0x200 in the sample script above and removes it, allowing the script to be activated again. It wouldn't be useful in some cases, but there are some practical uses for it.
Thank you very much, that helped a lot and it worked perfectly.
I also need to know how you call the 0x828 to my script and how to make a person disappear. Please and thank you.
  #2861    
Old January 8th, 2010 (07:23 PM).
Team Fail's Avatar
Team Fail Team Fail is offline
fun in the sun
Platinum Tier
 
Join Date: May 2009
Age: 20
Gender: Male
Nature: Brave
Posts: 10,505
Quote originally posted by arpeejajo:
Thank you very much, that helped a lot and it worked perfectly.
I also need to know how you call the 0x828 to my script and how to make a person disappear. Please and thank you.
I can't remember how to place in a flag, I'm figuring that out myself. As well, I don't know how to remove a sprite after you're done interacting with it. Check this AMAZING scripting thread, it may answer this and many more of your questions.
HTML Code:
http://www.pokecommunity.com/showthread.php?t=128887
All credits go to thethethethe for the tutorial.
__________________
Pair 1 Pair 2 Twitter Alt 1 Alt 2 PHO Image Source Avatar Source

"On my business card, I am a corporate president.
In my mind, I am a game developer.
But in my heart, I am a gamer."

- Satoru Iwata, 1959 - 2015
  #2862    
Old January 8th, 2010 (07:46 PM).
arpeejajo's Avatar
arpeejajo arpeejajo is offline
King Of Muay Thai
 
Join Date: Mar 2008
Location: Woodbridge, ON
Gender: Male
Nature: Jolly
Posts: 36
Quote originally posted by Team Fail:
I can't remember how to place in a flag, I'm figuring that out myself. As well, I don't know how to remove a sprite after you're done interacting with it. Check this AMAZING scripting thread, it may answer this and many more of your questions.
HTML Code:
http://www.pokecommunity.com/showthread.php?t=128887
All credits go to thethethethe for the tutorial.
I cannot thank you enough. I got the Pokemenu to show, and I got the person to disappear. That tutorial is amazing.
  #2863    
Old January 8th, 2010 (07:56 PM).
Quickster's Avatar
Quickster Quickster is offline
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Posts: 350
Quote originally posted by arpeejajo:
I cannot thank you enough. I got the Pokemenu to show, and I got the person to disappear. That tutorial is amazing.
Just to let you know, diegoisawesome translated that tutorial to XSE. Its in the doucuments section.
__________________
I laugh looking at this.

But sometimes I want to come back to it...

  #2864    
Old January 8th, 2010 (08:18 PM).
Team Fail's Avatar
Team Fail Team Fail is offline
fun in the sun
Platinum Tier
 
Join Date: May 2009
Age: 20
Gender: Male
Nature: Brave
Posts: 10,505
Quote originally posted by arpeejajo:
I cannot thank you enough. I got the Pokemenu to show, and I got the person to disappear. That tutorial is amazing.
No problem. That's what I used to learn how to script. It is such a lifesaver for new scripters!
__________________
Pair 1 Pair 2 Twitter Alt 1 Alt 2 PHO Image Source Avatar Source

"On my business card, I am a corporate president.
In my mind, I am a game developer.
But in my heart, I am a gamer."

- Satoru Iwata, 1959 - 2015
  #2865    
Old January 8th, 2010 (08:34 PM). Edited January 9th, 2010 by trebornosliw.
trebornosliw's Avatar
trebornosliw trebornosliw is offline
Learning
 
Join Date: Jul 2009
Age: 22
Gender: Male
Nature: Adamant
Posts: 523
So Special 0x8E is a must for all setmaptile scripts, then?
Also, thanks to NarutoActor for his explanation of the setmaptile level script, I was looking for a description of how to do that.

Update to my question. Here are the scripts I've made for an event on what used to be the Route 5 FR map. I'm just double-checking to make sure I didn't forget anything. The first script is the actual encounter, the second is my level script.

Spoiler:

#org @done1
checkflag 0x1012
if 0x1 goto @done2
msgbox @tele2 0x5
compare LASTRESULT 0x1
if 0x1 goto @warp2
msgbox @verywell 0x6
releaseall
end
#org @warp2
warp 1 81 0xFF 0x2F 0x1C
releaseall
end
#org @done2
releaseall
end
#org @huh
#raw 0x62 0xFE
#org @bii1
= [player], your path is not\nto be that way.\pI wish you to see something,\nsomething that has laid in\lsecrecy for a decade.\pFor some, it is a tragedy.\nFor you, [player], it is\la warning;\pa warning of the transcience\nof bliss and of the coming\lapocalypse.\p...Your partners are hurt,\nallow me to heal them, and\lthen I will show you[.]
#org @bii2
= And now, [player], I ask\nyou to see, and to understand.\pThis knowledge will serve\nyou well in your near future[.]\pCome[.]see, and understand[.]\n[.][.][.][.]
#org @tele2
= [player], do you wish to return\nto mankind's greatest vanity?
#org @verywell
= Very well[.]

Spoiler:

#dynamic 0x800000
#org @levelbii
#raw 0x1
#raw pointer @changemap
#raw 0x0
#org @changemap
compare 0x9001 0x1
if 0x1 goto @now
release
end
#org @now
setmaptile 0x2D 0x14 0x23 0x1
setmaptile 0x2D 0x13 0x1B 0x1
setmaptile 0x2D 0x12 0x13 0x0
return
__________________
Credit for my avatar goes to the Lego company.
  #2866    
Old January 9th, 2010 (07:55 AM).
NarutoActor's Avatar
NarutoActor NarutoActor is offline
The rocks cry out to me
Silver Tier
 
Join Date: Jan 2009
Location: Brooklyn/Marlboro
Age: 21
Gender: Female
Nature: Bashful
Posts: 1,975
Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
add setvar 0x9001 0x1 to the first script after you want it to become perminate.
__________________
~There are those people who understand hex, F the rest
  #2867    
Old January 9th, 2010 (04:52 PM).
trebornosliw's Avatar
trebornosliw trebornosliw is offline
Learning
 
Join Date: Jul 2009
Age: 22
Gender: Male
Nature: Adamant
Posts: 523
Oops, actually I forgot to include the first half of the script :\
Here it is
Spoiler:

#dynamic 0x800000
#org @teleport
lockall
compare 0x9001 0x1
if 0x1 goto @done1
setmaptile 0x2D 0x14 0x23 0x1
setmaptile 0x2D 0x13 0x1B 0x1
setmaptile 0x2D 0x12 0x13 0x0
special 0x8E
setvar 0x9001 0x1
applymovement 0xFF @huh
waitmovement 0x0
msgbox @bii1 0x6
fadescreen 0x1
special 0x0
fadescreen 0x0
msgbox @bii2 0x6
warp 1 81 0xFF 0x2F 0x1C
releaseall
end
#org @done1
checkflag 0x1012
if 0x1 goto @done2
msgbox @tele2 0x5
compare LASTRESULT 0x1
if 0x1 goto @warp2
msgbox @verywell 0x6
releaseall
end
#org @warp2
warp 1 81 0xFF 0x2F 0x1C
releaseall
end
#org @done2
releaseall
end
#org @huh
#raw 0x62 0xFE
#org @bii1
= [player], your path is not\nto be that way.\pI wish you to see something,\nsomething that has laid in\lsecrecy for a decade.\pFor some, it is a tragedy.\nFor you, [player], it is\la warning;\pa warning of the transcience\nof bliss and of the coming\lapocalypse.\p...Your partners are hurt,\nallow me to heal them, and\lthen I will show you...
#org @bii2
= And now, [player], I ask\nyou to see, and to understand.\pThis knowledge will serve\nyou well in your near future...\pCome...see, and remember...\n...................
#org @tele2
= [player], do you wish to return\nto mankind's greatest vanity?
#org @verywell
= Very well...
__________________
Credit for my avatar goes to the Lego company.
  #2868    
Old January 9th, 2010 (04:55 PM).
NarutoActor's Avatar
NarutoActor NarutoActor is offline
The rocks cry out to me
Silver Tier
 
Join Date: Jan 2009
Location: Brooklyn/Marlboro
Age: 21
Gender: Female
Nature: Bashful
Posts: 1,975
Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
okay, so what's wrong with it.
__________________
~There are those people who understand hex, F the rest
  #2869    
Old January 9th, 2010 (07:38 PM).
Engimal Engimal is offline
 
Join Date: Jan 2010
Gender: Male
Posts: 19
How do I get an offset from my code in PKSV?
  #2870    
Old January 9th, 2010 (08:44 PM).
trebornosliw's Avatar
trebornosliw trebornosliw is offline
Learning
 
Join Date: Jul 2009
Age: 22
Gender: Male
Nature: Adamant
Posts: 523
Quote originally posted by NarutoActor:
okay, so what's wrong with it.
Lol, well, that wasn't the question. Still, you've already told me what I wanted to know, I guess. I was just making sure I had it right. Thanks for your help!
@Enigma, do you mean, how do you find an offset to write it to, or how do you find the offset after you've inserted it?
__________________
Credit for my avatar goes to the Lego company.
  #2871    
Old January 10th, 2010 (11:45 AM). Edited January 10th, 2010 by Quickster.
Quickster's Avatar
Quickster Quickster is offline
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Posts: 350
This should be easy ebough to answer,but I dont know what Im doing wrong.
I give a person an id of 1001.
I set the flag in one script so hes not visible in the map he is in.
Next,in another map,I clear the flag 1001. He still is not visible.
I want him to be visible,so what do i do?

EDIT: I fixed this.-_-
I changed the flags from 1001 to 201.But for future refrences,why didnt this work with 1001?
__________________
I laugh looking at this.

But sometimes I want to come back to it...

  #2872    
Old January 10th, 2010 (05:51 PM).
trebornosliw's Avatar
trebornosliw trebornosliw is offline
Learning
 
Join Date: Jul 2009
Age: 22
Gender: Male
Nature: Adamant
Posts: 523
Quote originally posted by Quickster:
This should be easy ebough to answer,but I dont know what Im doing wrong.
I give a person an id of 1001.
I set the flag in one script so hes not visible in the map he is in.
Next,in another map,I clear the flag 1001. He still is not visible.
I want him to be visible,so what do i do?

EDIT: I fixed this.
I changed the flags from 1001 to 201.But for future refrences,why didnt this work with 1001?
...wow. How did you set the hideflag, exactly? I know that can be done, but I've never tried it before. Do I just type hidesprite 0x201, setflag 0x201 in a different map, or is it more complicated than that?
As for your question, I've heard that only specific flags can be used for that kind of hidesprite, but as you may have guessed, I'm not exactly an authority in this area.
__________________
Credit for my avatar goes to the Lego company.
  #2873    
Old January 10th, 2010 (06:01 PM).
Quickster's Avatar
Quickster Quickster is offline
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Posts: 350
Quote originally posted by trebornosliw:
...wow. How did you set the hideflag, exactly? I know that can be done, but I've never tried it before. Do I just type hidesprite 0x201, setflag 0x201 in a different map, or is it more complicated than that?
As for your question, I've heard that only specific flags can be used for that kind of hidesprite, but as you may have guessed, I'm not exactly an authority in this area.
Well,all I basically did was give a sprite a person id of 201. In a script I setflag 0x201.Its that simple. And if you were to hide a person in a script while in the map, you would hidesprite 0xwhatever and then setflag 0x201.
__________________
I laugh looking at this.

But sometimes I want to come back to it...

  #2874    
Old January 10th, 2010 (07:41 PM).
NarutoActor's Avatar
NarutoActor NarutoActor is offline
The rocks cry out to me
Silver Tier
 
Join Date: Jan 2009
Location: Brooklyn/Marlboro
Age: 21
Gender: Female
Nature: Bashful
Posts: 1,975
Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
O.o Yeah hidesprites are super easy but I never tryed to un hide them But my guess is try adding the special that reloads the map. The one used for setmaptile.
__________________
~There are those people who understand hex, F the rest
  #2875    
Old January 10th, 2010 (08:41 PM).
TB Pro's Avatar
TB Pro TB Pro is offline
Old-timer
 
Join Date: Nov 2004
Location: Midwestern USA
Age: 20
Gender: Male
Posts: 2,739
Quote originally posted by Quickster:
This should be easy ebough to answer,but I dont know what Im doing wrong.
I give a person an id of 1001.
I set the flag in one script so hes not visible in the map he is in.
Next,in another map,I clear the flag 1001. He still is not visible.
I want him to be visible,so what do i do?

EDIT: I fixed this.
I changed the flags from 1001 to 201.But for future refrences,why didnt this work with 1001?
Showsprite 0x[people number]
Clearflag 0x[ID no.]
__________________
--I'm a creepin'..
Closed Thread
Quick Reply

Sponsored Links

You may also like.. (Beta)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 06:36 AM.