Napisałem ten skrypt książki i tic toca poklatkowego wywołującego okno po naciśnięciu klawisza. Sparsowałem i nie działa.
Spoiler
// Nowe okno
func void cooker ()
{
var int nDocID;
if (NPC_TALENT_COOKER)
{
Doc_PrintLine ( nDocID, 1, " Gotowanie Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Gotowanie Nie");
};
};
func void kowal ()
{
var int nDocID;
if (NPC_TALENT_KOWAL)
{
Doc_PrintLine ( nDocID, 1, " Kowalstwo Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Kowalstwo Nie");
};
};
func void alchemy ()
{
var int nDocID;
if (NPC_TALENT_ALCHEMY)
{
Doc_PrintLine ( nDocID, 1, " Alchemia Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Alchemia Nie");
};
};
func void luczarz ()
{
var int nDocID;
if (NPC_TALENT_LUCZARZ)
{
Doc_PrintLine ( nDocID, 1, " Łuczarstwo Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Łuczarstwo Nie");
};
};
func void rymarz ()
{
var int nDocID;
if (NPC_TALENT_RYMARZ)
{
Doc_PrintLine ( nDocID, 1, " Rymarstwo Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Rymarstwo Nie");
};
};
func void wydobycie ()
{
var int nDocID;
if (NPC_TALENT_WYDOBYCIE)
{
Doc_PrintLine ( nDocID, 1, " Wydobycie surowców Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Wydobycie surowców Nie");
};
};
func void zielarz ()
{
var int nDocID;
if (NPC_TALENT_ZIELARZ)
{
Doc_PrintLine ( nDocID, 1, " Zielarz Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Zielarz Nie");
};
};
func void przetrw ()
{
var int nDocID;
if (NPC_TALENT_PRZETRW)
{
Doc_PrintLine ( nDocID, 1, " Przetrwanie Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Przetrwanie Nie");
};
};
func void tajemna ()
{
var int nDocID;
if (NPC_TALENT_TAJEMNA)
{
Doc_PrintLine ( nDocID, 1, " Wiedza tajemna Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Wiedza tajemna Nie");
};
};
func void learn ()
{
var int nDocID;
if (NPC_TALENT_LEARN)
{
Doc_PrintLine ( nDocID, 1, " Regeneracja Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Regeneracja Nie");
};
};
func void kostury ()
{
var int nDocID;
if (NPC_TALENT_KOSTURY)
{
Doc_PrintLine ( nDocID, 1, " Walka kosturami Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Walka kosturami Nie");
};
};
func void plugawy ()
{
var int nDocID;
if (NPC_TALENT_PLUGAWY)
{
Doc_PrintLine ( nDocID, 1, " Plugawy oręż Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Plugawy oręż Nie");
};
};
func void sekretny ()
{
var int nDocID;
if (NPC_TALENT_SEKRETNY)
{
Doc_PrintLine ( nDocID, 1, " Sekretny cios Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Sekretny cios Nie");
};
};
func void wlam ()
{
var int nDocID;
if (NPC_TALENT_WLAM)
{
Doc_PrintLine ( nDocID, 1, " Włamywanie się Tak");
}
else
{
Doc_PrintLine ( nDocID, 1, " Włamywanie się Nie");
};
};
// Okno ustwienia
func void menu_status_01 ()
{
var string tekst;
var string poziom_next;
var string punkty_nauki;
punkty_nauki = ConcatStrings (" Punkty nauki ", IntToString (hero.lp));
poziom_next = ConcatStrings ("/", IntToString (hero.exp_next));
poziom_next = ConcatStrings (IntToString (hero.exp), poziom_next);
poziom_next = ConcatStrings (" Doswiadczenie ", poziom_next);
tekst = ConcatStrings (" Poziom ", IntToString (hero.level));
var string ConcatText;
var int nDocID;
nDocID = Doc_Create () ; // DocManager
Doc_SetPages ( nDocID, 2 ); //wieviel Pages
Doc_SetPage ( nDocID, 0, "kartka_menu.TGA" , 0 );
Doc_SetPage ( nDocID, 1, "kartka_menu.TGA" , 0 );
Doc_SetMargins ( nDocID, 1, 275, 20, 30, 20, 1 ); // 0 -> margins are in pixels
Doc_SetFont ( nDocID, 0, "font_15_book.tga" ); // -1 -> all pages
Doc_PrintLine ( nDocID, 0, "");
Doc_PrintLine ( nDocID, 0, "");
Doc_PrintLine ( nDocID, 0, " Podstawowe informacje" );
Doc_PrintLine ( nDocID, 0, "");
Doc_PrintLine ( nDocID, 0, tekst );
Doc_PrintLine ( nDocID, 0, poziom_next );
Doc_PrintLine ( nDocID, 0, punkty_nauki );
Doc_PrintLine ( nDocID, 0, " Walka tradycyjna" );
Doc_PrintLine ( nDocID, 0, "");
kostury ();
plugawy ();
sekretny ();
Doc_PrintLine ( nDocID, 0, " Wiedza" );
Doc_PrintLine ( nDocID, 0, "");
zielarz ();
przetrw ();
tajemna ();
learn ();
Doc_SetMargins ( nDocID, -1, 30, 20, 275, 20, 1 ); // 0 -> margins are in pixels (Position des Textes von den Ränder des TGAs aus, links,oben,rechts,unten)
Doc_SetFont ( nDocID, 1, "font_15_book.tga" ); // -1 -> all pages
Doc_PrintLine ( nDocID, 1, "" );
Doc_PrintLine ( nDocID, 1, " Umiejetnosci zlodziejskie" );
Doc_PrintLine ( nDocID, 1, "" );
wlam ();
Doc_PrintLine ( nDocID, 1, " Rzemioslo" );
Doc_PrintLine ( nDocID, 1, "" );
cooker ();
kowal ();
alchemy ();
luczarz ();
rymarz ();
wydobycie ();
};
/*
*/
Dodam, że usunąłem z niego tę część, ponieważ wywalało Unkown indef MemoryProtectionOverride.
Obydwa skrypty pasuje na samym końcu Gothic.src. Nie wywala żadnego błędu a mimo wszystko nie działa. Dodam że nie zapomniałem o Tigerze.
w ZEN tez zrobiłem Tigera jakby co. Liczę na wsparcie.
Wydaję mi się że ta linijka jest ważna.
Może nie działało gdy ją usunąłem. Wydaję mi się że odpowiada za wyskoczenie mojego menu statystyk.
Błąd Unkown indef MemoryProtectionOverride. zniknął ale teraz wywala Unkown indef menu_start. Skrypt został przerobiony z g2 do g1 więc przypuszczam ze w g1 jest inaczej i to dlatego.