Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. Const
  2. BlankRuneID = 3147 // ID da Blank Rune
  3. Runar = 'adevo grav tera' // Nome do Speel Para Runar
  4. IdRuna = 3180 // Magic Wall "3180" Fire "3188"
  5.  
  6. function GetItemFromOpenBackpack(ID: integer): TItem;
  7. var
  8. y: integer;
  9. begin
  10. Result := nil;
  11. for x := 0 to Self.Containers.Count - 1 do
  12. begin
  13. if x >= Self.Containers.Count then Break;
  14. for y := 0 to Self.Containers.Container[x].Count - 1 do
  15. begin
  16. if y >= Self.Containers.Container[x].Count then Break;
  17. if Self.Containers.Container[x].Item[y].ID = ID then
  18. begin
  19. Result := Self.Containers.Container[x].Item[y];
  20. Exit;
  21. end;
  22. end;
  23. end;
  24. end;
  25.  
  26. begin
  27. while not Terminated do
  28. begin
  29. UpdateWorld;
  30. if (Self.RightHand.ID <> BlankRuneID) or (Self.LeftHand.ID <> BlankRuneID) then
  31. begin
  32. Weapon := GetItemFromOpenBackpack(BlankRuneID);
  33. if Weapon <> nil then
  34. begin
  35. Weapon.MoveToBody(Self.RightHand, 0);
  36. Weapon.MoveToBody(Self.LeftHand, 0);
  37. Sleep(100);
  38. end
  39. end
  40. else
  41. begin
  42. if (Self.RightHand.ID = BlankRuneID) and (Self.LeftHand.ID = BlankRuneID) then
  43. Begin
  44. UpdateWorld;
  45. Self.Say(Runar);
  46. Sleep(1000);
  47. end;
  48. end
  49. if (Self.RightHand.ID = IdRuna) and (Self.LeftHand.ID = IdRuna) then
  50. Begin
  51. Self.RightHand.MoveToContainer(Self.Containers.Container[0], 0, 0);
  52. Self.LeftHand.MoveToContainer(Self.Containers.Container[0], 0, 0);
  53. Sleep(100);
  54. end
  55. Sleep(500);
  56. end;
  57. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement