Jump to content
  • 0

how to make script drop auto gold only


Question

Posted

-    script    auto-drop-gold    -1,{
 OnNPCKillEvent:

if ( strcharinfo( 3 ) != "guild_vs4" || rand( 100 ) > 5 ) end;

getitem 909, 5;

}
end;
}

 

who can help me to fix this?

9 answers to this question

Recommended Posts

  • 1
Posted
-	script	Sample	-1,{
	OnInit:
		set .amount, 40; // amount of item to shower
		set .item_id, 7227; // item id to shower
		set .map$, "prontera"; // map to shower
		end;
	OnMinute00:
		while ( .count < .amount ) {
			do {
				.@x = rand(1,500);
				.@y = rand(1,500);
			} while (!checkcell(.map$,.@x,.@y,cell_chkpass));
			makeitem .item_id,1,.map$,.@x,.@y;
			set .count, .count + 1;
		}
		set .count, 0;
		end;
}

 

  • Upvote 1
  • 0
Posted

like this?

 

mapname,x,y,direction	script	NPCName	id,{
	
	for (set .@i, 0;.@i < getarraysize(.items);set .@i, .@i+1){
		set .@itemid = .items[.@i];
		for (set .@j, 0; .@j < .amount[.@i]; set .@j, .@j+1){
			set .@x, rand(.upperleftx,.lowerrightx);
			set .@y, rand(.lowerrighty,.upperlefty);
			makeitem .@itemid,1,.map,.@x,.@y;
		}
	}
	end;
	OnInit:
		setarray .items[0],909;	//add items that should be dropped here
		setarray .amount,5;	//how many of each item should drop?
		set .map,"guild_vs4";	//map
		set .upperleftx,0;		//items will be dropped in that area (see below)
		set .upperlefty,0;
		set .lowerrightx,0;
		set .lowerrighty,0;
		end;
		
}

 

  • Upvote 1
  • 0
Posted

-    script    .    -1,{
OnInit:
    
    for (set .@i, 0;.@i < getarraysize(.items);set .@i, .@i+1){
        set .@itemid = .items[.@i];
        for (set .@j, 0; .@j < .amount[.@i]; set .@j, .@j+1){
            set .@x, rand(.upperleftx,.lowerrightx);
            set .@y, rand(.lowerrighty,.upperlefty);
            makeitem .@itemid,1,.map,.@x,.@y;
        }
    }
    end;
    OnInit:
        setarray .items[0],969;    //add items that should be dropped here
        setarray .amount,5;    //how many of each item should drop?
        set .map,"guild_vs4";    //map
        set .upperleftx,0;        //items will be dropped in that area (see below)
        set .upperlefty,0;
        set .lowerrightx,0;
        set .lowerrighty,0;
        end;
        
}

 

can not drop gold auto in map

  • 0
Posted
22 hours ago, fiq5566 said:

-    script    auto-drop-gold    -1,{
 OnNPCKillEvent:

if ( strcharinfo( 3 ) != "guild_vs4" || rand( 100 ) > 5 ) end;

getitem 909, 5;

}
end;
}

 

who can help me to fix this?

Correct me if I'm wrong, your map is guild_vs4 and you want 5% chance to drop gold when some kills a monster in it? Or do you want a 5% chance to drop gold when someone kills a monster outside of guild_vs4?

  • 0
Posted (edited)

you can make this map guild_vs4 drop gold only... no monster.. only gold auto drop 100% like rain

Edited by fiq5566
  • 0
Posted
13 minutes ago, fiq5566 said:

you can make this map guild_vs4 drop gold only... no monster.. only gold auto drop 100% like rain

you mean even if there is no one there it will rain gold? no need to kill anything?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...