Displaying item received, spell learned or amount of gold received in a dialog box
#9
This is an old thread, but in case it helps anyone, the assembly below changes two unused event commands
6D XX: Give item XX and show dialogue box with the item name
6E XX: Give XX * 100 GP and show dialogue box with amount
It basically just copies the treasure chest code, which is why it's XX*100 GP.
Code:
hirom

org $C0ACFC
GiveItem:

org $C04D06
PlaySound:

org $C0B1A3:
Subroutine:

org $C09934
DW Action6D
DW Action6E

org $C0D613
Action6D:
LDA $EB
STA $1A
STA $0583
JSR GiveItem
JSR PlaySound
LDA #$08
STA $EB
BRA CommonEnd

Action6E:
LDA $EB
STA $1A
STA $4202
LDA #$64
STA $4203
NOP
NOP
NOP
LDY $4216
STY $22
STZ $24
REP #$21
TYA
ADC $1860
STA $1860
TDC
SEP #$20
ADC $1862
STA $1862
CMP #$98
BCC NotMaxedGP
LDX $1860
CPX #$967F
BCC NotMaxedGP
LDX #$967F
STX $1860
LDA #$98
STA $1862
NotMaxedGP:
JSR PlaySound
JSR $02E5
LDA #$10
STA $EB

CommonEnd:
STZ $EC
LDA #$00
STA $ED
LDA #$02
JMP Subroutine
Reply


Messages In This Thread
RE: Displaying item received, spell learned or amount of gold received in a dialog box - by Subtraction - 04-05-2018, 02:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Looking for patch that fix item loss when dying before using said item Warrax 4 3,561 08-03-2018, 09:49 AM
Last Post: Warrax
  problem in Nikeah Gerad event & Asking About Expanded Town Dialog hack q8fft 6 6,428 02-16-2018, 07:55 AM
Last Post: q8fft
  Could you change a large amount of PCs in the WoR? Jeff 11 12,732 02-04-2017, 07:44 PM
Last Post: Imzogelmo
  Item + Throw. Is it possible? Denis Colli 6 6,305 03-08-2016, 09:06 PM
Last Post: Denis Colli
  Can't be sold item tsushiy 8 7,393 02-18-2015, 09:39 PM
Last Post: Catone
  Item Arrange tsushiy 0 1,996 12-27-2014, 09:55 PM
Last Post: tsushiy
  Changing where dances are learned fedorajoe 4 5,359 10-21-2013, 07:42 PM
Last Post: fedorajoe
  Hacking HP/MP amount of stat boosting items Angelo26 2 3,892 04-30-2013, 11:10 PM
Last Post: JWhiteLXXXIX
  Portraits in Dialog Boxes (Notes) Zeemis 14 14,920 09-30-2012, 02:59 PM
Last Post: yic17

Forum Jump:


Users browsing this thread: 1 Guest(s)