Tibia script thread (Post tibia requests here)
347 replies Can someone give a new request I'm bored

Cs2d tibia tutorial ================ My new CS2D RPG Project Video
@
KenVo: Is it possible to link two servers together without changing the save function? I don't think two servers can run the same Lua file while it gets updated.
And if it's not possible. Would you be so kind and make it so for me? I would be very grateful.
Thanks in advance.

And if it's not possible. Would you be so kind and make it so for me? I would be very grateful.
Thanks in advance.
Remember to learn to forget. Whiskey shots and cheap cigarettes.
I'm not too sure about that because I've never thought about or tried it. But I think you can link 2 servers saves together and run at the same time, yes. However, the map saves and house saves need to be separated. The only save function we need to change is the player saving function; probably have to save individual players everytime he/she leaves the server.
I'm trying it after I get home from school and don't think it should be hard to make.
P.S. I removed the housing system in my edit because it causes lags and buggy sometimes and added a bank system instead.
I'm trying it after I get home from school and don't think it should be hard to make.
P.S. I removed the housing system in my edit because it causes lags and buggy sometimes and added a bank system instead.
edited 1×, last 05.04.13 07:57:43 pm
Cs2d tibia tutorial ================ My new CS2D RPG Project Video
06.04.13 11:30:14 pm
Hello,
I added a horse with 20 speed.
But when I start the server, and ride that horse. My speed is still 0.
How to fix that?
I added a horse with 20 speed.
But when I start the server, and ride that horse. My speed is still 0.
How to fix that?
Replace your updateEQ function in functions.lua with this
This also fixes hp bug when you equip items (current hp goes back to max hp) and knife bug (you receive a knife when you equip other weapons like crossbow)
This also fixes hp bug when you equip items (current hp goes back to max hp) and knife bug (you receive a knife when you equip other weapons like crossbow)
Cs2d tibia tutorial ================ My new CS2D RPG Project Video
You mean bow costs 1 arrow everytimes you shoot?
Cs2d tibia tutorial ================ My new CS2D RPG Project Video
I can make it but I don't really want to it's a waste of time
Cs2d tibia tutorial ================ My new CS2D RPG Project Video

is possible make arrow ammom for crossbow see this image
http://postimg.org/image/umhyi3xp9/
http://postimg.org/image/umhyi3xp9/
09.04.13 12:37:40 pm
can you show how to make fishing system? I think too much peoples wanna know how to make that.

@
-FQ: The search function brought me here in a couple of seconds: http://unrealsoftware.de/forum_posts.php?post=342036&start=0
Check the first more tag.

Check the first more tag.
Remember to learn to forget. Whiskey shots and cheap cigarettes.
How to make items on the ground dissapear after some minutes/seconds if they are not picked up?
edited 3×, last 12.04.13 04:37:40 pm
There might be some bugs so tell me if you find any.
config.lua
Add this code to the CONFIG table
functions.lua
1. Under function updateTileItems(x,y), find local heightoffset. Add this code under it:
2. Add this function to functions.lua:
hooks.lua
Find function EXPminute(). Add cleanitems() under it.
config.lua
Add this code to the CONFIG table
Code:
1
2
2
--minutes delay until dropped items are automatically remove from the map (except items in houses)
CLEANITEMSDELAY= 5,
CLEANITEMSDELAY= 5,
functions.lua
1. Under function updateTileItems(x,y), find local heightoffset. Add this code under it:
Code:
1
2
2
local heightoffset = (height < MAXHEIGHT and height or MAXHEIGHT)*3
item[4] = CONFIG.CLEANITEMSDELAY --this code
item[4] = CONFIG.CLEANITEMSDELAY --this code
2. Add this function to functions.lua:
Code:
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
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
function cleanitems()
for k,v in pairs (GROUNDITEMS) do
local x,y,height
for a,b in pairs (v) do
for c,d in pairs (b) do
d[4] = d[4] -1
y=k
x=a
height=c
if d[4] <= 0 and not TILEZONE[y][x].HOUSE then
local item = d
if item[1] == 1337 then
if item[2] then freeimage(item[2]) end
GROUNDITEMS[y][x][height] = nil
else
local tile = gettile(x*32, y*32)
if tile.HEAL and ITEMS[item[1]].heal then
tile.HEAL = tile.HEAL - ITEMS[item[1]].heal
if tile.HEAL == 0 then
tile.HEAL = nil
end
end
if item[2] then freeimage(item[2]) end
GROUNDITEMS[y][x][height] = nil
end
end
end
end
end
end
for k,v in pairs (GROUNDITEMS) do
local x,y,height
for a,b in pairs (v) do
for c,d in pairs (b) do
d[4] = d[4] -1
y=k
x=a
height=c
if d[4] <= 0 and not TILEZONE[y][x].HOUSE then
local item = d
if item[1] == 1337 then
if item[2] then freeimage(item[2]) end
GROUNDITEMS[y][x][height] = nil
else
local tile = gettile(x*32, y*32)
if tile.HEAL and ITEMS[item[1]].heal then
tile.HEAL = tile.HEAL - ITEMS[item[1]].heal
if tile.HEAL == 0 then
tile.HEAL = nil
end
end
if item[2] then freeimage(item[2]) end
GROUNDITEMS[y][x][height] = nil
end
end
end
end
end
end
hooks.lua
Find function EXPminute(). Add cleanitems() under it.
Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("minute","EXPminute")
function EXPminute()
cleanitems()
MINUTES = MINUTES+1
if game'sv_password' == '' and MINUTES%5 == 0 then
saveserver()
end
end
function EXPminute()
cleanitems()
MINUTES = MINUTES+1
if game'sv_password' == '' and MINUTES%5 == 0 then
saveserver()
end
end
Cs2d tibia tutorial ================ My new CS2D RPG Project Video
Easy Jarates:
in hooks.lua find:
hudtxt2(id,0,player(id, 'usgn') ~= 0 and PLAYERS[id].name or "NOT LOGGED IN","255100100", 565, 395-CONFIG.PIXELS, 1)
and change the 565, 395-CONFIG.PIXELS for your x,y for name position.
I made a tibia edit with a spell sistem, health bars(represented with 5 hearts/20% each) and other things:
http://www.unrealsoftware.de/files_show.php?file=13477
in hooks.lua find:
hudtxt2(id,0,player(id, 'usgn') ~= 0 and PLAYERS[id].name or "NOT LOGGED IN","255100100", 565, 395-CONFIG.PIXELS, 1)
and change the 565, 395-CONFIG.PIXELS for your x,y for name position.
I made a tibia edit with a spell sistem, health bars(represented with 5 hearts/20% each) and other things:
http://www.unrealsoftware.de/files_show.php?file=13477