Jump to content
  • 0

Mob vs Mob


ittiphol

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  115
  • Reputation:   7
  • Joined:  05/09/19
  • Last Seen:  

How to fix this script two player mob vs mob

prontera,158,168,5    script    SpawnMoner    509,{
    monster "this", -1,-1, "--ja--", .mobid[ rand(.total_mob) ], 1;
    setunitdata $@mobid, UMOB_MASTERAID, getcharid(3);
    setunitdata $@mobid, UMOB_MODE, MD_CANMOVE | MD_CANATTACK | MD_AGGRESSIVE | MD_ASSIST;
    end;
OnInit:
    if (checkre(0)) {
        .@mob_db$  = "mob_db_re";
        .@item_db$ = "item_db_re";
    } else {
        .@mob_db$  = "mob_db";
        .@item_db$ = "item_db";
    }
    .total_mob = query_sql( "select id from "+ .@mob_db$ +" where mode & "+( MD_CANMOVE | MD_CANATTACK ), .mobid );
    end;
    }

I'll try talk to npc but mob it's not attack to mob
(Play two ID)

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  26
  • Reputation:   1
  • Joined:  06/25/16
  • Last Seen:  

Have you tried to "summon" the monster instead of just using the monster+setunitdata?

*summon "monster name",<monster id>{,<Time Out>{,"event label"}};

This command will summon a monster. (see also 'monster') Unlike monsters spawned
with other commands, this one will set up the monster to fight to protect the
invoking character. Monster name and mob id obey the same rules as the one given
at the beginning of this document for permanent monster spawns with the
exceptions mentioned when describing 'monster' command.

The effect for the skill 'Call Homunculus' will be displayed centered on the
invoking character.

Timeout is the time in milliseconds the summon lives, and is set default
to 60000 (1 minute). Note that also the value 0 will set the timer to default,
and it is not possible to create a spawn that lasts forever.
If an event label is given, upon the monster being killed, the event label will
run as if by 'donpcevent'.

Returned value is the game ID of the spawned monster.

Maybe just with this it will do the trick.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...