• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved "You do not have enough skill" on cast spell

ralke

(҂ ͠❛ ෴ ͡❛)ᕤ
Joined
Dec 17, 2011
Messages
1,759
Solutions
31
Reaction score
999
Location
Santiago - Chile
GitHub
ralke23
Twitch
ralke23
Using: The OTX Server Version: (2.51 - SE - 1549) - Codename: (Necron)
Also UniServerZ (lastest version) and Znote ACC


¡¡¡When i used SQLITE platform this never happened, but when i started to use mySQL this trouble started!!! i'm thinking that this trouble is related to znote acc
I tried to fix but really dont have idea of whats going on, please help!!!
Also im able to receive help by teamviewer!! just send pm

This is what happens When I cast "exura" or any spell with my character

0805d3734f.png


ps: i saw this issue on other thread https://otland.net/threads/you-do-not-have-enough-skill-on-cast-spell.171906/#post-2412712 but nothing there seems to work
 
Last edited:
fixed!! I've inserted this tables on mySQL, OTX ones we're corrupted ;p

player_skills

Ralke said:
DROP TABLE IF EXISTS `player_skills`;
CREATE TABLE `player_skills`
(
`player_id` INT NOT NULL,
`skillid` TINYINT(2) NOT NULL DEFAULT 0,
`value` INT UNSIGNED NOT NULL DEFAULT 0,
`count` INT UNSIGNED NOT NULL DEFAULT 0,
KEY (`player_id`), UNIQUE (`player_id`, `skillid`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

and player_spells

Ralke said:
DROP TABLE IF EXISTS `player_spells`;
CREATE TABLE `player_spells`
(
`player_id` INT NOT NULL,
`name` VARCHAR(255) NOT NULL,
KEY (`player_id`), UNIQUE (`player_id`, `name`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
 
need help again! didn't work
now i have to replace thoose tables everytime i create a character!!

in resume, every character i create comes with the trouble of "you dont have enought skill.."

i'm absolutely sure that is a mysql error but i dont know how to fix :( please help!!
@Znote

edit: now when player dies all skills get reset!
 
Last edited:
when you did replace the tables you did replace the table on only that player right?

try replace it on the " base " player. that new players take information from..
 
when you did replace the tables you did replace the table on only that player right?

try replace it on the " base " player. that new players take information from..

thanks for reply!!
i execute thoose tables as SQL query, like this
if im doing wrong please tell me! :)

edit: as long as i know znote doesnt use player samples, so idk where new player information comes from

edit2: i tried with my default distro (not modified) and the same trouble happens, one more reason to think that is mysql

15ecd86cf2.png
 
Last edited:
uhm, then i dont know for sure, maybe structure tab in phpmyadmin?

hmm ill try with another .sql archive then i can check if structure changes a little bit
thanks

anyways still open for more suggestions!

edit: tried with schemas.sql from tfs 0.3 and doesnt work :/
edit2: tried other schemas from otx versions, doesnt work
 
Last edited:
otx 2.5 seem to be based on TFS 0.3.7.

In the Znote AAC files, edit $config['TFSVersion'] in config.php to "TFS_03"

Create a new character and see if problem still exist.
 
otx 2.5 seem to be based on TFS 0.3.7.

In the Znote AAC files, edit $config['TFSVersion'] in config.php to "TFS_03"

Create a new character and see if problem still exist.

thanks for reply!! @Znote
config.php is fine, this is how it looks ^^

Ralke said:
$config['TFSVersion'] = 'TFS_03';
// As far as I know, OTX is based on TFS_03, so make sure TFS version is configured TFS_03
$config['CustomVersion'] = false;

any other idea? :p
edit: i tried with $config['CustomVersion'] = true; too and doesnt work
edit2: im also worried because players loose all skills they gained when die
 
Last edited:
Edit:

/engine/function/users.php Line 1248-1254

Replace line 1248-1254 with this:
PHP:
mysql_insert("INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES ('{$charid}', '0', '".$skills['fist']."'), ('{$charid}', '1', '".$skills['club']."'), ('{$charid}', '2', '".$skills['sword']."'), ('{$charid}', '3', '".$skills['axe']."'), ('{$charid}', '4', '".$skills['dist']."'), ('{$charid}', '5', '".$skills['shield']."'), ('{$charid}', '6', '".$skills['fish']."');");

Create a new character and see if that character have same problem. Let me know how it goes.
 
@Znote tested and working! man you're genius
only one issue, when create character on website this code appears

PHP:
string(192) "INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES ('2', '0', '10'), ('2', '1', '10'), ('2', '2', '10'), ('2', '3', '10'), ('2', '4', '10'), ('2', '5', '10'), ('2', '6', '');"
(query - SQL error)
Type: voidQuery (voidQuery is used for update, insert or delete from database)

Duplicate entry '2-0' for key 'player_id_2'

thanks a lot bro!!
 
Hmm, ok. Replace my previous mysql_insert line with these 2 lines:

PHP:
mysql_delete("DELETE FROM `player_skills` WHERE `player_id`='{$charid}';");
mysql_insert("INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES ('{$charid}', '0', '".$skills['fist']."'), ('{$charid}', '1', '".$skills['club']."'), ('{$charid}', '2', '".$skills['sword']."'), ('{$charid}', '3', '".$skills['axe']."'), ('{$charid}', '4', '".$skills['dist']."'), ('{$charid}', '5', '".$skills['shield']."'), ('{$charid}', '6', '".$skills['fishing']."');");

Let me know how it works.
 
Hmm, ok. Replace my previous mysql_insert line with these 2 lines:

PHP:
mysql_delete("DELETE FROM `player_skills` WHERE `player_id`='{$charid}';");
mysql_insert("INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES ('{$charid}', '0', '".$skills['fist']."'), ('{$charid}', '1', '".$skills['club']."'), ('{$charid}', '2', '".$skills['sword']."'), ('{$charid}', '3', '".$skills['axe']."'), ('{$charid}', '4', '".$skills['dist']."'), ('{$charid}', '5', '".$skills['shield']."'), ('{$charid}', '6', '".$skills['fishing']."');");

Let me know how it works.

@Znote works perfect!!
thanks for your fast replies, you saved my week bcz this trouble was a headache ^^
 
No problem :)
I have now updated Znote AAC. So future otx 2.x/tfs 0.3 users shouldn't get this issue anymore.

24 days ago I created advanced character creation, but didnt have time to test TFS_03 and was a bit unsure of how to add the skills properly.
config.php is pretty flexible now, you can adjust skills for each vocation, and starting level above 8 will have HP/MP/CAP properly calculated to each vocation.
 
Back
Top