Users browsing this thread: 2 Guest(s)
Displaying item received, spell learned or amount of gold received in a dialog box

#9
Posts: 51
Threads: 5
Thanks Received: 2
Thanks Given: 0
Joined: Apr 2018
Reputation: 8
Status
Shell
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
  Find
Quote  
[-] The following 3 users say Thank You to Subtraction for this post:
  • madsiur (04-05-2018), Tenkarider (04-05-2018), Warrax (04-06-2018)



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

Forum Jump:

Users browsing this thread: 2 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite