Support ✅ Detalles que no puedo corregir en "firstitems.lua"

kurinino

Member
Messages
66
Points
168
Hola buenas Alex, bro no se porque a todos los personajes, le agrega una mochila con 3 Gold Coins dentro, quisiera saber como quitarla por favor, ya que esa backpack y esos 3 Gold Coins creo no aparecen dentro del "firstitems.lua". (Todo lo demás me funciona perfecto, los items según cada vocación).

Te adjunto foto sobre lo que quiero quitar y el código. Muchas gracias de antemano 😁.
JavaScript:
local creatureevent = CreatureEvent("FirstItems")
local config = {
    [1] = { -- Sorcerer
        items = {
            {2175, 1}, -- spellbook
            {2190, 1}, -- wand of vortex
            {8819, 1}, -- magician's robe
            {8820, 1}, -- mage hat
            {2468, 1}, -- studded legs
            {2643, 1}, -- leather boots
            {2661, 1}  -- scarf
        },
        container = {
            {2120, 1}, -- rope
            {2554, 1}, -- shovel
            {7620, 10}  -- mana potion
        }
    },
    [2] = { -- Druid
        items = {
            {2175, 1}, -- spellbook
            {2182, 1}, -- snakebite rod
            {8819, 1}, -- magician's robe
            {8820, 1}, -- mage hat
            {2468, 1}, -- studded legs
            {2643, 1}, -- leather boots
            {2661, 1}  -- scarf
        },
        container = {
            {2120, 1}, -- rope
            {2554, 1}, -- shovel
            {7620, 10}  -- mana potion
        }
    },
    [3] = { -- Paladin
        items = {
            {2525, 1}, -- dwarven shield
            {2389, 5}, -- 5 spears
            {2660, 1}, -- ranger's cloak
            {8923, 1}, -- ranger legs
            {2643, 1}, -- leather boots
            {2661, 1}, -- scarf
            {2480, 1}  -- legion helmet
        },
        container = {
            {2120, 1},  -- rope
            {2554, 1},  -- shovel
            {7618, 5},  -- health potion
            {7620, 5},  -- mana potion
            {2456, 1},  -- bow
            {2544, 50}  -- 50 arrows
        }
    },
    [4] = { -- Knight
        items = {
            {2525, 1}, -- dwarven shield
            {8601, 1}, -- steel axe
            {2465, 1}, -- brass armor
            {2460, 1}, -- brass helmet
            {2478, 1}, -- brass legs
            {2643, 1}, -- leather boots
            {2661, 1}  -- scarf
        },
        container = {
            {8602, 1}, -- jagged sword
            {2439, 1}, -- daramanian mace
            {2120, 1}, -- rope
            {2554, 1}, -- shovel
            {7618, 10}  -- health potion
        }
    }
}
function creatureevent.onLogin(player)
    local targetVocation = config[player:getVocation():getId()]
    if not targetVocation then
        return true
    end
    if player:getLastLoginSaved() ~= 0 then
        return true
    end
    for i = 1, #targetVocation.items do
        player:addItem(targetVocation.items[I][1], targetVocation.items[I][2])
    end
    local backpack = player:addItem(1988) -- backpack
    if not backpack then
        return true
    end
    for i = 1, #targetVocation.container do
        backpack:addItem(targetVocation.container[I][1], targetVocation.container[I][2])
    end
    return true
end
creatureevent:register()
 

Attachments

  • bpy3GP.png
    bpy3GP.png
    1.1 MB · Views: 5
Solution
Hola buenas Alex, bro no se porque a todos los personajes, le agrega una mochila con 3 Gold Coins dentro, quisiera saber como quitarla por favor, ya que esa backpack y esos 3 Gold Coins creo no aparecen dentro del "firstitems.lua". (Todo lo demás me funciona perfecto, los items según cada vocación).

Te adjunto foto sobre lo que quiero quitar y el código. Muchas gracias de antemano 😁.

local creatureevent = CreatureEvent("FirstItems")
local config = {
[1] = { -- Sorcerer
items = {
{2175, 1}, -- spellbook
{2190, 1}, -- wand of vortex
{8819, 1}, -- magician's robe
{8820, 1}, -- mage hat
{2468, 1}, -- studded legs
{2643, 1}, -- leather boots...
Hola buenas Alex, bro no se porque a todos los personajes, le agrega una mochila con 3 Gold Coins dentro, quisiera saber como quitarla por favor, ya que esa backpack y esos 3 Gold Coins creo no aparecen dentro del "firstitems.lua". (Todo lo demás me funciona perfecto, los items según cada vocación).

Te adjunto foto sobre lo que quiero quitar y el código. Muchas gracias de antemano 😁.

local creatureevent = CreatureEvent("FirstItems")
local config = {
[1] = { -- Sorcerer
items = {
{2175, 1}, -- spellbook
{2190, 1}, -- wand of vortex
{8819, 1}, -- magician's robe
{8820, 1}, -- mage hat
{2468, 1}, -- studded legs
{2643, 1}, -- leather boots
{2661, 1} -- scarf
},
container = {
{2120, 1}, -- rope
{2554, 1}, -- shovel
{7620, 10} -- mana potion
}
},
[2] = { -- Druid
items = {
{2175, 1}, -- spellbook
{2182, 1}, -- snakebite rod
{8819, 1}, -- magician's robe
{8820, 1}, -- mage hat
{2468, 1}, -- studded legs
{2643, 1}, -- leather boots
{2661, 1} -- scarf
},
container = {
{2120, 1}, -- rope
{2554, 1}, -- shovel
{7620, 10} -- mana potion
}
},
[3] = { -- Paladin
items = {
{2525, 1}, -- dwarven shield
{2389, 5}, -- 5 spears
{2660, 1}, -- ranger's cloak
{8923, 1}, -- ranger legs
{2643, 1}, -- leather boots
{2661, 1}, -- scarf
{2480, 1} -- legion helmet
},
container = {
{2120, 1}, -- rope
{2554, 1}, -- shovel
{7618, 5}, -- health potion
{7620, 5}, -- mana potion
{2456, 1}, -- bow
{2544, 50} -- 50 arrows
}
},
[4] = { -- Knight
items = {
{2525, 1}, -- dwarven shield
{8601, 1}, -- steel axe
{2465, 1}, -- brass armor
{2460, 1}, -- brass helmet
{2478, 1}, -- brass legs
{2643, 1}, -- leather boots
{2661, 1} -- scarf
},
container = {
{8602, 1}, -- jagged sword
{2439, 1}, -- daramanian mace
{2120, 1}, -- rope
{2554, 1}, -- shovel
{7618, 10} -- health potion
}
}
}
function creatureevent.onLogin(player)
local targetVocation = config[player:getVocation():getId()]
if not targetVocation then
return true
end
if player:getLastLoginSaved() ~= 0 then
return true
end
for i = 1, #targetVocation.items do
player:addItem(targetVocation.items[1], targetVocation.items[2])
end
local backpack = player:addItem(1988) -- backpack
if not backpack then
return true
end
for i = 1, #targetVocation.container do
backpack:addItem(targetVocation.container[1], targetVocation.container[2])
end
return true
end
creatureevent:register()
Hola

Los 3 gold coins si te lo concedo es complicado encontrarlo , se encuentra en el data/scripts/creaturescripts/objets/login.lua , al principio encima de las quests liberadas hay un código que dice que si el player nunca se ha conectado entonces abrir la ventana ourdit agregar una bp y 3 gold coins si no encuentras abre el archivo ctrl +f y busca por la id del gold coin y lo veras ese famoso 3.
 
Solution
Hola

Los 3 gold coins si te lo concedo es complicado encontrarlo , se encuentra en el data/scripts/creaturescripts/objets/login.lua , al principio encima de las quests liberadas hay un código que dice que si el player nunca se ha conectado entonces abrir la ventana ourdit agregar una bp y 3 gold coins si no encuentras abre el archivo ctrl +f y busca por la id del gold coin y lo veras ese famoso 3.
Buena Alex, logré sacarlo y quedó justo con lo que yo quería, muchas gracias crack 😁👍
 

Attachments

  • personajeNuevo.jpg
    personajeNuevo.jpg
    233.7 KB · Views: 4

Tibia Server Lists

#1 FEATURED US Ultron OT 1,277 / 5,000 EXPStages PROTO8.6 ENGINEUltron OT RANK PTS6.6 -9% VOTES0 #2 FEATURED US Nefera 217 / 0 EXPx1 PROTO15.20 ENGINECrystal Server RANK PTS5.9 +24% VOTES0 #3 FEATURED CL ZHYRAVEX 15 / 500 EXPx5 PROTO10.98 ENGINETFS 1.4.2 RANK PTS4.8 +100% VOTES0 #4 FEATURED ES Deixis 0 / 0 EXPStages PROTO1098 ENGINETFS RANK PTS4.0 -60% VOTES1 #5 DE DBU Online 73 / 400 EXP11 PROTO8.6 ENGINETFS 1.0 RANK PTS6.1 +1,000% VOTES0 #6 BR Exordion Legacy 57 / 2,000 EXPx2 PROTO7.72 ENGINEExordion RANK PTS5.7 +1% VOTES0 #7 MX Marlboro War 38 / 300 EXP999 PROTO8.6 ENGINETFS 0.3.7 RANK PTS5.5 -27% VOTES0 #8 BR Tibinha YurOts 32 / 150 EXPStages PROTO7.4 ENGINEYurOTS 1.5 RANK PTS5.5 +5% VOTES0 #9 US Wiki Ots 53 / 1,000 EXPx9999 PROTOcustom client ENGINETFS 1.4.2 RANK PTS5.1 +100% VOTES0 #10 ES JustRL FreeTC 1530 14 / 250 EXPx2 PROTO15.30 ENGINECrystal Server RANK PTS5.0 +15% VOTES0 #11 PL Lubelski 2 / 1,000 EXP200 PROTO7.6 ENGINELubelskiOTS 2.56.0 RANK PTS4.9 -17% VOTES0 #12 PL ReWar 0 / 2,000 EXPcustom PROTO8.6 ENGINEOther RANK PTS4.6 +100% VOTES0 #13 US Halera 0 / 0 EXPStages PROTO10.98 ENGINETFS 1.4.2 RANK PTS4.4 -82% VOTES0 #14 PL Velesta 0 / 1,000 EXP20 PROTO8.0 ENGINETFS 1.4.2 RANK PTS4.4 -100% VOTES0 #15 BR Turion Server 0 / 2,000 EXPx1 PROTO7.4 ENGINETurion 7.7 Project RANK PTS4.3 +155% VOTES0 #16 US BerethaOnline 0 / 2,000 EXPStages PROTO15.0 ENGINETFS RANK PTS4.3 -71% VOTES0 #17 ES Farlia Global 2026 0 / 333 EXPx5 PROTO15.25 ENGINEFarliaServ 1.525 RANK PTS4.0 -100% VOTES0 #18 SE MortalisOT Custom 0 / 500 EXP100x -1.2x PROTO10.98 ENGINEMortalisOT V1 RANK PTS4.0 -100% VOTES0 #19 RU Oldavia | 8.60 0 / 0 EXPx9999 PROTO8.6 ENGINETFS 1.3 RANK PTS3.9 +100% VOTES0 #20 BR Rethoria OpenToday 7.4 Custom 7 / 0 EXPx10 PROTO10.98 ENGINEOther RANK PTS3.8 +100% VOTES0 #21 US Rommania 0 / 3,000 EXPstages, x10 PROTO7.4 ENGINETFS 0.4 RANK PTS3.7 -88% VOTES0 #22 MX Maeli 0 / 150 EXPx10 PROTO10.98 ENGINETFS 1.4.2 RANK PTS3.5 -36% VOTES0 #23 ES DarkDragon EXPx10 PROTO8.6 ENGINECanary RANK PTS0.0 0% VOTES0
Top