Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ALL] Draggable map
#1
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!
Reply
#2
Wrong forum.

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

MfG Manuel
Reply
#3
you have skype?
Reply
#4
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
Reply
#5
ok, the map is almost done, just add the lines of the continent and decorations
Reply
#6
~moved
Reply
#7
(15.05.2013, 15:50)Molt Wrote: ~moved

Thanks, but can you help me?
Reply
#8
This seems very cool if it's working, however it needs to be included somewhere to work, I guese in map template?
Reply
#9

  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
Attached Files .php   hack_01.php (Size: 2.34 KB / Downloads: 80)
Reply
#10
the map is already working perfectly, the problem is to add lines from the mainland on the minimap
Reply
#11
(17.05.2013, 15:12)Molt Wrote:
PHP Code:
...
// Here you can apply your changes.
... 

There's your hook.
Reply
#12
I don't use con_map class
Reply
#13
HEY FELIPE NICE TO MEET YOU HOW ARE YOU!?
✝ RiP 
Weiter geht's  Cool
Reply
#14
I don't understand what you are saying
Reply
#15
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...
Reply
#16
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.
Reply




Users browsing this thread: 1 Guest(s)