Issue information

Issue ID
#3282
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Jun 22, 2009 13:23
Last Post
Hercules Elf Bot
Apr 5, 2012 10:26
Confirmation
N/A

Hercules Elf Bot - Jun 22, 2009 13:23

Originally posted by [b]Saithis[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=3282

there are several script commands using the GID of mobs/npcs, but as far as i know the only script command which returned the GID got removed with the mob controller system...

This are the commands using GID:
CODE
*pcblockmove <GID/ID>,<option>;
*unitwalk <GID>,<x>,<y>;
*unitwalk <GID>,<mapid>;
*unitkill <GID>;
*unitwarp <GID>,<Mapname>,<x>,<y>;
*unitattack <GID>,<Target ID>;
*unitstop <GID>;
*unittalk <GID>,<Text>;
*unitemote <GID>,<Emote>;
*unitskilluseid <GID>,<skill id>,<skill lvl>{,<target id>};
*unitskilluseid <GID>,"<skill name>",<skill lvl>{,<target id>};
*unitskillusepos <GID>,<skill id>,<skill lvl>,<x>,<y>;
*unitskillusepos <GID>,"<skill name>",<skill lvl>,<x>,<y>;


so how about reimplementing the mobspawn command?
I modified the command a bit, so you can also define an event:
CODE
BUILDIN_FUNC(mobspawn)
{
    int class_,x,y,id;
    const char *str,*map;
    const char* event = "";

    // Who?
    str        =script_getstr(st,2);
    // What?
    class_    =script_getnum(st,3);
    // Where?
    map        =script_getstr(st,4);
    x        =script_getnum(st,5);
    y        =script_getnum(st,6);
    // Event?
    if( script_hasdata(st,7) )
    {
        event = script_getstr(st,7);
        check_event(st, event);
    }

    id = mob_once_spawn(map_id2sd(st->rid),map_mapname2mapid(map),x,y,str,class_,1,event);
    script_pushint(st,id);

    return 0;
}


Actually I don't understand really why this 4 commands got removed:
mobspawn, mobremove, getmobdata, setmobdata
as it is not really hard to maintain them...
for mobassist and mobattach i do understand it...

This post has been edited by Saithis: Jun 22 2009, 06:29 AM

Hercules Elf Bot - Dec 22, 2011 15:11

Originally posted by [b]GodLesZ[/b]
GID is the Game ID of an object, which could be ever a mobID or accountID fo a character.
The mob controller system were removed because its not needed for official quests (yet?).
Its released as a patch and may be added by everyone himself.

Every command which says it needs a "GID" is working using a chacater accountID or mobID (if not designed in another way..).
So no bug here