Jump to content

Legato

Members
  • Posts

    87
  • Joined

  • Last visited

Posts posted by Legato

  1. After hours of searching what client to use. I decided to use 2011-11-02 but every time I open the setup.exe and choose the configuration I want and then close and save it. The configs I did doesn't apply to the client. The setup.exe I'm using is the one with the Marionnette and Ghosting in it's picture. Does it have something to do with the 'System' folder?

    Tia.

    It's been a day. No one?

    Sorry. Had to bump this one. It's been a day. No one?

  2. The lines with the - are to be removed and the ones with + are to be added.

    And this line right here is the path. So you have to go to your db folder and open const.txt search for the word before the one with the + sign and paste it under.

    +++ db/const.txt	(working copy)
    

    You could check these 2 links for more information about diff.

    Link 1

    Link 2

  3. Hey, everyone. I've got some newbie questions and hoping to get some accurate answers since I don't know what to search for this concern.(Tried reading some script commands but didn't quite understand most of it. So, please bear with me.)

    Right, here goes. Please, click the spoiler.

    1. Is there a way to check the total numbers of a specific monster on a map? Like for example, I want to check the amount of porings on prt_fild08, if it's <= 20, npc will automatically spawns 20 more porings on that map.

    2. (A)Scenario : Player talks to the NPC, then NPC ask the player if he/she wants to do the quest. Player agrees, quest starts after the conversation, then he/she will fail the quest if logs off, dies on the same map(or just die). How can I make that happen? Someone, please post an example. If some of the codes needs an explanation, please do so. I'd really be grateful.

    2. (B)Scenario : Player talks to the NPC, then NPC ask the player if he/she wants to do the quest. Player agrees, quest starts after the conversation, but won't fail unless he gave up. How can I make that happen? Someone, please post an example. If some of the codes needs an explanation, please do so. I'd really be grateful.

    3. Scenario : Player talks to the NPC to do some quest, NPC ask the player to collect some items, player returns to NPC but didn't bring all the items. NPC got pissed and don't want to talk to that player for an hour. How can I make that happen? Someone, please post an example. If some of the codes needs an explanation, please do so. I'd really be grateful.

    I found this while searching the old forum but I am a bit confused.

    Pardon me, it's 12:36AM. @_@

    Any kind of help would be greatly appreciated.

    - Legato

  4. Here's for the 5 seconds delay.

    src/map/atcommand.c

    ACMD_FUNC(new_mount) {
    
    +	if ( DIFF_TICK(gettick(), sd->new_mount_cd) < 5000 ) {
    +		clif_displaymessage(fd, "You can only use this command once per 5 seconds.");
    +			return 1;
    +	}
    +	sd->new_mount_cd = gettick();
    +	
    clif_displaymessage(sd->fd,"NOTICE: If you crash with mount your LUA is outdated");	
    
    if( !(sd->sc.option&OPTION_MOUNTING) ) {
    	clif_displaymessage(sd->fd,"You have mounted.");
    	pc_setoption(sd, sd->sc.option|OPTION_MOUNTING);
    } else {
    	clif_displaymessage(sd->fd,"You have released your mount");
    	pc_setoption(sd, sd->sc.option&~OPTION_MOUNTING);
    }
    return 0;
    }
    

    src/map/pc.h

    unsigned char head_dir; //0: Look forward. 1: Look right, 2: Look left.
    unsigned int client_tick;
    +  unsigned int new_mount_cd;	
    int npc_id,areanpc_id,npc_shopid,touching_id;
    

    For the cast-bar on the top of the head, that I don't know.

  5. Yes, I know. You already told me on my other topic. O:

    That script command isn't working properly. I hope someone could give me the fix.

    Anyways, thanks for telling me again, Arcenciel. :P

    Are we allowed to bump our thread on this section? If so, this is me bumping my thread. Thanks.

    Bump.

    EDIT:

    Nvm. Fixed it. Close the thread, thanks.

  6. Hello, everyone. Not sure if this one should go here or to Source Request.

    I hope someone could correct this script command. I tried to edit it, but it also create non-headgears.

    Anyway, here's the code:

    // Costume Item System [GreenBox - Cronus]
    BUILDIN_FUNC(getcostumeitem)
    {
    int nameid,amount,get_count,i,flag = 0;
    struct item it;
    TBL_PC *sd;
    struct script_data *data;
    
    data=script_getdata(st,2);
    get_val(st,data);
    if( data_isstring(data) )
    {// "<item name>"
    	const char *name=conv_str(st,data);
    	struct item_data *item_data = itemdb_searchname(name);
    	if( item_data == NULL ){
    		ShowError("buildin_getcostumeitem: Nonexistant item %s requested.n", name);
    		return 1; //No item created.
    	}
    	nameid=item_data->nameid;
    } else if( data_isint(data) )
    {// <item id>
    	nameid=conv_num(st,data);
    	//Violet Box, Blue Box, etc - random item pick
    	if( nameid < 0 ) {
    		nameid=itemdb_searchrandomid(-nameid);
    		flag = 1;
    	}
    	if( nameid <= 0 || !itemdb_exists(nameid) ){
    		ShowError("buildin_getcostumeitem: Nonexistant item %d requested.n", nameid);
    		return 1; //No item created.
    	}
    } else {
    	ShowError("buildin_getcostumeitem: invalid data type for argument #1 (%d).", data->type);
    	return 1;
    }
    
    // <amount>
    if( (amount=script_getnum(st,3)) <= 0)
    	return 0; //return if amount <=0, skip the useles iteration
    
    memset(&it,0,sizeof(it));
    it.nameid=nameid;
    if(!flag)
    	it.identify=1;
    else
    	it.identify=itemdb_isidentified(nameid);
    
    if (!(it.equip&EQP_HEAD_LOW) ||
    	!(it.equip&EQP_COSTUME_HEAD_LOW) ||
    	!(it.equip&EQP_HEAD_MID) ||
    	!(it.equip&EQP_COSTUME_HEAD_MID) ||
    	!(it.equip&EQP_HEAD_TOP) ||
    	!(it.equip&EQP_COSTUME_HEAD_TOP)
    	)
    {
    	ShowError("buildin_getcostumeitem: this item can't be a costume.");
    	return 0;
    }
    
    if( script_hasdata(st,4) )
    	sd=map_id2sd(script_getnum(st,4)); // <Account ID>
    else
    	sd=script_rid2sd(st); // Attached player
    
    if( sd == NULL ) // no target
    	return 0;
    
    //Check if it's stackable.
    if (!itemdb_isstackable(nameid))
    	get_count = 1;
    else
    	get_count = amount;
    
    it.nameid=nameid;
    it.identify=1;
    it.refine=0;
    it.attribute=5;
    it.card[0]=0;
    it.card[1]=0;
    it.card[2]=0;
    it.card[3]=0;
    
    for (i = 0; i < amount; i += get_count)
    {
    	// if not pet egg
    	if (!pet_create_egg(sd, nameid))
    	{
    		if ((flag = pc_additem(sd, &it, get_count, LOG_TYPE_SCRIPT)))
    		{
    			clif_additem(sd, 0, 0, flag);
    			if( pc_candrop(sd,&it) )
    				map_addflooritem(&it,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
    		}
    	}
    }
    
    return 0;
    }
    

    Tia.

  7. You can find the codes on eAthena. Click me

    I copied the codes that AnnieRuru wrote and make a .diff file of it. I based it on rAthena's. NOTE: I'm not good in making a .diff/.patch file so, bear with me. I tried to patch it using TortoiseSVN but it doesn't seem to work so, I'm guessing you'd have to apply the codes manually.

    Here's an example of an item that gives 5 str.

    17000,blu,bla,12,50,,70,,,,,0xFFFFFFFE,7,2,,,60,,,{ bonus bStr,5; },{},{}
    

    Credits goes to digitalhamster.

    Charms.diff

  8. Hiya, everyone. Can someone tell me why I'm getting all these warnings? Been trying to search for answers, but I can't find any accurate one.

    Thanks.

      	 mob_spawn (md); // Crea el MOB
    	clif_misceffect2(&md->bl, 92); // Meteor Storm
    	md->status.max_hp = power;
    	md->status.hp = power;
    
    

    clif_announce(&md->bl, output, (int)strlen(output) + 1, 0x0066CC, 1);
    

       	 sprintf (mensaje, "[%s] Killed by [%s]",(mvp_sd?mvp_sd->status.name:"???"),md->db->jname);
    		clif_GMmessage(&sd->bl, mensaje, strlen(mensaje) + 1, 1);
    

    warning C4013: 'clif_misceffect2' undefined; assuming extern returning int
    warning C4013: 'clif_announce' undefined; assuming extern returning int
    warning C4013: 'clif_GMmessage' undefined; assuming extern returning int
    

    warning C4013: 'map_readregions' undefined; assuming extern returning int
    

    map_readregions();
    

    /*======================================
     * [Zephyrus] Regional Maps
     *--------------------------------------*/
    int map_readregions (void)
    {
    int k, index;
    struct region_data *db;
    FILE* fp = NULL;
    char line[1024];
    char *str[6], *p;
    
    memset(region, 0, sizeof(region));
    sprintf(line, "%s/region_db.txt", db_path);
    
    if( (fp = fopen(line, "r")) == NULL ) {
    	ShowError("can't read %s\n", line);
    	return -1;
    }
    
    while( fgets(line, sizeof(line), fp) )
    {
    	if( line[0]=='/' && line[1]=='/' )
    		continue;
    
    	k = 0;
    	p = strtok (line,";");
    	while (p != NULL && k < 6)
    	{
    		str[k++] = p;
    		p = strtok (NULL, ";");
    	}
    
    	if( str[0] == NULL ) continue;
    
    	index = atoi(str[0]);
    	if( index < 1 )
    		continue;
    	if( index >= MAX_REGIONS ) {
    		ShowError("read_regiondb : Incorrect Index value %d.\n", index);
    		continue;
    	}
    
    	db = &region[index];
    	safestrncpy(db->name, str[1], ITEM_NAME_LENGTH);
    	db->bexp = atoi(str[2]);
    	db->jexp = atoi(str[3]);
    	db->vending_tax = atoi(str[4]);
    	db->bdrop = atoi(str[5]);
    }
    
    fclose(fp);
    ShowInfo("Successfull loaded region data.\n");
    return 0;
    }
    

  9. Thanks for replying, Arcenciel. Yea, I knew that. You already told me on the other topic.

    Well, it's weird, because on eAthena, 3ceam and ream I could use the full diff of costume items that I found on eA without experiencing the problem I've stated on my first post. But, on rAthena, there's no warning or error showing when I'm recompiling. Everytime I created a costume item with that command(256,512 and 1 as for their locations) server keeps on un-equipping it upon log-in.

    EDIT:

    Nvm. Fixed it.

  10. Hiya, everyone. Everytime I log off and then log back in, the costume item that is made by this custom command(Made by Greenbox) is always taken off.

    This is the code for the command.

    @costumeitem

    // Costume Item System [GreenBox]
    ACMD_FUNC(costumeitem)
    {
    struct item item_tmp;
    struct item_data *item_data;
    char item_name[100];
    int item_id, number = 0;
    int flag;
    int loop, get_count, i;
    nullpo_retr(-1, sd);
    
    memset(item_name, '\0', sizeof(item_name));
    
    if (!message || !*message || (
    	sscanf(message, "\"%99[^\"]\" %", item_name, &number) < 1 &&
    	sscanf(message, "%99s %d", item_name, &number) < 1
    )) {
    	clif_displaymessage(fd, "Please, at least enter an option. (usage: @costumeitem <item name or ID> <quantity>).");
    	return -1;
    }
    
    if (number <= 0)
    		number = 1;
    
    item_id = 0;
    if ((item_data = itemdb_searchname(item_name)) != NULL ||
    	(item_data = itemdb_exists(atoi(item_name))) != NULL)
    		item_id = item_data->nameid;
    
    if (item_id > 500) {
    	loop = 1;
    	get_count = number;
    	if (!(item_data->equip&EQP_HEAD_LOW) &&
    			!(item_data->equip&EQP_COSTUME_HEAD_LOW) &&
    			!(item_data->equip&EQP_HEAD_MID) &&
    			!(item_data->equip&EQP_COSTUME_HEAD_MID) &&
    			!(item_data->equip&EQP_HEAD_TOP) &&
    			!(item_data->equip&EQP_COSTUME_HEAD_TOP)
    			)
    	{
    		clif_displaymessage(fd, "This can't be a costume item.");
    		return 1;
    	}
    
    	for (i = 0; i < loop; i++) {
    		memset(&item_tmp, 0, sizeof(item_tmp));
    		item_tmp.nameid = item_id;
    		item_tmp.identify = 1;
    		item_tmp.refine = 0;
    		item_tmp.attribute = 5;
    		item_tmp.card[0] = 0;
    		item_tmp.card[1] = 0;
    		item_tmp.card[2] = 0;
    		item_tmp.card[3] = 0;
    		if ((flag = pc_additem(sd, &item_tmp, get_count)))
    			clif_additem(sd, 0, 0, flag);
    	}
    
    	//Logs (A)dmins items [Lupus]
    	if(log_config.enable_logs&0x400)
    		log_pick_pc(sd, "A", item_tmp.nameid, number, &item_tmp);
    
    	clif_displaymessage(fd, msg_txt(18)); // Item criado.
    } else {
    	clif_displaymessage(fd, msg_txt(19)); // Nome/ID inválido.
    	return -1;
    }
    
    return 0;
    }
    

    dytws6.jpg

    oigmcx.jpg

  11. Hiya, everyone. Can someone help me sort my problem out.

    It's the about the costume items made by Greenbox.

    Here's the code for pc_unequipitem

    if (sd->status.inventory[n].equip & EQP_HEAD_LOW_C)
    {
    int getLowLook = 0;
    sd->status.costume_low = 0;
    if (sd->equip_index[EQI_HEAD_LOW] > 0)
    {
    	int d = sd->equip_index[EQI_HEAD_LOW];
    	getLowLook = sd->inventory_data[d]->look;
    }
    clif_changelook(&sd->bl, LOOK_HEAD_BOTTOM, getLowLook);
    }
    
    if (sd->status.inventory[n].equip & EQP_HEAD_LOW)
    {
    int getLowLook = 0;
    if (sd->status.costume_low > 0)
    	getLowLook = sd->status.costume_low;
    
    clif_changelook(&sd->bl, LOOK_HEAD_BOTTOM, getLowLook);
    }
    

    When I equip the costume items and then reconnect, unequip the costume items and then reconnect, the costume items are still equipped on my character while they are not. I think it has something to do with the code I posted above. [it was posted/made by r99t]

    Here's the code for pc_equipitem.

    if (pos & EQP_HEAD_LOW_C)
    {
    sd->status.costume_low = id->look;
    clif_changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.costume_low);
    }
    
    if((pos & EQP_HEAD_LOW) && sd->status.costume_low == 0)
    {
    sd->status.head_bottom = id->look;
    clif_changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.head_bottom);
    }
    

    Tia and Happy Holidays to everyone!

  12. Here. Thanks to Ind for the fix.

    /*==========================================
    * @broadcast by [Valaris]
    *------------------------------------------*/
    ACMD_FUNC(broadcast)
    {
    +  int gm_lvl = pc_isGM(sd);
       nullpo_retr(-1, sd);
       memset(atcmd_output, '0', sizeof(atcmd_output));
    

  13. Ohh. Hiya, Keikun. Yep, I saw that from main.sql. But, how is that I get that error everytime I try to mail someone.

    2essy2killu, do I have to execute it all? Entries would be duplicated.

    EDIT :

    Is this the correct link for download for renewal?

  14. k9my8.png

    Everytime I use the Mailing NPC or @mail command this error shows up.

    I found the sql queries for the mail inside the upgrade_svn11548.sql file. But it keeps on showing "Unknown column" for every queries when I execute it.

    And inside the game I get this error "You have failed to mail a message. Recipient does not Exist"

×
×
  • Create New...