function CheckDeath(Obj: TL2Live = nil): boolean; // death check for the specified object
begin
if (Obj = nil) then Obj:= User; // if the object is not specified, then by default we use the user
result:= false; // specify result by default
if (Obj.Dead) then begin // if we are dead, then
result:= true; // set the result of the function - true
Engine.Msg('', 'Died, rising...', 128); // print info to logs
Engine.FaceControl(0, false); // turn off the interface
while (User.Dead) and delay(999) do Engine.GoHome; // while we are dead, every 1 second we try to rise
delay(5555); // waiting for additional time to boot (on low-end PCs, increase it)
end;
end;
begin
if CheckDeath() then ...
end.
- Adrenaline
-
Classes
- TL2Control
- TL2Object
- TL2Spawn
- TL2Live
- TL2Char
- TL2User
- TL2Npc
- TL2Pet
- TL2Drop
- TL2Buff
- TL2Skill
- TLearnItem
- TL2Cast
- TL2Item
- TL2AucItem
- TL2List
- TL2StaticObject
- TSpawnList
- TCharList
- TNpcList
- TPetList
- TDropList
- TItemList
- TSkillList
- TBuffList
- TL2Warehouse
- TL2Auction
- TInventory
- TParty
- TConfirmDlg
- TMessages
- TChatMessage
- TBot
- TPaxEngine
- TGps
- TGpsPoint
- TL2Base
- TBaseList
- TBaseObject
- TBaseItem
- TBaseSkill
- TBaseAction
- TBaseNpc
- Enums
- Objects
- Methods
- Units
- NexTarget
- TRadar
- Scripts
- Scripts Examples
- Scripts Catalog
- Order a script
- Useful
- Navigation
- Cabinet
- Bot's site
- Buy Adrenaline
- Instructions
- Game IDs DB
- Tech. support