MVP Card annoucement

mrlongshen

Noobies
Messages
1,126
Points
0
Age
36
Location
localhost 127.0.0.1
Emulator
Hye,

Can I request. If player get MVP card from killed MVP, there will be announcement.

For example ? 

zFJFN13.png


 
You can use settings in conf/battle/drops.cof

// Make broadcast ** Player1 won Pupa's Pupa Card (chance 0.01%) ***// This can be set to any value between 0~10000.// 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 itemsrare_drop_announce: 0 

@edit lol all cards will be announced xD Sorry
 
Last edited by a moderator:
I think writing that as script is possible, but you would need some source changes / plugins. Either a OnLoot label or a getareauserids command.

But if you request such a thing you also could ask for a mvp announcer plugin / source mod in the first place.

You could ask @@AnnieRuru as it seems she did what you want allready.

Atleast i found a snippet that seems to do what you want that she did here: http://www.eathena.ws/board/index.php?showtopic=272695.

 
No source mods needed. Already posted a script for it which includes all the MVP cards in Pre-RE.
@@Dogpatch It is kind of inefficient and requires you to edit the mobs to not loot the item the normal way. I dont think that kind of workaround is a good way to go. Also you can't really show the rate of the card by calculation atleast not with a pretty big effort since the script language doesn't support fractions.

But well thats just my opinion on that solution, if one wants to go with it, i would recommend to use this optimized version:

http://upaste.me/7559210089e1481dc

 
Last edited by a moderator:
@@Winterfox

remove card from mob loot with 

---------------------------------------
 
*delmonsterdrop(<mob id or name>, <item id>)
 
This command will temporarily remove a drop from an existing monster.
 
Both the monster and the item must be valid.
 
Return value will be 1 in case of success (the item was removed), and 0
otherwise (the monster didn't have the specified item in its drop list).
 
Example:
// Remove Jellopy (909) from the Poring's (1002) drops
delmonsterdrop(1002, 909);
 
---------------------------------------

 
@@mrlongshen You got it via picking it up or directly in your inventory? What MVP did you get the card from?

 
Last edited by a moderator:
@@mrlongshen I named a variable wrong, thats why it didn't get executed. Also the cards will go directly into the inventory since the card drop is disabled by script and given to the player by the rate you can configure in the script.

Check it out here: http://upaste.me/36f421015cab9f3e5

Also i am no sir. :/

 
Last edited by a moderator:
@@Winterfox so now all mvp card are 1% ?

// Rate : 1 = 0.01% / 1000 = 10% / 10000 = 100% setarray( .mvpCardRates, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 );

Right? 
 
@@Winterfox ups sory.

ok I done edit this.

- script MVP_CARD_ANNOUNCER -1,{ OnInit: setarray( .@mvpIdList, 1871, 1874, 1719, 1492, 1147, 1688, 1583, 1623, 1389, 1046, 1087, 1190, 1272, 1115, 1418, 1779, 1157, 1685, 1734, 1658, 1647, 1649, 1651, 1646, 1650, 1648, 1630, 1059, 1159, 1038, 1511, 1373, 1751, 1150, 1039, 1086, 1785, 1768, 1832, 1112, 1312, 1251, 1252 ); setarray( .mvpCardIds, 4441, 4145, 4386, 4263, 4146, 4376, 4302, 4342, 4134, 4142, 4143, 4135, 4168, 4123, 4330, 4419, 4148, 4374, 4403, 4352, 4359, 4363, 4365, 4357, 4367, 4361, 4372, 4132, 4121, 4144, 4236, 4276, 4407, 4131, 4147, 4128, 4425, 4408, 4430, 4137, 4305, 4318, 4324 ); // Rate : 1 = 0.01% / 1000 = 10% / 10000 = 100% setarray( .mvpCardRates, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ); for(.@i = 0; .@i < getarraysize( .@mvpIdList ); .@i++ ) { .mvpIds[ .@mvpIdList[ .@i ] ] = .@i; delmonsterdrop( .@mvpIdList[ .@i ], .mvpCardIds[ .@i ] ); } end; OnNPCKillEvent: .@mvpIndex = .mvpIds[ killedrid ]; if( .@mvpIndex == 0) end; if( rand( 10000 ) <= .mvpCardRates[ .@mvpIndex ] ){ getitem( .mvpCardIds[ .@mvpIndex ], 1 ); announce( "[ " + strcharinfo(PC_NAME) + " ] just got a " + getitemname( .mvpCardIds[.@mvpIndex] ), bc_all ); } end;}
so that means, eddga card, 100% drop.

I killed 100 eddga nothing happen
default_sleep.png


 
@@mrlongshen Yes, i copied the script you posted and it worked exactly as intended. I killed a Eddga and got his card directly into my inventory and the announcement got made.

 
Back
Top