Jump to content

yagamiraito

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by yagamiraito

  1. Chris, there are two bracket in Mass Seller script doesn't have Right Curly Bracket. At line 144.

    Thank you for your wonderful script!

    Edit: Nevermind got it work.

     

    On 11/3/2018 at 9:55 PM, jeromeblade said:

    Hi Chris, i got an error in this script "mass seller"

    i tried to put 1 curly brace at the end but it shows a new error. please help me to fix it. thank you.

    missing 1 right curlys at file npc/custom/mass_seller.txt , line 144

     

    
    prontera,150,180,4	script	Mass Seller	100,{
    mes .n$;
    mes "Welcome, "+strcharinfo(0)+"!";
    mes "How can I help you?";
    next;
    switch(select("- Sell Items:- Personal Config:- Leave")) {
    	case 1:
    	mes .n$;
    	if(!getarraysize(MS_Types)) {
    		mes "If this is your first time using my service, I would recommend you setup your personal config before proceeding.";
    		mes "Otherwise I will sell every Item in your Inventory, except Refined Equipment and Equipment with Cards.";
    		mes " ";
    	} else {
    		mes "Here is the current list of your ignored items:";
    			for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
    				for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
    					if(MS_Types[.@p] == .itemtypesid[.@q])
    						mes " > "+.itemtypestxt$[.@q];
    
    	next;
    	if(select("- Continue:- Leave") - 1) close;
    	getinventorylist;
    	for ( set .@i,0; .@i < @inventorylist_count; set .@i,.@i + 1) {
    		set .@e,0;
    		// Skip Equipment which is: Equipped, Refined and has Cards/Enchantments
    		if(@inventorylist_equip[.@i] != 0) continue;
    		if(@inventorylist_refine[.@i] != 0) continue;
    		if(@inventorylist_card1[.@i] != 0) continue;
    		if(@inventorylist_card2[.@i] != 0) continue;
    		if(@inventorylist_card3[.@i] != 0) continue;
    		if(@inventorylist_card4[.@i] != 0) continue;
    		for ( set .@l,0; .@l < getarraysize(MS_Types); set .@l,.@l + 1)
    			if(getiteminfo(@inventorylist_id[.@i],2) == (MS_Types[.@l]-1) ) {
    				set .@e,1;
    				break;
    			}
    		// Check if the selected item id was already mentioned for having more of the same than once
    		for ( set .@d,0; .@d < getarraysize(.@dup_item); set .@d,.@d + 1)
    			if(@inventorylist_id[.@i] == .@dup_item[.@d]) {
    				set .@e,1;
    				break;
    			}
    		if(.@e) continue;
    
    		// Checking if an item is equipped while you have multiply items of it in your inventory,
    		// preventing it of selling accidently
    		for ( set .@t,0; .@t < 20; set .@t,.@t + 1)
    			if(getequipid(.@t) == @inventorylist_id[.@i]) {
    				message strcharinfo(0),.n$+": You have the following item equipped and in your inventory, which I will not sell: "+countitem(@inventorylist_id[.@i])+"x "+getitemname(@inventorylist_id[.@i])+"!";
    				setarray .@dup_item[getarraysize(.@dup_item)],@inventorylist_id[.@i];
    				set .@e,1;
    				break;
    			}
    		if(.@e) continue;
    		setarray .@sellid[getarraysize(.@sellid)],@inventorylist_id[.@i];
    	}
    	for ( set .@s,0; .@s < getarraysize(.@sellid); set .@s,.@s + 1) {
    		set .@total,.@total + (getiteminfo(.@sellid[.@s],1)*countitem(.@sellid[.@s]));
    		delitem2 .@sellid[.@s],countitem(.@sellid[.@s]),1,0,0,0,0,0,0;
    	}
    	mes .n$;
    	if(getarraysize(.@sellid) > 0) {
    		mes "Your items were sold and you recieved "+.@total+" Zeny.";
    		set Zeny,Zeny + .@total;
    	} else
    		mes "No Items were sold, therefore you don't recieve any Zeny.";
    	break;
    
    	case 2:
    	mes .n$;
    	mes "What do you want to do?";
    	next;
    	if(select("- Add Item Type:- Remove Item Type") == 1) {
    		mes .n$;
    		mes "Please choose which Item Type you want to add to your list:";
    		for ( set .@l,0; .@l < getarraysize(.itemtypestxt$); set .@l,.@l + 1)
    			set .@ms_list$,.@ms_list$ + "- "+.itemtypestxt$[.@l] + ( (.itemtypestxt$[.@l+1] != "")?":":"");
    
    		set .@it,select(.@ms_list$) - 1;
    		next;
    		mes .n$;
    		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
    			if(.@it == MS_Types[.@p]) {
    				mes "This Item Type is already included in your list. Please choose a different one.";
    				close;
    			}
    		mes "The Item Type \""+.itemtypestxt$[.@it]+"\" has been added.";
    		setarray MS_Types[getarraysize(MS_Types)],.itemtypesid[.@it];
    	} else {
    		mes .n$;
    		if(!getarraysize(MS_Types)) {
    			mes "I'm sorry, but there is nothing to remove.";
    			close;
    		}
    		mes "Please choose which Item Type you want to remove from your list:";
    		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
    			for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
    				if(MS_Types[.@p] == .itemtypesid[.@q])
    					set .@ms_list$,.@ms_list$ + "- "+.itemtypestxt$[.@q] + ( (MS_Types[.@p+1] != 0)?":":"");
    		next;
    		set .@it,select(.@ms_list$) - 1;
    		mes .n$;
    		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
    			for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
    				if(MS_Types[.@it] == .itemtypesid[.@q]) {
    					mes "The Item Type \""+.itemtypestxt$[.@q]+"\" has been removed.";
    					deletearray MS_Types[.@it],1;
    					end;
    				}
    	}
    	break;
    
    	case 3:
    	break;
    }
    end;
    
    OnInit:
    set .n$,"["+strnpcinfo(0)+"]";
    setarray .itemtypestxt$[0],"Healing","Usable","Equipment","Weapon","Card","Pet Egg","Pet Equipment","Ammuntion","Usable with delay","Shadow Equipment","Usable with confirmation";
    setarray .itemtypesid[0],1,3,5,6,7,8,9,11,12,13,19;
    end;
    }

     

    Jerome, I got it. You have to put curly right bracket at the end of line 38. So it should look like this

     

    Quote

        } else {
            mes "Here is the current list of your ignored items:";
                for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
                    for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
                        if(MS_Types[.@p] == .itemtypesid[.@q])
                            mes " > "+.itemtypestxt$[.@q];}

    Edit: I was wrong. This edit make NPC appear but it doesn't make script  work.

  2. Ahhh... I see. Did you set base_max_level higher than 99?

     

     

     

    Edit: If you change their max level, tell me what max number you change. Base Level should be no more than 1000, and Job Lvl would be no more than 255...... And I'll give you fix files that according to that max level.

  3. Try go to your server folder, go to Conf\battle\ and open file that called exp.conf with Notepad++.

     

    Edit this line......

    // Rate at which exp. is given. (Note 2)
    base_exp_rate: 100
    
    // Rate at which job exp. is given. (Note 2)
    job_exp_rate: 100
    

    Change that 100 to 200000000000 to both of them. Compile and then try to kill monster. See how it goes....

  4. Hello,

    I'm manually put Goddameit Reflect "Reflection Damage" in my server. I'm using already-made server by someone, and for some reason it didn't leave any clue what revision I use. I hope it's not major role in this problem. Anyway I think I did good job add/replace line according to this patch. But there are tiny little change that make me bamboozled I learned script by comparison with working one but I don't understand any language at all.

     

    Please take a look in this battle.c....

    ===================================================================
    --- src/map/battle.c	(revision 17168)
    +++ src/map/battle.c	(working copy)
    @@ -4688,7 +4688,7 @@
     // Deals the same damage to targets in area. [pakpil]
     int battle_damage_area( struct block_list *bl, va_list ap) {
     	unsigned int tick;
    -	int amotion, dmotion, damage;
    +	int amotion, dmotion, damage, return_, damage_;
     	struct block_list *src;
    
     	nullpo_ret(bl);
    

    According to this patch, I only just remove red one and add green one, and so I did. But, my battle.c has different line...

     

    int battle_damage_area(struct block_list *bl, va_list ap) {
        unsigned int tick;
        int64 damage;    <--- This one is new line.
    //    int amotion, dmotion;    <--- And this one doesn't have "damage" 
        int amotion, dmotion, damage, return_, damage_;
        struct block_list *src;
    
        nullpo_ret(bl);
    

    And other lines doesn't change much, so it's easy...

     			status_fix_damage(src,bl,damage,0);
     		clif_damage(bl,bl,tick,amotion,dmotion,damage,1,ATK_BLOCK,0);
     		skill_additional_effect(src, bl, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick);
    //Start Reflect Script
    		if( (return_=((TBL_PC*)bl)->bonus.short_weapon_damage_return) > 0 )
    		{
    			damage_=damage*return_/100;
    			if(damage_>0)
    			{
    				battle_delay_damage(tick, amotion,bl,src,0,CR_REFLECTSHIELD,0,damage_,ATK_DEF,0,true);
    				clif_damage(src,src,tick,amotion,dmotion,damage_,1,ATK_BLOCK,0);
    				skill_additional_effect(bl, src, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick);
    			}
    		}
    //end Reflect script
     		map_freeblock_unlock();
    

    And when I compiled it, it bring this error.

     

    Error	1	error C2371: 'damage' : redefinition; different basic types	...rathena-master\src\map\battle.c	6967	1	map-server
    Warning	2	warning C4244: '=' : conversion from 'int64' to 'int', possible loss of data	.......rathena-master\src\map\battle.c	6995	1	map-server
    Error	3	error C2198: 'battle_delay_damage' : too few arguments for call	...rathena-master\src\map\battle.c	6998	1	map-server
    Error	4	error C2198: 'clif_damage' : too few arguments for call	...rathena-master\src\map\battle.c	6999	1	map-server
    	5	IntelliSense: too few arguments in function call	...rathena-master\src\map\battle.c	6998	89	map-server
    	6	IntelliSense: argument of type "damage_lv" is incompatible with parameter of type "e_damage_type"	...rathena-master\src\map\battle.c	6999	56	map-server
    	7	IntelliSense: too few arguments in function call	...\rathena-master\src\map\battle.c	6999	67	map-server
    
    

    From this, I knew that that tiny change really mess it up. And I also uploaded my own version battle.h...... Please take a look. I would be grateful by any help I can get.

×
×
  • Create New...