sábado, 4 de julio de 2009

CJIT Tests Scripts / Transformation

;///////////////////////////////////////////////
;// TEST SCRIPT NPC
;// LORENCIA BAR
;// Beta method by [INDIGO©]FeN$x
;//
;///////////////////////////////////////////////


_DEFINE
#Lorencia = 0
#pID = 0
#pMap = 0
#PlayerObj.PlayerID <-> pID
#PlayerObj.PlayerMap <-> pMap

_START
.if pMap == Lorencia
execute Message,pID,'Hello this is a test script and you are in lorencia'
.else
execute Message,pId,'Hello this is a test script and you are not in lorencia'
_END


----------------------------------------------------------------------------------

CJIT process transformation to pure ASM:


local pID:Dword
local pMap:Dword
local Lorencia:Dword

mov Lorencia, 0
mov eax, lpObj
mov edx, [eax]
mov pID, edx
mov ecx, [eax+10Dh] ;10D lpObj pointer to Map player under 0.99.98
mov pMap, ecx
cmp pMap, 0 ;compare with lorencia
jnz ItsOtherMap
push [pID]
push String ;string creation will be created when CJIT read the script with a complex operation
call SendMessage ;a test proc that will send a message to display user on client
IsOtherMap:
push [pID]
push String2 ;string creation will be created when CJIT read the script with a complex operation
call SendMessage ;a test proc that will send a message to display user on client
retn


CJIT transformation process will be very complex so we cant expect much "flexibility" but if you have more ideas about scripting side please tell them.

No hay comentarios:

Publicar un comentario