Jump to content
  • 0

Broadcast when item is get from mob or drop


Tonetzkii

Question


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  323
  • Reputation:   9
  • Joined:  11/19/11
  • Last Seen:  

Anyone can do this script?

If i kill the poring then drop the poring card or automatic get in inventory using @autolootid we will announce in broadcast like this "Khaii got the poring card!"

Thank you if you can do this. Im waiting for anyone who reply this request script.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

What if instead of putting the item drops in mob_db.txt you used a script to control them?

  1. delete the item drops for you mob (/db/mob_db.txt or the SQL table)
  2. configure the drops here in the "dropitem" section

-	script	custom_itemdrops	-1,{
function dropitem;
OnNPCKillEvent:
if (killedrid == <your_custom_mob_id>) {
	// dropitem <item_id>,<chance>;
	dropitem 911, 10000; // 100.00% chance
	dropitem 911,  5000; //  50.00% chance
	dropitem 911,   100; //   1.00% chance
	dropitem 911,	 1; //	.01% chance
}
end;

function dropitem {
set .@item_id, getarg(0);
set .@drop_per, getarg(1);

if (rand(10000) < .@drop_per) {
	if (checkweight(.@item_id,1)) {
		getitem .@item_id,1;
	} else {
		getmapxy(.@map$,.@x,.@y,0);
		makeitem .@item_id,1, .@map$,.@x,.@y;
	}
	announce "'"+strcharinfo(0)+"' got "+getmonsterinfo(killedrid,MOB_NAME)+"'s "+getitemname(.@item_id)+" (chance: "+ (getarg(1)/100 + "." + getarg(1)%100) +"%)", bc_all;
}
return;
}
}

</chance></item_id></your_custom_mob_id>

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  128
  • Reputation:   4
  • Joined:  11/14/11
  • Last Seen:  

// Make broadcast ** Player1 won Pupa's Pupa Card (chance 0.01%) ***

// Note: It also announces STEAL skill usage with rare items

// 0 = don't show announces at all

// 1 = show announces for 0.01% drop chance items

// 333 = show announces for 3.33% or lower drop chance items

// 10000 = show announces for all items

rare_drop_announce: 1

drops.conf? is this what you want?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  323
  • Reputation:   9
  • Joined:  11/19/11
  • Last Seen:  

Yes i know that conf if i use that conf all 0.01% are included to announce. Im trying to make script OnPCPickupEvent with my customize broadcasting item.

I found this script from EA old but this is not working on me.

OnPCPickUpEvent:
if ( @lootitemtype & pow(2,0) && @lootitemid == 512 ) // pick up item from floor and from @autoloot
announce strcharinfo(0) +" has obtained "+ getitemname(@lootitemid), 0;
end;

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  323
  • Reputation:   9
  • Joined:  11/19/11
  • Last Seen:  

Thank you! You saved my life :)

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  566
  • Reputation:   34
  • Joined:  11/17/11
  • Last Seen:  

This is simple and you don't need to add an script. Just add these..

confbattledrops.conf:


// Make broadcast ** Player1 won Pupa's Pupa Card (chance 0.01%) ***
// Note: It also announces STEAL skill usage with rare items
// 0 = don't show announces at all
// 1 = show announces for 0.01% drop chance items
// 333 = show announces for 3.33% or lower drop chance items
// 10000 = show announces for all items
rare_drop_announce: 0

100 = 1% announce

333 = 3.33% announce

if you want to make it 0.5 then put 50 only.

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

erm..just wondering some issue...

could the script will caused players able to get the items for 2 or more time ?

for example :

players killed a poring drop a Jellopy..

then the script will generate the random number for counting the chances to get "Another" jellopy that has defined in the script ...

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Correct, if you use script-based item drops (the script I posted in post #4),

yes you would delete the item drops for that monster from your /db/mob_db.txt (or `mob_db` SQL table).

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