aWineRack.lua 743 B

12345678910111213141516171819202122
  1. --[[
  2. Script Name : SpawnScripts/Nektropos1/aWineRack.lua
  3. Script Author : smash
  4. Script Date : 2016.09.11 04:09:21
  5. Script Purpose :
  6. :
  7. --]]
  8. function casted_on(NPC, Spawn, Message)
  9. SpawnSet(NPC, "show_command_icon", "0")
  10. SpawnSet(NPC, "display_hand_icon", "0")
  11. --Random result
  12. local result = math.random(1,5)
  13. if result == 1 then
  14. --20% chance to spawn a fermented elixir
  15. SendMessage(Spawn, "During your search you knock a bottle off the shelf and a strange liquid begins to stream out of it.")
  16. SpawnMob(GetZone(NPC), 1780446, 0, GetX(Spawn), GetY(Spawn), GetZ(Spawn))
  17. else
  18. SendMessage(Spawn, "You search through the racks but fail to find anything of use.")
  19. end
  20. end