J.Dre
Unity Games
Glad you were able to figure it out yourself! Thank you for sharing.
I got this weird issue on TFS 0.3.7, i mean i have used this mod before and everything worked fine, but now when i create character it starts completley naked - no items equiped at all, not even a container.
I get no errors in console, (loading mod firstitemx.xm - done), this is really weird and i got no idea what could be causing this problem, im using 9.83 client protocol, could it be this "new" slot system causing this?
Using rev 5940, I would really appricate if you could test it or find whats wrong, i really love the mod! It's really strange it doesn't work for me or it doesn't give any errors '
I tested it with latest rev, still doesn't work, there must some issue with equipment slots.
bump
still looking for a fix
I'm using this on 0.3.7 and it works. Not sure why it isn't working for you. I am running 0.3.7 (9.46) downgraded to 8.60.
Maybe it's an issue with the latest updates? The code is fine.
Nobody can deny that J.Dre is one of the best scripters, maybe the best
Using rev 5940, I would really appricate if you could test it or find whats wrong, i really love the mod! It's really strange it doesn't work for me or it doesn't give any errors '
I tested it with latest rev, still doesn't work, there must some issue with equipment slots.
Thank you for looking into it!
Unfortunately it still doesn't seem to work for me even as creaturescript. But i appriciate your work!
You must spread some Reputation around before giving it to J.Dre again.
if(not getCreatureName(cid) == "Account Manager") then
--script
end
i fixed this problem, thanks though
I know this is pretty old but anyone have any idea how to edit start items for custom vocations?
local config = {
[1] = {
--equipment spellbook, wand of vortex, magician's robe, mage hat, studded legs, leather boots, scarf
items = {{2175, 1}, {2190, 1}, {8819, 1}, {8820, 1}, {2649, 1}, {2643, 1}, {2661, 1}},
--container rope, shovel, mana potion
container = {{2120, 1}, {2554, 1}, {7620, 5}, {2789, 20}}
},
[2] = {
--equipment spellbook, wand of vortex, magician's robe, mage hat, studded legs, leather boots scarf
items = {{2175, 1}, {2190, 1}, {8819, 1}, {8820, 1}, {2649, 1}, {2643, 1}, {2661, 1}},
--container rope, shovel, mana potion
container = {{2120, 1}, {2554, 1}, {7620, 5}, {2789, 20}}
},
}
function 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)
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
Code:local config = { [1] = { --equipment spellbook, wand of vortex, magician's robe, mage hat, studded legs, leather boots, scarf items = {{2175, 1}, {2190, 1}, {8819, 1}, {8820, 1}, {2649, 1}, {2643, 1}, {2661, 1}}, --container rope, shovel, mana potion container = {{2120, 1}, {2554, 1}, {7620, 5}, {2789, 20}} }, [2] = { --equipment spellbook, wand of vortex, magician's robe, mage hat, studded legs, leather boots scarf items = {{2175, 1}, {2190, 1}, {8819, 1}, {8820, 1}, {2649, 1}, {2643, 1}, {2661, 1}}, --container rope, shovel, mana potion container = {{2120, 1}, {2554, 1}, {7620, 5}, {2789, 20}} }, } function 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) 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
add this to data/creaturescripts/scripts/firstitems or /other/firstitems
I'm not familiar with 0.4 so I can't really help you with that, but I could suggest opening the firstitems.lua you already have and copy the format of the function (most likely to replace "function onLogin(player)" to something else) to the newer scriptGetting errors. Running 0.4 tfs