Forum

> > CS2D > Scripts > [Lua] Backpack & Zombies
Forums overviewCS2D overview Scripts overviewLog in to reply

English [Lua] Backpack & Zombies

6 replies
To the start Previous 1 Next To the start

old [Lua] Backpack & Zombies

Fehu
User Off Offline

Quote
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.

old Re: [Lua] Backpack & Zombies

Surplus
User Off Offline

Quote
user Fehu has written
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.

old Re: [Lua] Backpack & Zombies

Fehu
User Off Offline

Quote
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
edited 1×, last 04.07.11 08:06:36 pm

old Re: [Lua] Backpack & Zombies

Vectarrio
User Off Offline

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