Jump to content
  • 0
ragexe

Custom Instance unitskilluseid (Please help)

Question

 monster(.@map$, 120, 130, "Dracula", 1389, 1);
        'Dracula = $@mobid[0];

            getunitdata 'Dracula,.@bossdata;
            .@x = .@bossdata[6];
            .@y = .@bossdata[7];
            monster instance_mapname("1@dra"),.@x,.@y,"",1389,1;
            'draculaclone = $@mobid[0];
            setunitdata 'draculaclone, 29, 1;
            unitskilluseid 'draculaclone, 85, 1;
                if(rand(1,20) > 10) {
                    unittalk 'Dracula,"!!!!!!";
                    unitskillusepos 'draculaclone,85,10,.@x,.@y;
                    for(.@i = 0; .@i < 2; .@i ++) {
                        unitskillusepos 'draculaclone,89,10,.@x+.@i+5,.@y+.@i+5;
                        unitskillusepos 'draculaclone,89,10,.@x-.@i-5,.@y-.@i-5;
                    }
            }

I'm trying to create custom instance, but unitskilluseid & unitskillusepos just cast(just magic circle) without give any magic effect & damage, no error in map server

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

your .@x and .@y do not get the right data because you call getunitdata() improperly: you have to specify the data type, which would be UDT_MAPIDXY in your case

 

see https://github.com/HerculesWS/Hercules/blob/master/doc/script_commands.txt#L9636

hi thanks for answer, but can you give example to use that?

.@x = UDT_MAPIDXY[1]?

.@y = UDT_MAPIDXY[2]?

Edited by ragexe

Share this post


Link to post
Share on other sites
  • 0

If all you want is get the location then getmapxy() works just fine, no need to use more "advanced" commands such as getunitdata

Share this post


Link to post
Share on other sites
  • 0

If all you want is get the location then getmapxy() works just fine, no need to use more "advanced" commands such as getunitdata

yea thanks work now

Edited by ragexe

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.