Okay so I got this script from somewhere.It compiled without errors but when I add the script name to a npc it wont come up with anything something about a map id in the script so I thought that it might be it.Thanks for help!
http://pastebin.com/dww8e7Jq
http://pastebin.com/dww8e7Jq