Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Make sure gump is opened

Only working scripts
Post Reply
mixers
Neophyte
Neophyte
Posts: 49
Joined: 03.10.2013 14:11

Make sure gump is opened

Post by mixers »

if dead then
begin
repeat
waitgump('1')
wait(100);
until ?***********?
end;

until what ?
nah nah
Developer
Developer
Posts: 414
Joined: 13.07.2011 11:23
Contact:

Re: Make sure gump is opened

Post by nah nah »

IsGump ?
GetGumpsCount ?

Code: Select all

if dead then begin
    while not isgump do
        wait(100);
    waitgump('1');
end;
mixers
Neophyte
Neophyte
Posts: 49
Joined: 03.10.2013 14:11

Re: Make sure gump is opened

Post by mixers »

i want use getgumpinfo, until some word show in gumpinfo
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Make sure gump is opened

Post by Vizit0r »

word - in what part of gumpinfo?
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
mixers
Neophyte
Neophyte
Posts: 49
Joined: 03.10.2013 14:11

Re: Make sure gump is opened

Post by mixers »

1.JPG
1.JPG (27.73 KiB) Viewed 12377 times
2.JPG
2.JPG (17.86 KiB) Viewed 12377 times
until some words show in text lines or Released_ID = 1210
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Make sure gump is opened

Post by Vizit0r »

this gump info nor for this gump.

For you really need seach in stringlist, filled by GetGumpTextLines.

for example,
if GumpTextStringList.Items.IndexOf(Your_text) > -1 then
....
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Crome696
Novice
Novice
Posts: 67
Joined: 04.03.2012 18:57
Location: Germany
Contact:

Re: Make sure gump is opened

Post by Crome696 »

Scan if GumpID exist. GumpId for RessGump will be always the same.

Code: Select all

function GumpExist(GumpType : Cardinal):Boolean;
var
 Index : Word;
 Count : Integer;
begin
 Count := GetGumpsCount() - 1;
 if ( Count > -1 ) then
 begin
  for Index := 0 to Count do
  begin
   if ( GetGumpID(Index) = GumpType ) then
   begin
    Result := True;
    exit;   
   end;
  end;
 end;
 Result := False;
end;
Untested since i just hacked it into this post. But i hope you understand the princip.
Stealth Development Team & Support
mixers
Neophyte
Neophyte
Posts: 49
Joined: 03.10.2013 14:11

Re: Make sure gump is opened

Post by mixers »

yes, i think i know.

Code: Select all

const currentgump = getgumpscount;
begin
  usbobject(itemid);
  while getgumpscount <= currentgump;
  wait(100);
end;   
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Make sure gump is opened

Post by Vizit0r »

Code: Select all

var currentgump : Integer;
begin
currentgump := getgumpscount;
  usbobject(itemid);
  while getgumpscount <= currentgump;
  wait(100);
end; 
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Post Reply