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

start skills

popitox

Member
Joined
Jul 8, 2008
Messages
63
Reaction score
8
i need a script for tfs 0.4 rev3777 i just want the first time they loggin with their vocation get skills for a pvp enfo i dont want when they logout reset the skills i just want a starting skill scripts
 
It would probably be better to adjust the skills before they even login. (During character creation). You may be able to do it in-game with addskilltry, but that isn't an efficient approach of doing it.
 
i was thinking on make it from znote but look it works a 50% but in game the skills doesnt apply.... just on the database look
//Register
$character_data = array(
'name' => format_character_name($_POST['name']),
'account_id'=> $session_user_id,
'vocation' => $_POST['selected_vocation'],
'town_id' => $_POST['selected_town'],
'sex' => $_POST['selected_gender'],
'lastip' => ip2long(getIP()),
'created' => time(),
'maglevel' => 60,
'skill_fist' => 10,
'skill_sword' => 10,
'skill_club' => 10,
'skill_axe' => 10,
'skill_dist' => 10,
'skill_shielding' => 30,
'skill_fishing' => 10
);
} elseif (($_POST['selected_vocation']) == 2,3,4,5...etcccc) {

in create character php....

then in fuction/users.php add this lines,

'skill_fist' => $character_data['skill_fist'],
'skill_sword' => $character_data['skill_sword'],
'skill_club' => $character_data['skill_club'],
'skill_axe' => $character_data['skill_axe'],
'skill_dist' => $character_data['skill_dist'],
'skill_shielding' => $character_data['skill_shielding'],
'skill_fishing' => $character_data['skill_fishing']
);

and in the db add the tables on players but doesnt work.... if you look on the database it works, but in game the skills still 10. just the magic level its working for each vocation
 
i was thinking on make it from znote but look it works a 50% but in game the skills doesnt apply.... just on the database look
//Register
$character_data = array(
'name' => format_character_name($_POST['name']),
'account_id'=> $session_user_id,
'vocation' => $_POST['selected_vocation'],
'town_id' => $_POST['selected_town'],
'sex' => $_POST['selected_gender'],
'lastip' => ip2long(getIP()),
'created' => time(),
'maglevel' => 60,
'skill_fist' => 10,
'skill_sword' => 10,
'skill_club' => 10,
'skill_axe' => 10,
'skill_dist' => 10,
'skill_shielding' => 30,
'skill_fishing' => 10
);
} elseif (($_POST['selected_vocation']) == 2,3,4,5...etcccc) {

in create character php....

then in fuction/users.php add this lines,

'skill_fist' => $character_data['skill_fist'],
'skill_sword' => $character_data['skill_sword'],
'skill_club' => $character_data['skill_club'],
'skill_axe' => $character_data['skill_axe'],
'skill_dist' => $character_data['skill_dist'],
'skill_shielding' => $character_data['skill_shielding'],
'skill_fishing' => $character_data['skill_fishing']
);

and in the db add the tables on players but doesnt work.... if you look on the database it works, but in game the skills still 10. just the magic level its working for each vocation
tet This In U Sql After Player inserts data

Code:
DELIMITER $$
CREATE TRIGGER `oncreate_players` AFTER INSERT ON `players` FOR EACH ROW BEGIN
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 0, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 1, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 2, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 3, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 4, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 5, 10);
    INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 6, 10);
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `ondelete_players` BEFORE DELETE ON `players` FOR EACH ROW BEGIN
    DELETE FROM `bans` WHERE `type` IN (2, 5) AND `value` = OLD.`id`;
    UPDATE `houses` SET `owner` = 0 WHERE `owner` = OLD.`id`;
END
$$
DELIMITER ;
 
Back
Top