Npc Rashid

Discussion in 'Support' started by xshaggyx, Jan 11, 2017.

  1. xshaggyx

    xshaggyx Member

    Joined:
    Feb 20, 2016
    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    I have a question
    About npc rashid I can not make it change according to the day I can help
     
  2. Xikini

    Xikini Titan Kingdoms

    Joined:
    Nov 17, 2010
    Messages:
    2,997
    Likes Received:
    1,531
    Best Answers:
    32
    It's not pretty, but it's simple and works. 0.3.7 scripting style/code.
    Code (Text):
    1. function onStartUp()
    2.     if os.date('%A') == "Sunday" then
    3.         doCreateNpc("Rashid", {x = 11111, y = 11111, z = 11})
    4.     elseif os.date('%A') == "Monday" then
    5.         doCreateNpc("Rashid", {x = 22222, y = 22222, z = 22})
    6.     elseif os.date('%A') == "Tuesday" then
    7.         doCreateNpc("Rashid", {x = 33333, y = 33333, z = 33})
    8.     elseif os.date('%A') == "Wednesday" then
    9.         doCreateNpc("Rashid", {x = 44444, y = 44444, z = 44})
    10.     elseif os.date('%A') == "Thursday" then
    11.         doCreateNpc("Rashid", {x = 55555, y = 55555, z = 55})
    12.     elseif os.date('%A') == "Friday" then
    13.         doCreateNpc("Rashid", {x = 66666, y = 66666, z = 66})
    14.     elseif os.date('%A') == "Saturday" then
    15.         doCreateNpc("Rashid", {x = 77777, y = 77777, z = 77})
    16.     end
    17.     return true
    18. end
     

Share This Page

Loading...