|
-
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?
-
Zitat von pawbuj
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 von hatrez123
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.
-
Zitat von Lehona
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)
-
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);};
Geändert von TheEternal (07.08.2014 um 13:23 Uhr)
-
Rookie
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.
-
Does IDA Pro use addresses in that format or do you need to convert it into the hex-system first?
-
Zitat von Milky-Way
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...
-
Rookie
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)
-
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.
-
Rookie
-
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.).
-
Rookie
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)
-
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;
};
-
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...
-
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)
-
Is it possible to change position of Info_Choices?
-
Zitat von hatrez123
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
-
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)); }; };
-
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...
-
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)
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
|
|