Jump to content

crazyarashi

Developer
  • Posts

    761
  • Joined

  • Last visited

  • Days Won

    19

Posts posted by crazyarashi

  1. Use item_noequip.txt in the database. This will disable the script effect the item. In your case just restricted in normal maps will do
     

    // Structure of Database:
    // ItemID,Flag
    //
    // Legend for 'Flag' field (bitmask):
    // 1    - restricted in normal maps
    // 2    - restricted in PVP
    // 4    - restricted in GVG
    // 8    - restricted in Battlegrounds
    // 16   - restricted in WOE:TE castles
    // Restricted zones - configured by 'restricted <number>' mapflag
    // 32   - restricted in zone 1
    // 64   - restricted in zone 2
    // 128  - restricted in zone 3
    // 256  - restricted in zone 4
    // 512  - restricted in zone 5
    // 1024 - restricted in zone 6
    // 2048 - restricted in zone 7
    // 4096 - restricted in zone 8

     

    • Like 1
  2. 18 hours ago, zlfxl said:

     ATK_ADDRATE(wd.damage, wd.damage2, (map_flag_gvg(src->m)) || (map_flag_vs(src->m)) ? 25 : 100)

    The map_flag_vs is for pvp.
     

    ATK_ADDRATE(wd.damage, wd.damage2, (map_flag_gvg(src->m) || map_getmapdata(src->m)->flag[MF_BATTLEGROUND] > 0) ? 25 : 100);

     

  3. @domez86 There are simple ways to achieve this than you're request. Make the item account bound and add restriction to the NPC like your past request for the equipment giver.


    @Sakurada This is script request section not an "opinion request section". You correct people, then maybe it's not hard to read on what section you're at. ^^

    • Upvote 1
  4. 20 minutes ago, Skorm said:

    Could maybe shorten it too...

    prontera,255,255,3	script	Equip Freebies	123,{
        getinventorylist;
        copyarray [email protected][0],@inventorylist_id[0],getarraysize(@inventorylist_id);
        for([email protected] = 0; [email protected] < .len; [email protected]++){
            if(isequipped(.equip_id[[email protected]]) || inarray([email protected], .equip_id[[email protected]]) > -1) {
                getitem .equip_id[[email protected]],1;
                equip .equip_id[[email protected]];
            } else [email protected]++;
        }
    
        mes "[ Freebies ]";
        if(!.len - [email protected]){
            mes "It looks like you already have all the freebie(s).";
            close;
        } else if ([email protected])
            mes "It looks like you already have "[email protected]+" freebie(s).";
        mes "Here is your freebies.";
        close;
    		
    OnInit:
        setarray .equip_id, 1208, 2154; // Add your ID's here.
        .len = getarraysize(.equip_id);
    }

    Although in this case if the user was able to store/trade the freebies he could get more, but it would also allow the list of freebies to be updated.
    Also my example is completely untested so...

    I forgot about the isequipped that could have shorten it a little bit ^^

  5. 24 minutes ago, domez86 said:

    can you explain this script to me?
    Does the item equip it directly?
    do I just have to enter an item id?

    you didn't mention about being equipped on the topic.

     

    prontera,255,255,3	script	Equip Freebies	123,{
    	if(#claimed){
    		mes "[ Freebies ]";
    		mes "You alreay receieved your freebies.";
    		close;
    	}
    	getinventorylist;
    	for([email protected] = 0; [email protected] < 20; [email protected]++){
    		[email protected] = getequipid([email protected]);
    		if([email protected] == -1)
    			[email protected]_id[[email protected]] = 0; // Dummy Data
    		else
    			[email protected]_id[[email protected]] = [email protected];
    	}
    	for([email protected] = 0; [email protected] < getarraysize(.equip_id); [email protected]++){
    		if(inarray([email protected]_id[0],.equip_id[[email protected]]) >= 0 || inarray(@inventorylist_id[0],.equip_id[[email protected]]) >= 0){
    			[email protected] = 1;
    			break;
    		}
    		continue;
    	}
    	if([email protected]){
    		mes "[ Freebies ]";
    		mes "You already have a duplicated freebies in your inventory/equipment.";
    		close;
    	}
    	#claimed = 1;
    	for([email protected] = 0; [email protected] < getarraysize(.equip_id); [email protected]++){
    		getitem .equip_id[[email protected]],1;
    		equip .equip_id[[email protected]];
    	}
    	mes "[ Freebies ]";
    	mes "Here is your freebies.";
    	end;
    		
    OnInit:
    	setarray .equip_id,1208,2154; // Add your ID's here.
    	end;
    }

    Here is the new script that it will automatically equip it after receiving :))

    • Upvote 1
  6. 22132,Lighting_Gods_Shoes,Lightning Gods Shoes,4,20,,400,,18,,1,0xFFFFFFFE,63,2,64,,99,1,,{ [email protected] = getrefine(); bonus2 bVariableCastrate,[email protected]; bonus bMatk,([email protected]*5); bonus2 bMagicAddEle,Ele_Earth,2*[email protected]; bonus2 bAddEle,Ele_Neutral,2*[email protected]; bonus2 bAddEle,Ele_Undead,2*[email protected]; bonus2 bAddEle,Ele_Ghost,2*[email protected]; },{},{}

    There is nothing wrong with your item script 😮

  7. prontera,255,255,3	script	Equip Freebies	123,{
    	if(#claimed){
    		mes "[ Freebies ]";
    		mes "You alreay receieved your freebies.";
    		close;
    	}
    	getinventorylist;
    	for(.@i = 0; .@i < 20; .@i++){
    		.@id = getequipid(.@i);
    		if(.@id == -1)
    			.@equip_id[.@i] = 0; // Dummy Data
    		else
    			.@equip_id[.@i] = .@id;
    	}
    	for(.@i = 0; .@i < getarraysize(.equip_id); .@i++){
    		if(inarray(.@equip_id[0],.equip_id[.@i]) >= 0 || inarray(@inventorylist_id[0],.equip_id[.@i]) >= 0){
    			.@fail = 1;
    			break;
    		}
    		continue;
    	}
    	if(.@fail){
    		mes "[ Freebies ]";
    		mes "You already have a duplicated freebies in your inventory/equipment.";
    		close;
    	}
    	#claimed = 1;
    	for(.@i = 0; .@i < getarraysize(.equip_id); .@i++){
    		getitem .equip_id[.@i],1;
    	}
    	mes "[ Freebies ]";
    	mes "Here is your freebies.";
    	end;
    		
    OnInit:
    	setarray .equip_id,1208,2154; // Add your ID's here.
    	end;
    }

     

  8. 5 minutes ago, dest1n said:
    22178:4352,{ skill "SM_MAGNUM",10; bonus2 bHPRegenRate,5000,10000; bonus2 bSPRegenRate,100,10000; .@r = getrefine(); if(BaseLevel<99){bonus bStr,3*.@r;bonus bFlee,5*.@r;}else{bonus bStr,10*.@r;bonus bFlee,15*.@r;} } 

     everything works fine but for the bonus str and flee every refine are not working for both condition

    You added it in item_combo, you need to wear both item for effect to work.

×
×
  • Create New...

Important Information

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