View Single Post
  #2742    
Old December 25th, 2009 (08:25 AM). Edited December 25th, 2009 by Tropical Sunlight.
Tropical Sunlight's Avatar
Tropical Sunlight Tropical Sunlight is offline
The Faltine
 
Join Date: Mar 2008
Location: Slovenia
Age: 19
Gender: Male
Posts: 3,578
Send a message via Windows Live Messenger to Tropical Sunlight
ROM: FireRed
Scripted in: XSE
Script: Person
Actual script:
Spoiler:
#dynamic 0x000000

#org @start
lock
faceplayer
checkflag 0x1581
compare LASTRESULT 0x1
if 0x1 goto @1581set
checkflag 0x1580
compare LASTRESULT 0x1
if 0x1 goto @1580set
checkitem ITEM_MOOMOOMILK 2
compare LASTRESULT 0x1
if 0x1 goto @havethemilk
checkflag 0x1582
compare LASTRESULT 0x1
if 0x1 goto @1582set
msgbox @wygb MSG_NORMAL
setflag 0x1582
release
end

#org @1581set
msgbox @sell MSG_NORMAL
pokemart @pokemart
release
end

#org @1582set
msgbox @getbusy MSG_NORMAL
release
end

#org @havethemilk
removeitem ITEM_MOOMOOMILK 2
msgbox @gimmethemilk MSG_NORMAL
setflag 0x1580
release
end

#org @1580set
checkitem ITEM_GREPABERRY 1
compare LASTRESULT 0x1
if 0x1 goto @havetheberry
msgbox @youonly MSG_NORMAL
release
end

#org @havetheberry
removeitem ITEM_LEEMONBERRY 1
msgbox @gimmetheberry MSG_NORMAL
applymovement LASTTALKED @moveup
pause 0x100
applymovement LASTTALKED @movedown
msgbox @deserve MSG_NORMAL
giveitem ITEM_GOLDTEETH 1 MSG_OBTAIN
setflag 0x1581
release
end

#org @gimmethemilk
= RYAN: You got the MOOMOO MILK!\nGive it to me now.

#org @wygb
= RYAN: Hey, [player]!\nSo you're here eh?\pRYAN: If I can recall, you need a\nPIKA-CHEW, correct?\pRYAN: Ah, I'm sorry to disappoint\nyou, but I've ran out of the basic\lingredients for it.\pRYAN: I need [fr_blue]2 bottles of MOOMOO\nMILK and a LEEMON BERRY[black_fr].\pRYAN: Bring me those and I'll make\nyou a PIKA-CHEW free of charge.

#org @youonly
= RYAN: I only need a LEEMON BERRY\nnow.

#org @gimmethemilk
= RYAN: You got the LEEMON BERRY!\nGive it to me now.

#org @getbusy
= RYAN: Chop-chop, get busy!\pRemember, I need [fr_blue]2 bottles of\nMOOMOO MILK and a LEEMON BERRY[black_fr].

#org @deserve
= RYAN: Here you go, buddy!\nYou deserve it! Use it wisely.

#org @sell
= RYAN: Hello, dear friend! I have a\nspecial discount just for you!\pNow, what can I do for you?

#org @pokemart
#raw word ITEM_BERRYJUICE
#raw word ITEM_RARECANDY
#raw word 0x0

#org @moveup
#raw 0x11 0x13 0x11 0x60 0xFE

#org @movedown
#raw 0x10 0x12 0x10 0x61 0xFE

Don't mind the offset.

Compiled:
Spoiler:
#include stditems.rbh

;---------------
#org 0x80F00B
lock
faceplayer
checkflag 0x1651
compare LASTRESULT 0x1
if 0x1 goto 0x880F055
checkflag 0x1580
compare LASTRESULT 0x1
if 0x1 goto 0x88104B8
checkitem ITEM_MOOMOOMILK 0x2
compare LASTRESULT 0x1
if 0x1 goto 0x880FFE0
checkflag 0x1852
compare LASTRESULT 0x1
if 0x1 goto 0x880F065
msgbox 0x8810CEC MSG_NORMAL ;"RYAN: Hey, [player]!\nSo you're he..."
setflag 0x1852
release
end

;---------------
#org 0x80F055
msgbox 0x8810F27 MSG_NORMAL ;"RYAN: Hello, dear friend! I have a..."
pokemart 0x8810F87
release
end

;---------------
#org 0x8104B8
checkitem ITEM_GREPABERRY 0x1
compare LASTRESULT 0x1
if 0x1 goto 0x88104D3
msgbox 0x8810E28 MSG_NORMAL ;"RYAN: I only need a LEEMON BERRY\n..."
release
end

;---------------
#org 0x80FFE0
removeitem ITEM_MOOMOOMILK 0x2
msgbox 0x881050B MSG_NORMAL ;"RYAN: You got the MOOMOO MILK!\nGi..."
setflag 0x1580
release
end

;---------------
#org 0x80F065
msgbox 0x8810E85 MSG_NORMAL ;"RYAN: Chop-chop, get busy!\pRememb..."
release
end

;---------------
#org 0x8104D3
removeitem ITEM_GREPABERRY 0x1
msgbox 0x8810E50 MSG_NORMAL ;"RYAN: You got the LEEMON BERRY!\nG..."
applymovement LASTTALKED 0x8810F8E
pause 0x100
applymovement LASTTALKED 0x8810F94
msgbox 0x8810EEC MSG_NORMAL ;"RYAN: Here you go, buddy!\nYou des..."
giveitem ITEM_GOLDTEETH 0x1 MSG_OBTAIN
setflag 0x1651
release
end

;---------
; Strings
;---------
#org 0x810CEC
= RYAN: Hey, [player]!\nSo you're here eh?\pRYAN: If I can recall, you need a\nPIKA-CHEW, correct?\pRYAN: Ah, I'm sorry to disappoint\nyou, but I've ran out of the basic\lingredients for it.\pRYAN: I need [blue_fr]2 bottles of MOOMOO\nMILK and a LEEMON BERRY[red_fr].\pRYAN: Bring me those and I'll make\nyou a PIKA-CHEW free of charge.

#org 0x810F27
= RYAN: Hello, dear friend! I have a\nspecial discount just for you!\pNow, what can I do for you?

#org 0x810E28
= RYAN: I only need a LEEMON BERRY\nnow.

#org 0x81050B
= RYAN: You got the MOOMOO MILK!\nGive it to me now.

#org 0x810E85
= RYAN: Chop-chop, get busy!\pRemember, I need fr blue 2 bottles of\nMOOMOO MILK and a LEEMON BERRY[black_fr].

#org 0x810E50
= RYAN: You got the LEEMON BERRY!\nGive it to me now.

#org 0x810EEC
= RYAN: Here you go, buddy!\nYou deserve it! Use it wisely.

;-----------
; Movements
;-----------
#org 0x810F8E
#raw 0x11 ;Step Up (Normal)
#raw 0x13 ;Step Right (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0x60 ;Hide
#raw 0xFE ;End of Movements
#org 0x810F94
#raw 0x10 ;Step Down (Normal)
#raw 0x12 ;Step Left (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0x61 ;Show
#raw 0xFE ;End of Movements

;-----------
; MartItems
;-----------
#org 0x810F87
#raw word ITEM_BERRYJUICE
#raw word ITEM_RARECANDY
#raw word ITEM_NONE
__________________