Jump to content
  • 0

Global Drop Src


Meister

Question


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

Hi,

Requesting for a global drop src wherein you can add items to be dropped by all monster via global_drop.txt.
E.G.
ItemID,Percentage (10518,50)

Wanted to use NPCKillEvent but problem is that all items go directly to the inventory. I want it to be dropped normally by monster.

Regards!

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  333
  • Reputation:   67
  • Joined:  09/05/12
  • Last Seen:  

5 hours ago, Meister said:

Hi,

Requesting for a global drop src wherein you can add items to be dropped by all monster via global_drop.txt.
E.G.
ItemID,Percentage (10518,50)

Wanted to use NPCKillEvent but problem is that all items go directly to the inventory. I want it to be dropped normally by monster.

Regards!

Maybe this topic may help you on your request:

Then you can use makeitem script command to make an item on the ground.
Hope it helps you.

Edited by GodKnows Jhomz
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.02
  • Content Count:  267
  • Reputation:   40
  • Joined:  01/19/17
  • Last Seen:  

3 hours ago, GodKnows Jhomz said:

Maybe this topic may help you on your request:

Then you can use makeitem script command to make an item on the ground.
Hope it helps you.

Not the same I think.

Edited by iAmGnome
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  333
  • Reputation:   67
  • Joined:  09/05/12
  • Last Seen:  

8 hours ago, Meister said:

Hi,

Requesting for a global drop src wherein you can add items to be dropped by all monster via global_drop.txt.
E.G.
ItemID,Percentage (10518,50)

Wanted to use NPCKillEvent but problem is that all items go directly to the inventory. I want it to be dropped normally by monster.

Regards!

This one is what you're looking for.

2 hours ago, iAmGnome said:

Not the same I think.

Sorry for that :) Already found the one he's looking for.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

@GodKnows Jhomz: Unfortunately don't want to use NPCKillEvent since it will be directed to your Inventory.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  333
  • Reputation:   67
  • Joined:  09/05/12
  • Last Seen:  

4 hours ago, Meister said:

@GodKnows Jhomz: Unfortunately don't want to use NPCKillEvent since it will be directed to your Inventory.

Lol, did you check the said reply?
It will redirect the item to your inventory once you use getitem script command.
In the reply, he removed the getitem and replaced it by makeitem so the item will be dropped once the monster is killed.
Here I'll make it for you:

-	script	GlobalDrop	-1,{

	OnNPCKillEvent:
		set .@randitem,rand(2); // 50% That will drop Red Potion
		if(.@randitem == 1) {
			getmapxy(.@map$,.@x,.@y,0);
			makeitem 501,1,.@map$,.@x,.@y; //Will Drop Red Potion. Change 501 to what you want the monster to drop.
			end;
		}
}

Already tested it and it works for any mob that you kill, will drop Red Potion at 50% chance.
I hope this script will fulfill your needs. ;)

Edited by GodKnows Jhomz
Added explanation for getitem and makeitem script commands.
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

11 hours ago, GodKnows Jhomz said:

Lol, did you check the said reply?
It will redirect the item to your inventory once you use getitem script command.
In the reply, he removed the getitem and replaced it by makeitem so the item will be dropped once the monster is killed.
Here I'll make it for you:


-	script	GlobalDrop	-1,{

	OnNPCKillEvent:
		set .@randitem,rand(2); // 50% That will drop Red Potion
		if(.@randitem == 1) {
			getmapxy(.@map$,.@x,.@y,0);
			makeitem 501,1,.@map$,.@x,.@y; //Will Drop Red Potion. Change 501 to what you want the monster to drop.
			end;
		}
}

Already tested it and it works for any mob that you kill, will drop Red Potion at 50% chance.
I hope this script will fulfill your needs. ;)

So if its getitem, will autoloot 100% or alootid +itemID will get the item? or? 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  58
  • Reputation:   5
  • Joined:  07/16/17
  • Last Seen:  

Newbie developer here! ~ Interested in this same concept but needs an explination on how to do the math for the randitem value. How would you calculate 0.01%?

Edited by Kaleidoscope
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  333
  • Reputation:   67
  • Joined:  09/05/12
  • Last Seen:  

12 hours ago, Meister said:

So if its getitem, will autoloot 100% or alootid +itemID will get the item? or? 

I'm not sure if its available to auto-get using @autoloot/@alootid.

10 hours ago, Kaleidoscope said:

Newbie developer here! ~ Interested in this same concept but needs an explination on how to do the math for the randitem value. How would you calculate 0.01%?

Maybe you can try this:

set .@randitem,rand(10000); // 0.01% That will drop Red Potion
		if(.@randitem == 1) {
			getmapxy(.@map$,.@x,.@y,0);
			makeitem 501,1,.@map$,.@x,.@y; //Will Drop Red Potion. Change 501 to what you want the monster to drop.
			end;
		}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

@GodKnows Jhomz: Unfortunately it doesn't work with autoloot with the script provided or I was wrong. That's why it's better if its not script. Like an item_global_drop.txt wherein you can just add items there like

607,100 // ITEMID,Drop Rate

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  58
  • Reputation:   5
  • Joined:  07/16/17
  • Last Seen:  

11 hours ago, GodKnows Jhomz said:

I'm not sure if its available to auto-get using @autoloot/@alootid.

Maybe you can try this:


set .@randitem,rand(10000); // 0.01% That will drop Red Potion
		if(.@randitem == 1) {
			getmapxy(.@map$,.@x,.@y,0);
			makeitem 501,1,.@map$,.@x,.@y; //Will Drop Red Potion. Change 501 to what you want the monster to drop.
			end;
		}

Thanks, Ill try this out shortly! 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

Anyone who could lead? Thanks!

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