IsGumpCanBeClosed
Check if Gump with Index GumpIndex can be simply closed (like right click on gump in graphic client) or not. If can be closed - returns True.
If char disconnected - will return False.
Pascal
function IsGumpCanBeClosed(GumpIndex : Word) : Boolean;
Python
def IsGumpCanBeClosed(GumpIndex): -> boolean
Example Python
def close_gumps():
while IsGump():
if not Connected():
return False
if not IsGumpCanBeClosed(GetGumpsCount() - 1):
return False
#WaitGump('0')
else:
CloseSimpleGump(GetGumpsCount() - 1)
return True