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

Квесты

тут можно задать вопрос по скриптингу
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Квесты

Post by Vizit0r »

write in notepad

Code: Select all

 Program New;
var gi : TGumpInfo;
    i : Integer;
begin
GetGumpInfo(0, gi);
AddToSystemJournal('Gump has ' + IntToStr(Length(gi.XmfHTMLGumpColor)) + ' XmfHTMLGumpColors');
if Length(gi.XmfHTMLGumpColor) > 0 then
for i := 0 to Length(gi.XmfHTMLGumpColor) - 1 do
  AddToSystemJournal('XmfHTMLGumpColor #' + IntToStr(i) + ' ClilocText: ' + GetCliloc(gi.XmfHTMLGumpColor[i].Cliloc_id));
end.

in your GumpLines you can see that in Text Lines only crossbow bolts count written
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
TheEnd
Neophyte
Neophyte
Posts: 23
Joined: 20.11.2012 11:20
Contact:

Re: Квесты

Post by TheEnd »

Vizit0r wrote:write in notepad

Code: Select all

 Program New;
var gi : TGumpInfo;
    i : Integer;
begin
GetGumpInfo(0, gi);
AddToSystemJournal('Gump has ' + IntToStr(Length(gi.XmfHTMLGumpColor)) + ' XmfHTMLGumpColors');
if Length(gi.XmfHTMLGumpColor) > 0 then
for i := 0 to Length(gi.XmfHTMLGumpColor) - 1 do
  AddToSystemJournal('XmfHTMLGumpColor #' + IntToStr(i) + ' ClilocText: ' + GetCliloc(gi.XmfHTMLGumpColor[i].Cliloc_id));
end.

in your GumpLines you can see that in Text Lines only crossbow bolts count written
With the code, i've opened the 'crossbow bolts' gump, get the result like this:
1.jpg
1.jpg (26.11 KiB) Viewed 3749 times
There is no ''CliclocText '' output.

BTW: how to translate this code to Python?
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Квесты

Post by Vizit0r »

this code can't be translated to Python now - function GetGumpInfo not added there.

write me in icq and prepare char&shard info - i will see (char will be located near NPC, or where he take quest).
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
TheEnd
Neophyte
Neophyte
Posts: 23
Joined: 20.11.2012 11:20
Contact:

Re: Квесты

Post by TheEnd »

Thanks a lot.
My char near the NPC, and take the Quest of "crossbow bolts" Gump had been Opened, too.
But no nothing ClilocText to output in Stealth.
Last edited by TheEnd on 23.11.2012 15:00, edited 1 time in total.
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Квесты

Post by Vizit0r »

small error :

Code: Select all

GetCliloc 
not correct, need

Code: Select all

GetClilocByID
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Post Reply