Current time: 24.10.2017, 09:04 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Исследование героев
» туториал(ы)
Author Message
gamecreator Offline
Administrators

Posts: 7122
Post: #826

(27.03.2017 13:16)Bes Wrote:  вроде бы замена wog'ификацией идёт в теле таймера... не?
Так о том и речь. Если замена в начале игры, то перенести её в !?PI.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
27.03.2017 14:57
Find all posts by this user Quote this message in a reply
igrik Offline
Moderators

Posts: 1164
Post: #827

(27.03.2017 13:16)Bes Wrote:  вроде бы замена wog'ификацией идёт в теле таймера... не?
В том и дело, что все те замены которые идут в теле таймера (только для первого дня) следует перенести в тело !?PI;
И раньше мы получали гарантированный вылет, сейчас - нет.


Скачать HoMM3 ERA 2.461
И пара мелочей для ERA
(This post was last modified: 27.03.2017 16:34 by igrik.)
27.03.2017 16:33
Visit this user's website Find all posts by this user Quote this message in a reply
hippocamus Offline

Posts: 461
Post: #828

Вот всегда инстересовал вопрос - почему многие ресиверы нормально обрабатываются в ?!PI, но не работают в качестве инструкций #! ?
Что вообще допустимо в инструкциях?

(да, у вас переставлены местами символы ? и !. старого ермиста не проведёшь!)


-= подпись Гиппокамуса =-
03.04.2017 05:46
Visit this user's website Find all posts by this user Quote this message in a reply
igrik Offline
Moderators

Posts: 1164
Post: #829

(03.04.2017 05:46)hippocamus Wrote:  Вот всегда инстересовал вопрос - почему многие ресиверы нормально обрабатываются в ?!PI, но не работают в качестве инструкций #! ?
Что вообще допустимо в инструкциях?
Немного странный вопрос если честно. Это же разные участки кода, куда поставлены хуки триггеров и инструкции.
(03.04.2017 05:46)hippocamus Wrote:  (да, у вас переставлены местами символы ? и !. старого ермиста не проведёшь!)
Зачем его пытаться провести, когда он сам это делает с успехом. Либо кто-то уже совсем старый в этом деле, и кое-что успел подзабыть. 96-copy


Скачать HoMM3 ERA 2.461
И пара мелочей для ERA
(This post was last modified: 03.04.2017 11:45 by igrik.)
03.04.2017 11:35
Visit this user's website Find all posts by this user Quote this message in a reply
RoseKavalier Offline

Posts: 15
Post: #830

Hello
Привет!

Sorry for English! I will try to translate with Yandex...
Извините за английский! Я попытаюсь перевести с Яндекс...

Is it possible to link these includes that were previously available here ?
Можно ли связать эти включает в себя, которые ранее были доступны здесь ?

Would be very nice for making plugins)
Было бы очень хорошо для создание плагинов)

Code:
#include "targetver.h"

#include <windows.h>
#include <stdlib.h>
#include <stdio.h>

#include "..\..\include\patcher_x86_commented.hpp"
#include "..\..\include\HotA\HoMM3.h"
#include "..\..\include\era.h"
12.08.2017 05:18
Find all posts by this user Quote this message in a reply
feanor Offline

Posts: 485
Post: #831

17.08.2017 09:59
Find all posts by this user Quote this message in a reply
RoseKavalier Offline

Posts: 15
Post: #832

Thank you)
Спасибо)

By any chance, you wouldn't happen to have an example of creating a custom dialog? I understand how to use 0x4F6C00 but I can't figure how to make one from scratch ..
Вы случайно не пример создания пользовательского диалогового окна? Я понимаю, как использовать 0x4F6C00, но я не могу понять, как сделать один с нуля 105
18.08.2017 00:20
Find all posts by this user Quote this message in a reply
feanor Offline

Posts: 485
Post: #833

No, I haven't.
If I'll need it someday, probably I will use !!DL and ExecErm.
18.08.2017 01:57
Find all posts by this user Quote this message in a reply
igrik Offline
Moderators

Posts: 1164
Post: #834

(18.08.2017 00:20)RoseKavalier Wrote:  By any chance, you wouldn't happen to have an example of creating a custom dialog? I understand how to use 0x4F6C00 but I can't figure how to make one from scratch ..
Уфф!!! И у меня наконец-то что-то начало получаться:
Code:
void AdvMgr_ShowTestDlg(int x, int y)
{
    int cx = 256;    // ширина (width)
    int cy = 106;    // высота (height)
    int zx = 22;    // отступ по x
    int zy = 55;    // отступ по y

    _Dlg_* dlg = _CustomDlg_::Create(-1, -1, cx, cy, DF_SCREENSHOT | DF_SHADOW, NULL);                                // создали диалог
    dlg->AddItemByZOrder(_DlgStdBackground_::Create(0,0,dlg->width,dlg->height, 0, 0, o_GameMgr->GetMeID()), 0);    // рамка в цвете игрока
    // dlg->AddItem(_DlgBlueBackground_::Create(0,0, dlg->width, dlg->height, o_GameMgr->GetMeID()));                // синяя рамка как в HD
    dlg->AddItem(_DlgStaticText_::Create(0, 20, dlg->width, 42, "Вы действительно хотите выйти?", "medfont.fnt", 1, 0, ALIGN_H_CENTER | ALIGN_V_TOP, 0)); // заголовок
        
    // делаем кнопку ок
    dlg->AddItem(_DlgStaticPcx8_::Create(zx, dlg->height -zy, 0, "Box64x30.pcx"));
    dlg->AddItem(_DlgButton_::Create(zx +1, dlg->height -zy +1, 64, 30, 30722, "iOkay.def", 0, 1, 0, 28, 2));
    // dlg->GetItem(30722)->SetEnabled(0); отключенная кнопка ok

    // делаем кнопку отмена
    dlg->AddItem(_DlgStaticPcx8_::Create(dlg->width - zx -64, dlg->height -zy, 0, "Box64x30.pcx"));
    dlg->AddItem(_DlgButton_::Create(dlg->width - zx -64 +1, dlg->height -zy +1, 64, 30, 30721, "iCancel.def", 0, 1, 0, 1, 2));

    dlg->Run();
    dlg->Destroy(TRUE);
}


Скачать HoMM3 ERA 2.461
И пара мелочей для ERA
(This post was last modified: 18.08.2017 16:23 by igrik.)
18.08.2017 15:39
Visit this user's website Find all posts by this user Quote this message in a reply
RoseKavalier Offline

Posts: 15
Post: #835

@feanor
Sadly, cannot use ERM for what I want (SoD).

@igrik
Very nice!
I will try it and see if I can get some more things figured out and share back results)
18.08.2017 17:24
Find all posts by this user Quote this message in a reply
RoseKavalier Offline

Posts: 15
Post: #836

I've not managed to discover much except about this:
   
Right-click window message on item
Code:
_DlgItem_* it;
it = dlg->GetItem(7);
it->full_tip_text = "This is right-click popup message.";

Dialog only open during right-click
Code:
//dlg->Run(); // don't use this
//dlg->Destroy(TRUE); // don't use this
dlg->RMC_Show();

Some work done... not sure if I should make it available to public even with multiplayer checks. I don't mind sharing code, just don't want it to fall in wrong hands, opinions? 105
Youtube movie

Some things I'm interested in (if anyone knows) :
  1. assign a variable/function to a clicked item (not only button, also defs - see 4/5)
  2. read text in the edit dialog
  3. make edit dialog numbers/text only
  4. make the highlighted cadre when clicking an item (like level-up skills)
  5. changing defs (like HWrulez button)

I think some of these may be connected to each other but I could not figure it out so far.

4:
Image: y37dzBk.png
5:
Image: U8Ge7fJ.png

Any help greatly appreciated)
02.09.2017 08:13
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 1795
Post: #837

Can't add a check if game is MP or single, as cheat codes? Then I see no problem with releasing the code, btw great job132


All my WoG scenarios
02.09.2017 14:18
Find all posts by this user Quote this message in a reply
igrik Offline
Moderators

Posts: 1164
Post: #838

Code:
1. int __stdcall Y_HeroLvlUp_3x_Proc(HiHook* hook, _Struct_* dlg, _EventMsg_* msg)
{
    if (msg->type == MT_MOUSEBUTTON)
    {
        if (msg->subtype == MST_LBUTTONCLICK)
        {
            if (msg->item_id == 7012)
            {    
                dlg->GetItem(2012)->SendCommand(6, 4); dlg->GetItem(2012)->Draw();
                dlg->GetItem(2013)->SendCommand(6, 4); dlg->GetItem(2013)->Draw();
                dlg->GetItem(7013)->SendCommand(5, 4); dlg->GetItem(7013)->Draw();
                dlg->GetItem(30722)->SetEnabled(1);
                dlg->Redraw(TRUE);                
            }
    return CALL_2(int, __thiscall, hook->GetDefaultFunc(), dlg, msg);
}

2, 3.     sprintf(o_TextBuffer, "%s либо %s %s.", ((_DlgStaticText_*)dlg->GetItem(2005))->text, *(int*)((*(int*)((*(int*)0x6A7F68) +32)) + 4*hero->second_skill[SSkill]), *(int*)(*(int*)0x67DCF0 + SSkill*16) );
    ((_DlgStaticText_*)dlg->GetItem(2005))->SetText(o_TextBuffer);

4.     dlg->AddItem(CALL_8 (_DlgItem_*, __thiscall, 0x44FE00, o_New(56), 257, 325, 46, 46, 7013, *(int*)(*(int*)0x6AAD18 + 118), 1024));
    dlg->GetItem(7013)->SendCommand(5, 4);

5. ((_DlgStaticDef_*)dlg->GetItem(7012))->def_frame_index = your_number;

Image: YK78FzIHOww.jpg


Скачать HoMM3 ERA 2.461
И пара мелочей для ERA
(This post was last modified: 02.09.2017 14:40 by igrik.)
02.09.2017 14:28
Visit this user's website Find all posts by this user Quote this message in a reply
RoseKavalier Offline

Posts: 15
Post: #839

(02.09.2017 14:18)Valery Wrote:  Can't add a check if game is MP or single, as cheat codes? Then I see no problem with releasing the code, btw great job132
Merci, I think the inspiration should look familiar to you!
Of course, almost all my code has no-multiplayer check, but anyone with a little knowledge and bad intentions could circumvent it - hence my hesitation.

(02.09.2017 14:28)igrik Wrote:  

Fantastic, it seems you've figured most of it already) 96 132

Another question: how about "mouse-over text"?
Code:
dlg->AddItemByZOrder(_DlgStdBackground_::Create(x, y, w, h, id, bottom_bar=TRUE, player_id), 0);
[...]
dlg->GetItem(some_id)->short_tip_text = "Text to show in bottom bar."

//guess you need text in bottom bar
dlg->AddItem(_DlgStaticText_::Create(x, y, w, h, ?messageText?, font, color, id, ALIGN_H_CENTER | ALIGN_V_TOP, bkcolor));

Image: mG2HQae.png
02.09.2017 19:17
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 1795
Post: #840

(02.09.2017 19:17)RoseKavalier Wrote:     but anyone with a little knowledge and bad intentions could circumvent it - hence my hesitation.

If a player is motivated enough to change your code in order to cheat, it already means he can already cheat by using other obvious tools, as playing the autosaves on another device and find how split works anyway.


All my WoG scenarios
02.09.2017 20:20
Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Forum Jump:

Powered by MyBB Copyright © 2002-2017 MyBB Group