Jeder kennt ja die Emotes /me, : oder ::, doch damit ist man für RPG eingeschränkt.
Deshalb hab ich mich drangesetzt und es geschafft, Landschafts-Emotes zu machen, die mit /X eingeleitet werden.
Ich bin so frei und Poste das mal, in der Hoffnung, ein Feetback zu bekommen
Suche die Funktion addcommentary (normalerweise in der common.php) und Suche:
[php]
if (substr($commentary,0,1)!=":" &&
substr($commentary,0,2)!="::" &&
substr($commentary,0,3)!="/me" &&
$session['user']['drunkenness']>0) {
//drunk people shouldn't talk very straight.
[/php]
Ersetze mit:
[php]
if (substr($commentary,0,1)!=":" &&
substr($commentary,0,2)!="::" &&
substr($commentary,0,3)!="/me" &&
substr($commentary,0,2)!="/X" &&
$session['user']['drunkenness']>0) {
//drunk people shouldn't talk very straight.
[/php]
Suche:
[php]
if ($talkline!="sagt" // do an emote if the area has a custom talkline and the user isn't trying to emote already.
&& substr($commentary,0,1)!=":"
&& substr($commentary,0,2)!="::"
&& substr($commentary,0,3)!="/me")
[/php]
Ersetze mit:
[php]
if ($talkline!="sagt" // do an emote if the area has a custom talkline and the user isn't trying to emote already.
&& substr($commentary,0,1)!=":"
&& substr($commentary,0,2)!="::"
&& substr($commentary,0,2)!="/X"
&& substr($commentary,0,3)!="/me")
[/php]
Suche Funktion viewcommentary, suche:
[php]
if (substr($ft,0,2)=="::") $ft = substr($ft,0,2);
else
[/php]
Füge danach ein:
[php]
if (substr($ft,0,2)=="/X") $ft = substr($ft,0,2);
else
[/php]
Suche:
[php]
if ($ft=="::" || $ft=="/me" || $ft==":")
{
$x = strpos($row[comment],$ft);
if ($x!==false)
{
if ($linkbios)
$op[$i] = str_replace("&","&",HTMLEntities(substr($row[comment],0,$x)))
."`0<a href='$link' style='text-decoration: none'>\n`&$row[name]`0</a>\n`& "
.str_replace("&","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0`n";
else
$op[$i] = str_replace("&","&",HTMLEntities(substr($row[comment],0,$x)))
."`0\n`&$row[name]`0\n`& "
.str_replace("&","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0`n";
}
}
[/php]
Füge davor ein:
[php]
/*
Landschafts-Emote by Eliwood
*/
if ($ft=="/X")
{
$x = strpos($row[comment],$ft);
if ($x!==false)
{
if ($linkbios)
$op[$i] = str_replace("&","&",HTMLEntities(substr($row[comment],0,$x)))
."`0\n`& "
.str_replace("&","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0`n";
else
$op[$i] = str_replace("&","&",HTMLEntities(substr($row[comment],0,$x)))
."`0\n`& "
.str_replace("&","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0`n";
}
}
/*Landschaft-Emote Ende*/
[/php]
Ersetze
[php]
if ($ft=="::" || $ft=="/me" || $ft==":")
[/php]
Mit
[php]
elseif ($ft=="::" || $ft=="/me" || $ft==":")
[/php]