Portal-Zone Gothic-Zone Gothic II-Zone Gothic 3-Zone Gothic 4-Zone Modifikationen-Zone Download-Zone Foren-Zone RPG-Zone Almanach-Zone Spirit of Gothic

 

Seite 4 von 31 « Erste 123456781115 ... Letzte »
Ergebnis 61 bis 80 von 606
  1. Beiträge anzeigen #61 Zitieren
    Local Hero
    Registriert seit
    Feb 2013
    Beiträge
    236
     
    pawbuj ist offline
    Lehona, Yes I am aware of that when u press "O" u can control NPC in marvin mode.

    What I want to achieve is to control NPC in the same way but not when u focus NPc u want to control but u choosing him by ID.

    it is possible?

  2. Beiträge anzeigen #62 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist offline
    Zitat Zitat von pawbuj Beitrag anzeigen
    Lehona, Yes I am aware of that when u press "O" u can control NPC in marvin mode.

    What I want to achieve is to control NPC in the same way but not when u focus NPc u want to control but u choosing him by ID.

    it is possible?
    Yes, you can choose your target however you like. But hatrez123 has a good point, changing the visual will probably be much safer. Assuming that you have LeGo installed, you can use _TRIA_Copy(int ptr1, int ptr2) to swap the visual of two Npcs.

    Zitat Zitat von hatrez123 Beitrag anzeigen
    I've one problem:

    I'm hooking two funcs but it's cause of game crash at the start(without any errors).
    But with hooked one func works great.

    These funcs are changing color of focused chest(when is locked/unlocked/empty) and focused doors(when are locked/unlocked). I don't know oldInstr value. If oldInstr value is lower than 8 it's cause of game crash.
    Why do you use different numbers for OldInstr when you're hooking the same address?
    Stacking hooks should work, so if you use 8 for both calls, there should be no crash. You could also just handle it with one hook...

    Code:
    func void myHook() {
        DoorColorChanger();
        ChestColorChanger();
    };
    If it still doesn't work, give us a screenshot of the error.

  3. Beiträge anzeigen #63 Zitieren
    Abenteurer Avatar von hatrez123
    Registriert seit
    Feb 2014
    Beiträge
    50
     
    hatrez123 ist offline

    Thumbs up

    Zitat Zitat von Lehona Beitrag anzeigen
    Why do you use different numbers for OldInstr when you're hooking the same address?
    Stacking hooks should work, so if you use 8 for both calls, there should be no crash. You could also just handle it with one hook...

    Code:
    func void myHook() {
        DoorColorChanger();
        ChestColorChanger();
    };
    If it still doesn't work, give us a screenshot of the error.
    Thank you, now it works!
    Geändert von hatrez123 (02.07.2014 um 09:15 Uhr)

  4. Beiträge anzeigen #64 Zitieren
    Legend of Ahssûn Avatar von TheEternal
    Registriert seit
    Jun 2013
    Ort
    Frankfurt
    Beiträge
    4.540
     
    TheEternal ist offline
    Kleiner, aber hässlicher Bug beim Multibook hier. Wenn man das Buch mit Rechtsklick schließt statt mit Escape, dann spinnt alles rum....

    habe die Funktion angepasst.

    Code:
    func int ZS_MultiPageBooks_Loop() {    // Wichtig, damit eine Taste nicht mehrmals aufgerufen wird
        AI_Wait (self, 0.1);
        
        // Die nächste Seite aufrufen?
        if (UpdatePage == TRUE)
        {
            MEM_CallByString(CurrentBook);
            UpdatePage = FALSE;
        };
        
        // Tasten
        var int LeftKey;  LeftKey  = MEM_KeyState(KEY_LEFTARROW);
        var int RightKey; RightKey = MEM_KeyState(KEY_RIGHTARROW);
        var int EscKey;   EscKey   = MEM_KeyState(KEY_ESCAPE);
        var int MouseRightKey;   MouseRightKey   = MEM_KeyState(MOUSE_BUTTONRIGHT);
        
        // Pfeil-Links gedrückt
        if (LeftKey == KEY_PRESSED) {
            // Ende des Buches noch nicht erreicht
            if (CurrentPage > 0)
            {
                CurrentPage -= 2;
                MEM_InsertKeyEvent (KEY_ESCAPE);
            MEM_InsertKeyEvent (MOUSE_BUTTONRIGHT);
                UpdatePage = TRUE;
                return LOOP_CONTINUE;
            }
            // Ende des Buches erreicht, aber Loop ist eingeschaltet
            else if (CurrentBookLoopable) {
                CurrentPage = CurrentBookMaxPage - (CurrentBookMaxPage%2);
                MEM_InsertKeyEvent (KEY_ESCAPE);
                MEM_InsertKeyEvent (MOUSE_BUTTONRIGHT);
                UpdatePage = TRUE;
                return LOOP_CONTINUE;
            };
        };
        
        // Pfeil-Rechts gedrückt
        if (RightKey == KEY_PRESSED) {
            // Ende des Buches noch nicht erreicht
            if (CurrentPage < CurrentBookMaxPage-2)
            {
                CurrentPage += 2;
                MEM_InsertKeyEvent (KEY_ESCAPE);
                MEM_InsertKeyEvent (MOUSE_BUTTONRIGHT);
                UpdatePage = TRUE;
                return LOOP_CONTINUE;
            }
            // Ende des Buches erreicht, aber Loop ist eingeschaltet
            else if (CurrentBookLoopable) {
                CurrentPage = 0;
                MEM_InsertKeyEvent (KEY_ESCAPE);
                MEM_InsertKeyEvent (MOUSE_BUTTONRIGHT);
                UpdatePage = TRUE;
                return LOOP_CONTINUE;
            };
        };
        
        // Wenn Escape gedrückt, Loop verlassen und Buch schließen
        if (EscKey == KEY_PRESSED || MouseRightKey == KEY_PRESSED)
        {
            return LOOP_END;
        };
    };

    Wer noch Seitenzahlen in dem Multibook haben will, hier sind paar funktionen zum automatischen generieren via nDoc_SetPagenumbers()

    Code:
    func void mDoc_SetPagenumbersLayout(var int DocID){    mDoc_SetMargins (DocID, LEFT_PAGE,  375, 453, 30,  20, 1);    mDoc_SetMargins (DocID, RIGHT_PAGE, 160, 453, 30,  20, 1);};func void mDoc_CreatePageNumbers(var int DocID, var int Pagenumber){    if Pagenumber > 0 {        mDoc_PrintLines (DocID, Pagenumber - 1, IntToString(Pagenumber));         mDoc_CreatePageNumbers(DocID, Pagenumber - 1);    };};func void mDoc_SetPagenumbers(var int DocID, var int Pagenumbers){    mDoc_SetPagenumbersLayout(DocID);        mDoc_CreatePageNumbers(DocID, Pagenumbers);};
    [Bild: LoA_Banner_Skyline2.jpg]
    LoA Website
    Checkout Cloudevo: unlimited Cloud-Drive

    Geändert von TheEternal (07.08.2014 um 13:23 Uhr)

  5. Beiträge anzeigen #65 Zitieren
    Rookie
    Registriert seit
    Jul 2014
    Beiträge
    7
     
    hamsta1 ist offline
    It's again me . I'd like to show permamently stami.... swim bar and I need your help.
    I seen sample code for mana bar:
    MemoryProtectionOverride(7091180, 4);
    MEM_WriteInt(7091180, 227218667);
    but my IDA PRO doesn't find anything at address " 7091180 ".
    And please, don't give me prepared scripts IF IT'S POSSIBLE.

  6. Beiträge anzeigen #66 Zitieren
    now also in your universe  Avatar von Milky-Way
    Registriert seit
    Jun 2007
    Beiträge
    15.191
     
    Milky-Way ist offline
    Does IDA Pro use addresses in that format or do you need to convert it into the hex-system first?

  7. Beiträge anzeigen #67 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist offline
    Zitat Zitat von Milky-Way Beitrag anzeigen
    Does IDA Pro use addresses in that format or do you need to convert it into the hex-system first?
    IDA wants hex addresses, so you'll have to convert it first. The Windows Calculator does that just fine (Hint: It's 6C33EC).

    I don't really remember how I hid the manabar anymore, but I was probably changing some if-clause. You'll have to find the part about the swimbar first, though...

  8. Beiträge anzeigen #68 Zitieren
    Rookie
    Registriert seit
    Jul 2014
    Beiträge
    7
     
    hamsta1 ist offline
    I knew it, that first I must convert it to HEX, but I need same code for swimBar, not manaBar. I want to appear SWIM BAR forever like this MANA BAR.
    These addresses are for manaBar:

    MemoryProtectionOverride(7091180/*0x6C33Ec*/, 4);
    //0x6C33Ec - 7091180
    [Bild: 34y6645.png]
    [Bild: vorgpk.png]

    MEM_WriteInt(7091180, 227218667/*0xD8B14EB*/);
    //0xD8B14EB - 227218667 - that's magic number!
    [Bild: 2w3rnrc.png]
    [Bild: eiwke1.png]
    These addresses don't told me anything interesting...
    Sry, if it's unclearly.
    For exmaple, this address told me, that's oCNpc::EquipItem
    [Bild: 35k4z2g.png]
    Geändert von hamsta1 (01.08.2014 um 14:48 Uhr)

  9. Beiträge anzeigen #69 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist offline
    6C33ECh is somewhere within oGame::Update_Player if I'm not mistaken. The magic number you referenced is simply the new bytecode to change the if-clause (It changes if (spellDrawn) to if (true) iirc). I'm not changing data - I'm changing code. You'll have to know about assembly before you can create your own.

    Use Jump (hotkey G) to jump to the code in question. Obviously this only works if you have analyzed the executable.

  10. Beiträge anzeigen #70 Zitieren
    Rookie
    Registriert seit
    Jul 2014
    Beiträge
    7
     
    hamsta1 ist offline
    [Bild: 2412rdw.jpg]
    Okey, this is boring. Will see results after 3 years...
    Lehona, I've a feeling, that you know everything about gothic and much more!
    Btw. I'd like to get instance of selected item in hero inventory. Any tips?
    Probably it can be used with oCNpc.inventory2_oCItemContainer_selectedItem, but I couldn't receive instance of current selected item

  11. Beiträge anzeigen #71 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist offline
    Well, if oCNpc.inventory2_oCItemContainer_selectedItem is of type oCItem, then just do it like this:

    Code:
    var oCNpc her; var oCItem itm;
    her = Hlp_GetNpc(hero);
    itm = _^(her.inventory2_oCItemContainer_selectedItem);
    var int instance; instance = itm.instance;
    If you want the name (of the instance) as well you'll have to get the symbol:

    Code:
    var zCPar_Symbol symb; symb = _^(MEM_GetSymbolByID(instance));
    Print(symb.name);
    I haven't looked up all the names, so I might be slightly mistaken (it may be zCPar_Symb instead of zCPar_Symbol etc.).

  12. Beiträge anzeigen #72 Zitieren
    Rookie
    Registriert seit
    Jul 2014
    Beiträge
    7
     
    hamsta1 ist offline
    Nope, it doesn't work.
    Btw. can someone give me some tips, how to appear swim bar? I tried a lot of times do it alone, but unfortunately.. failed.
    Geändert von hamsta1 (05.08.2014 um 18:42 Uhr)

  13. Beiträge anzeigen #73 Zitieren
    Moderator Avatar von ukur
    Registriert seit
    Jan 2009
    Ort
    Ukraine
    Beiträge
    281
     
    ukur ist offline
    Please tell, is it possible to paint some text fields to needed color in the instance of the item?

    for example:
    TEXT[2]
    TEXT[3]
    TEXT[4]
    etc.

    INSTANCE ItMw_1h_Bau_Axe (C_Item)
    {
    name = "Sichel";

    mainflag = ITEM_KAT_NF;
    flags = ITEM_AXE;
    material = MAT_METAL;

    value = Value_BauAxe;

    damageTotal = Damage_BauAxe;
    damagetype = DAM_EDGE;
    range = RANGE_BauAxe;

    cond_atr[2] = ATR_STRENGTH;
    cond_value[2] = Condition_BauAxe;
    visual = "Itmw_007_1h_sickle_01.3DS";

    description = name;
    TEXT[2] = NAME_Damage; COUNT[2] = damageTotal;
    TEXT[3] = NAME_Str_needed; COUNT[3] = cond_value[2];
    TEXT[4] = NAME_OneHanded;
    TEXT[5] = NAME_Value; COUNT[5] = value;
    };

  14. Beiträge anzeigen #74 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist offline
    Possible? Sure.

    I have provided code to colour the item name, but not the description/TEXT[]-fields. You'll have to see where those views are created and change them (zCViewText) accordingly...

  15. Beiträge anzeigen #75 Zitieren
    Held Avatar von Ulukai
    Registriert seit
    Feb 2003
    Ort
    Deutschland
    Beiträge
    5.046
     
    Ulukai ist offline
    Hallo,

    Ich würde gerne für das Beispiel Eigene Schadensberechnung wissen, ob das Opfer der aktuelle Held(PC_HERO) ist und ob der Angreifer ein Monster ist und zu einem bestimmten Typ gehört.

    Pseudocode:

    Code:
    if(victim == PC_HERO && attacker == Blutfliege)
    {
       //mach was...
    }
    Wie stell ich das am einfachsten mit Ikarus bzw. LeGo an?

    MfG Ulukai
    "In 20 Jahren wirst Du dich mehr ärgern über die Dinge, die du nicht getan hast, als über die, die du getan hast. Also wirf die Leinen und segle fort aus deinem sicheren Hafen. Fange den Wind in deinen Segeln. Forsche. Träume. Entdecke." (Mark Twain)

  16. Beiträge anzeigen #76 Zitieren
    Abenteurer Avatar von hatrez123
    Registriert seit
    Feb 2014
    Beiträge
    50
     
    hatrez123 ist offline
    Is it possible to change position of Info_Choices?

  17. Beiträge anzeigen #77 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist offline
    Zitat Zitat von hatrez123 Beitrag anzeigen
    Is it possible to change position of Info_Choices?
    As usually, the answer is: Yes, but we don't necessarily know how to, yet. Give us some context (ie what "problem" you're trying to solve) so we can see whether it's actually necessary to change the position

  18. Beiträge anzeigen #78 Zitieren
    Abenteurer Avatar von hatrez123
    Registriert seit
    Feb 2014
    Beiträge
    50
     
    hatrez123 ist offline
    I tried this, but it doesn't work.
    func string i2s(var int i) {
    return IntToString(i);
    };
    func int GetSelection() {
    const int zCViewDialogChoice__GetSelection_G2 = 6878528; //0x68F540
    var int t; t = MEM_InformationMan.dlgChoice;
    CALL_PutRetValTo(_@(ret));
    CALL__thisCall(_@(t), zCViewDialogChoice__GetSelection_G2);

    var int ret;
    return +ret;
    };
    func void myFunc() {
    if (MEM_KeyPressed(KEY_P)) {
    var zCViewText t; t = _^(GetSelection());
    Print(i2s(t.posx));
    };
    };

  19. Beiträge anzeigen #79 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist offline
    This has barely anything to do with what you asked just a post earlier. At least tell us what you're trying to do (and why), instead of just posting random code snippets without any extra information (and no, "doesn't work" does not count!). This is generally helpful if you want help...

  20. Beiträge anzeigen #80 Zitieren
    Abenteurer Avatar von hatrez123
    Registriert seit
    Feb 2014
    Beiträge
    50
     
    hatrez123 ist offline
    Don't yell at me.
    Again once... I want to change standard position of choices which appear at the start of dialog.[Bild: 2hz5kyo.png]
    Just I don't how to do it.
    I didn't come here to get readied scripts ( i don't like easy ways ). I came here to get some help.
    Geändert von hatrez123 (01.09.2014 um 15:06 Uhr)

Seite 4 von 31 « Erste 123456781115 ... Letzte »

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
Impressum | Link Us | intern
World of Gothic © by World of Gothic Team
Gothic, Gothic 2 & Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD Productions AG, all rights reserved worldwide