A very simple shop script created by imrankaba on the original RealmCrafter Standard forums.

Hey guys ive been looking around for a proper WORKING shop script but it took me AGES to find one that worked with no problems. After a while a found some scraps of shop scripts and then I thought of changing it around a bit but anyway, heres one that REALLY works.

Use this as your RIGHT CLICK script on your npc/trader waypoint. 

Using "RC_Core.rcm" 
; 01:34, March 29, 2017 (UTC)01:34, March 29, 2017 (UTC)~
; By ~~~~~~~~

Function Main()
Player = Actor()

;open the dialog box and name it "General Store"
D=OpenDialog(Player, D, "General Store")

DialogOutput(Player, D, " Welcome to the General Store, what would you like to buy")
;give the options for the player to buy
choice=DialogInput(Player, D, "Sword[99]|No Thanks","|")
If choice = 1
;check if the player has enough money
If Money(player) > 10
DialogOutput(Player, D, "You have bought item Sword for 10 copper")
;take away the amount the sword costs
ChangeMoney(Player, -10)
;give the player the item, make sure you have an item called whatevers in the ""
GiveItem(Player, "Sword", 1)
DialogOutput(Player, D, "You dont have that much money, come back when you do!")
CloseDialog(Player, D)
;close the dialog box
CloseDialog(Player, D)

;the following is the same as the above just more money and different names
ElseIf choice = 2 then
CloseDialog(Player, D)
End Function

You may edit the items in this script as much as you want. Anyways hope it helps people who are new to RC!