Here're some examples for the new commands I've added in 4.85
DisplayHex is just for advanced users, it can be used to check a memory area and see how the area reacts to certain actions you do
Code:
#DO=9999999999; <-- starts infinite loop
_MemPtrReadVar=%PlayerBase,%OffsetData/0x0,BYTE[512],1; <-- read the first 512 bytes and save them in variable 1
_MemPtrReadVar=%PlayerBase,%OffsetData,BYTE[4],2; <-- save address we read from in variable 2 (reversed)
DisplayHex=%Var1,0,0,HexView <-: %Var2; <-- display the information at screen coordinate x:0 y:0
Delay=100;
#UNTIL=1,5; <-- impossible condition, jump back to #DO
SessionPushVar pushes a variable into a global area which can be accessed from all Script Editors, so you can push a variable from Script Editor 1 to Script Editor 2 comes in handy if multiple Clients need to work together
Script 1
Code:
#IF=%FirstTime,;
#SetVar1=Which value should be transfered to the second Script Editor/n/nvalue should be higher than 0;
_SetVar2=0; <-- didn't receive answer yet
#ENDIF
SessionPushVar=1; <-- Shares Variable 1
WaitForResponse=Shared Var1 with the value %Var1 globaly and wait for an answer;
#DO=120000;
Delay=1000;
SessionGetVar=2; <-- Retrieves Variable 2
#UNTIL=%Var2,=1; <-- Checks if Variable 2 is equal 1
_SetVar1=0;
_SetVar2=0;
SessionPushVar=1; <-- Resets Variable 1
SessionPushVar=2; <-- Resets Variable 2
WaitForResponse=Received the answer;
Script 2
Code:
#IF=%FirstTime,;
_SetVar1=0;
#ENDIF
#DO=120000;
Delay=1000;
SessionGetVar=1; <-- Retrieves Variable 1
#UNTIL=%Var1,>0; <-- Checks if %Variable 1 is greater than 0
WaitForResponse=Received %Var1, going to push 1 into Var2 and share it globaly;
_SetVar2=1; <-- Sets Variable 2 to 1
SessionPushVar=2; <-- Shares Variable 2
Note: The Session area can be viewed when you copy this into your file explorer address bar