Forum

> > CS2D > Scripts > I need help !
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch I need help !

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt I need help !

Egoist
User Off Offline

Zitieren
OK I want to make a npc that makes wizard armor(I added wizard armor)it takes 15000$ and 5 wizard books from you(I added wizard book too)and gives you a wizard armour can you code this ? this is my lua but it is wrong:

Spoiler >
3× editiert, zuletzt 14.04.11 18:42:38

alt Re: I need help !

DannyDeth
User Off Offline

Zitieren
Yay! One more idiot the forgot to close his functions and/or statements/loops with end!

Look, considering you are ( obviously ) not very bright, I will put this simply.
Look at this:
1
2
3
function my_function(argument)
	print(argument)
end
See how the function called 'my_function' has an 'end' to it? It's the same for this:
1
2
3
4
5
function my_function(agrument)
	if argument="print" then
		print(argument)
	end
end
Simple, is it not?

alt Re: I need help !

SDKey
User Off Offline

Zitieren
Hi, TheFire1

With TAB it look so:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- WHERE BEGIN OF CODE?


			NPCs[18].func = function(npc, id, words, state)
				if words == "hi" then
					NPCspeak(npc, "Welcome! Are you want to sail somewhere ?")
					PLAYERS[id].tmp.npcstate = {npc, 1}
				end
			end
		end
	end
elseif state == 1 then
	if words=="no" then
		NPCspeak(npc, "Bye then.")
		PLAYERS[id].tmp.npcstate = {npc, 0}
	elseif words == "yes" then
	

-- WHERE FINISH  OF CODE?

It is your problem!!!

alt Re: I need help !

Egoist
User Off Offline

Zitieren
Can you make a npc for me that makes wizard armor for 15000$ and a wizard book(I added wizard book)
1× editiert, zuletzt 14.04.11 18:43:26
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht