- 58
- Posts
- 14
- Years
- Tartarus; come visit me some time! :)
- Seen Jun 21, 2013
Can anyone please help me with this script? I am not sure what's wrong with it but it doesn't compile. It says "No "#org/#seek directives were found" when I try to compile it.
What I'm trying to do is to make a NPC not let me past a point if I don't have the boulderbadge (since it is leaf green version I'm hacking). Actually, I just copied another NPC's script, edited the text and added the dynamic offset since I don't want to edit an old script, rather i want to make a new one.
(Let's call this one Script A)
Now have a look at the picture in the attachement.
See, when you step infront of the door, the script activates which makes the NPC prevent you from going there.
The original scripts are:
Player (Let's call this script B):
Other Script (Let's call it script C):
Sorry for the long post.
P.S. I'm gonna need a script like Script C above to go with my script A, but I'd like to make the second script on my own, as long as you tell me whats wrong with script A.
What I'm trying to do is to make a NPC not let me past a point if I don't have the boulderbadge (since it is leaf green version I'm hacking). Actually, I just copied another NPC's script, edited the text and added the dynamic offset since I don't want to edit an old script, rather i want to make a new one.
(Let's call this one Script A)
Spoiler:
dynamic 0x2DD2E9
#org @start
lock
faceplayer
setvar 0x4001 0x1
bufferstd 0x0 0xF
goto @snippet1
'---------------
#org @snippet1
comparevars 0x405F 0x4001
if 0x4 goto @snippet2
copyvar 0x8000 0x4001
compare 0x8000 0x1
if 0x1 goto @snippet3
compare 0x8000 0x2
if 0x1 goto @snippet4
compare 0x8000 0x3
if 0x1 goto @snippet5
compare 0x8000 0x4
if 0x1 goto @snippet6
compare 0x8000 0x5
if 0x1 goto @snippet7
compare 0x8000 0x6
if 0x1 goto @snippet8
compare 0x8000 0x7
if 0x1 goto @snippet9
compare 0x8000 0x8
if 0x1 goto @snippet10
end
'---------------
#org @snippet2
preparemsg @string1 '"Go right ahead."
waitmsg
fanfare 0x101
waitfanfare
waitkeypress
release
end
'---------------
#org @snippet3
checkflag 0x820
if 0x1 goto @snippet11
goto @snippet12
'---------------
#org @snippet4
checkflag 0x821
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet5
checkflag 0x822
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet6
checkflag 0x823
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet7
checkflag 0x824
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet8
checkflag 0x825
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet9
checkflag 0x826
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet10
checkflag 0x827
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet11
preparemsg @string1 '"Go right ahead."
waitmsg
fanfare 0x101
waitfanfare
waitkeypress
copyvar 0x405F 0x4001
release
end
'---------------
#org @snippet12
msgbox @string2 MSG_KEEPOPEN '"I'm sorry, in this privately\nowned area of PALLET TOWN\lonly trainers are allowed through.\pWhat? You are a trainer? I don't believe you!\pShow me a gym badge and I'll believe you."
sound 0x16
msgbox @string3 MSG_KEEPOPEN '"Rules are rules.\nI can't let you pass."
release
end
'---------------
#org @snippet13
msgbox @string4 MSG_KEEPOPEN '"I'm sorry, in this privately\nowned area of PALLET TOWN\lonly trainers are allowed through.\pWhat? You are a trainer? I don't believe you!\pOh! That is the [buffer1]!\c\h17\c\h0BAA\c\h08[ME]\c\h18\pOkay, then.\nPlease, go right ahead."
copyvar 0x405F 0x4001
release
end
'---------------
#org @snippet14
preparemsg @string5 '"You can pass here only if you are a trainer. \pYou don't have a gym badge\nyet.\pYou have to have it to get to\nthe Pokemon Academy Area."
waitmsg
sound 0x16
waitkeypress
closeonkeypress
checksound
release
end
'---------
' Strings
'---------
#org @string1
= Go right ahead.
#org @string2
= I'm sorry, in this privately\nowned area of PALLET TOWN\lonly trainers are allowed through.\pWhat? You are a trainer? I don't believe you!\pShow me a gym badge and I'll believe you.
#org @string3
= Rules are rules.\nI can't let you pass.
#org @string4
= I'm sorry, in this privately\nowned area of PALLET TOWN\lonly trainers are allowed through.\pWhat? You are a trainer? I don't believe you!\pOh! That is the [buffer1]!\c\h17\c\h0BAA\c\h08[ME]\c\h18\pOkay, then.\nPlease, go right ahead.
#org @string5
= You can pass here only if you are a trainer. \pYou don't have a gym badge\nyet.\pYou have to have it to get to\nthe Pokemon Academy Area.
#org @start
lock
faceplayer
setvar 0x4001 0x1
bufferstd 0x0 0xF
goto @snippet1
'---------------
#org @snippet1
comparevars 0x405F 0x4001
if 0x4 goto @snippet2
copyvar 0x8000 0x4001
compare 0x8000 0x1
if 0x1 goto @snippet3
compare 0x8000 0x2
if 0x1 goto @snippet4
compare 0x8000 0x3
if 0x1 goto @snippet5
compare 0x8000 0x4
if 0x1 goto @snippet6
compare 0x8000 0x5
if 0x1 goto @snippet7
compare 0x8000 0x6
if 0x1 goto @snippet8
compare 0x8000 0x7
if 0x1 goto @snippet9
compare 0x8000 0x8
if 0x1 goto @snippet10
end
'---------------
#org @snippet2
preparemsg @string1 '"Go right ahead."
waitmsg
fanfare 0x101
waitfanfare
waitkeypress
release
end
'---------------
#org @snippet3
checkflag 0x820
if 0x1 goto @snippet11
goto @snippet12
'---------------
#org @snippet4
checkflag 0x821
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet5
checkflag 0x822
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet6
checkflag 0x823
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet7
checkflag 0x824
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet8
checkflag 0x825
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet9
checkflag 0x826
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet10
checkflag 0x827
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet11
preparemsg @string1 '"Go right ahead."
waitmsg
fanfare 0x101
waitfanfare
waitkeypress
copyvar 0x405F 0x4001
release
end
'---------------
#org @snippet12
msgbox @string2 MSG_KEEPOPEN '"I'm sorry, in this privately\nowned area of PALLET TOWN\lonly trainers are allowed through.\pWhat? You are a trainer? I don't believe you!\pShow me a gym badge and I'll believe you."
sound 0x16
msgbox @string3 MSG_KEEPOPEN '"Rules are rules.\nI can't let you pass."
release
end
'---------------
#org @snippet13
msgbox @string4 MSG_KEEPOPEN '"I'm sorry, in this privately\nowned area of PALLET TOWN\lonly trainers are allowed through.\pWhat? You are a trainer? I don't believe you!\pOh! That is the [buffer1]!\c\h17\c\h0BAA\c\h08[ME]\c\h18\pOkay, then.\nPlease, go right ahead."
copyvar 0x405F 0x4001
release
end
'---------------
#org @snippet14
preparemsg @string5 '"You can pass here only if you are a trainer. \pYou don't have a gym badge\nyet.\pYou have to have it to get to\nthe Pokemon Academy Area."
waitmsg
sound 0x16
waitkeypress
closeonkeypress
checksound
release
end
'---------
' Strings
'---------
#org @string1
= Go right ahead.
#org @string2
= I'm sorry, in this privately\nowned area of PALLET TOWN\lonly trainers are allowed through.\pWhat? You are a trainer? I don't believe you!\pShow me a gym badge and I'll believe you.
#org @string3
= Rules are rules.\nI can't let you pass.
#org @string4
= I'm sorry, in this privately\nowned area of PALLET TOWN\lonly trainers are allowed through.\pWhat? You are a trainer? I don't believe you!\pOh! That is the [buffer1]!\c\h17\c\h0BAA\c\h08[ME]\c\h18\pOkay, then.\nPlease, go right ahead.
#org @string5
= You can pass here only if you are a trainer. \pYou don't have a gym badge\nyet.\pYou have to have it to get to\nthe Pokemon Academy Area.
Now have a look at the picture in the attachement.
See, when you step infront of the door, the script activates which makes the NPC prevent you from going there.
The original scripts are:
Player (Let's call this script B):
Spoiler:
'---------------
#org @start
lock
faceplayer
setvar 0x4001 0x1
bufferstd 0x0 0xF
goto @snippet1
'---------------
#org @snippet1
comparevars 0x405F 0x4001
if 0x4 goto @snippet2
copyvar 0x8000 0x4001
compare 0x8000 0x1
if 0x1 goto @snippet3
compare 0x8000 0x2
if 0x1 goto @snippet4
compare 0x8000 0x3
if 0x1 goto @snippet5
compare 0x8000 0x4
if 0x1 goto @snippet6
compare 0x8000 0x5
if 0x1 goto @snippet7
compare 0x8000 0x6
if 0x1 goto @snippet8
compare 0x8000 0x7
if 0x1 goto @snippet9
compare 0x8000 0x8
if 0x1 goto @snippet10
end
'---------------
#org @snippet2
preparemsg @string1 '"Oh! That is the [buffer1]!\nGo rig..."
waitmsg
fanfare 0x101
waitfanfare
waitkeypress
release
end
'---------------
#org @snippet3
checkflag 0x820
if 0x1 goto @snippet11
goto @snippet12
'---------------
#org @snippet4
checkflag 0x821
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet5
checkflag 0x822
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet6
checkflag 0x823
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet7
checkflag 0x824
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet8
checkflag 0x825
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet9
checkflag 0x826
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet10
checkflag 0x827
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet11
preparemsg @string1 '"Oh! That is the [buffer1]!\nGo rig..."
waitmsg
fanfare 0x101
waitfanfare
waitkeypress
copyvar 0x405F 0x4001
release
end
'---------------
#org @snippet12
msgbox @string2 MSG_KEEPOPEN '"Only truly skilled TRAINERS are\na..."
sound 0x16
msgbox @string3 MSG_KEEPOPEN '"Rules are rules.\nI can't let you ..."
release
end
'---------------
#org @snippet13
msgbox @string4 MSG_KEEPOPEN '"You can pass here only if you have..."
copyvar 0x405F 0x4001
release
end
'---------------
#org @snippet14
preparemsg @string5 '"You can pass here only if you have..."
waitmsg
sound 0x16
waitkeypress
closeonkeypress
checksound
release
end
'---------
' Strings
'---------
#org @string1
= Oh! That is the [buffer1]!\nGo right ahead.
#org @string2
= Only truly skilled TRAINERS are\nallowed through.\pYou don't have the [buffer1]\nyet!
#org @string3
= Rules are rules.\nI can't let you pass.
#org @string4
= You can pass here only if you have\nthe [buffer1].\pOh! That is the [buffer1]!\c\h17\c\h0BAA\c\h08[ME]\c\h18\pOkay, then.\nPlease, go right ahead.
#org @string5
= You can pass here only if you have\nthe [buffer1].\pYou don't have the [buffer1]\nyet.\pYou have to have it to get to\nthe POKeMON LEAGUE.
#org @start
lock
faceplayer
setvar 0x4001 0x1
bufferstd 0x0 0xF
goto @snippet1
'---------------
#org @snippet1
comparevars 0x405F 0x4001
if 0x4 goto @snippet2
copyvar 0x8000 0x4001
compare 0x8000 0x1
if 0x1 goto @snippet3
compare 0x8000 0x2
if 0x1 goto @snippet4
compare 0x8000 0x3
if 0x1 goto @snippet5
compare 0x8000 0x4
if 0x1 goto @snippet6
compare 0x8000 0x5
if 0x1 goto @snippet7
compare 0x8000 0x6
if 0x1 goto @snippet8
compare 0x8000 0x7
if 0x1 goto @snippet9
compare 0x8000 0x8
if 0x1 goto @snippet10
end
'---------------
#org @snippet2
preparemsg @string1 '"Oh! That is the [buffer1]!\nGo rig..."
waitmsg
fanfare 0x101
waitfanfare
waitkeypress
release
end
'---------------
#org @snippet3
checkflag 0x820
if 0x1 goto @snippet11
goto @snippet12
'---------------
#org @snippet4
checkflag 0x821
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet5
checkflag 0x822
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet6
checkflag 0x823
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet7
checkflag 0x824
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet8
checkflag 0x825
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet9
checkflag 0x826
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet10
checkflag 0x827
if 0x1 goto @snippet13
goto @snippet14
'---------------
#org @snippet11
preparemsg @string1 '"Oh! That is the [buffer1]!\nGo rig..."
waitmsg
fanfare 0x101
waitfanfare
waitkeypress
copyvar 0x405F 0x4001
release
end
'---------------
#org @snippet12
msgbox @string2 MSG_KEEPOPEN '"Only truly skilled TRAINERS are\na..."
sound 0x16
msgbox @string3 MSG_KEEPOPEN '"Rules are rules.\nI can't let you ..."
release
end
'---------------
#org @snippet13
msgbox @string4 MSG_KEEPOPEN '"You can pass here only if you have..."
copyvar 0x405F 0x4001
release
end
'---------------
#org @snippet14
preparemsg @string5 '"You can pass here only if you have..."
waitmsg
sound 0x16
waitkeypress
closeonkeypress
checksound
release
end
'---------
' Strings
'---------
#org @string1
= Oh! That is the [buffer1]!\nGo right ahead.
#org @string2
= Only truly skilled TRAINERS are\nallowed through.\pYou don't have the [buffer1]\nyet!
#org @string3
= Rules are rules.\nI can't let you pass.
#org @string4
= You can pass here only if you have\nthe [buffer1].\pOh! That is the [buffer1]!\c\h17\c\h0BAA\c\h08[ME]\c\h18\pOkay, then.\nPlease, go right ahead.
#org @string5
= You can pass here only if you have\nthe [buffer1].\pYou don't have the [buffer1]\nyet.\pYou have to have it to get to\nthe POKeMON LEAGUE.
Other Script (Let's call it script C):
Spoiler:
'---------------
#org @start
lockall
setvar 0x4001 0x1
setvar 0x8009 0x1
bufferstd 0x0 0xF
goto @snippet1
'---------------
#org @snippet1
textcolor 0x0
applymovement 0x8009 @move1
waitmovement 0x0
copyvar 0x8000 0x4001
compare 0x8000 0x1
if 0x1 goto @snippet2
compare 0x8000 0x2
if 0x1 goto @snippet3
compare 0x8000 0x3
if 0x1 goto @snippet4
compare 0x8000 0x4
if 0x1 goto @snippet5
compare 0x8000 0x5
if 0x1 goto @snippet6
compare 0x8000 0x6
if 0x1 goto @snippet7
compare 0x8000 0x7
if 0x1 goto @snippet8
compare 0x8000 0x8
if 0x1 goto @snippet9
end
'---------------
#org @snippet2
checkflag 0x820
if 0x1 goto @snippet10
goto @snippet11
'---------------
#org @snippet3
checkflag 0x821
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet4
checkflag 0x822
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet5
checkflag 0x823
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet6
checkflag 0x824
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet7
checkflag 0x825
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet8
checkflag 0x826
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet9
checkflag 0x827
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet10
preparemsg @string1 '"Oh! That is the [buffer1]!\nGo rig..."
waitmsg
fanfare 0x101
waitfanfare
waitkeypress
copyvar 0x405F 0x4001
releaseall
end
'---------------
#org @snippet11
msgbox @string2 MSG_KEEPOPEN '"Only truly skilled TRAINERS are\na..."
sound 0x16
msgbox @string3 MSG_KEEPOPEN '"Rules are rules.\nI can't let you ..."
closeonkeypress
applymovement MOVE_PLAYER @move2
applymovement 0x8009 @move3
waitmovement 0x0
releaseall
end
'---------------
#org @snippet12
msgbox @string4 MSG_KEEPOPEN '"You can pass here only if you have..."
copyvar 0x405F 0x4001
releaseall
end
'---------------
#org @snippet13
preparemsg @string5 '"You can pass here only if you have..."
waitmsg
sound 0x16
waitkeypress
closeonkeypress
checksound
applymovement MOVE_PLAYER @move2
applymovement 0x8009 @move3
waitmovement 0x0
releaseall
end
'---------
' Strings
'---------
#org @string1
= Oh! That is the [buffer1]!\nGo right ahead.
#org @string2
= Only truly skilled TRAINERS are\nallowed through.\pYou don't have the [buffer1]\nyet!
#org @string3
= Rules are rules.\nI can't let you pass.
#org @string4
= You can pass here only if you have\nthe [buffer1].\pOh! That is the [buffer1]!\c\h17\c\h0BAA\c\h08[ME]\c\h18\pOkay, then.\nPlease, go right ahead.
#org @string5
= You can pass here only if you have\nthe [buffer1].\pYou don't have the [buffer1]\nyet.\pYou have to have it to get to\nthe POKeMON LEAGUE.
'-----------
' Movements
'-----------
#org @move1
#raw 0x2F 'Face Left (Delayed)
#raw 0xFE 'End of Movements
#org @move2
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
#org @move3
#raw 0x2D 'Face Down (Delayed)
#raw 0xFE 'End of Movements
#org @start
lockall
setvar 0x4001 0x1
setvar 0x8009 0x1
bufferstd 0x0 0xF
goto @snippet1
'---------------
#org @snippet1
textcolor 0x0
applymovement 0x8009 @move1
waitmovement 0x0
copyvar 0x8000 0x4001
compare 0x8000 0x1
if 0x1 goto @snippet2
compare 0x8000 0x2
if 0x1 goto @snippet3
compare 0x8000 0x3
if 0x1 goto @snippet4
compare 0x8000 0x4
if 0x1 goto @snippet5
compare 0x8000 0x5
if 0x1 goto @snippet6
compare 0x8000 0x6
if 0x1 goto @snippet7
compare 0x8000 0x7
if 0x1 goto @snippet8
compare 0x8000 0x8
if 0x1 goto @snippet9
end
'---------------
#org @snippet2
checkflag 0x820
if 0x1 goto @snippet10
goto @snippet11
'---------------
#org @snippet3
checkflag 0x821
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet4
checkflag 0x822
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet5
checkflag 0x823
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet6
checkflag 0x824
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet7
checkflag 0x825
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet8
checkflag 0x826
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet9
checkflag 0x827
if 0x1 goto @snippet12
goto @snippet13
'---------------
#org @snippet10
preparemsg @string1 '"Oh! That is the [buffer1]!\nGo rig..."
waitmsg
fanfare 0x101
waitfanfare
waitkeypress
copyvar 0x405F 0x4001
releaseall
end
'---------------
#org @snippet11
msgbox @string2 MSG_KEEPOPEN '"Only truly skilled TRAINERS are\na..."
sound 0x16
msgbox @string3 MSG_KEEPOPEN '"Rules are rules.\nI can't let you ..."
closeonkeypress
applymovement MOVE_PLAYER @move2
applymovement 0x8009 @move3
waitmovement 0x0
releaseall
end
'---------------
#org @snippet12
msgbox @string4 MSG_KEEPOPEN '"You can pass here only if you have..."
copyvar 0x405F 0x4001
releaseall
end
'---------------
#org @snippet13
preparemsg @string5 '"You can pass here only if you have..."
waitmsg
sound 0x16
waitkeypress
closeonkeypress
checksound
applymovement MOVE_PLAYER @move2
applymovement 0x8009 @move3
waitmovement 0x0
releaseall
end
'---------
' Strings
'---------
#org @string1
= Oh! That is the [buffer1]!\nGo right ahead.
#org @string2
= Only truly skilled TRAINERS are\nallowed through.\pYou don't have the [buffer1]\nyet!
#org @string3
= Rules are rules.\nI can't let you pass.
#org @string4
= You can pass here only if you have\nthe [buffer1].\pOh! That is the [buffer1]!\c\h17\c\h0BAA\c\h08[ME]\c\h18\pOkay, then.\nPlease, go right ahead.
#org @string5
= You can pass here only if you have\nthe [buffer1].\pYou don't have the [buffer1]\nyet.\pYou have to have it to get to\nthe POKeMON LEAGUE.
'-----------
' Movements
'-----------
#org @move1
#raw 0x2F 'Face Left (Delayed)
#raw 0xFE 'End of Movements
#org @move2
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
#org @move3
#raw 0x2D 'Face Down (Delayed)
#raw 0xFE 'End of Movements
Sorry for the long post.
P.S. I'm gonna need a script like Script C above to go with my script A, but I'd like to make the second script on my own, as long as you tell me whats wrong with script A.
Last edited: