Author Topic: PHP Taunt maker - [23/05: Azerty support added]  (Read 9754 times)

0 Members and 1 Guest are viewing this topic.

Offline DePhille

  • Flagrunner
  • ****
  • Posts: 623
  • SoldatPage Webmaster
    • SoldatPage
PHP Taunt maker - [23/05: Azerty support added]
« on: May 02, 2007, 08:57:56 am »
Hi,

On request, I've made a PHP script that helps you create and/or edit taunts.txt files. You can simply load an existing taunts.txt file or start from scratch.
The script is hosted on SoldatPage and you need a SoldatPage account to be able to use it, I've included screenshots if you don't want to sign up just to view it.
Please post any possible feedback!

Features:
- Upload and load an existing taunts.txt file.
- Generate new taunts.txt files.
- Very simple GUI.
- Automatic download of the taunts.txt file.
- Support for azerty keyboards.


Grtz, DePhille
« Last Edit: May 23, 2007, 01:23:31 pm by DePhille »
This signature was broken. Feel free to fix it.

Offline TBDM

  • Flagrunner
  • ****
  • Posts: 812
Re: PHP Taunt maker
« Reply #1 on: May 02, 2007, 09:35:50 am »
nice!

/uses

Offline DePhille

  • Flagrunner
  • ****
  • Posts: 623
  • SoldatPage Webmaster
    • SoldatPage
Re: PHP Taunt maker
« Reply #2 on: May 04, 2007, 10:00:16 am »
Thanks!

However, I'm looking for some taunt presets, they have to be made from the Soldat 1.4 taunts.txt file. If you have one please link me to it or send it to me via e-mail.

Grtz, DePhille
This signature was broken. Feel free to fix it.

Offline -Skykanden-

  • Flamebow Warrior
  • *****
  • Posts: 3065
  • Hallowed be my name
Re: PHP Taunt maker
« Reply #3 on: May 04, 2007, 10:11:35 am »
Nice tool im doing my tauns, thanks i never discoverwhat key is what taunt :P

Offline DePhille

  • Flagrunner
  • ****
  • Posts: 623
  • SoldatPage Webmaster
    • SoldatPage
Re: PHP Taunt maker
« Reply #4 on: May 04, 2007, 03:51:59 pm »
Thanks :).
I'm currently looking for someone who can test it using an Azerty keyboard. I think the keys only correspond to a Qwerty keyboard and not to an Azerty one, I've had the problem a few years ago when I still had my Azerty keyboard.
Would be the first and only taunt editor that supports Azerty keyboards then ;).

Grtz, DePhille
This signature was broken. Feel free to fix it.

Offline Psycho

  • Flagrunner
  • ****
  • Posts: 677
  • Decomposing
Re: PHP Taunt maker
« Reply #5 on: May 04, 2007, 04:42:28 pm »
ontopic: very nice taunt editor. one of the best I think :D
offtopic: please make the server status thing next ^^

 Looking down from ethereal skies

Offline Sytrus

  • Flagrunner
  • ****
  • Posts: 862
  • English Teech0r
    • AtlanticProject
Re: PHP Taunt maker
« Reply #6 on: May 05, 2007, 09:07:49 am »
Hm, my old taunts still work with 1.4

So I'm not going to use it. Seems to be sweet though.

Offline DePhille

  • Flagrunner
  • ****
  • Posts: 623
  • SoldatPage Webmaster
    • SoldatPage
Re: PHP Taunt maker
« Reply #7 on: May 05, 2007, 11:26:48 am »
Well, the taunts.txt file in 1.4 differs slightly from the one in 1.3.1 .
As you can see (or already saw) the 1.4 taunts.txt file is over 1024 bytes while the old one is around 400 bytes.
There's some binary data in the taunts.txt file in 1.4, probably for the unicode support or something.
The taunt maker should be able to handle both 1.4 and 1.3.1 taunts.txt files.

Grtz, DePhille
This signature was broken. Feel free to fix it.

Offline NinjaGimp369

  • Veteran
  • *****
  • Posts: 1474
  • Wa-Poww!
Re: PHP Taunt maker
« Reply #8 on: May 11, 2007, 05:47:48 am »
I've encountered a problem, I made my taunt file and replaced the existing one in my Soldat folder. I went in-game to try them out but they are still the original taunts. Anyone know what the problem is and how to fix it? Any help is much appreciated.

@ DePhille: Program is very easy to use, thanks.
"You should've used the pythagoras theorum, b*tch."
[/url]

Offline DePhille

  • Flagrunner
  • ****
  • Posts: 623
  • SoldatPage Webmaster
    • SoldatPage
Re: PHP Taunt maker
« Reply #9 on: May 11, 2007, 01:01:13 pm »
Hi,

You're probably using profiles. If you do then you need to find the appropriate taunts.txt in the Profiles folder.

Grtz, DePhille
This signature was broken. Feel free to fix it.

Offline NinjaGimp369

  • Veteran
  • *****
  • Posts: 1474
  • Wa-Poww!
Re: PHP Taunt maker
« Reply #10 on: May 11, 2007, 08:44:09 pm »
Oh true, thanks DePhille!
"You should've used the pythagoras theorum, b*tch."
[/url]

Offline DePhille

  • Flagrunner
  • ****
  • Posts: 623
  • SoldatPage Webmaster
    • SoldatPage
Re: PHP Taunt maker
« Reply #11 on: May 12, 2007, 04:12:23 am »
No problem.
If anyone tried using Unicode characters, please let me know if they worked or not since I'm not able to test that.
Thanks!

Grtz, DePhille
This signature was broken. Feel free to fix it.

Offline hyrr

  • Major(1)
  • Posts: 30
Re: PHP Taunt maker
« Reply #12 on: May 12, 2007, 03:21:06 pm »
Remember to save the taunts.txt in Unicode :)

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: PHP Taunt maker
« Reply #13 on: May 12, 2007, 07:01:28 pm »
UNICODE characters didn't work for me. It should work without touching the file, right?
And hyrr is right, you have to save taunts.txt in Unicode, thing you aren't doing.
urraka

Offline DePhille

  • Flagrunner
  • ****
  • Posts: 623
  • SoldatPage Webmaster
    • SoldatPage
Re: PHP Taunt maker
« Reply #14 on: May 13, 2007, 04:01:55 am »
Alright, I'll look that up and I'll try to implement that. Thanks for testing it out for me and! :)
I'll update this post when it's finished.

Grtz, DePhille
This signature was broken. Feel free to fix it.

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: PHP Taunt maker
« Reply #15 on: May 13, 2007, 12:27:14 pm »
This might be a little help.

Code: [Select]
<?php
    header
("Content-disposition: attachment; filename=taunts.txt");
    echo 
iconv("UTF-8""UTF-16LE"$taunts);
?>

Assuming you have a $taunts variable with all the taunts and that you are using utf-8 as your website encoding. This seems to work fine cause you open the output file in notepad and you can read everything, but for some reason it doesn't work in soldat unless i open the file in notepad and save it. I'm not sure if soldat uses utf-16le, but that's the encoding i use in a taunts app i made and it works.
urraka

Offline DePhille

  • Flagrunner
  • ****
  • Posts: 623
  • SoldatPage Webmaster
    • SoldatPage
Re: PHP Taunt maker
« Reply #16 on: May 13, 2007, 03:55:27 pm »
Ah thanks alot for the suggestion. Spared me the time of having to look it up. it seems to work for me too, now the generated taunts.txt has the exact same size as the one that came with Soldat 1.4 and some people told me it was working now.
Unicode feature was added.

Grtz, DePhille
This signature was broken. Feel free to fix it.

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: PHP Taunt maker
« Reply #17 on: May 13, 2007, 09:55:46 pm »
It stills doesn't work properly. For some reason, some characters are converted to some kind of numeric representation.

For example, I set ALT + 0 = привет, (hello in russian), but when I open the taunts file I see this:
привет

EDIT: LOL I didn't notice the paste actually made those number turn into the word again, i'll try again:
& # 1087; & # 1088; & # 1080; & # 1074; & # 1077; & # 1090;
I added some spaces between the symbols so it doesnt happen again

Grtz, PerroAZUL
« Last Edit: May 14, 2007, 12:14:59 am by PerroAZUL »
urraka

Offline DePhille

  • Flagrunner
  • ****
  • Posts: 623
  • SoldatPage Webmaster
    • SoldatPage
Re: PHP Taunt maker
« Reply #18 on: May 14, 2007, 11:58:59 am »
Hi,

Seems like PHP5 doesn't support Unicode fully. I've browsed the internet and all I could find were unanswered questions about Unicode support in PHP. PHP6 however will have extended Unicode support, but that's still in development and not available to the public.

I managed to get the decimal value of every character but chr() only supports ASCII numbers, and not Unicode. I'm currently using mb functions to convert the text but it returns some special characters. It might be that it works now, but I severely doubt it. Anyway, this is the closest I can come to solve this problem besides for waiting for PHP6.

Grtz, DePhille
This signature was broken. Feel free to fix it.

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: PHP Taunt maker
« Reply #19 on: May 14, 2007, 01:15:02 pm »
Using the small code i posted before it worked just fine for me, the only problem was that i had to resave the file.
Hmm, i think i used another header too, but for the site. Look, I'll post the exact code I used for my testing:
Code: [Select]
<?php
if (isset(
$_REQUEST['text'])) {
header("Content-disposition: attachment; filename=taunts.txt");
echo iconv("utf-8""UTF-16LE"$_REQUEST['text']);
}
else {
header("Content-Type: text/html; charset=UTF-8"true);
?>

<html><head></head><body>
<form action="uni.php">
<input name="text" type="text" /><input type="submit" />
</form>
</body>
</html>
<?php ?>

I wonder what are u using that converts unicode characters into that numeric representation.
urraka