English Tibia Requests

60 replies
Goto Page
To the start Previous 1 2 3 4 Next To the start
13.01.13 06:50:11 pm
Up
mattasha
User
Offline Off
Yes i want someone like this But
You see ONIX CAVE
FULLMAP...
I want add the Same But i want ADD :
ICECAVE at the Position of the ice monsters Cave But when i wrte the Position of the monster
That's Not Spawn At the correct Place So i hope you will Help me Thanks
14.04.13 04:30:11 pm
Up
UBMaster
BANNED
Offline Off
PLAYERS[id].class = 1
PLAYERS[id].class = 2
PLAYERS[id].class = 3

not working !

PLAYERS[id].class = PLAYERS[id].class + (1, 2, 3)

!
edited 1×, last 15.04.13 02:28:32 pm
27.04.13 02:13:48 pm
Up
eduxd0707
BANNED
Offline Off
Help To fix Class script

ERROR
Code:
1
LUA ERROR: sys/lua/cs2dtibia/hooks.lua:12: attempt to compare number with nil


HOOKS

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
38
39
40
41
42
addhook("menu","C_menu",-1)
function C_menu(id,title,button)
     if title == "Class" then
          if button == 1 then
               if PLAYERS[id].class == 0 then
                    PLAYERS[id].tmp.atk = PLAYERS[id].tmp.atk + 1
                    PLAYERS[id].tmp.def = PLAYERS[id].tmp.def - 7
                    PLAYERS[id].tmp.spd = PLAYERS[id].tmp.spd - 6
                    PLAYERS[id].cAtk2 = PLAYERS[id].cAtk2 + 1
                    PLAYERS[id].cDef2 = PLAYERS[id].cDef2 - 7
                    PLAYERS[id].cSpd2 = PLAYERS[id].cSpd2 - 6
                    PLAYERS[id].class = 1
               else
                    message(id, "You need to reset your class first!")
               end
          elseif button == 2 then
               if PLAYERS[id].class == 0 then
                    PLAYERS[id].tmp.atk = PLAYERS[id].tmp.atk - 0.75
                    PLAYERS[id].tmp.def = PLAYERS[id].tmp.def + 3
                    PLAYERS[id].tmp.spd = PLAYERS[id].tmp.spd - 1
                    PLAYERS[id].cAtk2 = PLAYERS[id].cAtk2 - 0.75
                    PLAYERS[id].cDef2 = PLAYERS[id].cDef2 + 3
                    PLAYERS[id].cSpd2 = PLAYERS[id].cSpd2 - 1
                    PLAYERS[id].class = 2
               else
                    message(id, "You need to reset your class first!")
               end
          elseif button == 3 then
               if PLAYERS[id].class == 0 then
                    PLAYERS[id].tmp.atk = PLAYERS[id].tmp.atk + 0.25
                    PLAYERS[id].tmp.def = PLAYERS[id].tmp.def + 1
                    PLAYERS[id].tmp.spd = PLAYERS[id].tmp.spd + 1
                    PLAYERS[id].cAtk2 = PLAYERS[id].cAtk2 + 0.25
                    PLAYERS[id].cDef2 = PLAYERS[id].cDef2 + 1
                    PLAYERS[id].cSpd2 = PLAYERS[id].cSpd2 + 1
                    PLAYERS[id].class = 3
               else
                    message(id, "You need to reset your class first!")
               end
          end
     end
end


COFING > PLAYERINIT
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
PLAYERINIT = {
          Experience = 0,
          Level = 1,
          Money = 50,
          HP = 100,
          MP = 100,
          cAtk2 = 0,
          cDef2 = 0,
          cSpd = 0,               
          class = 0,    
          FISHLevel = 1,
          FISHExp = 0,
          Inventory = {}, 
          Equipment = {}, 
          Spawn = {784, 240}, 
          Tutorial = {},
          Info = {},


Funcions
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function updateEXTRAS(id)
     hudtxt2(id, 18, PLAYERS[id].FISHLevel, '255255000', 250, 435, 2)
     hudtxt2(id, 19, "Fishing", '255255255', 150, 435, 0)
     if PLAYERS[id].class == 0 then
          hudtxt2(id, 34, "Noobie", '255255000', 378, 421, 2)
          hudtxt2(id, 35, "Class", '255255255', 278, 421, 0)
     elseif PLAYERS[id].class == 1 then
          hudtxt2(id, 34, "Fighter", '255255000', 378, 421, 2)
          hudtxt2(id, 35, "Class", '255255255', 278, 421, 0)
     elseif PLAYERS[id].class == 2 then
          hudtxt2(id, 34, "Defender", '255255000', 378, 421, 2)
          hudtxt2(id, 35, "Class", '255255255', 278, 421, 0)
     elseif PLAYERS[id].class == 3 then
          hudtxt2(id, 34, "Mage", '255255000', 378, 421, 2)
          hudtxt2(id, 35, "Class", '255255255', 278, 421, 0)
     end
end

AND
Code:
1
2
3
4
5
6
7
addhook("ms100","ms100")
function ms100()
     for _,id in ipairs(player(0,"tableliving")) do
          updateHUD(id)
          updateEXTRAS(id)
     end
end


HOOKS
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 = {}}
     for k, v in ipairs(CONFIG.SLOTS) do
          PLAYERS[id].tmp.equip[k] = {}
     end
     if PLAYERS[id].class > 0 then
          PLAYERS[id].tmp.atk = PLAYERS[id].tmp.atk + PLAYERS[id].cAtk2
          PLAYERS[id].tmp.def = PLAYERS[id].tmp.def + PLAYERS[id].cDef2
          PLAYERS[id].tmp.spd = PLAYERS[id].tmp.spd + PLAYERS[id].cSpd2
     end
end


PLSS HELPE ME
24.05.13 08:05:31 pm
Up
Crabby
User
Offline Off
Is it just me or anyone else thinks the same?

The new cs2d update (0.1.2.2) ruined tibia. The bugs are back, you can use knife while wearing another weapon. I tryed to use Kenvo's fixed bug, but none of that worked
24.05.13 08:13:22 pm
Up
UBMaster
BANNED
Offline Off
@user eduxd0707:

line 12: PLAYERS[id].class = PLAYERS[id].class + 1
line 24: PLAYERS[id].class = PLAYERS[id].class + 2
line 36: PLAYERS[id].class = PLAYERS[id].class + 3

you edit and work √ .
24.05.13 08:44:36 pm
Up
Crabby
User
Offline Off
Does anyone get this error?

Code:
1
LUA ERROR: sys/lua/cs2dtibia/functions.lua:353: attempt to index field '?' (a nil value)


The Line of the code is:
Code:
1
return TILEZONE[y][x]
24.05.13 09:08:10 pm
Up
UBMaster
BANNED
Offline Off
i dont know sorry.
01.04.15 08:46:20 am
Up
VerteX
User
Offline Off
Is there a way to disable guns able to shoot through walls?
01.04.15 09:15:40 am
Up
Yates
Reviewer
Offline Off
@user VerteX: Check out KenVo's upload. He fixed some bugs.

Make sure you have the old wrapper.lua
01.04.15 09:29:59 am
Up
VerteX
User
Offline Off
Downloaded it, and can still shoot through walls, I tried changing the weapon range but all it did was decrease the range Dx
01.04.15 09:37:31 am
Up
Yates
Reviewer
Offline Off
Then you're doing something wrong. Here is the code:

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
addhook("attack", "MONSTERattack")
function MONSTERattack(id)
     if gettile(PLAYERS[id].x, PLAYERS[id].y).SAFE or gettile(PLAYERS[id].x, PLAYERS[id].y).NOMONSTERS then
          return
     end
     if inarray({400, 401, 402, 403, 404}, PLAYERS[id].Equipment[7]) then
          msg2(id,"You are not allowed to attack on a horse.")
          return
     end
     local weapon, closest = player(id, 'weapontype')
     for _, m in ipairs(MONSTERS) do
          local x, y = player(id, 'x'), player(id, 'y')
          local dist = math.sqrt((m.x-x)^2+(m.y-y)^2)
          if dist <= (closest and closest[2] or (CONFIG.WEAPONRANGE[weapon] or CONFIG.WEAPONRANGE[50])) then
               local rot = player(id, 'rot')
               if math.abs(math.rad(rot) - math.atan2(y-m.y, x-m.x) + math.pi/2)%(2*math.pi) <= (CONFIG.WEAPONWIDTH[weapon] or CONFIG.WEAPONRANGE[50]) then
                    if free_line(player(id,"x"),player(id,"y"),m.x,m.y) then
                         closest = {m, dist}
                    end
               end
          end
     end
     if closest then
          closest[1]:damage(id, math.ceil(20*((PLAYERS[id].Level+50)*PLAYERS[id].tmp.atk/closest[1].def)/math.random(60, 140)), weapon)
     end
end


Replace your MONSTERattack with this in monsters.lua
01.04.15 10:04:09 am
Up
VerteX
User
Offline Off
Now I can't kill them. I'm using m4a1 btw
01.04.15 10:27:51 am
Up
Yates
Reviewer
Offline Off
Then you probably removed or added something where you shouldn't have. Best for you to download KenVo's script and replace everything and put your item, npc and monster tables back.
01.04.15 11:06:45 am
Up
VerteX
User
Offline Off
I made a new clean cs2d put tibia and KenVo's, but still doesn't work. I've also heard some other users saying that shoot through walls wasn't fixed in KenVo's files at all. Without the code you gave me, I can shoot them through walls but with the code, it makes them go god mode and can't shoot them with/without walls >_<

edit: Here is the error:
Code:
1
LUA ERROR: sys/lua/cs2dtibia/monsters.lua:392: attempt to call global 'free_line' (a nil value)
edited 1×, last 03.04.15 10:20:19 am
03.04.15 12:58:41 pm
Up
Yates
Reviewer
Offline Off
Add this to functions.lua

Code:
1
2
3
4
5
6
7
8
9
10
11
12
function free_line(x1,y1,x2,y2)
    for i=1,distance(x1,y1,x2,y2) do
        if tile(math.floor((x1+i*math.cos(math.atan2(y2-y1,x2-x1)))/32),math.floor((y1+i*math.sin(math.atan2(y2-y1,x2-x1)))/32),"walkable")==false then
            return false
        end
    end
    return true
end

function distance(x1,y1,x2,y2)
    return math.floor(math.sqrt(math.pow(x1-x2,2)+math.pow(y1-y2,2)))
end
03.04.15 03:17:05 pm
Up
VerteX
User
Offline Off
YES IT WORKS, thank you anal bagel yates
03.04.15 03:52:01 pm
Up
Yates
Reviewer
Offline Off
It's Senpai Anal Bagel. Whatever.
24.04.15 08:26:38 am
Up
VerteX
User
Offline Off
Hallo, I'm back again with another request.
Is it possible to make something like a faction/clan/party system wherein you can't kill each other if you are in the same thing. You talk to an npc, you pay some money to create a faction, and it tells you the maximum players you can recruit. It doesn't need to have clan points, honor or something, I just want their faction name they're in to be seen in their HUD and if possible some rank powers.
Thanks!
24.04.15 09:25:23 am
Up
Yates
Reviewer
Offline Off
Yes it's possible.
24.04.15 09:47:49 am
Up
VerteX
User
Offline Off
I only asked if it was possible, my mistake lol.
Can someone do it and post it here?
To the start Previous 1 2 3 4 Next To the start