Additional traps of targets: |
In ASM are realized several additional traps of targets. Practically all them it is possible to replace with lumbersome functions, but made this should be only in such a case if you is not arranged their functionality. Such can be on some shards. But it is better not to be by egoist and to preliminarily discuss with me the possibilities of their modernization.
number asmWaitTragetMapTile(string LogicType, number X, number Y, number Map) If the cell of the map 'Map' in the coordinates of the X, Y belongs to the logical type of 'LogicType' according to the table of map, function will establish the trap of the target of UO.WaitTargetTile('0',STR(X),STR(Y),STR(UO.asmMapGetZ(X,Y))) and 1 will return. Otherwise function will return 0. Function will not work in those places, where the character is located below the level of map and it will always return 0. For example in the mines. This is done for your own safety. number asmWaitTragetStaticTile(string LogicType, number X, number Y, number Map) If on the map of 'Map' in the coordinates of the X, Y there is the static object, which belongs to the logical type of 'LogicType' according to the table of statics, function will establish to it the trap of the target of UO.WaitTargetTile(***) and 1 will return. Otherwise function will return 0. Пример:
sub main()
Var CanMine UO.asmTLMapOpen('TLMapRock.txt'); Load the table of the types of map for the mine UO.asmTLStaticOpen('TLStaticRock.txt'); Load the table of the types of statics for the mine CanMine=UO.asmWaitTargetMapTile('rock',UO.GetX(),UO.GetY(),0); Attempt to establish target on the map If CanMine Then; If it came out UO.UseType('0x0E85'); use a pickaxe Else; If it did not come out CanMine=UO.asmWaitTargetStaticTile('rock',UO.GetX(),UO.GetY(),0); Attempt to establish target to the statics If CanMine Then; If it came out UO.UseType('0x0E85'); use a pickaxe EndIf EndIf end sub |