local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102
if player:getStorageValue(52325) < 1 then
for i = 1, mounts do
player:addMount(i)
end
for i = 1...
data/xml/outfits.xml
, which are the ones listed in outfits = {} and then just remove the ones you dont have.data/xml/mounts.xml
data/events/scripts/player.lua
, at the bottom of the file.local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102
function onLogin(player)
if player:getStorageValue(52324) < 1 then
for i = 1, mounts do
player:addMount(i)
end
for i = 1, #outfits do
player:addOutfit(outfits[i])
player:addOutfitAddon(outfits[i], 3)
end
player:setStorageValue(52324, 1)
end
return true
end
Do you have any errors?I added it on player.lua. It doesn't work. or maybe is missing something??
function onLogin(cid)
local player = Player(cid)
local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102
if player:getStorageValue(52325) < 1 then
for i = 1, mounts do
player:addMount(i)
end
for i = 1, #outfits do
player:addOutfit(outfits[i])
player:addOutfitAddon(outfits[i], 3)
end
player:setStorageValue(52325, 1)
end
return true
end
shouldn't this creeatureevent script be placed at creatureevent script folder and xml? or tfs 1.0 didn't had it yet?And then you just place the code below indata/events/scripts/player.lua
, at the bottom of the file.
Then reload events, or restart server and login.
shouldn't this creeatureevent script be placed at creatureevent script folder and xml? or tfs 1.0 didn't had it yet?
local player = Player(cid)
data/creaturescript/scripts/login.lua
local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102
if player:getStorageValue(52325) < 1 then
for i = 1, mounts do
player:addMount(i)
end
for i = 1, #outfits do
player:addOutfit(outfits[i])
player:addOutfitAddon(outfits[i], 3)
end
player:setStorageValue(52325, 1)
end
Way to go swoop in at the last second with my script <3Paste this below line 3 of that file:
Lua:local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514, 542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749, 759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512, 516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746, 750, 760, 846, 853, 873, 884, 899} local mounts = 102 if player:getStorageValue(52325) < 1 then for i = 1, mounts do player:addMount(i) end for i = 1, #outfits do player:addOutfit(outfits[i]) player:addOutfitAddon(outfits[i], 3) end player:setStorageValue(52325, 1) end
Way to go swoop in at the last second with my script <3
local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102
if player:getStorageValue(52325) < 1 then
for i = 1, mounts do
player:addMount(i)
end
for i = 1, #outfits do
player:addOutfit(outfits[i])
player:addOutfitAddon(outfits[i], 3)
end
player:setStorageValue(52325, 1)
end
function onLogin(cid)
local player = Player(cid)
local loginStr = "Welcome to " .. configManager.getString(configKeys.SERVER_NAME) .. "!"
local outfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156,
157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366, 431, 433, 464, 466, 471, 513, 514,
542, 575, 578, 618, 620, 632, 635, 636, 664, 666, 683, 694, 696, 698, 724, 732, 745, 749,
759, 845, 852, 874, 885, 900, 128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151,
152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512,
516, 541, 574, 577, 610, 619, 633, 634, 637, 665, 667, 684, 695, 697, 699, 725, 733, 746,
750, 760, 846, 853, 873, 884, 899}
local mounts = 102
if player:getStorageValue(52325) < 1 then
for i = 1, mounts do
player:addMount(i)
end
for i = 1, #outfits do
player:addOutfit(outfits[i])
player:addOutfitAddon(outfits[i], 3)
end
player:setStorageValue(52325, 1)
end
if player:getLastLoginSaved() <= 0 then
loginStr = loginStr .. " Please choose your outfit."
player:sendOutfitWindow()
else
if loginStr ~= "" then
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
doCreatureSay(cid, "Welcome", TALKTYPE_ORANGE_1)
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
end
loginStr = string.format("Your last visit was on %s.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
end
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
player:registerEvent("PlayerDeath")
player:registerEvent("LevelLock")
player:registerEvent("player")
return true
end