✅ cambiar scripts a revscripts

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:
Solution
Diría que son Creaturescripts? en esto caso prueba:

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 },
{...
Diría que son Creaturescripts? en esto caso prueba:

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 }
}
}
local advSkill = CreatureEvent ("advSkill")
function advSkill.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
advSkill:register()

local killStorage = 3000
local deathStorage = 3001
local toMostDamage = true
local toKiller = true
local advKill = CreatureEvent ("advKill")
function advKill.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
advKill:register()
 
Solution

Tibia Server Lists

#1 FEATURED US Ultron OT 1,531 / 5,000Online EXPStages PROTO8.6 ENGINEUltron OT RANK PTS5.9 +100% VOTES0 #2 FEATURED US Nefera 141 / 0Online EXPx1 PROTO15.20 ENGINECrystal Server RANK PTS5.1 +100% VOTES0 #3 FEATURED ES Deixis 0 / 0Offline EXPStages PROTO1098 ENGINETFS RANK PTS3.7 +100% VOTES1 #4 FEATURED ES Maeli 5 / 150Online EXPx10 PROTO10.98 ENGINETFS 1.4.2 RANK PTS3.7 +100% VOTES0 #5 MX Marlboro War 33 / 300Online EXP999 PROTO8.6 ENGINETFS 0.3.7 RANK PTS5.5 -33% VOTES0 #6 BR Tibinha YurOts 17 / 150Online EXPStages PROTO7.4 ENGINEYurOTS 1.5 RANK PTS5.2 -14% VOTES0 #7 US Halera 3 / 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 8 / 1,000Online EXP200 PROTO7.6 ENGINELubelskiOTS 2.56.0 RANK PTS4.6 -15% VOTES0 #10 ES JustRL FreeTC 1530 39 / 250Online EXPx2 PROTO15.30 ENGINECrystal Server RANK PTS4.3 +100% VOTES0 #11 DE DBU Online 0 / 400Online EXP11 PROTO8.6 ENGINETFS 1.0 RANK PTS4.3 +100% VOTES0 #12 PL ReWar 0 / 2,000Online EXPcustom PROTO8.6 ENGINEOther RANK PTS4.3 0% VOTES0 #13 PL Velesta 0 / 1,000Offline EXP20 PROTO8.0 ENGINETFS 1.4.2 RANK PTS4.3 -99% 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 1 / 2,000Online EXPStages PROTO10.98 ENGINETFS RANK PTS3.5 +100% VOTES0
Top