✅Como poner puerta por vocacion

D

danigym

Invited
Hola, Necesito un script para ponerle a una puerta y que solo la abran los de cierta vocacion ejemplo:

Puerta 1 = Sorcerer
Puerta 2 = Druid
Puerta 3 = Paladin
Puerta 4 = Knight

Uso el globalbr tfs 1.3 con cliente 12.72
Gracias.
 
Solution
G
Hola, creo que este te puede servir;

data/scripts/actions

Code:
local vocationDoors = {
    -- Sorcerer
    [22001] = {
        vocation = VOCATION.ID.SORCERER,
        destination = {x = 1000, y = 1000, z = 7}
    },
    -- Druid
    [22002] = {
        vocation = VOCATION.ID.DRUID,
        destination = {x = 1000, y = 1000, z = 7}
    },
    -- Paladin
    [22003] = {
        vocation = VOCATION.ID.PALADIN,
        destination = {x = 1000, y = 1000, z = 7}
    },
    -- Knight
    [22004] = {
        vocation = VOCATION.ID.KNIGHT,
        destination = {x = 1000, y = 1000, z = 7}
    },
}

local vocationDoor = Action()

function vocationDoor.onUse(player, item, target, position, fromPosition)
    local door = vocationDoors[item.uid]...
Hola, Necesito un script para ponerle a una puerta y que solo la abran los de cierta vocacion ejemplo:

Puerta 1 = Sorcerer
Puerta 2 = Druid
Puerta 3 = Paladin
Puerta 4 = Knight

Uso el globalbr tfs 1.3 con cliente 12.72
Gracias.
Hola

Utilizando el TFS ya genera las actions y estan registradas en el sistema.

Para utilizar el sistema de puertas con vocations, si recuerdo bien:
Crear una puerta e indicar en ActionID:

101 - Puertas para Vocaciones con ID 1 ( sorcerers y master )
102 - ....
103 - ...
104 - Puertas para Knights & Elite Knights

Para niveles, pero sin registrar la vocations, empieza a 1001.
1001 = nivel 1.
1100 = nivel 100.

Para unicamente Skulls, no recuerdo los numeros bien pero existe también
Para personas sin skull era 180 en AID.
 
Hola, creo que este te puede servir;

data/scripts/actions

Code:
local vocationDoors = {
    -- Sorcerer
    [22001] = {
        vocation = VOCATION.ID.SORCERER,
        destination = {x = 1000, y = 1000, z = 7}
    },
    -- Druid
    [22002] = {
        vocation = VOCATION.ID.DRUID,
        destination = {x = 1000, y = 1000, z = 7}
    },
    -- Paladin
    [22003] = {
        vocation = VOCATION.ID.PALADIN,
        destination = {x = 1000, y = 1000, z = 7}
    },
    -- Knight
    [22004] = {
        vocation = VOCATION.ID.KNIGHT,
        destination = {x = 1000, y = 1000, z = 7}
    },
}

local vocationDoor = Action()

function vocationDoor.onUse(player, item, target, position, fromPosition)
    local door = vocationDoors[item.uid]
    --Check Oressa storage before choose vocation
    if player:getStorageValue(Storage.Dawnport.DoorVocation) == door.vocation then
        player:teleportTo(door.destination)
        player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
        player:sendTextMessage(
            MESSAGE_EVENT_ADVANCE,
            "Open the chest and take your gear, young " .. player:getVocation():getName():lower() .. "!"
        )
    elseif player:getStorageValue(Storage.Dawnport.DoorVocation) ~= door.vocation then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The door seems to be sealed against unwanted intruders.")
    end
    return true
end

for index, value in pairs(vocationDoors) do
    vocationDoor:uid(index)
end

vocationDoor:register()
 
Solution

Tibia Server Lists

#1 FEATURED US Ultron OT 1,500 / 5,000Online EXPStages PROTO8.6 ENGINEUltron OT RANK PTS5.9 +100% VOTES0 #2 FEATURED US Nefera 168 / 0Online EXPx1 PROTO15.20 ENGINECrystal Server RANK PTS5.1 +100% VOTES0 #3 FEATURED ES Deixis 1 / 0Online EXPStages PROTO1098 ENGINETFS RANK PTS3.7 +100% VOTES1 #4 FEATURED ES Maeli 10 / 150Online EXPx10 PROTO10.98 ENGINETFS 1.4.2 RANK PTS3.7 +100% VOTES0 #5 MX Marlboro War 31 / 300Online EXP999 PROTO8.6 ENGINETFS 0.3.7 RANK PTS5.5 -33% VOTES0 #6 BR Tibinha YurOts 18 / 150Online EXPStages PROTO7.4 ENGINEYurOTS 1.5 RANK PTS5.2 -14% VOTES0 #7 US Halera 2 / 0Online EXPStages PROTO10.98 ENGINETFS 1.4.2 RANK PTS4.9 -83% VOTES0 #8 BR Exordion Legacy 52 / 2,000Online EXPx2 PROTO7.72 ENGINEExordion RANK PTS4.9 +100% VOTES0 #9 PL Lubelski 5 / 1,000Online EXP200 PROTO7.6 ENGINELubelskiOTS 2.56.0 RANK PTS4.6 -15% VOTES0 #10 DE DBU Online 0 / 400Online EXP11 PROTO8.6 ENGINETFS 1.0 RANK PTS4.3 +100% VOTES0 #11 PL ReWar 0 / 2,000Online EXPcustom PROTO8.6 ENGINEOther RANK PTS4.3 0% VOTES0 #12 PL Velesta 0 / 1,000Offline EXP20 PROTO8.0 ENGINETFS 1.4.2 RANK PTS4.3 -99% VOTES0 #13 ES JustRL FreeTC 1530 23 / 250Online EXPx2 PROTO15.30 ENGINECrystal Server RANK PTS4.3 +100% VOTES0 #14 ES Farlia Global 2026 0 / 333Offline EXPx5 PROTO15.25 ENGINEFarliaServ 1.525 RANK PTS3.9 -22% VOTES0 #15 SE MortalisOT Custom 0 / 500Offline EXP100x -1.2x PROTO10.98 ENGINEMortalisOT V1 RANK PTS3.8 +100% VOTES0 #16 US Rommania 0 / 500Online EXPstages, x10 PROTO7.4 ENGINETFS 0.4 RANK PTS3.6 +100% VOTES0 #17 US BerethaOnline 2 / 2,000Online EXPStages PROTO10.98 ENGINETFS RANK PTS3.5 +100% VOTES0
Top