Jump to content

Jarek

Members
  • Posts

    143
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Jarek

  1. «You are doing it wrong». (= Try this:

    BUILDIN_FUNC(downrefitem)
    {
    	int i = -1,num,ep;
    	TBL_PC *sd;
    
    	num = script_getnum(st,2);
    	sd = script_rid2sd(st);
    	if( sd == NULL )
    		return 0;
    
    	if (num > 0 && num <= ARRAYLENGTH(equip))
    		i = pc_checkequip(sd,equip[num-1]);
    	if(i >= 0) {
    		ep = sd->status.inventory[i].equip;
    
    		//Logs items, got from (N)PC scripts [Lupus]
    		log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i]);
    
    		sd->status.inventory[i].refine++;
    		pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below
    
    		if(sd->status.inventory[i].refine < 4)
    			clif_refine(sd->fd,2,i,sd->status.inventory[i].refine = 0);
    		else
    			clif_refine(sd->fd,2,i,sd->status.inventory[i].refine = sd->status.inventory[i].refine - 4);
    		clif_delitem(sd,i,1,3);
    
    		//Logs items, got from (N)PC scripts [Lupus]
    		log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i]);
    
    		clif_additem(sd,i,1,0);
    		pc_equipitem(sd,i,ep);
    		clif_misceffect(&sd->bl,2);
    	}
    
    	return 0;
    }

    Or you could run the command 3 times...

    Yeah, that's more simple >.<
  2. Hmm

    I'm tried to make new skill (but i don't create new skil 'cause it takes time and i'm too lazy, just replace code for MC_IDENTIFY) and it works

    All i do is

    replaced this

        case MC_IDENTIFY:
            if(sd)
                clif_item_identify_list(sd);
            break;
    
    with this
        case MC_IDENTIFY:
            if(sd)
                if (storage_storageopen(sd))
                    return -1;
            break;
    
     

     

    and wrote in the beginning

    #include "storage.h"
    
     

    What i'm doing wrong? (=

  3. atcommand.c

    ACMD_FUNC(monster)

    ...

    memset(name, '\0', sizeof(name));

    memset(monster, '\0', sizeof(monster));

    memset(atcmd_output, '\0', sizeof(atcmd_output));

    + if((pc_get_group_level(sd) < 99) && (map[sd->bl.m].flag.town))

    + return -1;

    if (!message || !*message) {

    ...

  4. Ru localization

    http://pastebin.com/sap6wqVG

     

    +I found some typos:

     
    IDCHECKBOX_NOCTRL,              "Turns turns auto-attack on and off.\r\nEnables you to auto-attack an enemy without having to hold CTRL key when starting the attack.\r\n\r\nIngame: /noctrl or /nc"
    IDCHECKBOX_NOSHIFT,             "Turns turns force heal on and off.\r\nEnables you to use your 'force heal' ability without the having to hold the SHIFT key.\r\n\r\nIngame: /noshift or /ns"
    IDCHECKBOX_TRILINEARFILTER,     "Turns trilinear filtering (smoothing) on and off. Blurs all graphics to acchive a smoothening effect, but might cause text harder to read.\r\n\r\nIngame: Alt+D"
    • Upvote 1
  5. На вопрос: "А можно ли в еА сделать то-то и то-то?" ответ один: "Да можно!", а вот вопрос "Как?" требует более тщательного рассмотрения :)

    Ну я думаю следует сделать через чтение файла, в котором указаны связки итемов. Сам запрет написать в pc_isUseitem

  6. А тут все просто.

    1) в db\ создаем файл, например mob_mydb.txt

    Первой строчкой там вписываем

    0,Poring,1002

    А потом уже свой список.

    2) в mob.h

    Увеличиваем MAX_RANDOMMONSTER на 1 (по идее там должно быть 4, значит меняем на 5)

    3) в mob.c ищем функцию mob_read_randommonster

    вписываем название своего файла

    	const char* mobfile[] = {
    	"mob_branch.txt",
    	"mob_poring.txt",
    	"mob_boss.txt",
    	"mob_pouch.txt",
    	"mob_mydb.txt"};

    4) Рекомпилим

    5) Скрипт для вызова случайного монстра из вашего списка { monster "this",-1,-1,"--ja--",-5,1,""; }

×
×
  • Create New...