I need help for add continent lines in the minimap.
this function is:
steffen: Removed (my) copyrighted code.
Since now a thank,
Hugs, The Gamer!
Wrong forum.
How should we help you, when we don't have the whole source?
MfG Manuel
Yes.
manuel.mannhardt
But I go to bed now, I came home tomorrow at 4pm. Just write me some pn so that I remember.
MfG Manuel
ok, the map is almost done, just add the lines of the continent and decorations
(15.05.2013, 15:50)Molt Wrote: [ -> ]~moved
Thanks, but can you help me?
This seems very cool if it's working, however it needs to be included somewhere to work, I guese in map template?
- Download the attached file and move it to twlan/htdocs/lib/.
- Open twlan/htdocs/lib/con_map.php with a text editor, delete everything and replace it by this:
PHP Code:
<?php
require_once dirname(__FILE__).'/hack_01.php';
class con_map extends hack_01
{
function con_map()
{
$this->hack_01();
}
function draw($village, $userid, $ally)
{
parent::draw($village, $userid, $ally);
// Here you can apply your changes.
// The image variable is called $this->image and was created using imagecreatefrompng()
}
}
- Open twlan/htdocs/templates/game_map.tpl with a text editor and insert this at the very beginning of the file:
Code:
{php}
if(!file_exists('graphic/continent/'.$this->_tpl_vars['user']['id'].'-'.$this->_tpl_vars['conmap'].'-'.$this->_tpl_vars['contime'].'.png'))
{
$this->_tpl_vars['contime'] = reload_map($this->_tpl_vars['user']['id'], $this->_tpl_vars['continent'], $this->_tpl_vars['map']['x'], $this->_tpl_vars['map']['y'], FALSE);
}
{/php}
- Have fun.
Regards
Molt
the map is already working perfectly, the problem is to add lines from the mainland on the minimap
(17.05.2013, 15:12)Molt Wrote: [ -> ]PHP Code:
...
// Here you can apply your changes.
...
There's your hook.
I don't use con_map class
HEY FELIPE NICE TO MEET YOU HOW ARE YOU!?
I don't understand what you are saying
OK, I've done what you said Molt, but ummm...the map is not draggable?
Still, when I hover my mouse in the map and try dragging it, it just stays there, it won't move.
Any ideas?
PS. I deleted templates_c...
Well, the title of the thread is actually wrong, this hasn't anything to do with the draggable map. He wanted to outline continents on the minimap.
If you want a draggable map... you're gonna have to take the JavaScripts from Tribalwars and write a page which gives map data in JSON format and make the map request that using AJAX.