kinglewey1st
Hey Jude.
Currently I am trying to make an NPC say a random phrase when you say Hi to him.
But i cannot work it out, could any1 please tell me the error of my ways.
I've got something along the lines of this.. (obviously the rest of the npc is left out, im just looking for how to randomize the command SelfSay)
any help would be appreciated.
But i cannot work it out, could any1 please tell me the error of my ways.
I've got something along the lines of this.. (obviously the rest of the npc is left out, im just looking for how to randomize the command SelfSay)
Code:
local phrases = {"Damn i suck at scripting", "Help!", "SOME1 PLEASE HELP THIS NAP", "WHY NPCS SO HARD?"}
selfSay(cid, phrases[math.random(1, #phrases)])
any help would be appreciated.