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

Solved Monster names

Rossii

Member
Joined
Mar 27, 2012
Messages
366
Reaction score
6
Location
England
Just wondering if any1 knows how i can stop players making characters with monster names..

Demon, Dragon and dragon lord ECT
 
xd didn't think about that. Facepalm @ myself.
Well it would work - just the extremely long way ;d

Maybe make a code that reads the monsters xml within your data folder/database.. idk much with web acc's.. So i don't know how to arrange something like that
 
SOLVED


IN AJAX_CHECK_NAME.PHP
add under
//first word can't be:
$first_words_blocked = array('gm ','cm ', 'god ','comminity manager', 'comminity-manager','tutor ', "'", '-');
//names blocked:
$names_blocked = array('gm','cm', 'god', 'comminity manager', 'comminity-manager', 'tutor');
//name can't contain:
$words_blocked = array('gamemaster', 'game master', 'game-master', 'comminity manager', 'comminity-manager', "game'master", ' ', '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor');
$temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- '");
if($temp != strlen($name))
{

foreach($config['site']['monsters'] as $word)
if($word == $name)
{
echo '<font color="red"><b>You can not use monster name.</b></font>';
exit;
}



NOW IN LOAD.COMPAT.PHP
add
foreach($config['site']['monsters'] as $word)


now in config.php

add

$config['site']['monsters'] = array("amazon","valkyrie");

ill upload all the monster names so u can put them all in instead of just blocking amazon and valkyrie. haha

gaga - Pastebin.com



REP NINJA IF THIS HELPS..
 
Back
Top