Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeSearchLatest imagesRegisterLog in

 

 Beginners Guide v 1.0.2

Go down 
AuthorMessage
GESHE ARCHITON
Admin
GESHE ARCHITON


Posts : 16
Join date : 2007-08-25
Age : 44
Location : israel

Beginners Guide v 1.0.2 Empty
PostSubject: Beginners Guide v 1.0.2   Beginners Guide v 1.0.2 Icon_minitimeFri Aug 31, 2007 8:57 am

BB-codes

BB-codes are an easy way to format text. One thing you could do for instance is to change the colour of text. Generally BB-codes consist of a starttag (e.g. ) and an endtag (e.g. ). Everything between the tags will be formatted. You can use BB-code in the forum of your tribe, in messages and in your profile. The following BB-codes are available:
Code Effect Forum Message Profile
Text Text x x x
Text Text x x x
Text Text x x x
Text Text x x
Text Text x
[quote=Author]Text[/quote]
Author wrote:
Text
x x x
Beginners Guide v 1.0.2 Eisen x
http://www.google.com/ http://www.google.com/ x x x
Tribal Wars Forum Tribal Wars Forum x x x
Code:
[b]not fat[/b]


not fat

x x x
[player]exception[/player] exception x x x
[ally]ally[/ally] ally x x x
[village](1|1)[/village] Invalid village x x x



Sending of IGM's using extrenal interface

Sometimes it is desirable to use external applications to send messages to players to inform them about important game events, or to verify their identity. Because the rules forbid the development and use of bots, we provide an interface for this purpose.

IGM-messages are created by GET-request:

http://tw5new.tribalwars.net/send_mail.php?from_id=FROM_ID&password=PASSWORD&to=TO&subject=SUBJECT&message=MESSAGE

Meaning of the parameters:

* FROM_ID: your account-id (it can be acquired e.g. through the ranking)
* PASSWORD: you account password md5-encoded
* TO: name (not id) of the player who is supposed to get the message
* SUBJECT: subject of the message
* MESSAGE: the message itself

This option is available for premium accounts only. Should it be abused for spamming or insulting other players, the account could be banned.
Example in PHP:

// The parameters must be URL encoded
$to = urlencode('exception');
$subject = urlencode('test & test');
$message = urlencode('This is a test');

$base_url = "http://tw5new.tribalwars.net/send_mail.php?from_id=FROM_ID&password=PASSWORD";

// go to URL
$handle = fopen($base_url . "&to=$to&subject=$subject&message=$message", 'r');
echo fgets($handle); // Display message
fclose($handle);



World data

For the creation external statistics, we provide the most important world data for download. The attributes of the villages, tribes and players are offered for download regularly.

Please load the world statistics only as often as you really need to. Scripts which load the statistics more than once per hour in regular operation are not allowed. In this case try to cache the data to an external webserver. The world statistics are updated at regular intervals, which depend on the particular server.

The files are also available compressed as .txt.gz files. If possible, please do use these files.

There are three files available for download. Each file consists of an arbitrary number of lines separated by commas. The individual data are coded with the PHP function urlencode(), which means for example that a comma is represented by %2C.
/map/village.txt - /map/village.txt.gz

This file contains information about the villages. The data are available in the following order:

$id, $name, $x, $y, $tribe, $points, $rank

/map/tribe.txt - /map/tribe.txt.gz

This file contains information about the players. The data are available in the following order:

$id, $name, $ally, $villages, $points, $rank

/map/ally.txt - /map/ally.txt.gz

This file contains information about Tribal Wars. The data are sorted in the following order:

$id, $name, $tag, $members, $villages, $points, $all_points, $rank

Example

A simple example in PHP to write the villages and their names into a MySQL-database:

$lines = gzfile('http://ds1.die-staemme.de/map/village.txt.gz', 'r');
if(!is_array($lines)) die("File could not be opened");
foreach($lines as $line) {
list($id, $name,$x, $y, $player, $points, $rank) = explode(',', $line);
$name = urldecode($name);

$name = addslashes($name);
mysql_query("INSERT INTO village SET id='$id', name='$name', x='$x', y='$y',
player='$player', points='$points', rank='$rank'");
}



Tribal Wars banner

If you want to sport a Tribal Wars banner on your homepage, you will find the code here. Copy the banner code from the textbox and insert it into the html code on your homepage. Thank you for helping promote Tribal Wars!
Banner
Tribal Wars, a free browser based MMOG

<a href="http://www.tribalwars.net/?ref=banner_468"><img src="http://www.tribalwars.net/banner.php?id=banner_468" alt="Tribal Wars, a free browser based MMOG"></a>

Button
Tribal Wars

<a href="http://www.tribalwars.net/?ref=banner_button"><img src="http://www.tribalwars.net/banner.php?id=banner_button" alt="Tribal Wars"></a>
Back to top Go down
https://ghostdogs.board-directory.net
 
Beginners Guide v 1.0.2
Back to top 
Page 1 of 1
 Similar topics
-
» Beginners Guide v 1.0.0
» Beginners Guide v 1.0.1
» Part 1 – An Introduction to the Beginners Guide

Permissions in this forum:You cannot reply to topics in this forum
 :: the dog's tips :: Tribal wars :: Beginners Guide v 1.0.0-
Jump to: