ну вот к примеру:
dim ps$(16)
Function CMDparse$(st$)
For i=0 To 16
ps(i)=""
Next
c=1
a=Instr(st$,"(")-1
If a=-1 c=0
For i=a+2 To Len(st)
If Mid(st,i,1)="," Or Mid(st,i,1)=" " Or Mid(st,i,1)=")" Then c=c+1 Else ps(c)=ps(c)+Mid(st,i,1)
Next
If a=-1 Then cmd$=ps(0) Else cmd$=Mid(st,1,a)
Return cmd$
End Function
.RunCommand
cc$=Trim(Lower(CMDparse(cmd)))
;DebugLog "cmd :"+cmd$
;DebugLog "cc :"+cc$
;DebugLog "ps1:"+ps(1)
;DebugLog "ps2:"+ps(2)
;DebugLog "ps3:"+ps(3)
Select cc
Case "clear"
If ps(1)="" Then ps(1)=tx
If ps(2)="" Then ps(2)=tz
If ps(3)="" Then ps(3)=100
Clear(Int(ps(1)),Int(ps(2)),Int(ps(3)))
Case "res.add"
res(myteam,Int(ps(1)))=res(myteam,Int(ps(1)))+Int(ps(2))
Case "res.set"
res(myteam,Int(ps(1)))=Int(ps(2))
Case "world.clear"
;#Region [мешаеццо сцуко]
LockBuffer TextureBuffer(fog_of_war)
For i=1 To 511
For j=1 To 511
WritePixelFast i,j,$01000000,TextureBuffer(fog_of_war)
m(i,j)=1
Next
Next
UnlockBuffer TextureBuffer(fog_of_war)
LockBuffer ImageBuffer(fog_of_war_mini)
For i=1 To 127
For j=1 To 127
WritePixelFast cpx+i,cpz+j,51,ImageBuffer(fog_of_war_mini)
m_mini(i,j)=1
Next
Next
UnlockBuffer ImageBuffer(fog_of_war_mini)
;#End Region
Case "unit.add"
If ps(2)="" Then ps(2)=tx
If ps(3)="" Then ps(3)=tz
If ps(4)="" Then ps(4)=myteam
unit_add(Int(ps(1)),Int(ps(2)),Int(ps(3)),Int(ps(4)))
Case "change.can_unit_add"
can_unit_add=1-can_unit_add
Case "change.dip"
dip(Int(ps(1)),Int(ps(2)))=Int(ps(3))
dip(Int(ps(2)),Int(ps(1)))=Int(ps(3))
End Select
Return
тока набросок. и то исполнимой его части, наверное 1% сделан.
а вообще ИМХО, это система активного управления в игре из-вне (из файла например) где описанны условия и действия которые будут происходить.
насчет условий, мне кажется логичным писать условие и указывать строчку в файле, начианая с которой будет вылоняться "скрипт" файла, до какой-то определенной метки. Есть блокноты, которые показывают номер строчки, или придется самому писать?