English Tibia script thread (Post tibia requests here)

347 replies
Goto Page
To the start Previous 1 2 ... 12 13 14 ... 17 18 Next To the start
05.04.13 06:41:48 pm
Up
KenVo
User
Offline Off
Can someone give a new request I'm bored
05.04.13 06:44:53 pm
Up
Conscience
User
Offline Off
@user 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.
Remember to learn to forget. Whiskey shots and cheap cigarettes.
05.04.13 07:15:50 pm
Up
KenVo
User
Offline Off
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.
edited 1×, last 05.04.13 07:57:43 pm
06.04.13 11:30:14 pm
Up
TopNotch
User
Offline Off
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?
06.04.13 11:34:09 pm
Up
KenVo
User
Offline Off
Replace your updateEQ function in functions.lua with this
Spoiler >


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)
06.04.13 11:36:36 pm
Up
Me Gusta
User
Offline Off
Hey, is possible make an type of ammo system per arrow ammo crossbow?
06.04.13 11:42:26 pm
Up
KenVo
User
Offline Off
You mean bow costs 1 arrow everytimes you shoot?
07.04.13 03:19:11 am
Up
Me Gusta
User
Offline Off
Yes, you have the code or script?
07.04.13 03:39:00 am
Up
KenVo
User
Offline Off
I can make it but I don't really want to it's a waste of time
07.04.13 01:20:25 pm
Up
Xirot
Idiot
Offline Off
user KenVo: It will be a good idea , Tibia servers need a good hosts.
07.04.13 05:55:44 pm
Up
Me Gusta
User
Offline Off
is possible make arrow ammom for crossbow see this image
http://postimg.org/image/umhyi3xp9/
09.04.13 12:37:40 pm
Up
-FQ
User
Offline Off
can you show how to make fishing system? I think too much peoples wanna know how to make that.
09.04.13 02:08:32 pm
Up
Conscience
User
Offline Off
@user -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.
Remember to learn to forget. Whiskey shots and cheap cigarettes.
12.04.13 03:11:29 pm
Up
Jarates
User
Offline Off
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
13.04.13 11:34:11 pm
Up
KenVo
User
Offline Off
There might be some bugs so tell me if you find any.

config.lua

Add this code to the CONFIG table
Code:
1
2
--minutes delay until dropped items are automatically remove from the map (except items in houses)
     CLEANITEMSDELAY= 5,


functions.lua

1. Under function updateTileItems(x,y), find local heightoffset. Add this code under it:

Code:
1
2
local heightoffset = (height < MAXHEIGHT and height or MAXHEIGHT)*3
          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
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


hooks.lua
Find function EXPminute(). Add cleanitems() under it.

Code:
1
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
14.04.13 01:15:43 pm
Up
UBMaster
BANNED
Offline Off
@user KenVo:

I have got your mana system but
..not work fishimng system pls help !
14.04.13 05:49:26 pm
Up
SilentDash
User
Offline Off
Can someone fix this Lua Error?
Spoiler >


line 213 >


whole function >


Problem solved
edited 1×, last 15.04.13 03:31:02 pm
16.04.13 12:57:54 pm
Up
Jarates
User
Offline Off
@user KenVo How to add the players name upper?
17.04.13 12:41:36 am
Up
nickitolas
User
Offline Off
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
23.04.13 09:50:41 am
Up
Jarates
User
Offline Off
Please fix this error: LUA ERROR: sys/lua/cs2dtibia/hooks.lua:329: attempt to index field '?' (a nil value)
Spoiler >
Line 329 =
Code:
1
if      PLAYERS[id].tmp.equip[3].monstermessage >= 35 then
To the start Previous 1 2 ... 12 13 14 ... 17 18 Next To the start