peonso

npc long history lib

Nov 17th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. -libs, at npc.lua add
  2. --Summ longshitory
  3.  
  4. function selfStory(msg, player, delay)
  5.     local interval, npc = delay or 5000, getNpcCid()
  6.     local ret = {}
  7.  
  8.     for i, message in pairs(msg) do
  9.         if i == 1 then
  10.             selfSay(message)
  11.         else
  12.             local r = addEvent(selfSay, (i-1)*interval, message)
  13.             table.insert(ret, r)
  14.         end
  15.     end
  16.     return ret
  17. end
Advertisement
Add Comment
Please, Sign In to add comment