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

Trigger.sql

ot flames

New Member
Joined
May 14, 2008
Messages
28
Reaction score
0
Trigger.sql & Skills don't save !

Hello !
I am having the problem that all the people has with TFS, which is the save of the players skills. Well it will never save skills because `player_skills` table is empty and I need the triggers.sql. I have TFS Mystic 0.2.12 but it has no triggers.sql. From where I get it ??

Posted by Marky

add to the movement "firstitems" this:


Code:
dofile("./config.lua")
env = assert(luasql.mysql()) 
con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))                
id = getPlayerGUID(cid)           
assert(con:execute("INSERT INTO `player_skills` (`player_id` ,`skillid` ,`value` ,`count`) VALUES ('" .. id .. "', '0', '10', '0');"))
assert(con:execute("INSERT INTO `player_skills` (`player_id` ,`skillid` ,`value` ,`count`) VALUES ('" .. id .. "', '1', '10', '0');"))
assert(con:execute("INSERT INTO `player_skills` (`player_id` ,`skillid` ,`value` ,`count`) VALUES ('" .. id .. "', '2', '10', '0');"))
assert(con:execute("INSERT INTO `player_skills` (`player_id` ,`skillid` ,`value` ,`count`) VALUES ('" .. id .. "', '3', '10', '0');"))
assert(con:execute("INSERT INTO `player_skills` (`player_id` ,`skillid` ,`value` ,`count`) VALUES ('" .. id .. "', '4', '10', '0');"))
assert(con:execute("INSERT INTO `player_skills` (`player_id` ,`skillid` ,`value` ,`count`) VALUES ('" .. id .. "', '5', '10', '0');"))
assert(con:execute("INSERT INTO `player_skills` (`player_id` ,`skillid` ,`value` ,`count`) VALUES ('" .. id .. "', '6', '10', '0');"))					
con:close()
env:close()

now when a new player is created and he gets his items, the skillids will be created...
hope this helps

Thuggeh answered him that it worked. But what he means by "add to the movement "firstitems" this"

Any ideas ?
 
Last edited:
data/movements/scripts/firstitems.lua

in new versions of TFS it is

data/creaturescripts/scripts/firstitems.lua.
 
Back
Top