TWLan Forum
[ALL] Draggable map - Printable Version

+- TWLan Forum (https://twlan.org)
+-- Forum: Legacy (https://twlan.org/forumdisplay.php?fid=61)
+--- Forum: TWLan 1.x (DSLan) (https://twlan.org/forumdisplay.php?fid=62)
+---- Forum: English Community (https://twlan.org/forumdisplay.php?fid=64)
+----- Forum: Questions & Problems (https://twlan.org/forumdisplay.php?fid=30)
+----- Thread: [ALL] Draggable map (/showthread.php?tid=43229)



[ALL] Draggable map - The Gamer - 14.05.2013

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!


RE: [ALL] Draggable map - SlimShady95 - 14.05.2013

Wrong forum.

How should we help you, when we don't have the whole source?

MfG Manuel


RE: [ALL] Draggable map - The Gamer - 14.05.2013

you have skype?


RE: [ALL] Draggable map - SlimShady95 - 14.05.2013

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


RE: [ALL] Draggable map - The Gamer - 14.05.2013

ok, the map is almost done, just add the lines of the continent and decorations


RE: [ALL] Draggable map - Molt - 15.05.2013

~moved


RE: [ALL] Draggable map - The Gamer - 15.05.2013

(15.05.2013, 15:50)Molt Wrote: ~moved

Thanks, but can you help me?


RE: [ALL] Draggable map - parat26 - 17.05.2013

This seems very cool if it's working, however it needs to be included somewhere to work, I guese in map template?


RE: [ALL] Draggable map - Molt - 17.05.2013


  1. Download the attached file and move it to twlan/htdocs/lib/.
  2. 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()
        
    }

  3. 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}
  4. Have fun.

Regards
Molt


RE: [ALL] Draggable map - The Gamer - 17.05.2013

the map is already working perfectly, the problem is to add lines from the mainland on the minimap


RE: [ALL] Draggable map - Molt - 17.05.2013

(17.05.2013, 15:12)Molt Wrote:
PHP Code:
...
// Here you can apply your changes.
... 

There's your hook.


RE: [ALL] Draggable map - The Gamer - 17.05.2013

I don't use con_map class


RE: [ALL] Draggable map - Milu2K - 18.05.2013

HEY FELIPE NICE TO MEET YOU HOW ARE YOU!?


RE: [ALL] Draggable map - The Gamer - 18.05.2013

I don't understand what you are saying


RE: [ALL] Draggable map - parat26 - 21.05.2013

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...


RE: [ALL] Draggable map - Molt - 21.05.2013

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.