@ GubbyBlips no just me working on it atm m8 (with any help i can get yeah if you have a working script it'd help speed things up for me

) I'm kinda working on a trading set in my project "A Tall Story" where basically the Merchant class can sail about to different lands and trade goods for exp and profit, 8 classes in total. Merchant, Hunter, Craftsman, Chef, Rogue, Fisherman, Sailor and Collector.
TBH any help is welcomed as the level creation takes forever and there are a lot of levels

Edit: just tested that code and it works fine thank you

edit2: stopped working and gave this error? weird the sell_price isn't a global?
--collected foods
g_corncollected=0
g_berriescollected=0
g_grasscollected=0
g_tuberscollected=0
g_mushroomscollected=0
g_rootscollected=0
g_watercollected=0
g_fishcaught=0
g_meatcollected=0
-- collected Minerals and weapon crafting items
g_fiberscollected=0
g_featherscollected=0
g_flintcollected=0
g_woodcollected=0
g_hidecollected=0
g_ironscollected=0
g_coppercollected=0
g_leadcollected=0
-- collected chemicals
g_sulphurscollected=0
g_saltpeterscollected=0
g_carbonscollected=0
--foods crafted
g_basic_meal=0
g_basic_desert=0
g_filling_meal=0
g_filling_desert=0
g_exotic_meal=0
g_exotic_desert=0
--key to cycle left
--local left = "o"
--key to cycle right
--local right = "p"
--key to purchase item
--local confirm = "["
--distance to shop (to interact)
local shop = 120
--variable used for in game currency
local g_RPG_Gold = 10000
local pressed = 0
local item = 1
local item_name = {}
local max_item = 13
local item_number = {}
local cost = {}
function food_buy_shop_gren_a_init(e)
item_name[1] = "Berries"
item_name[2] = "Meat"
item_name[3] = "Mushrooms"
item_name[4] = "Corn"
item_name[5] = "Tubers"
item_name[6] = "Fibers"
item_name[7] = "Fish"
item_name[8] = "Basic Meal"
item_name[9] = "Basic Desert"
item_name[10] = "Filling Meal"
item_name[11] = "Filling Desert"
item_name[12] = "Exotic Meal"
item_name[13] = "Exotic Desert"
--match to names above
sell_price[1] = 4
sell_price[2] = 11
sell_price[3] = 4
sell_price[4] = 3
sell_price[5] = 3
sell_price[6] = 3
sell_price[7] = 11
sell_price[8] = 23
sell_price[9] = 35
sell_price[10] = 37
sell_price[11] = 55
sell_price[12] = 58
sell_price[13] = 58
--need this so we know what order they are in when selling
item_order[1] = "g_berriescollected"
item_order[2] = "g_meatcollected"
item_order[3] = "g_mushroomscollected"
item_order[4] = "g_corncollected"
item_order[5] = "g_tuberscollected"
item_order[6] = "g_fiberscollected"
item_order[7] = "g_fishcaught"
item_order[8] = "g_basic_meal"
item_order[9] = "g_basic_desert"
item_order[10] = "g_filling_meal"
item_order[11] = "g_filling_desert"
item_order[12] = "g_exotic_meal"
item_order[13] = "g_exotic_desert"
--folder containing images
LoadImages("shop",1)
end
function food_buy_shop_gren_a_main(e)
--if player near shop
if GetPlayerDistance(e) < 150 then
Text(1,1,1,"You have")
Text(1,4,1,g_berriescollected.." x "..item_name[1])
Text(1,7,1,g_meatcollected.." x "..item_name[2])
Text(1,10,1,g_mushroomscollected.." x "..item_name[3])
Text(1,13,1,g_corncollected.." x "..item_name[4])
Text(1,16,1,g_tuberscollected.." x "..item_name[5])
Text(1,19,1,g_fiberscollected.." x "..item_name[6])
Text(1,22,1,g_fishcaught.." x "..item_name[7])
Text(1,25,1,g_basic_meal.." x "..item_name[8])
Text(1,28,1,g_basic_desert.." x "..item_name[9])
Text(1,31,1,g_filling_meal.." x "..item_name[10])
Text(1,34,1,g_filling_desert.." x "..item_name[11])
Text(1,37,1,g_exotic_meal.." x "..item_name[12])
Text(1,40,1,g_exotic_desert.." x "..item_name[13])
Text(1,43,1,g_RPG_Gold.." Credits")
if g_Scancode == 0 then pressed = 0 end -- no ghost keys
if g_Scancode == 26 and pressed == 0 then -- confirm purchase
pressed = 1
--check player has enough to purchase item
if g_RPG_Gold >= cost[item] then
g_RPG_Gold = g_RPG_Gold - cost[item]
if item == 1 then g_berriescollected = g_berriescollected + 1 end
if item == 2 then g_meatcollected = g_meatcollected + 1 end
if item == 3 then g_mushroomscollected = g_mushroomscollected + 1 end
if item == 4 then g_corncollected = g_corncollected + 1 end
if item == 5 then g_tuberscollected = g_tuberscollected + 1 end
if item == 6 then g_fiberscollected = g_fiberscollected + 1 end
if item == 7 then g_fishcaught = g_fishcaught + 1 end
if item == 8 then g_basic_meal = g_basic_meal + 1 end
if item == 9 then g_basic_desert = g_basic_desert + 1 end
if item == 10 then g_filling_meal = g_filling_meal + 1 end
if item == 11 then g_filling_desert = g_filling_desert + 1 end
if item == 12 then g_exotic_meal = g_exotic_meal + 1 end
if item == 13 then g_exotic_desert = g_exotic_desert + 1 end
end -- purchase if ENOUGH GOLD?
end -- pressed purchase key
--local keyp = GetInKey()
--cycle through items
if g_Scancode == 25 and pressed == 0 then
pressed = 1
if item < max_item then item = item + 1 else item = 1 end
end
if g_Scancode == 24 and pressed == 0 then
pressed = 1
if item > 1 then item = item - 1 else item = max_item end
end
-- debugger -- Text(22,22,3, "Select # "..item.." Want some "..item_name[item].." ?" )
end -- Player distance = close enough?
end -- main
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
XFX R5 2gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel
I only smile because i have absolutely no idea whats going on