9
3

pirateskull.lua 963 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : pirate skull
  3. Script Purpose :
  4. Script Author :
  5. Script Date : 17/05/2020
  6. Script Notes :
  7. --]]
  8. local Guurok = 2530096
  9. function examined(Item, Player)
  10. conversation = CreateConversation()
  11. AddConversationOption(conversation, "Place skull on group", "PlaceSkull")
  12. AddConversationOption(conversation, "exit", "CloseItemConversation")
  13. StartDialogConversation(conversation, 2, Item, Player, "pirate skull test")
  14. end
  15. function PlaceSkull(Item, Player)
  16. zone = GetZone(Player)
  17. Guurok = GetSpawnByLocationID(zone, 433001)
  18. local distancecheck = GetDistance(Guurok, Player)
  19. if distancecheck > 9 then
  20. RemoveItem(Player, 10399)
  21. SendMessage(Player, "the skull is breaking on the ground", "yellow")
  22. CloseItemConversation(Item, Player)
  23. else
  24. SendMessage(Player, "Guurok is close", "yellow")
  25. CloseItemConversation(Item, Player)
  26. RemoveItem(Player, 10399)
  27. end
  28. end