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 210 11 1217 18 Next To the start

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

AbAeterno
User Off Offline

Quote
Last question: How do I assign a table like this to the hudtxt?
1
2
3
4
5
6
TABLENAME = {
[1] = "TEXT", 
[2] = "TEXT", 
[3] = "TEXT", 
etc..
},
The hudtxt should show the STRING.
Thanks very much! I'm sorry if i'm disturbing.

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

KenVo
User Off Offline

Quote
Put this in configs.lua:
1
TABLE = {"table1","table2","etc"}

And this in updateHUD(id) function
1
2
3
for t,m in ipairs(CONFIG.STATSMENU) do
		hudtxt2(id, #CONFIG.TABLE+t+10, m, '255255255', 380, 410+(t-1)*CONFIG.PIXELS, 0)
	end

old Help

SeekRin
User Off Offline

Quote
Please Help Me Kenvo Add Attack On My Tibia

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

KenVo
User Off Offline

Quote
First off, make a general menu to store 'Inventory' and 'Equipment' button (so you can click on them and access inventory and equipment menu). Then in the menu hook, make an if then statement like
1
2
3
4
5
6
7
if title ==  "General menu" then
    if button == 1 then
        inventory(id)
    elseif button == 2 then
        equipment(id)
    end
end

Then in serveraction hook, put generalmenu(id) in action 2(f3) so everytime a player press f3 general menu appears.

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

EngiN33R
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
addhook("serveraction","svact")
function svact(id,a)
	if (a==2) then
		menu(id,"General Menu,Inventory,Equipment")
	end
end

addhook("menu","menus")
function menus(id,menu,sel)
	if (menu=="General Menu") then
		if (sel==1) then
			inventory(id) --function doesn't exist btw, make your own one
		end
		if (sel==2) then
			equipment(id) --neither does this one
		end
	end
end

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

fishlover101
User Off Offline

Quote
Hi!
How I shall prepare a system like that with what it is possible to make a choice that you may be a magus, a fighter, an archer ?
And to these how I shall prepare it how separately let them have abilities?
Ahead thank you for the answer!
-Snakel

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

4Vendetta
User Off Offline

Quote
> Why this don't works?
1
2
3
4
5
6
7
8
9
{
		name = 'Slime', health = 100, image('gfx/creeping/monsters/slime'..math.random(1, 4)..'.png', scalex = 1, scaley = 1, r = 136, g = 224, b = 32, 
		atk = 0.3, def = 0.6, spd = 4, atkspd = 12, x = 0, y = 0, ang = 0, imgang = 0, runat = 10, 
		spawnchance = {['rpg_mapb'] = {100}}, 
		spawn = {
			['rpg_mapb'] = {SPAWNS.ALLWORLD}
		}, 
		exp = 3, money = 6, loot = {{chance = 300, id = 824}, {chance = 250, id = 825}}, 
	},

• GFX's
gfx/creeping/monsters/slime1.png
IMG:https://wiki.terrariaonline.com/images/7/7b/Green_Slime.png

gfx/creeping/monsters/slime2.png
IMG:https://wiki.terrariaonline.com/images/8/87/Red_Slime.png

gfx/creeping/monsters/slime3.png
IMG:https://wiki.terrariaonline.com/images/a/a1/Dungeon_Slime.png

gfx/creeping/monsters/slime4.png
IMG:https://wiki.terrariaonline.com/images/c/c5/Lava_Slime.png

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

3RROR
User Off Offline

Quote
I made my own minute auto-saving but it's not working, because when you put the script and you open a server, the whole server goes blue. Where's the problem?
1
2
3
4
5
addhook('minute','OhGawdMinuteSave')
function OhGawdMinuteSave()
    saveserver()
 msg('Minute Saving! By OhGawd-Gaming')
end

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

AbAeterno
User Off Offline

Quote
user 3RROR has written
I made my own minute auto-saving but it's not working, because when you put the script and you open a server, the whole server goes blue. Where's the problem?
1
2
3
4
5
addhook('minute','OhGawdMinuteSave')
function OhGawdMinuteSave()
    saveserver()
 msg('Minute Saving! By OhGawd-Gaming')
end

Check the console.

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

3RROR
User Off Offline

Quote
user AbAeterno has written
user 3RROR has written
I made my own minute auto-saving but it's not working, because when you put the script and you open a server, the whole server goes blue. Where's the problem?
1
2
3
4
5
addhook('minute','OhGawdMinuteSave')
function OhGawdMinuteSave()
    saveserver()
 msg('Minute Saving! By OhGawd-Gaming')
end

Check the console.

Can't find any error on the console. Just a blue screen on it.
edited 1×, last 07.03.12 03:54:31 pm

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

KenVo
User Off Offline

Quote
idk if you already solve the problem but I added
1
2
saveserver()
	msg("Server saved")

to minute hook that is already in hooks.lua and it worked fine.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
addhook("minute","EXPminute")
function EXPminute()
	MINUTES = MINUTES+1
	for i, v in ipairs(HOUSES) do
		if v.owner then
			local difftime = os.difftime(v.endtime, os.time())
			if difftime <= 0 then
				local online
				for _, id in ipairs(player(0, 'table')) do
					if player(id, 'usgn') == v.owner then
						online = id
						break
					end
				end
				if not online then
					table.insert(PLAYERCACHE[v.owner].Info, "Your house has expired. All items will be sent to your inventory.")
				else
					message(online, "Your house has expired. All items will be sent to your inventory.")
					updateHUD(online)
				end
				houseexpire(i)
			elseif difftime < 300 then
				for _, id in ipairs(player(0, 'table')) do
					if player(id, 'usgn') == v.owner then
						message(id, "Your house will expire in " .. difftime .. " seconds.")
						break
					end
				end
			end
		end
	end
	if game'sv_password' == '' and MINUTES%5 == 0 then
		saveserver()
	end
	saveserver()
	msg("Server saved")
end
To the start Previous 1 210 11 1217 18 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview