i want to put a coupon when i kill MVP boss, for example i want to add the coupon when i kill some MVP.
example:
when i kill doppelganger, 15pcs coupon will be drop.
@Anacondaqq
by the way, i tried but it only drop 1 pc instead of 5. i have 100% drop rate
update:
this will work. thanks for this script
- script #mvpdrop -1,{
OnNPCKillEvent:
if (getmonsterinfo(killedrid,22)) // If mob has MOB_MVPEXP, it's an MVP.
if (rand(100) < 100) // 15% chance of activating.
getitem 7623,10;
end;
}
I just recheck the following files if they are correct. I dont have accessoryid.lua and accname.lua, so i tried to decompile it with the Microsoft Visual Studio, so the korean letters will change into numbers or words and I refer to this guide. https://rathena.org/wiki/Custom_Items#Structure
Just recheck, if the error gives you the sprites or textures, check the data/textures and data/sprite of your grf and put the following sprites in ur error like this.
Also recheck the following if you put the right name, view id of the following:
- idnum2itemdesctable.txt
This file contains the description of your item, when it is right-clicked. The syntax for an item is:
ItemID#
Item Description Line 1
Item Description Line 2
#
- idnum2itemresnametable.txt
This file sets the inventory and drop-sprite for an the item. Item is defined as follows:
ItemID#SpriteName#
- itemslotcounttable.txt
The SpriteName is the name of the files in collection and item folders inside texture and the ones inside sprite folder. If you want to use the look of an another item, search for it's id and copy the sprite name from there.
ItemID#NumberOfSlots#
Also put the custom item in /System/ItemInfo.lua
[<item id>] = {
unidentifiedDisplayName = <item name to show when not magnified>,
unidentifiedResourceName = <file name prefix used for all the images and drop sprite when not magnified>,
unidentifiedDescriptionName = { <comma separated list of strings>,<to get multiple lines>,<in item description> },
identifiedDisplayName = <item name to show when magnified>,
identifiedResourceName = <file name prefix used for all the images and drop sprite when magnified>,
identifiedDescriptionName = { <same format as unidentifiedDescriptionName but for magnified items> },
slotCount = <number of slots>,
ClassNum = <View ID - yes the same one that was there item_db>
},
Dont forget these: