Forum

> > CS2D > Scripts > Tibia script thread (Post tibia requests here)
Forums overviewCS2D overview Scripts overviewLog in to reply

English Tibia script thread (Post tibia requests here)

347 replies
Page
To the start Previous 1 29 10 1117 18 Next To the start

old Re: Tibia script thread (Post tibia requests here)

ExecL
User Off Offline

Quote
all i dont know is where to put it like i tryed puting it here

Spoiler >


show me like that and with the HUD thing too.
edited 1×, last 10.02.12 10:28:26 pm

old Re: Tibia script thread (Post tibia requests here)

ExecL
User Off Offline

Quote
all i need help with is where to put

1
2
3
4
5
6
7
8
if player(id, 'health') > 0 and PLAYERS[id] and PLAYERS[id].MP > (CONFIG.MAXMP - 5) and PLAYERS[id].MP < (CONFIG.MAXMP) then
PLAYERS[id].tmp.tmana = (CONFIG.MAXMP) - PLAYERS[id].MP
PLAYERS[id].MP = PLAYERS[id].MP + PLAYERS[id].tmp.tmana
updateMP(id)
elseif player(id, 'health') > 0 and PLAYERS[id] and PLAYERS[id].MP < (CONFIG.MAXMP) then
PLAYERS[id].MP = PLAYERS[id].MP + 5
updateMP(id)
end

1
updateMP(id)

1
2
3
4
function updateMP(id)
     hudtxt2(id,21, PLAYERS[id].MP, '255255000', 610,452,1)
     hudtxt2(id,22, "Mana", '255255255', 528,452,1)
end

like what line do i put them on show me hooks.lua so i can see, thanks.

old Re: Tibia script thread (Post tibia requests here)

Infinite Rain
Reviewer Off Offline

Quote
sure.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("join","EXPjoin")
function EXPjoin(id)
	if loadplayer(id) then
		print('-- loaded!')
	else
		print('-- unable to load!')
	end
	PLAYERS[id].tmp = {hp = 100, atk = 1, def = 1, spd = 0, usgn = player(id, "usgn"), equip = {}, exhaust = {}}
	PLAYERS[id].Recipes = {} --> ignore this, it's for my tibia
	for k, v in ipairs(CONFIG.SLOTS) do
		PLAYERS[id].tmp.equip[k] = {}
	end
	PLAYERS[id].name = player(id, "name")
end
PLAYERS[id].tmp = {hp = 100, atk = 1, def = 1, spd = 0, usgn = player(id, "usgn"), equip = {}, exhaust = {}}
You can add here mana or just make:
PLAYERS[id].Mana = 0
PUT IT IN JOIN HOOK!

old Re: Tibia script thread (Post tibia requests here)

4Vendetta
User Off Offline

Quote
Hi, anyone can say me if this math.random[5 colour, same monster] will work?

Spoiler >

old Re: Tibia script thread (Post tibia requests here)

4Vendetta
User Off Offline

Quote
user AbAeterno has written
Not sure, why don't you test it?

BTW, could someone explain how to create a new "hudtxt2"? Thanks in advance!


I not've tested yet because I'm in my uncle house, and here don't have cs2d and've 'download popup blocker' I've have that idea here now!...
----------------------------------------
Just copy all of hudtxt2 and change the name, not?

old Re: Tibia script thread (Post tibia requests here)

KenVo
User Off Offline

Quote
@user AbAeterno: Find updateHUD(id) function in functions.lua and follow the pattern

Example:

1
2
hudtxt2(id, 21, "Attack", '255255255', 250, 410, 0)
	hudtxt2(id, 22, PLAYERS[id].tmp.atk, '255255000', 340, 410, 0)

Notice that each hudtxt has an id and they cant have the same id so make it like 21,22,23,24,... bla bla bla

@user 4Vendetta: I don't think that would work because the table is made when the server starts and it will only choose 1 random number until you restart the server. I'm not sure though.
edited 1×, last 21.02.12 12:59:57 am

old Re: Tibia script thread (Post tibia requests here)

4Vendetta
User Off Offline

Quote
user agash2010 has written
@user 4Vendetta: plz help me on item tibia make what he fire for 1 minute plz like this i try plz help                     addtimer(1000, parse, "effect "fire" " .. id .. ",x,y")

Like one torch who expires and a fireplace?
He @user Infinite Rain: already has done this, he can tell you....

user KenVo has written
I don't think that would work because the table is made when the server starts and it will only choose 1 random number until you restart the server. I'm not sure through.

Do not worry, I was ironic. [/quote]
To the start Previous 1 29 10 1117 18 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview