Forum

> > CS2D > Scripts > [Lua] Backpack & Zombies
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch [Lua] Backpack & Zombies

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt [Lua] Backpack & Zombies

Fehu
User Off Offline

Zitieren
Okay, hi guys, anyone can help me create a backpack menu like weiwen Tibia mod ?

And 2nd Question, how to get npc id's ? Example, i killed zombie, msg "Good", but when i kill headcrap then msg "Bad".

Really thanks guys for help.

alt Re: [Lua] Backpack & Zombies

Surplus
User Off Offline

Zitieren
user Fehu hat geschrieben
but when i kill headcrap then msg "Bad".


Nice headcrap.

you should give a bit more details, would you like the good/bad displayed only to the killer or to everyone.

alt Re: [Lua] Backpack & Zombies

Fehu
User Off Offline

Zitieren
Okay guys next question.
I have virtual dmg ( dmg[id] ), how can i add player more damage, example: Player hit zombie with normal dmg 30, now how to make, this player hit zombie with 30+10 Dmg.

@Back to question 2.
Oh guys, us dont understand me,
I need id to give players exp[id].
Headcrap give us +10, zombies give us +25 etc.

---------------
Anybody know why this don't work ?

1
2
3
4
5
6
addhook("objectkill","lol_expr")
function lol_expr(idd,id)
	if object(idd,"typename")==Zombie then
		msg("lol@C")
	end
end
1× editiert, zuletzt 04.07.11 20:06:36

alt Re: [Lua] Backpack & Zombies

Vectarrio
User Off Offline

Zitieren
user Fehu hat geschrieben
Okay guys next question.
I have virtual dmg ( dmg[id] ), how can i add player more damage, example: Player hit zombie with normal dmg 30, now how to make, this player hit zombie with 30+10 Dmg.

@Back to question 2.
Oh guys, us dont understand me,
I need id to give players exp[id].
Headcrap give us +10, zombies give us +25 etc.

---------------
Anybody know why this don't work ?

1
2
3
4
5
6
addhook("objectkill","lol_expr")
function lol_expr(idd,id)
	if object(idd,"typename")==Zombie then
		msg("lol@C")
	end
end

I said "player" property of object. So:

1
2
3
4
5
6
addhook("objectkill","lol_expr")
function lol_expr(idd,id)
	if object(idd,"player")==1 then
		msg("lol@C")
	end
end
and 1=zombie, 2=headcrab, 3=snark, 4=vortigaunt, 5=soldier
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht