Forum

> > CS2D > Scripts > how to do what work
Forums overviewCS2D overview Scripts overviewLog in to reply

English how to do what work

No replies
To the start Previous 1 Next To the start

old how to do what work

Kantos
BANNED Off Offline

Quote
how make what work menu in npc u can choose class in tibia ?

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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview