Jump to content
  • 0

Monster drop straight to inventory


rappar

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  01/03/18
  • Last Seen:  

can someone help me?

i edited a ring (Accessory) to have a chance to drop a gold.

now my problem is i dont know how to make this gold go straight to my inventory like mvp rewards..

 

thanks

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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

bonus2 bAddMonsterDropItem,n,x;		When killing any monsters with physical attack, the probability which drops item n +x% (the item which the monster drops unrelated ones)
									if 'x' is negative value, then it's a part of formula
										chance = -x*(killed_mob_level/10)+1

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  01/03/18
  • Last Seen:  

sir thank you for your reply. my item script is okay it already drops my desired items. i want to know if its possible that item will go straightly in my invertory (like @alootid +gold)

 

can you teach me how i can put other items with different drops%.

is it possible to have an option if weapon/armor is equiped it will drop *the items* with *50,60,70%* chance

OnNPCKillEvent:

if( rand( 100 ) < 30 ) {
.@item_id = F_Rand( 969 );
getitem .@item_id,1;

 

like this

OnNPCKillEvent:

gold = 50%

apple = 30%

jellopy = 20%

accessory = isequiped

 

thank you

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  17
  • Reputation:   5
  • Joined:  01/06/12
  • Last Seen:  

You can try this idea:

OnNPCKillEvent:
  if (getequipid(EQUIP_TYPE) == EQUIP_ID) {
      setiteminfo ITEM_ID,3,NEW_CHANCE; //1 = 0.01% , etc..
  }
EQUIP TYPES:

EQI_COMPOUND_ON (-1)      - Item slot that calls this script (In context of item script)
EQI_ACC_L (0)             - Accessory 1
EQI_ACC_R (1)             - Accessory 2
EQI_SHOES (2)             - Footgear (shoes, boots)
EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
EQI_HEAD_TOP (6)          - Upper Headgear
EQI_ARMOR (7)             - Armor (jackets, robes)
EQI_HAND_L (8)            - Left hand (weapons, shields)
EQI_HAND_R (9)            - Right hand (weapons)
EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
EQI_COSTUME_GARMENT (13)  - Costume Garment
EQI_AMMO (14)              - Arrow/Ammunition
EQI_SHADOW_ARMOR (15)     - Shadow Armor
EQI_SHADOW_WEAPON (16)    - Shadow Weapon
EQI_SHADOW_SHIELD (17)    - Shadow Shield
EQI_SHADOW_SHOES (18)     - Shadow Shoes
EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1

If is a lot of items, you can create an array, and do a loop... Hope you understand..

 

You can do like that:

if (rand(10000) < PERCENT) getitem ID,QTY;

1 = 0.01%, 100 = 1%...

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:  

-	script	Sample	-1,{
	OnPCKillEvent:
		// if equipped specific item id
		if (isequipped(5001)) {
			.@rate = rand(100);
			if (.@rate < 30) {
				getitem 969, 1;
			} 
			else if (.@rate < 70) {
				getitem 512, 1;
			}
			else {
				getitem 909, 1;
			}
		}
		end;
}
-	script	Sample	-1,{
	OnPCKillEvent:
		// if equipped specific equipment slots
		if (getequipid(EQI_ACC_L) > 0 || getequipid(EQI_ACC_R) > 0) {
			.@rate = rand(100);
			if (.@rate < 30) {
				getitem 969, 1;
			} 
			else if (.@rate < 70) {
				getitem 512, 1;
			}
			else {
				getitem 909, 1;
			}
		}
		end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  01/03/18
  • Last Seen:  

thank you for all  your help..... i will try this

Quote

i tried both scripts you gave me but nothing works.

1st script


-    script    Sample    -1,{
    OnNPCKillEvent:
        if (getequipid(EQI_ACC_R) == 1) {
            setiteminfo 2642,3,80000; //1 = 0.01% , etc..
            }
            
        if (rand(10000) < 80) getitem 969,1;
}

2nd script


-    script    Sample    -1,{
    OnPCKillEvent:
        // if equipped specific item id
        if (isequipped(2642)) {
            .@rate = rand(100);
            if (.@rate < 15) {
                getitem 969, 1;
            } 
            else if (.@rate < 18) {
                getitem 6238, 1;
                getitem 6239, 1;    
            }
            else if (.@rate < 21) {
                getitem 6228, 1;
                getitem 6232, 1;
            }
            else if (.@rate < 24) {
                getitem 6229, 1;
                getitem 6233, 1;
            }
            else if (.@rate < 27) {
                getitem 6230, 1;
                getitem 6234, 1;
            }
            
            else (.@rate < 30) {
                getitem 6231, 1;
                getitem 6235, 1;
            }
        }
        

and btw here's my item script ( Accessory )

Serin's Ring 2642


bonus2 bAddMonsterDropItem,6238,50;
bonus2 bAddMonsterDropItem,6228,150;
bonus2 bAddMonsterDropItem,6229,210;
bonus2 bAddMonsterDropItem,6230,280;
bonus2 bAddMonsterDropItem,6231,320;
bonus2 bAddMonsterDropItem,6239,50;
bonus2 bAddMonsterDropItem,6232,150;
bonus2 bAddMonsterDropItem,6233,210;
bonus2 bAddMonsterDropItem,6234,280;
bonus2 bAddMonsterDropItem,6235,320;

if item 2642 is equipped it will drop the items and go straight in my inventory

it shows no error when i load both of the scripts. the problem is it wont drop the items

 

thanks i hope i get it after your reply. appreciate the time you've given to this thread.  

 

ignore my last message.....

made it work. here's my script

-	script	Poring_Coin	-1,{
	OnNPCKillEvent:
		.@rate = rand(100);
	if (getequipid(EQI_ACC_R) == 2642 || getequipid(EQI_ACC_L) == 2642) {
		if (.@rate < 15) {
				getitem 969, 1;
			} 
			else if (.@rate < 18) {
				getitem 6238, 1;
				getitem 6239, 1;	
			}
			else if (.@rate < 21) {
				getitem 6228, 1;
				getitem 6232, 1;
			}
			else if (.@rate < 24) {
				getitem 6229, 1;
				getitem 6233, 1;
			}
			else if (.@rate < 27) {
				getitem 6230, 1;
				getitem 6234, 1;
			}
			
			else (.@rate < 30) {
				getitem 6231, 1;
				getitem 6235, 1;
			}
	}
}

my problem now is.. it only gives the items 969,6238,6239.

items 6228,6232 wont drops. 

could this work?

-	script	Poring_Coin	-1,{
	OnNPCKillEvent:
		.@rate = rand(100);
	if (getequipid(EQI_ACC_R) == 2642 || getequipid(EQI_ACC_L) == 2642) {
		if(.@rate< 10 ) {
			getitem 969,1 (.@rate< 10);
			getitem 2,1 (.@rate< 20);
            getitem 3,1 (.@rate< 30);
	}
}

 

here's my working script

-	script	Poring_Coin	-1,{
	OnNPCKillEvent:
		.@rate = rand(1000);
	if (getequipid(EQI_ACC_R) == 2642 || getequipid(EQI_ACC_L) == 2642) {
		if(.@rate< 100 ) 
			getitem 969,1; // Gold
		else if(.@rate< 50 )
			getitem 6238,1; // +11 W
		else if(.@rate< 50 )
			getitem 6239,1; // +11 A
		else if(.@rate< 100 )
			getitem 6228,1; // +9 W
		else if(.@rate< 101 )
			getitem 6232,1; // +9 A
		else if(.@rate< 200 )
			getitem 6229,1; // +8 W
		else if(.@rate< 201 )
			getitem 6233,1; // +8 A
		else if(.@rate< 250 )
			getitem 6230,1; // +7 W
		else if(.@rate< 251 )
			getitem 6234,1; // +7 A
		else if(.@rate< 300 )
			getitem 6231,1; // +6 W
		else if(.@rate< 301 )
			getitem 6235,1; // +6 A
		else	
end;
	}
}

it works for me. thank you for all your time. Happy Ragnarok to all

 

i hope there is an easy code like this hehe 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...