Jump to content

Decimal

Members
  • Posts

    44
  • Joined

  • Last visited

Posts posted by Decimal

  1. Exactly, I would like to know how many party/guild are on the map. Not how many members from the party/guild is online on the map.

    getuseronmap();
    while(users_iterator.hasnext() ){
     cur_user = users_iterator.next();
     ARR_FIND(0, nbusersonmap, i, (guildid[i] == cur_user.guilid)); //did we already found this guild ?
     if(i<nbpersononmap) continue; //already in here
     else {
     ARR_FIND(0, nbusersonmap, i, (guildid[i]==0) ); //register guilid in a new spot
     guildid[i] = cur_user.guildid;
    guildcount++;
     }
    }
    script_pushint(st, guildcount); //send number of guild in here
    

    I couldn't understand well. Do I have two options? The above one would work with the Script (doesn't seem like a Script though) only while the below one would work with the Source?

    /*==========================================
    * Template methode, [Lighta]
    * 0 mapusers number returned as int
    * 1 mapusers char id returned as $@mapcharid[]
    * 2 mapuser char name returned as $@mapcharname$[]
    *------------------------------------------*/
    BUILDIN_FUNC(getmapusers2)
    {
    const char *str = script_getstr(st, 2);
    int map_id = 0, users = 0;
    int type = script_getnum(st, 3);
    struct s_mapiterator* iter;
    TBL_PC *it_sd;
    
    if ((map_id = map_mapname2mapid(str)) <= 0)   //map not found
    {
    	TBL_PC *sd = script_rid2sd(st);
    	map_id = sd->bl.m;
    }
    if (!map_id) return -1;
    
    iter = mapit_getallusers();
    for (it_sd = (TBL_PC*) mapit_first(iter); mapit_exists(iter); it_sd = (TBL_PC*) mapit_next(iter))
    {
    	if (it_sd->bl.m != map_id)
    		continue;
    	if (pc_has_permission(it_sd, PC_PERM_HIDE_SESSION) && pc_isinvisible(it_sd))
    		continue; // skip hidden GMs (with !hide)
    	switch (type)
    	{
    	case 1:
    		mapreg_setreg(reference_uid(add_str("$@mapcharid"), users), it_sd->status.char_id);
    		break;
    	case 2:
    		mapreg_setregstr(reference_uid(add_str("$@mapcharname$"), users), it_sd->status.name);
    		break;
    		//add more type here
    	}
    	users++;
    }
    mapit_free(iter);
    if (type == 0) script_pushint(st, users);
    
    return 0;
    }
    

    And how exactly would I use the command? Would the syntax be like this:

    if (getmapusers2("pvp_n_1-5") == 0) {
    announce "All players failed to survive.",0;
    end;
    }
    

    And what would getmapusers2 (Party or Guild?) be exactly? Sorry for my ignorance, I am a real newbie at all this.

    :P

  2. Hi,

    I would like to know if is there something like "getmapusers" for "party" and "guild" where you'll be able to view how many "party" and "guild" are currently located on the specified map.

    See below an example of how I'll use the syntax:

    if (getmapusers("pvp_n_1-5") == 0) {
    announce "All players failed to survive.",0;
    end;
    }
    

  3. Hi Euphy,

    First of all, thanks for sharing all those amazing scripts you have made.

    Second, I need your support; I would like to use a variable (such as; #CASHPOINTS or #KAFRAPOINTS) to buy stuff on Multi-Shop Script. However, I have no idea how to do so because seems like the "setarray .Currency[1]" doesn't accept variable. So, could you please help me?

  4. Odd. Even admin acc doesn't work now.

    return array(
    'modules' => array(
    	'news'  => array(
    		'index'  =>  AccountLevel::ANYONE,
    	),
    ),
    )
    

    Or am I doing something wrong?

    //Edit:

    Alright! I figured out that the problem was a conflict with an AddOn (CMS AddOn made by CalciumKid) that I had installed; I uninstalled the AddOn and now your AddOn works perfectly fine.

    Sorry for the trouble caused!

  5. Hi,

    I've a problem with permission. For some reason I can only see the News & Update with my admin acc. This is how my access.php is set up;

    return array(
    'modules' => array(
    	'ipbrss'  => array(
    		'index'  =>  AccountLevel::ANYONE,
    	),
    ),
    )
    

    Do I need to configure something else? Besides addons > rss2news > config > access.php?

  6. I think so.

    I only changed the mob.h at rAthena\src\map\ like you did.

    // Change this to increase the table size in your mob_db to accomodate a larger mob database.
    // Be sure to note that IDs 4001 to 4048 are reserved for advanced/baby/expanded classes.
    // Notice that the last 1000 entries are used for player clones, so always set this to desired value +1000
    #define MAX_MOB_DB 10000
    

    Make sure to recompile correctly.

  7. See, the answer is there. Read carefully next time.

    ^_^

    To update your SP from 2 to 3:

    You can turn on Automatic Updates so that your computer downloads the latest SP automatically.

    Or

    You can download from somewhere (Microsoft, maybe?).

    • Upvote 1
  8. First of all; download the rAthena using TortoiseSVN.

    Second; setup your rAthena and MySQL (Import your Custom DB from eAthena to rAthena and such).

    Third; update the MySQL to be compatible with rAthena. How? Import these files from rAthena's sql-files:

    upgrade_svn15531_db

    upgrade_svn15572

    upgrade_svn15885

    15531 will update your MOB DB to be compatible with rAthena latest version.

    15572 will update the permissions system (from level to group) to be compatible with rAthena latest version.

    15885 will create the table elemental if you don't have one.

    • Upvote 1
  9. It isn't server side?

    How can I delete a char with new servers?

    I don't understand how it work...

    At character select, there is a button "del request". But there's a delay of 24 hours to erase your character. However, you may change the delay to erase your character faster if you don't want to wait for a day.

    trunk/conf/char_athena.conf:

    // Amount of time in seconds by which the character deletion is delayed.
    // Default: 86400 (24 hours)
    // NOTE: Requires client 2010-08-03aragexeRE or newer.
    char_del_delay: 86400
    

    • Upvote 1
  10. DebugError.png

    Would anyone know what is causing this kind of error on my SVN?

    Note: This happen after some hours that my SVN is running on my Windows Server. I use Windows Server 2008 R2 x64.

  11. I wanted to update my SVN from rAthena Revision 15527 to latest version and so I did reconfigure everything from zero, but I'm having problem with the MySQL DB and Control Panel now because of the 'group.conf' system which I don't have on rAthena Revision 15527.

    New GM, Commands & Permissions system has been added in r15572. Unfortunately, this update is not backwards compatible with previous revisions and requires reconfiguration of existing rAthena installations.

    Details

    • Column `login`.`gmlevel` has been renamed to `group_id`. It now stores ID of the group player belongs to, so you need update your database accordingly.

    I would like to know how to change the column name appropriately because I ran a SQL Query and seems like it didn't work well, the name changes and all but when I try to connect to the server I have an error. See the SQL Query that I used below:

    alter table login change level group_id tinyint (3) ;
    

    Not sure if that's the correct way to change the column name so I would like to know what's the correct way.

    As for Control Panel; I would like to know if is there a Control Panel compatible with that new system.

  12. I think that you're right, thank you very much. I just looked into both Database Structure:

    rAthena Revision 15527:
    // ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,ExpPer,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper
    rAthena Revision 16233:
    // ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper
    

×
×
  • Create New...