English Tibia script thread (Post tibia requests here)

347 replies
Goto Page
To the start Previous 1 2 ... 10 11 12 ... 17 18 Next To the start
21.02.12 01:14:31 am
Up
AbAeterno
User
Offline Off
Last question: How do I assign a table like this to the hudtxt?
Code:
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.
21.02.12 01:22:18 am
Up
KenVo
User
Offline Off
Put this in configs.lua:
Code:
1
TABLE = {"table1","table2","etc"}


And this in updateHUD(id) function
Code:
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
26.02.12 03:49:28 am
Up
SeekRin
User
Offline Off
Please Help Me Kenvo Add Attack On My Tibia
[img]img1.uploadhouse.com/fileuploads/15073/15073151f0c3793272f28eb7634bb2ea10d87706.jpg[img]
28.02.12 04:39:05 pm
Up
Black Wolf
User
Offline Off
How do i can make tibia like when you press "f3" opens menu with (Inventory and equipments). Then f2 will be free. Is this possible... if is can you tell how i can do this?
come 1n1 skype
28.02.12 04:42:33 pm
Up
KenVo
User
Offline Off
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
Code:
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.
28.02.12 04:46:20 pm
Up
Black Wolf
User
Offline Off
KenVo i am novice at scripting can you say how? plz
come 1n1 skype
28.02.12 04:48:14 pm
Up
EngiN33R
Moderator
Offline Off
Code:
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
I code, therefore I exist. | Visit my blog for Lua tips and other interesting info
28.02.12 08:01:43 pm
Up
4Vendetta
User
Offline Off
• How I make my tibia auto-saving?
Every minute the server auto-save!
IMG:http://orig12.deviantart.net/d660/f/2015/294/4/a/loki_free_icon_smite_by_cuti_chan-d9dwjst.gif
No one can play Masturball... IMG:http://orig08.deviantart.net/2bdc/f/2015/360/1/f/khepri_free_icon_smite_by_cuti_chan-d9llycr.gif
28.02.12 08:45:31 pm
Up
fishlover101
User
Offline Off
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
IMG:http://img228.imageshack.us/img228/4356/45180.gif
IMG:http://img3.imageshack.us/img3/8939/29153.gif
29.02.12 02:26:03 am
Up
4Vendetta
User
Offline Off
> Why this don't works?
Code:
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:http://wiki.terrariaonline.com/images/7/7b/Green_Slime.png

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

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

gfx/creeping/monsters/slime4.png
IMG:http://wiki.terrariaonline.com/images/c/c5/Lava_Slime.png
IMG:http://orig12.deviantart.net/d660/f/2015/294/4/a/loki_free_icon_smite_by_cuti_chan-d9dwjst.gif
No one can play Masturball... IMG:http://orig08.deviantart.net/2bdc/f/2015/360/1/f/khepri_free_icon_smite_by_cuti_chan-d9llycr.gif
29.02.12 02:31:17 am
Up
Mechanolith
User
Offline Off
Stolen from Terraria, all rights reserved.
http://wiki.terrariaonline.com/Slime
29.02.12 02:36:17 am
Up
4Vendetta
User
Offline Off
I'll not use it -.-
I only wants know why the matchrandon don't works!
IMG:http://orig12.deviantart.net/d660/f/2015/294/4/a/loki_free_icon_smite_by_cuti_chan-d9dwjst.gif
No one can play Masturball... IMG:http://orig08.deviantart.net/2bdc/f/2015/360/1/f/khepri_free_icon_smite_by_cuti_chan-d9llycr.gif
29.02.12 02:44:46 am
Up
KenVo
User
Offline Off
I already tell you, it wouldn't work because it's a table.
29.02.12 02:48:16 am
Up
4Vendetta
User
Offline Off
user KenVo has written:
I already tell you, it wouldn't work because it's a table.


Oh.. yes, i remember, sorry!
IMG:http://orig12.deviantart.net/d660/f/2015/294/4/a/loki_free_icon_smite_by_cuti_chan-d9dwjst.gif
No one can play Masturball... IMG:http://orig08.deviantart.net/2bdc/f/2015/360/1/f/khepri_free_icon_smite_by_cuti_chan-d9llycr.gif
06.03.12 02:25:38 pm
Up
3RROR
User
Offline Off
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?
Code:
1
2
3
4
5
addhook('minute','OhGawdMinuteSave')
function OhGawdMinuteSave()
    saveserver()
 msg('Minute Saving! By OhGawd-Gaming')
end
IMG:http://gamerswins.com/images/ins/logo.png
06.03.12 02:36:24 pm
Up
AbAeterno
User
Offline Off
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?
Code:
1
2
3
4
5
addhook('minute','OhGawdMinuteSave')
function OhGawdMinuteSave()
    saveserver()
 msg('Minute Saving! By OhGawd-Gaming')
end

Check the console.
06.03.12 03:40:00 pm
Up
3RROR
User
Offline Off
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?
Code:
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
IMG:http://gamerswins.com/images/ins/logo.png
07.03.12 03:59:51 pm
Up
Yates
Reviewer
Offline Off
If Tibia has a minute hook already try using the same name. But then don't use a second hook, but I think you get that.
11.03.12 02:31:16 am
Up
KenVo
User
Offline Off
idk if you already solve the problem but I added
Code:
1
2
saveserver()
     msg("Server saved")


to minute hook that is already in hooks.lua and it worked fine.
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
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
03.04.12 03:44:34 pm
Up
Black Wolf
User
Offline Off
Are in tibia possible make items and only usgn listed can use them. I mean make items and only usgn listed can use them?
come 1n1 skype
To the start Previous 1 2 ... 10 11 12 ... 17 18 Next To the start