Jump to content
  • 0

how to make script drop auto gold only


fiq5566

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  06/04/17
  • Last Seen:  

-    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?

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   30
  • Joined:  04/03/17
  • Last Seen:  

-	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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   28
  • Joined:  12/21/16
  • Last Seen:  

-	script	auto-drop-gold	-1,{
	
OnNPCKillEvent:
if ( strcharinfo( 3 ) != "guild_vs4" || rand( 100 ) > 5 ) end;
getitem 969,1;
end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   30
  • Joined:  04/03/17
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  06/04/17
  • Last Seen:  

sir i test can not..

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  06/04/17
  • Last Seen:  

-    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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

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?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  06/04/17
  • Last Seen:  

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

Edited by fiq5566
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

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?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  06/04/17
  • Last Seen:  

ya.. you can make?:D

Link to comment
Share on other sites

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.

×
×
  • Create New...