• 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!

Little bug in slawkens script

ScorpiOOn93

etherno.net
Joined
Jun 19, 2008
Messages
662
Reaction score
1
Location
CookieLand :DDD
It was working perfectly on TFS 0.2 but on TFS 0.3 it has a little bug.

Anty bot training system by Slawkens

08/02/2009 01:07:17] Lua Script Error: [Action Interface]
[08/02/2009 01:07:17] in a timer event called from:
[08/02/2009 01:07:17] data/actions/scripts/training.lua:eek:nUse

[08/02/2009 01:07:17] luaGetPlayerStorageValue(). Player not found

I don't know how to fix it because it's not showing any information about line etc. I know that it's showing that the script can't find the player in a timer event, but how to fix it?
And in game it's annoying because if it's set for example to 10 minutes sometimes it's working after 2 minutes, sometimes after 10, sometimes after 4 etc.
:S
 
[08/02/2009 01:07:17] luaGetPlayerStorageValue(). Player not found

PHP:
if isPlayer(cid) == TRUE then the script etc.

repxzpor ok'+ i mean rep++

Here a good idea,
PHP:
if isPlayer(cid) == FALSE then
doTeleportThing(cid, fromPosition)
else 
return TRUE
:):)
 
Last edited:
Today i'm too lazy to think <rofl> so can you do it for me? :D
In this file:

--------CONFIG--------
local fromActionId = 20000 -- actions id used. (default: 20000). If you change it, you also need change in actions.xml

local function playerStartTraining(cid)
local text = '(TrainMod): Your training started. After '.. getMinExtend(TRAIN_TIME) ..' you\'ll need to write code to extend training'
if TRAIN_PRICE > 0 then
text = text..', and you have to pay '.. TRAIN_PRICE ..' gp to continue this training'
end
text = text..'.'
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, text)
setPlayerStorageValue(cid, STORAGEVALUE_TRAINING, 1)
doPlayerExtendTraining(cid)
return TRUE
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid >= fromActionId and item.actionid <= (fromActionId + 3) then
dir = item.actionid - fromActionId
arenaPos = getNextPosFromDir(fromPosition, (item.actionid - fromActionId), 1)
arenaPos.stackpos = STACKPOS_TOP_CREATURE
if isPlayerTraining(cid) ~= TRUE then
if getThingfromPos(arenaPos).uid ~= 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '(TrainMod): Room is full.')
doSendMagicEffect(getCreaturePosition(cid), 2)
else
if playerStartTraining(cid) == TRUE then
doTeleportThing(cid, arenaPos, FALSE)
doSendMagicEffect(getThingPos(item.uid), 21)
end
end
else
doPlayerEndTraining(cid)
end
end
return TRUE
end
 
Back
Top