• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved TFS 0.3.6 to 0.4 some bugs needed to be fixed

Ray Rewind

Doctor
Joined
Jun 6, 2009
Messages
1,349
Reaction score
76
Location
Germany
Hello :)!

I have these bugs

a2ixYZv.png




cobsMXQ.png



Which needs to be fixed.

Lets start with the globalevent stuffs.

here is the script !


Code:
function onStartup()
db.executeQuery("UPDATE `player_storage` SET `value` = 0 WHERE `key` = " .. ZEA_isOnLMSArea .. ";")
db.executeQuery("UPDATE `player_storage` SET `value` = 0 WHERE `key` = " .. ZEA_JOIN .. ";")
doSetStorage(ZEA_STATUS, 0)
doSetStorage(ZEA_PLAYERS_NUMBER, ZEA_DEFAULT_NUMBER_OF_PLAYERS)
addLMSEventBlockEnterPosition()
return true
end


the other error is the functio naddskill and conjure food


this is the part of my conjured spells from spells.xml

Code:
    <!-- Conjure Spells -->
    <conjure name="Conjure Arrow" words="exevo con" lvl="13" mana="100" soul="1" conjureId="2544" conjureCount="10" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
        <vocation id="3"/>
        <vocation id="7"/>
    </conjure>
    <conjure name="Food" words="exevo pan" lvl="14" mana="120" soul="1" exhaustion="1000" needlearn="0" event="function" value="conjureFood">
        <vocation id="2"/>
        <vocation id="3"/>
        <vocation id="6"/>
        <vocation id="7"/>
    </conjure>
    <conjure name="Poisoned Arrow" words="exevo con pox" lvl="16" mana="130" soul="2" conjureId="2545" conjureCount="7" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
        <vocation id="3"/>
        <vocation id="7"/>
    </conjure>
    <conjure name="Conjure Bolt" words="exevo con mort" lvl="17" mana="140" soul="2" prem="1" conjureId="2543" conjureCount="5" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
        <vocation id="3"/>
        <vocation id="7"/>
    </conjure>
    <conjure name="Conjure Sniper Arrow" words="exevo con hur" lvl="24" mana="160" soul="3" prem="1" conjureId="7364" conjureCount="5" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
        <vocation id="3"/>
        <vocation id="7"/>
    </conjure>
    <conjure name="Explosive Arrow" words="exevo con flam" lvl="25" mana="290" soul="3" conjureId="2546" conjureCount="8" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
        <vocation id="3"/>
        <vocation id="7"/>
    </conjure>
    <conjure name="Conjure Piercing Bolt" words="exevo con grav" lvl="33" mana="180" soul="3" prem="1" conjureId="7363" conjureCount="5" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
        <vocation id="3"/>
        <vocation id="7"/>
    </conjure>
    <conjure name="Enchant Staff" words="exeta vis" lvl="41" mana="80" prem="1" conjureId="2433" reagentId="2401" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
        <vocation id="5"/>
    </conjure>
    <conjure name="Enchant Spear" words="exeta con" lvl="45" mana="350" soul="3" prem="1" conjureId="7367" reagentId="2389" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
        <vocation id="3"/>
        <vocation id="7"/>
    </conjure>
    <conjure name="Power Bolt" words="exevo con vis" lvl="59" mana="800" soul="4" prem="1" conjureId="2547" conjureCount="10" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
        <vocation id="7"/>
    </conjure>
    <conjure name="Poison Field" words="adevo grav pox" lvl="14" mana="200" soul="1" reagentId="2260" conjureId="2285" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="2"/>
        <vocation id="5"/>
        <vocation id="6"/>
    </conjure>
    <conjure name="Light Magic Missile" words="adori min vis" lvl="15" mana="120" soul="1" reagentId="2260" conjureId="2287" conjureCount="10" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="2"/>
        <vocation id="5"/>
        <vocation id="6"/>
    </conjure>
    <conjure name="Fire Field" words="adevo grav flam" lvl="15" mana="240" soul="1" reagentId="2260" conjureId="2301" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="2"/>
        <vocation id="5"/>
        <vocation id="6"/>
    </conjure>
    <conjure name="Fireball" words="adori flam" lvl="27" mana="460" soul="3" prem="1" reagentId="2260" conjureId="2302" conjureCount="5" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="5"/>
    </conjure>
    <conjure name="Energy Field" words="adevo grav vis" lvl="18" mana="320" soul="2" reagentId="2260" conjureId="2277" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="2"/>
        <vocation id="5"/>
        <vocation id="6"/>
    </conjure>
    <conjure name="Stalagmite" words="adori tera" lvl="24" mana="400" soul="2" prem="2" reagentId="2260" conjureId="2292" conjureCount="10" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="5"/>
        <vocation id="2"/>
        <vocation id="6"/>
    </conjure>
    <conjure name="Great Fireball" words="adori mas flam" lvl="30" mana="530" soul="3" reagentId="2260" conjureId="2304" conjureCount="4" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="5"/>
    </conjure>
    <conjure name="Heavy Magic Missile" words="adori vis" lvl="25" mana="350" soul="2" reagentId="2260" conjureId="2311" conjureCount="10" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="5"/>
        <vocation id="2"/>
        <vocation id="6"/>
    </conjure>
    <conjure name="Poison Bomb" words="adevo mas pox" lvl="25" mana="520" soul="2" prem="1" reagentId="2260" conjureId="2286" conjureCount="2" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="2"/>
        <vocation id="6"/>
    </conjure>
    <conjure name="Firebomb" words="adevo mas flam" lvl="27" mana="600" soul="4" reagentId="2260" conjureId="2305" conjureCount="2" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="2"/>
        <vocation id="5"/>
        <vocation id="6"/>
    </conjure>
    <conjure name="Soulfire" words="adevo res flam" lvl="27" mana="600" soul="3" prem="1" reagentId="2260" conjureId="2308" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="2"/>
        <vocation id="5"/>
        <vocation id="6"/>
    </conjure>
    <conjure name="Poison Wall" words="adevo mas grav pox" lvl="29" mana="640" soul="3" reagentId="2260" conjureId="2289" conjureCount="4" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="2"/>
        <vocation id="5"/>
        <vocation id="6"/>
    </conjure>
    <conjure name="Explosion" words="adevo mas hur" lvl="31" mana="570" soul="4" reagentId="2260" conjureId="2313" conjureCount="6" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="2"/>
        <vocation id="5"/>
        <vocation id="6"/>
    </conjure>
    <conjure name="Fire Wall" words="adevo mas grav flam" lvl="33" mana="780" soul="4" reagentId="2260" conjureId="2303" conjureCount="4" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
        <vocation id="1"/>
        <vocation id="2"/>
        <vocation id="5"/>
        <vocation id="6"/>
    </conjure>

Would somebody help me :)?
 
Add this to talcations
<talkaction log="yes" words="/skill;/addskill" access="5" event="script" value="skill.lua"/>
And create a lua and name it skill then paste this in it. (This is for tfs 0.4)
Code:
function onSay(cid, words, param, channel)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
        return true
    end

    local t = string.explode(param, ",")
    if(not t[2]) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params.")
        return true
    end

    local pid = getPlayerByNameWildcard(t[1])
    if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")
        return true
    end

    t[2] = t[2]:lower()
    local skill = SKILL_IDS[t[2]]
    if(not skill) then
        local tmp = t[2]:sub(1, 1)
        if(tmp == 'l' or tmp == 'e') then
            skill = SKILL__LEVEL
        elseif(tmp == 'm') then
            skill = SKILL__MAGLEVEL
        else
            skill = tonumber(t[2])
            if(not skill or skill < SKILL_FIRST or SKILL > SKILL__LAST) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such skill does not exists.")
                return true
            end
        end
    end

    local amount = tonumber(t[3])
    if(not amount or amount == 0) then
        amount = 1
    end

    doPlayerAddSkill(pid, skill, amount, true)
    return true
end
 
This is a working zombie onstartup for tfs 0.4
Code:
function onStartup()
    db.executeQuery("UPDATE `player_storage` SET `value` = 0 WHERE `key` = " .. ZE_isOnZombieArea .. ";")
    doSetStorage(ZE_STATUS, 0)
    doSetStorage(ZE_PLAYERS_NUMBER, ZE_DEFAULT_NUMBER_OF_PLAYERS)
    doSetStorage(ZE_ZOMBIES_TO_SPAWN, 0)
    doSetStorage(ZE_ZOMBIES_SPAWNED, 0)
    addZombiesEventBlockEnterPosition()
    return true
end
 
Add in data/lib/100-compat.lua
Code:
db.executeQuery = db.query

Do you have the source of your server?

Yes @Limos I have the source but I am not sure anymore which one I took when I was Premium can I find it out somehow ?

I have all the doc files. What do you need to help me more ?:D




This is a working zombie onstartup for tfs 0.4
Code:
function onStartup()
    db.executeQuery("UPDATE `player_storage` SET `value` = 0 WHERE `key` = " .. ZE_isOnZombieArea .. ";")
    doSetStorage(ZE_STATUS, 0)
    doSetStorage(ZE_PLAYERS_NUMBER, ZE_DEFAULT_NUMBER_OF_PLAYERS)
    doSetStorage(ZE_ZOMBIES_TO_SPAWN, 0)
    doSetStorage(ZE_ZOMBIES_SPAWNED, 0)
    addZombiesEventBlockEnterPosition()
    return true
end

Thanks for the Zombie startup mate ! :)




EDIT: I still have the error with conjure food !

3VKLaUe.png






Someone know how to fix my NPC bug problem?

cCOxlfQ.png
 
Last edited:
look at this file in source definition.h if u find database version 27 it's mean source is 3884 rev and if it 25 source is 3777
there is something called version check but they left it empty xD
 
Back
Top