Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. const
  2. RespondBot : array[1..7] of string = ('wha?','Who?','Nope.','No','What?','No..','lol, no.');
  3.  
  4. var
  5. Obj: Tl2Live;
  6. Index : Integer;
  7.  
  8. Procedure Respond;
  9. begin
  10. while true do begin
  11. Index := 1 + random(7); //used to pick a random response
  12.  
  13. if ChatMessage.Unread and (ChatMessage.Time < 3000) then
  14. begin
  15. if CharList.ByName(ChatMessage.sender, Obj) and not Obj.IsMember then //checks to make sure player not part of party
  16. begin
  17. if Obj.InZone and (ChatMessage.text = 'Hey') then //checks to make sure player is in zone
  18. begin
  19. delay(1500);
  20. print(RespondBot[Index]); //uses the randomly picked number
  21. end;
  22.  
  23. end;
  24. end; delay(100);
  25. end; //end of while
  26. end;
  27.  
  28. begin //start of main body
  29. Script.NewThread(@Respond);
  30. end. //end of main body
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement