D
dfsuno
Invited
lamentable mente estos no pude hacerlos correr, e estado modificando códigos pero la verdad ya me volví loco dejare por aquí los scripts a ver si me pueden ayudar con 1, o con los que puedas por favor, y gracias.
local firstStorage = 56364
local firstSkills = {
[1] = {
{ amount = 96 }
},
[2] = {
{ amount = 96 }
},
[3] = {
{ skillid = SKILL_DISTANCE, skillLevel = 109200 },
{ skillid = SKILL_SHIELD, skillLevel = 339200 },
{ amount = 20 }
},
[4] = {
{ skillid = SKILL_CLUB, skillLevel = 519200 },
{ skillid = SKILL_SWORD, skillLevel = 519200 },
{ skillid = SKILL_AXE, skillLevel = 519200 },
{ skillid = SKILL_SHIELD, skillLevel = 1019200 },
{ amount = 8 }
},
[5] = {
{ amount = 96 }
},
[6] = {
{ amount = 96 }
},
[7] = {
{ skillid = SKILL_DISTANCE, skillLevel = 109200 },
{ skillid = SKILL_SHIELD, skillLevel = 339200 },
{ amount = 20 }
},
[8] = {
{ skillid = SKILL_CLUB, skillLevel = 519200 },
{ skillid = SKILL_SWORD, skillLevel = 519200 },
{ skillid = SKILL_AXE, skillLevel = 519200 },
{ skillid = SKILL_SHIELD, skillLevel = 1019200 },
{ amount = 8 }
}
}
function onLogin(player)
local player = Player(player)
local playerVoc = firstSkills[player:getVocation():getId()]
if (not playerVoc) then
return true
end
if (player:getStorageValue(firstStorage) == -1) then
for i = 1, #playerVoc do
if (playerVoc.skillid) then
player:addSkillTries(playerVoc.skillid, playerVoc.skillLevel)
end
if (playerVoc.amount) then
local magicNeed = ( playerVoc.amount - player:getMagicLevel() )
player:addManaSpent(player:getVocation():getRequiredManaSpent(player:getBaseMagicLevel() + magicNeed) - player:getManaSpent())
end
end
player:setStorageValue(firstStorage, 1)
end
return true
end
local killStorage = 3000
local deathStorage = 3001
local toMostDamage = true
local toKiller = true
function onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
if not creature:isPlayer() then return true end
if creature then
if killer and killer:isPlayer() and toKiller then
local killAmount = killer:getStorageValue(killStorage)
if killAmount == -1 then killAmount = 0 end
killer:setStorageValue(killStorage, killAmount + 1)
end
if mostDamageKiller and mostDamageKiller:isPlayer() and toMostDamageKiller then
local killAmount = mostDamageKiller:getStorageValue(killStorage)
if killAmount == -1 then killAmount = 0 end
mostDamageKiller:setStorageValue(killStorage, killAmount + 1)
end
local deathAmount = creature:getStorageValue(deathStorage)
if deathAmount == -1 then deathAmount = 0 end
creature:setStorageValue(deathStorage, deathAmount + 1)
end
return true
end
Last edited by a moderator: