AgentGOD
02-26-2006, 12:20 AM
Command Sender
Written by AgentGOD
Use in Assembly (MASM):
How to call:
invoke CommandSender ;or
call CommandSender
The Data being used:
CommandParams db 1Fh, 6Bh ;Specify parameters here
CMDType db 03h ;Command Type, check the list below
IssueCommand dd 47F1E0h ;FXN for issuing the commands in SC/BW
The Function:
CommandSender proc
;Direct Command Sender
;Example by Agent_GOD
invoke BWTextDisplay, CTEXT ("Commands sent.") ;Display Message
mov ecx, Offset CommandParams ;Move the address of variable to ecx (contains parameters for your commands)
movzx edx, CMDType ;Moves command type into edx
call dword ptr [IssueCommand] ;Issues the command
ret
CommandSender endp
How to tell:
Command Types:
1 - Subunit commands
2 - Burrow, Unburrow, Cloak, Uncloak, Stop
3 - Vision Control, Morph, Create Unit, Cancel Last
5 - Alliance
There are more to list under command types, and same goes for the commands.
Using Commands that specify HOW they are created, and WHAT they create:
00 00
| |
Method (Morph, etc) Unit ID
The commands that take these parameters ONLY take 2 parameters. No more, no less.
Commands that use the first parameter (common ones):
0Dh - Controls vision ;)
0Eh - Controls alliance ;)
15h - Targetted Commands (this doesn't use the standard format)
23h - Morph
14h - Right Click (this doesn't use the standard format)
1Fh - Create Unit (build)
20h - Cancel Last
35h - Building Morph
Second parameter:
2Dh - Burrow
2Ch - Unburrow
21h - Cloak
22h - Uncloak
26h - Siege
25h - Unsiege
1Ah - Stop
Third Parameter:
31h - Cancel Subunit
19h - Cancel Morph
36h - Stim Pack
27h - Build Subunit
Parameter format:
00 00 00 00
| | | |
1 2 3 4
Written by AgentGOD
Use in Assembly (MASM):
How to call:
invoke CommandSender ;or
call CommandSender
The Data being used:
CommandParams db 1Fh, 6Bh ;Specify parameters here
CMDType db 03h ;Command Type, check the list below
IssueCommand dd 47F1E0h ;FXN for issuing the commands in SC/BW
The Function:
CommandSender proc
;Direct Command Sender
;Example by Agent_GOD
invoke BWTextDisplay, CTEXT ("Commands sent.") ;Display Message
mov ecx, Offset CommandParams ;Move the address of variable to ecx (contains parameters for your commands)
movzx edx, CMDType ;Moves command type into edx
call dword ptr [IssueCommand] ;Issues the command
ret
CommandSender endp
How to tell:
Command Types:
1 - Subunit commands
2 - Burrow, Unburrow, Cloak, Uncloak, Stop
3 - Vision Control, Morph, Create Unit, Cancel Last
5 - Alliance
There are more to list under command types, and same goes for the commands.
Using Commands that specify HOW they are created, and WHAT they create:
00 00
| |
Method (Morph, etc) Unit ID
The commands that take these parameters ONLY take 2 parameters. No more, no less.
Commands that use the first parameter (common ones):
0Dh - Controls vision ;)
0Eh - Controls alliance ;)
15h - Targetted Commands (this doesn't use the standard format)
23h - Morph
14h - Right Click (this doesn't use the standard format)
1Fh - Create Unit (build)
20h - Cancel Last
35h - Building Morph
Second parameter:
2Dh - Burrow
2Ch - Unburrow
21h - Cloak
22h - Uncloak
26h - Siege
25h - Unsiege
1Ah - Stop
Third Parameter:
31h - Cancel Subunit
19h - Cancel Morph
36h - Stim Pack
27h - Build Subunit
Parameter format:
00 00 00 00
| | | |
1 2 3 4