how if i use a monster ID as a NPC ID?I don't think an npc attacking or using actual skills (not just effects) will get a nice behavior in the emulator. I bet you can make it but you'll probably get a server crash or a huge warning, since npcs don't have any atk value.
What you can do with it is maybe making a monster attack another monster provided you have their GIDs. Or a player attacking some other thing without actually ordering his player character himself.
But as said, I don't think making a npc attacking or being attacked is a big idea.
unit* commands are just a leftover of the mob control suite that was custom built long long ago in the eAthena era and then was removed. The unit* commands just give a quite basic control which isn't just enough for much purposes).Both 'monster' and 'areamonster' return the GID of the monster
spawned if there was ONLY ONE monster to be spawned. This is useful for
controlling each of the spawned mobs with the unit* commands shown below.
For example:
// We'll make a poring which will automatically attack invoking player:
set .@mobGID, monster "Prontera",150,150,"Poring",1002,1;
unitattack .@mobGID, getcharid(3); // Attacker GID, attacked GID
The way you can get the GID of more than only one monster is looping
through all the summons to get their individual GIDs and do whatever you
want with them. For example:
// We want to summon .mobnumber porings which will give us a kiss
for (set .@i, 0; .@i < .mobnumber; set .@i, .@i + 1){
set .@mobGID, monster "map",.x,.y,"Kisser Poring",1002,1;
unitemote .@mobGID, e_kis;
}
Refer to the unit* commands below in this document.
We use essential cookies to make this site work, and optional cookies to enhance your experience.