endNPCs[18].func = function(npc, id, words, state)
if words == "hi" then
NPCspeak(npc, "Welcome! Say 'class' if you want choose class.")
PLAYERS[id].tmp.npcstate = {npc, 1}
elseif contains(words, "bye") then
NPCspeak(npc, "Goodbye.")
PLAYERS[id].tmp.npcstate = nil
elseif state == 1 then
if contains(words, "class") then
NPCspeak(npc, "Greetings, do you wish choose your class?")
PLAYERS[id].tmp.npcstate = {npc, 2}
end
elseif state == 2 then
if contains(words, "yes") then
if menu(id,"Select your Class,Knight|Defence and Attack,Ninja| Speed and Attack,Magician|Magic spell books")then
message(id, "You have choosed your class", "255255255")
NPCspeak(npc, "Have a good day!")
PLAYERS[id].Spawn = {2704, 1040}
PLAYERS[id].tmp.npcstate = nil
else
NPCspeak(npc, "Don't try to enter without paying!")
PLAYERS[id].tmp.npcstate = nil
end
elseif contains(words, "no") then
NPCspeak(npc, "Alright then.")
PLAYERS[id].tmp.npcstate = nil
end
end
end
plz plz help how makemenu classes npc :dd
edited 1×, last 25.12.11 07:29:56 pm