• 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 Screwing up my OT alot these days

Apollo

Herban Legend
Joined
Jul 11, 2007
Messages
519
Reaction score
1
Location
Canada
I have plenty of problems / requests i need answeres to about TFS


REQUESTS
Code:
1. Changeing PVP In-game
2. Cleaning System
3. Using the old NPC interface
4. Quests screwing up. I get dead dogs, pigs, and tiles.
5. PvP Zones, i want my town Non PVP, and certain areas enforced, and normal pvp.

QUESTIONS / BUGS / HELP

Code:
1. My map doesnt load, all I edited was making new houses, and now I get not the right map format when it's already .otbm.
2. I want to be able to make my server save shorter, I dont know who the hell wants to put it as 1 hour - 24 hours except real tibia, because I dont have a dedicated host.
3. None of my old actions work on TFS, my training doors, chests, ect.
4.The Forgotten Server has screwed up commands, !save "1 doesnt work, !clean, !buypremium.
5. My server crashes when players use !leaveguild command.


I don't know about you, but I know plenty of people want more usefull commands like /clean, /pvp, /premium, /addons, /promotion, ect.

I also know that people want PvP zones, and plenty of the features I have listed.


As for what I was saying, I love sql, just, once I had switched to this OT, plenty of things are going wrong that I need to fix.

I dont know why this stuff happens, but, people keep complaining that they dont get their quest items, and I generally have to make it for them because they got to the end of the quests.


I need help with these things badly, especially the server saves.

Thanks in advance and for reading.

Xine
 
REQUESTS
1. Will be done later, it isn't that important.
2. Read #1.
3. Already works, you cant expect your NPC's from another server to work on this, but old NPC interface still works the advanced one is just an addon to make things easier.
4. Then you're doing something wrong, as you've not provided information what you have as ActionID/UniqueID on the chest I cannot help you.
5. Read #1.

QUESTIONS / BUGS / HELP
1. Would help if you posted the error and not what you think it says.
2. It is for the server to know when to move house days further, if you put it 1 second then 1 week will pass in 7 seconds, but you can use !save "x, which saves the server every x minute, IF THERE'S ANY ERROR POST THE ERROR INSTEAD OF SAYING IT DOESN'T WORK.
3. You can't expect lua scripts from other servers to work on this, but lua scripts from the OpenTibia SVN works on this as it is based on it.
4. They work expect for !clean as it isn't implented yet, also read my last sentence in #2.
5. It is !leave not !leaveguild and I cannot reproduce that crash either, not on latest forgottenserver SVN or 0.2.2 release.
 
Ok, Lets start.

QUESTIONS / BUGS / HELP

1. I just posted the error, it says it cannot load the map because it has an invalid format.
2. It gives me a Global Error, I will post more details once the hoster gets on.
3. Where can I find scripts that are already made on OpenTibia SVN servers?
4. I found a talkaction for !clean, I will post more error details once the Hoster gets online.
5. I am using forgottenserver 0.2.2 release. I made my mistake on this one, sorry.

REQUESTS:

1. Atleast it will be done in a newer version, thats all I care about.
2. Read #1.
3. Ok, but can I change the interface to my old one if I copy my whole NPC folder to the forgottenserver?
4. I will post the scripts once I will get ahold of the hoster.
5. Read #1


CODES / SCRIPTS:

Annihilator Script: Chests give dead bodies. All uniqueid's are correct.
Code:
-- Annihilator script by GriZzm0.
--
-- Variables used:
--
-- player?pos = The position of the players before teleport.
-- player? = Get the thing from playerpos.
-- player?level = Get the players levels.
-- questslevel = The level you have to be to do this quest.
-- questtatus? = Get the quest status of the players.
-- demon?pos = The position of the demons.
-- nplayer?pos = The position where the players should be teleported too.
--
-- UniqueIDs used:
--
-- 9999 = The switch.
-- 3002 = Demon Armor chest.
-- 3000 = Magic Sword chest.
-- 3001 = Stonecutter Axe chest.
-- 3003 = Present chest.
--

function onUse(cid, item, frompos, item2, topos)
  if item.uid == 9999 then
    if item.itemid == 1946 then

     player1pos = {x=191, y=118, z=9, stackpos=253}
     player1 = getThingfromPos(player1pos)

     player2pos = {x=192, y=118, z=9, stackpos=253}
     player2 = getThingfromPos(player2pos)

     player3pos = {x=193, y=118, z=9, stackpos=253}
     player3 = getThingfromPos(player3pos)

     player4pos = {x=194, y=118, z=9, stackpos=253}
     player4 = getThingfromPos(player4pos)

      if player1.itemid > 0 
	    and player2.itemid > 0 
		and player3.itemid > 0 
		and player4.itemid > 0 then

        player1level = getPlayerLevel(player1.uid)
        player2level = getPlayerLevel(player2.uid)
        player3level = getPlayerLevel(player3.uid)
        player4level = getPlayerLevel(player4.uid)

        questlevel = 100

        if player1level >= questlevel 
		  and player2level >= questlevel 
		  and player3level >= questlevel 
		  and player4level >= questlevel then

        --queststatus1 = getPlayerStorageValue(player1.uid,9999)
        --queststatus2 = getPlayerStorageValue(player2.uid,9999)
        --queststatus3 = getPlayerStorageValue(player3.uid,9999)
        --queststatus4 = getPlayerStorageValue(player4.uid,9999)

        queststatus1 = getPlayerStorageValue(player1.uid,3000)
        queststatus2 = getPlayerStorageValue(player2.uid,3000)
        queststatus3 = getPlayerStorageValue(player3.uid,3000)
        queststatus4 = getPlayerStorageValue(player4.uid,3000)

          if queststatus1 == -1 
		    and queststatus2 == -1 
			and queststatus3 == -1 
			and queststatus4 == -1 then
	
          demon1pos = {x=190, y=116, z=10}
          demon2pos = {x=191, y=120, z=10}
          demon3pos = {x=192, y=116, z=10}
          demon4pos = {x=193, y=120, z=10}
          demon5pos = {x=194, y=118, z=10}
          demon6pos = {x=195, y=118, z=10}
		
            doSummonCreature("Orshabaal", demon1pos)
            doSummonCreature("Orshabaal", demon2pos)
            doSummonCreature("Orshabaal", demon3pos)
            doSummonCreature("Orshabaal", demon4pos)
            doSummonCreature("Ferumbras", demon5pos)
            doSummonCreature("Orshabaal", demon6pos)

          nplayer1pos = {x=190, y=118, z=10}
          nplayer2pos = {x=191, y=118, z=10}
          nplayer3pos = {x=192, y=118, z=10}
          nplayer4pos = {x=193, y=118, z=10}

            doSendMagicEffect(player1pos,2)
            doSendMagicEffect(player2pos,2)
            doSendMagicEffect(player3pos,2)
            doSendMagicEffect(player4pos,2)

            doTeleportThing(player1.uid,nplayer1pos)
            doTeleportThing(player2.uid,nplayer2pos)
            doTeleportThing(player3.uid,nplayer3pos)
            doTeleportThing(player4.uid,nplayer4pos)

            doSendMagicEffect(nplayer1pos,10)
            doSendMagicEffect(nplayer2pos,10)
            doSendMagicEffect(nplayer3pos,10)
            doSendMagicEffect(nplayer4pos,10)

            doTransformItem(item.uid,item.itemid-1)
          else
            doPlayerSendCancel(cid,"Sorry, not possible.")
          end
        else
          doPlayerSendCancel(cid,"Sorry, not possible.")
        end
      else
        doPlayerSendCancel(cid,"Sorry, not possible.")
      end
    elseif item.itemid == 1945 then
      if getPlayerAccess(cid) >= 4 then
        doTransformItem(item.uid,item.itemid+1)
      else
        doPlayerSendCancel(cid,"Sorry, not possible.")
      end
    end
  elseif item.uid == 3002 then
    queststatus = getPlayerStorageValue(cid,3000)
    if queststatus == -1 then
      doPlayerSendTextMessage(cid,22,"You have found a demon armor.")
      doPlayerAddItem(cid,2494,1)
      setPlayerStorageValue(cid,3000,1)
    else
      doPlayerSendTextMessage(cid,22,"The chest is empty.")
    end
  elseif item.uid == 3000 then
    queststatus = getPlayerStorageValue(cid,3000)
    if queststatus == -1 then
      doPlayerSendTextMessage(cid,22,"You have found a magic sword.")
      doPlayerAddItem(cid,2400,1)
      setPlayerStorageValue(cid,3000,1)
    else
      doPlayerSendTextMessage(cid,22,"The chest is empty.")
    end
  elseif item.uid == 3001 then
    queststatus = getPlayerStorageValue(cid,3000)
    if queststatus == -1 then
      doPlayerSendTextMessage(cid,22,"You have found a stonecutter axe.")
      doPlayerAddItem(cid,2431,1)
      setPlayerStorageValue(cid,3000,1)
    else
      doPlayerSendTextMessage(cid,22,"The chest is empty.")
    end
  elseif item.uid == 3003 then
    queststatus = getPlayerStorageValue(cid,3000)
    if queststatus == -1 then
		doPlayerSendTextMessage(cid,22,"You have found a present.")
                        doSendMagicEffect(topos,12)
			gkey_uid = doPlayerAddItem(cid,2091,1)
                        doSetItemActionId(gkey_uid,6969)
      setPlayerStorageValue(cid,3000,1)
    else
      doPlayerSendTextMessage(cid,22,"The chest is empty.")
    end
  end
  return 1
end


Training Rooms: Doors dont do anything. All unique id's and action id's are correct.

Code:
function onUse(cid, item, frompos, item2, topos)

-- <beginning> Training Room script by Alreth.
-- Version 1.0, last edited 2006-06-02 17:39

-- Beginning of editable Variabels
    aidNor = 4211 -- Action id for door where training room is north of door
    aidSou = 4212 -- Action id for door where training room is south of door
    aidWes = 4213 -- Action id for door where training room is west of door
    aidEas = 4214 -- Action id for door where training room is east of door
-- End of editable Variabels
   
    emptyRoom = true
    charPos = getPlayerPosition(cid)
   
    if (item.actionid == aidNor) then
        if (charPos.y < frompos.y) then
            othersidePos = {x=frompos.x, y=frompos.y+1, z=frompos.z}
        else
            othersidePos = {x=frompos.x, y=frompos.y-1, z=frompos.z, stackpos=253}
            things = getThingfromPos(othersidePos)
            if (things.itemid == 1) then
                if (getPlayerLevel(things.uid) > 0) then
                    emptyRoom = false
                end
            end
        end
       
    elseif (item.actionid == aidSou) then
        if (charPos.y > frompos.y) then
            othersidePos = {x=frompos.x, y=frompos.y-1, z=frompos.z}
        else
            othersidePos = {x=frompos.x, y=frompos.y+1, z=frompos.z, stackpos=253}
            things = getThingfromPos(othersidePos)
            if (things.itemid == 1) then
                if (getPlayerLevel(things.uid) > 0) then
                    emptyRoom = false
                end
            end
        end
       
    elseif (item.actionid == aidEas) then
        if (charPos.x > frompos.x) then
            othersidePos = {x=frompos.x-1, y=frompos.y, z=frompos.z}
        else
            othersidePos = {x=frompos.x+1, y=frompos.y, z=frompos.z, stackpos=253}
            things = getThingfromPos(othersidePos)
            if (things.itemid == 1) then
                if (getPlayerLevel(things.uid) > 0) then
                    emptyRoom = false
                end
            end
        end
       
    elseif (item.actionid == aidWes) then
        if (charPos.x < frompos.x) then
            othersidePos = {x=frompos.x+1, y=frompos.y, z=frompos.z}
        else
            othersidePos = {x=frompos.x-1, y=frompos.y, z=frompos.z, stackpos=253}
            things = getThingfromPos(othersidePos)
            if (things.itemid == 1) then
                if (getPlayerLevel(things.uid) > 0) then
                    emptyRoom = false
                end
            end
        end
       
    end
   
    if (emptyRoom == true) then
        doTeleportThing(cid, othersidePos)
        doSendMagicEffect(charPos, 2)
        doSendMagicEffect(frompos, 12)
        doSendMagicEffect(othersidePos, 10)
       
    else
        doPlayerSendTextMessage(cid, 22, "Esta sala ja esta ocupada.")
    end
-- <end> Training Room script by Alreth.

    return 1
end

Talk Actions

save.lua (included in the forgottenserver 0.2.2)

Code:
local savingEvent = 0
local savingDelay = 0

function onSay(cid, words, param)
	
if param == "" then
		
savePlayers()
	
elseif isNumber(param) and getPlayerAccess(cid) ~= 0 then
		
stopEvent(savingEvent)
		savingDelay = param * 1000 * 60
		
save()
	
end
end

function save()
	
savingEvent = addEvent(save, savingDelay, {})
	
savePlayers()
end

ERROR:

Code:
 Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/save.lua:OnSay

data/talkactions/scripts/save.lua:7: attempt to call global 'isNumber' <a nil value>

!Promotion Command (Made by me, doesnt do anything, need to get revised)

[CODE]function onSay(cid, words, param)
	doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
	if doPlayerRemoveMoney(cid, 20000) == 1 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted!")
		else
			doPlayerSendCancel(cid, 'You don't have enough money, the promotion costs 2000 gold!.')
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		end
	else
		doPlayerSendCancel(cid, "You can't buy more than one year of Premium Account.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
	end
end

!Clean Command: nothing happens

Code:
function onSay(cid, words, param)
local access = getPlayerAccess(cid)


if access >= 3 then
			for cleanx = 143, 153 do
			for cleany = 111, 120 do
			cleanpos = {x=cleanx, y=cleany, z=7, stackpos=255}
			remove = getThingfromPos(cleanpos)
		if remove.itemid > 0 then
			doSendMagicEffect(cleanpos,2)
			doRemoveItem(remove.uid,100)
			end
	end
end
	else
		doPlayerSendCancel(cid,"You cannot execute this command.")	
end
return 0
end

!addon 1, !addon 2, nothing happens, needs revision, i get errors when loading the server

!addon 1

Code:
function onSay(cid, words, param)
	doPlayerAddAddon(cid, 252, 1)
		if doPlayerRemoveMoney(cid, 5000) == 1 then
	 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now have the first addon!")
		else
			doPlayerSendCancel(cid, 'You don't have enough money, the first addon costs 5000 gold!')
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		end
	else
		doPlayerSendCancel(cid, "You can't buy the same addon!")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
	end
end

!Addon 2

Code:
function onSay(cid, words, param)
	doPlayerAddAddon(cid, 251, 1)
		if doPlayerRemoveMoney(cid, 10000) == 1 then
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now have your second addon!")
		else
			doPlayerSendCancel(cid, 'You don't have enough money, the second addon costs 10000 gold!')
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		end
	else
		doPlayerSendCancel(cid, "You cant buy the same addon!")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
	end
end

Error while loading:

Warning: [Event::loadscript] Can not load script. data/talkactions/scripts/addon 2.lua:9: 'end' expected <to close 'function' at line 1> near 'else.

Warning: [Event::loadScript] Can not load scripts. data/talkactions/scripts/addon 1.lua
data/talkactions/scripts/addon 1.lua:9: 'end' expected <to close 'function' at line 1> near 'else'

WHOLE CMD IMAGE:

tfsweirdthingspc4.jpg


IGNORE THE NPCS, I CAN FIX THOSE.

Sincerily,

Xine
 
QUESTIONS / BUGS / HELP

1. You are still saying what you think it says, because there is no such error message in the sources, that is why I want you to paste exactly what it says.
3. Why not just use the scripts that comes with TheForgottenServer?

REQUESTS:
3. Your old NPC's should work if they were written to work in Official OpenTibia.
 
I edited my post, I posted errors with talkactions, scripts, ect.

The reason why I dont use the forgottenserver origional things is because sometimes I dont have what I want.

They arent.
 
Talkaction errors:
post the scripts.

Monster error:
you don't have the monster file or you don't have it added to monsters.xml.

Map error:
copy the items.otb in the server to your mapeditor folder, launch the mapeditor, load your map, save it.

NPC errors:
do you even have the npc XML files, if you do post one of them and I'll see what is wrong.

Last error:
post your worldType line in config.lua
 
Talkactions:

already listed,

Monsters:
Fixed.

Map Error:
It doesnt load.

NPC Errors:
I was using a diff map, but it works now, no worries.

Last error:
I put non pvp, is it no pvp?
 
Your addons scripts are fucked up... I suggest you to rewrite it.
Map error: doesn't load in MapEditor?
Last error: You should put no-pvp
 
Thanks talaturen, but I dont know lua anyways.. i cant really make addons or promotion talkations.

By the way, I tried to change the items files so I dont get the warning, it made it worse, it keeps telling me that it was using a different version of items.otb file when I load it on the map editor.

Even though i have tried like 5 comboes of items.xml and items.otb, I still get the same error.
 
I KNow the whole problem!

You are using YurOTs Map, Npcs and so on...
They are not designed to work with the new OpenTibia Releases... (Only the old 7.4,7.5,7.6,7.71,7.8 & some 7.9 (Not the forgotten server which is based on a new official OTServ SVN.

If you wanna use YurOTs Map and so on i suggest you use Evolutions with SQL
 
Yeah thats why. Thanks guys. I gave up on that OT, making a new one.
 
Back
Top Bottom