2020-07-07 22:50:58 +00:00
|
|
|
GiveItem::
|
|
|
|
; Give player quantity c of item b,
|
2021-08-28 21:02:20 +00:00
|
|
|
; and copy the item's name to wStringBuffer.
|
2020-07-07 22:50:58 +00:00
|
|
|
; Return carry on success.
|
|
|
|
ld a, b
|
|
|
|
ld [wd11e], a
|
|
|
|
ld [wcf91], a
|
|
|
|
ld a, c
|
|
|
|
ld [wItemQuantity], a
|
|
|
|
ld hl, wNumBagItems
|
|
|
|
call AddItemToInventory
|
|
|
|
ret nc
|
|
|
|
call GetItemName
|
2021-08-28 21:02:20 +00:00
|
|
|
call CopyToStringBuffer
|
2020-07-07 22:50:58 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
|
|
|
GivePokemon::
|
|
|
|
; Give the player monster b at level c.
|
|
|
|
ld a, b
|
|
|
|
ld [wcf91], a
|
|
|
|
ld a, c
|
|
|
|
ld [wCurEnemyLVL], a
|
|
|
|
xor a ; PLAYER_PARTY_DATA
|
|
|
|
ld [wMonDataLocation], a
|
|
|
|
farjp _GivePokemon
|