Jump to content

Search the Community

Showing results for tags 'getmapusers'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Bulletin Centre
    • Community News
    • Repository News
    • Ragnarok News
  • Hercules Development Centre
    • Development Discussion
    • Suggestions
    • Development Centre Archives
  • Support & Releases
    • General Server Support
    • Database
    • Scripting
    • Source
    • Plugin
    • Client-Side
    • Graphic Enhancements
    • Other Support & Releases
  • Hercules Community
    • General Discussion
    • Projects
    • Employment
    • Server Advertisement
    • Arts & Writings
    • Off Topic
  • 3CeAM Centre
    • News and Development
    • Community
  • International Communities
    • Filipino Community
    • Portuguese Community
    • Spanish Community
    • Other Communities

Categories

  • Client Resources
  • Graphic Resources
    • Sprites & Palettes
    • Maps & Textures
    • Other Graphics
  • Server Resources
    • Server Managers / Editors Releases
    • Script Releases
    • Source Modifications
    • Plugins
    • Pre-Compiled Server
  • Web Resources

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Discord


Skype


IRC Nickname


Website URL


Location:


Interests


Github

Found 1 result

  1. Lately i been working to switch from eAthena server to Hercules. with all the new functions Hercules has i started to build new scripts for my npcs. i found myself searching a lot for lists: 1) Name of people on specific map. 2) Char ID of people on specific map. 3) Account ID of people on specific map. BUILDIN(getmapusers) { int16 m; int type = 0; int users = 0; struct s_mapiterator* iter; struct map_session_data *sd; const char *str; str = script_getstr(st,2); if( (m=map->mapname2mapid(str))< 0) { script_pushint(st,-1); return true; } if (script_hasdata(st,3)) type = script_getnum(st,3); else{ script_pushint(st,map->list[m].users); return true; } iter = mapit_getallusers(); for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { if (sd->bl.m == m){ switch (type) { case 1: mapreg->setregstr(reference_uid(script->add_str("$@mapcharname$"), users), sd->status.name); break; case 2: mapreg->setreg(reference_uid(script->add_str("$@mapcharid"), users), sd->status.char_id); break; case 3: mapreg->setreg(reference_uid(script->add_str("$@mapaccountid"), users), sd->status.account_id); break; } users++; } } mapit->free(iter); return true; } BUILDIN_DEF(getmapusers,"s?"), I was wondering if you want to add it to Hercules as a new feature. Regards, Klutx
×
×
  • Create New...

Important Information

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