Advertisement
Clotic

Eluna Complete all quest in log NON Target

Jun 17th, 2020
1,202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. -- To use do .qc
  2. function UpdateQuest(player)
  3.     local query = WorldDBQuery("SELECT ID FROM quest_template")
  4.     if query then
  5.         repeat
  6.             local row = query:GetRow()
  7.             local Quest = tonumber(row["ID"])
  8.  
  9.             if  player:HasQuest(Quest) then
  10.                 player:CompleteQuest(Quest)
  11.             end
  12.         until not query:NextRow()
  13.     end
  14. end
  15.  
  16. local function QuestAutoComplete(event, player, command)
  17.     if (command == "qc") then
  18.         UpdateQuest(player)
  19.         player:SendBroadcastMessage("Quest Been Completed")
  20.         return false
  21.     end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement