Forum

> > CS2D > Scripts > Tibia: Np'c lvl!
Forums overviewCS2D overview Scripts overviewLog in to reply

English Tibia: Np'c lvl!

5 replies
To the start Previous 1 Next To the start

old Re: Tibia: Np'c lvl!

3RROR
User Off Offline

Quote
Didn't tested. Should work.
Made in 2 minutes:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- Made by Deck3R / RedFrix / Trauma Tizer
NPCs[XNumber].func = function(npc, id, words, state) -- Edit
     if words == "hi" then
          NPCspeak(npc, "Hi there! Wanna ride?")
          PLAYERS[id].tmp.npcstate = {npc, 1}
     elseif contains(words, "bye") then
          NPCspeak(npc, "Goodbye. See you again!")
          PLAYERS[id].tmp.npcstate = nil
	elseif state == 1 then
		if contains(words, "yes") then
			if PLAYERS[id].Level >= 5 then -- Edit
                    parse("setpos " .. id .. " X Y") -- Edit
                    PLAYERS[id].tmp.npcstate = nil
			else
				NPCspeak(npc, "Dude, you must be lvl 5 or higher to go there!")
			end
		elseif contains(words, "no") then
			NPCspeak(npc, "Yeah whatever dude.")
		end
		PLAYERS[id].tmp.npcstate = nil
          end
     end
end
edited 1×, last 13.01.12 11:33:49 pm

old Re: Tibia: Np'c lvl!

Glix
User Off Offline

Quote
user 3RROR has written
Didn't tested. Should work.
Made in 2 minutes:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- Made by Deck3R / RedFrix / Trauma Tizer
NPCs[XNumber].func = function(npc, id, words, state) -- Edit
     if words == "hi" then
          NPCspeak(npc, "Hi there! Wanna ride?")
          PLAYERS[id].tmp.npcstate = {npc, 1}
     elseif contains(words, "bye") then
          NPCspeak(npc, "Goodbye. See you again!")
          PLAYERS[id].tmp.npcstate = nil
	elseif state == 1 then
		if contains(words, "yes") then
			if PLAYERS[id].Level >= 5 then -- Edit
                    parse("setpos " .. id .. " X Y") -- Edit
                    PLAYERS[id].Spawn = {X, Y} -- Edit
                    PLAYERS[id].tmp.npcstate = nil
			else
				NPCspeak(npc, "Dude, you must be lvl 5 or higher to go there!")
			end
		elseif contains(words, "no") then
			NPCspeak(npc, "Yeah whatever dude.")
		end
		PLAYERS[id].tmp.npcstate = nil
          end
     end
end


Trauma u best. Than you very much.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview