• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X Convert SKILLS/ML when change vocation Dawnport

samandriel

Active Member
Joined
Oct 19, 2016
Messages
242
Solutions
1
Reaction score
46
I'm trying to make Dawnport possible in my 8.60 server, it's already working, changing vocation, giving items...

But there is a big problem, player can switch to sorcerer, get ML high and back to knight and be OP, same to mages, can get a big shielding and can change vocation.

Is anybody know how to convert ML/SKILLS when players change vocation in dawnport tile?
Code:
local tile = {
   --[actionid] = {vocation id}
   [65530] = {
        vocid = 1,
        weaponID = 2190, -- wand of vortex
        extraItems = {
            {itemID = 2287, count = 30}, -- lmm
            {itemID = 2302, count = 15} -- FIREBALL
        }
   },
   [65529] = {
        vocid = 2,
        weaponID = 2182, -- snakebite rod
        extraItems = {
            {itemID = 2287, count = 30}, -- lmm
            {itemID = 2265, count = 5}, -- IH
            {itemID = 2302, count = 10} -- FIREBALL
        }
   },
   [65528] = {
        vocid = 3,
        weaponID = 2456, -- bow
        extraItems = {
            {itemID = 2544, count = 100}, -- arrows
            {itemID = 2389, count = 3}, -- spear
            {itemID = 2265, count = 5}, -- IH
            {itemID = 2287, count = 5}, -- LMM
            {itemID = 2302, count = 5} -- FIREBALL
        }
   },
   [65527] = {
        vocid = 4,
        extraItems = {
            {itemID = 2379, count = 1}, -- sword
            {itemID = 2382, count = 1}, -- axe
            {itemID = 2380, count = 1}, -- club
            {itemID = 2265, count = 10} -- IH
        }
   }
}

function onStepIn(cid, item, position, fromPosition)
    local r = tile[item.actionid]
    if not r then
        return true
    end
    local townid = 7
    local pos = {x= 392, y=929, z=6}
    local needcap
    local extralvls = getPlayerLevel(cid) - 1
    local vocation
    local cap
    local hp
    local mp
    if item.actionid == 65530 then -- sorc
        doPlayerSetVocation(cid, 1)
        needcap = 88
        hp = (185) + (extralvls * 5)
        mp = (35) + (extralvls * 30)
        cap = (400) + (extralvls * 10)
        -- convert ML and SKILLS
    elseif item.actionid == 65529 then -- druid
        doPlayerSetVocation(cid, 2)
        needcap = 91
        hp = (185) + (extralvls * 5)
        mp = (35) + (extralvls * 30)
        cap = (400) + (extralvls * 10)
        -- convert ML and SKILLS
    elseif item.actionid == 65528 then -- pally
        doPlayerSetVocation(cid, 3)
        needcap = 122
        hp = (185) + (extralvls * 10)
        mp = (35) + (extralvls * 15)
        cap = (400) + (extralvls * 20)
        -- convert ML and SKILLS
    elseif item.actionid == 65527 then -- kina
        doPlayerSetVocation(cid, 4)
        needcap = 44
        hp = (185) + (extralvls * 15)
        mp = (35) + (extralvls * 5)
        cap = (400) + (extralvls * 25)
        -- convert ML and SKILLS
    end

    -- add stuff
    setCreatureMaxHealth(cid, hp)
    setCreatureMaxMana(cid, mp)
    doCreatureAddHealth(cid, getCreatureMaxHealth(cid), false)
    doCreatureAddMana(cid, getCreatureMaxMana(cid), false)
    doTeleportThing(cid, pos)
    doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
    doPlayerSetTown(cid, townid)
    doPlayerSetMaxCapacity(cid, cap)

    -- add items
    -- already recived
    local queststatus = getPlayerStorageValue(cid, item.actionid)
    if queststatus ~= -1 then
        return true
    end
    -- dont have cap
    if getPlayerFreeCap(cid) < needcap then
        doTeleportThing(cid, fromPosition, false)
        doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
        doPlayerPopupFYI(cid, 'You need '.. needcap ..' OZ CAP to recive the items!')
        return true
    end
    -- add items
    -- weapon first
    if r.weaponID then
        doPlayerAddItem(cid, r.weaponID, 1)
    end
    -- other stuffs
    if r.extraItems then
        for i=1,#r.extraItems do
            local item,count = r.extraItems[i].itemID, r.extraItems[i].count
            doPlayerAddItem(cid, item, count)
        end
    end
    setPlayerStorageValue(cid,item.actionid,1)
    return true
end
 
make the players experiment a vocation have to be like tibia method, this way with new vocations and low skills is a bad user experience
it is just worse, it's not about make like real tibia, is just make right, no offense
 
no, bacause the spells of dawnport are made to work at low attack damage.
you just have like 4 spells a think, and the skills is the same, slow.
and remember when you change voc with npc reaching level 8, yours skills can change
 
no, bacause the spells of dawnport are made to work at low attack damage.
you just have like 4 spells a think, and the skills is the same, slow.
and remember when you change voc with npc reaching level 8, yours skills can change

I think it is not a good user experience, player experience the player get the slow up in dawnport, i'm for example, train in dawnport on tibia
I was thinking make a different dawnport, with new spells, trainers (even if i didn't i still think it's not good)
If i did know how to change at reaching lvl 8 i would change when player change vocation
 
Back
Top