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

VIP System for TFS 1.1

reebo

New Member
Joined
Nov 22, 2014
Messages
28
Reaction score
1
Hi there, I've new problem and need help with solution.
I'm trying to use Kekox VIP system, I've little edited it, but now I've problem with this.

Code:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/others/VipCheck.lua:onLogin
data/global.lua:62: attempt to call global 'getPlayerAccountId' (a nil value)
stack traceback:
        [C]: in function 'getPlayerAccountId'
        data/global.lua:62: in function 'getPlayerVipDays'
        data/creaturescripts/scripts/others/VipCheck.lua:2: in function <data/cr          eaturescripts/scripts/others/VipCheck.lua:1>

can't find getPlayerAccountId in compat.lua and still I'm really newbee to scripting, any ideas?
 
Ahh, that's the syntax! I went on it wrong, finally I'm slowly getting into a little. Seem it's working now, I haven't tried these teleport tiles or doors so can we have this thread still open please?
 
Yes, try to change the functions using compat.lua (ctrl f to look for the function names) and if you have problems post them.
 
I've found another problem, when the time for removeVipday come, it comes with this error.
Code:
Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/daysremover.lua:onTime
data/globalevents/scripts/daysremover.lua:2: attempt to call field 'executeQuery          ' (a nil value)
stack traceback:
        [C]: in function 'executeQuery'
        data/globalevents/scripts/daysremover.lua:2: in function <data/globaleve          nts/scripts/daysremover.lua:1>

The lua for vipremove
Code:
function onTime()
db.executeQuery("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;")
return true
end
 
Thanks, it's working now! I'm trying to add VIPTILE but without succes.
here is my viptile.lua
Code:
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
    if not player then
        return true
end

if getPlayerVipDays(player) == 0 then
player:teleportTo(FALSE)
end
return true
end

in movements, I've added that AID in map editor on that tile. Only happened after I added this 2 things, line in movements.xml and viptile.lua-
Code:
[Error - MoveEvent::configureMoveEvent] Missing event
[Warning - BaseEvents::loadFromXml] Failed to configure event

Code:
<!-- Viptile -->
    <movevent type="StepIn" actionid="11223" script="viptile.lua"/>

It also goes for an error for no reason and I don't understand
 
Code:
<movevent event="StepIn" actionid="11223" script="viptile.lua"/>
Also change player:teleportTo(FALSE) to player:teleportTo(fromPosition)
 
You are right about the removingvipdays, but it's now edited even for 1.1 and is working.. I mean the rest of it, but I'll take an eye for your vip 1.1 system, thanks :)
 
Back
Top