- 4
- Posts
- 1
- Years
- Seen Mar 27, 2025
Hi Everyone,
For Emerald, I am trying to make it where you give Capt Stern the scanner he gives you both the deepseatooth and deepseascale.
However when I have the script below in the game if the player has one bag space, for the first item OK, it receives it, but the second not... it says BAG FULL.
the code is working, npc is giving the first scale, but for the second scale it checks bag space, stops script, and then when I try again I get the first item again.
Just seeing if anyone had some insight on edit for the script to get it working and receive both items:
```giveitem 0x59 0x1 MSG_OBTAIN
compare LASTRESULT 0x1
if 0x1 goto 0x8272054
giveitem 0x5A 0x1 MSG_OBTAIN
compare LASTRESULT 0x0
if 0x1 goto 0x8272054
removeitem 0x116 0x1
msgbox 0x820D94A MSG_KEEPOPEN '"[player] handed the SCANNER to\nCA..."
setflag 0x126
goto 0x820CE11```
```#org 0x272054
msgbox 0x8272AD0 MSG_KEEPOPEN '"Too bad!\nThe BAG is full[.]"
release
end
```
For Emerald, I am trying to make it where you give Capt Stern the scanner he gives you both the deepseatooth and deepseascale.
However when I have the script below in the game if the player has one bag space, for the first item OK, it receives it, but the second not... it says BAG FULL.
the code is working, npc is giving the first scale, but for the second scale it checks bag space, stops script, and then when I try again I get the first item again.
Just seeing if anyone had some insight on edit for the script to get it working and receive both items:
```giveitem 0x59 0x1 MSG_OBTAIN
compare LASTRESULT 0x1
if 0x1 goto 0x8272054
giveitem 0x5A 0x1 MSG_OBTAIN
compare LASTRESULT 0x0
if 0x1 goto 0x8272054
removeitem 0x116 0x1
msgbox 0x820D94A MSG_KEEPOPEN '"[player] handed the SCANNER to\nCA..."
setflag 0x126
goto 0x820CE11```
```#org 0x272054
msgbox 0x8272AD0 MSG_KEEPOPEN '"Too bad!\nThe BAG is full[.]"
release
end
```