Forum

> > CS2D > Scripts > Tibia script thread (Post tibia requests here)
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Tibia script thread (Post tibia requests here)

347 Antworten
Seite
Zum Anfang Vorherige 1 29 10 1117 18 Nächste Zum Anfang

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

ExecL
User Off Offline

Zitieren
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.
1× editiert, zuletzt 10.02.12 22:28:26

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

ExecL
User Off Offline

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

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

Infinite Rain
Reviewer Off Offline

Zitieren
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!

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

4Vendetta
User Off Offline

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

Spoiler >

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

4Vendetta
User Off Offline

Zitieren
user AbAeterno hat geschrieben
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?

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

KenVo
User Off Offline

Zitieren
@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.
1× editiert, zuletzt 21.02.12 00:59:57

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

4Vendetta
User Off Offline

Zitieren
user agash2010 hat geschrieben
@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 hat geschrieben
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]
Zum Anfang Vorherige 1 29 10 1117 18 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht