English [REQ]NPC Health Left[tibia]

34 replies
Goto Page
To the start Previous 1 2 Next To the start
24.10.12 07:22:05 pm
Up
Runnin
User
Offline Off
Dear members from us,

I'm being busy with making a nice tibia server.
Iam wondering if anyone has a script for tibia,
that when you shoot a NPC is displays
how much health that monster got left.

Thanks in advance!

PS: I'm searching the whole forum for that kind of script like 2 days already, couldn't find any. I searched even on Turkish and Polish CS2D forums.
»'Molukia' x, *
24.10.12 07:46:56 pm
Up
Yates
Reviewer
Offline Off
IMG:http://i.imgur.com/FqrE1.png

Put this code at the correct place (See image) in monsters.lua file.
Code:
1
msg2(id,"You have dealt "..dmg.." damage, the monster has "..self.health.." health left.")
24.10.12 08:16:31 pm
Up
Runnin
User
Offline Off
user Yates has written:
Put this code at the correct place (See image) in monsters.lua file.
Code:
1
msg2(id,"You have dealt "..dmg.." damage, the monster has "..self.health.." health left.")


Sweet!
Thank you so much
»'Molukia' x, *
25.10.12 06:14:00 pm
Up
-FQ
User
Offline Off
Yates write here all code i dont see yours pic. Thanks.
25.10.12 10:19:52 pm
Up
Runnin
User
Offline Off
user Yates has written:
Put this code at the correct place (See image) in monsters.lua file.
Code:
1
msg2(id,"You have dealt "..dmg.." damage, the monster has "..self.health.." health left.")


Hey man,
I want to display the damage at the top of the screen.
this is the code i tried to make for it:

Code:
1
hudtxt2(id,"Dealt "..dmg.." damage, "..self.health.." health left." 320, 400, 0)


But it isn't working.
Please help me.
Thanks in advance.
»'Molukia' x, *
26.10.12 09:23:52 am
Up
Jynxxx
User
Offline Off
Code:
1
2
hudtxt2(id,41, 'Dealt '..dmg..' damage, '..self.health..' health left.', '255255255', 200,250,0)
hudtxtalphafade(id,41,5000,0)


>Open monsters.lua
>find function Monster:damage(id, dmg, wpntype)
>find the line with self.health = self.health - dmg
>Paste code under it
>???
>Profit
26.10.12 09:51:13 am
Up
-FQ
User
Offline Off
please put here an funcion code
edited 1×, last 26.10.12 10:14:10 am
26.10.12 01:08:10 pm
Up
Jynxxx
User
Offline Off
Click Here Lazy >
26.10.12 01:46:46 pm
Up
Dimas541
User
Offline Off
@Jynxxx Please Give Me Code Un-Equip
IMG:http://i49.tinypic.com/fnn9w.png
IMG:http://i45.tinypic.com/23vf2q.png
file File does not exist (14217) <-- My Tibia Edited file cs2d CarMods (20) <-- My CarMods
26.10.12 02:20:59 pm
Up
Runnin
User
Offline Off
user Jynxxx has written:
Code:
1
2
hudtxt2(id,41, 'Dealt '..dmg..' damage, '..self.health..' health left.', '255255255', 200,250,0)
hudtxtalphafade(id,41,5000,0)


>Open monsters.lua
>find function Monster:damage(id, dmg, wpntype)
>find the line with self.health = self.health - dmg
>Paste code under it
>???
>Profit


Sweet man it's working 100%
Thank you so much!
»'Molukia' x, *
03.01.13 09:28:05 am
Up
connor34
User
Offline Off
Code:
1
2
hudtxt2(id,41, 'Dealt '..dmg..' damage, '..self.health..' health left.', '255255255', 200,250,0)
hudtxtalphafade(id,41,5000,0)


This doesn't work for me It does'nt display at all.
03.01.13 11:38:41 am
Up
NutShell
User
Offline Off
My rpg doest work, im edited the code im add
Code:
1
addtimer(2000)-- has 2 seconds has show in hud
has been work please edit!
No annoying animated sigs please. /DC
03.01.13 12:42:17 pm
Up
Yates
Reviewer
Offline Off
There is no such thing as addtimer. What the fuck.
03.01.13 12:52:04 pm
Up
connor34
User
Offline Off
@user Yates: Yates, when I write this code:

Code:
1
hudtxtalphafade(id,41,5000,0)


Than it doesn't work and the monster doesn't die. Do you know how I can fix it?
03.01.13 12:53:21 pm
Up
Yates
Reviewer
Offline Off
I had that once, there should be an error in the console (Nil value or something). Give it.
03.01.13 01:02:48 pm
Up
connor34
User
Offline Off
The error msg is:

Quote:
LUA ERROR: sys/lua/cs2dtibia/monsters.lua:752: attempt to call global 'hudtxtalphafade' (a nil value)
03.01.13 01:06:04 pm
Up
Yates
Reviewer
Offline Off
What ID does your hudtxt2 have?
03.01.13 01:06:40 pm
Up
connor34
User
Offline Off
@user Yates: The id was 41 but i already had another so i changed it to 44 but i still got the same problem.
edited 1×, last 03.01.13 01:42:26 pm
03.01.13 01:49:09 pm
Up
Infinite Rain
Reviewer
Offline Off
This error mean that this function doesn't exists.
A thousand may fall at your side, ten thousand at your right hand, but it will not come near you. You will only look with your eyes and see the recompense of the wicked. - Psalm 91:7-8 ESV
03.01.13 01:50:10 pm
Up
connor34
User
Offline Off
So.. I am blind?
To the start Previous 1 2 Next To the start