The waypoint to buy the potions of my script is this below, and I want to add him to buy HP potions too, but I don't know how, I configured the entire script, I'm just depending on this waypoint.
if not islocation() then
while windowcount(MainBP) ~= 1 or windowcount() ~= 1 do
if (itemcount(SMPname) < SMPtobuy) then
local SMPtobuy = SMPtobuy-itemcount(SMPname)
while SMPtobuy> 0 do
SMPtobuy = SMPtobuy-100