Forum

> > CS2D > Scripts > how to do what work
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch how to do what work

Keine Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt how to do what work

Kantos
BANNED Off Offline

Zitieren
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
1× editiert, zuletzt 25.12.11 19:29:56
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht