Thread: JJM-Script
View Single Post
Sfaizst

JCF Member

Joined: Mar 2008

Posts: 99

Sfaizst is an asset to this forum

Jan 23, 2011, 09:21 AM
Sfaizst is offline
Reply With Quote
Hey, sorry for the doublepost, but i want to say a lot new related to the script:

I finished today the support for arrays (they are working generally at all functions only at "for" as parameters not), added the new functions "Valloc" (VirtualAllocEx), "CRT" (CreateRemoteThread) and "VFree" (VirtualFreeEx) to the script, so that you can call functions in the game.

And I edited the Compiler itself a bit, so that it's easyer to debug it if you made a mistake

Here a example script for sending a echo with CRT:
Quote:
var
//General Variables
VFalse : Boolean = false
StartLevel : Boolean = True

//Send Echo with CRT:
EchoStr, EmptyStr : String
EchoPtr : Integer=$483060
EchoStrSize : Integer = 68
THandle, ParamP : Integer
begin

//On Level Start;
If (StartLevel <> VFalse)
EchoStr :=I wanted to say hello man!
StartLevel := VFalse
end

//Send Echo with CRT:
If (EchoStr <> EmptyStr)
Valloc(ParamP,EchoStrSize)
jjwrite(ParamP,EchoStr)
CRT(THandle,EchoPtr,ParamP)
VFree(THandle,ParamP)
EchoStr:= EmptyStr
end
end.
I know there is jjecho() for sending an echo, but this is only a example to show how CRT is working...

Here alittle Picture about the Compiler and it's new little helper:


Now I try to fix the bugs you guys said in the other tread and then i will release the new version (normally take about 3 or 4 days, I'm not all the time there, i have to work sometimes )