Jump to content
  • 0

Question

Posted

Does anyone already have this script?

 

Npc Flow:

1. Pay zeny let say 300k.

2. It will give random items just like Old Blue Box/Old Violet Box....example of the item:costume items,potions,weapons,armors,etc.

3. By Percentage it depends on the item level.

 

 

Hope some could have this script already...Thanks in Advance

13 answers to this question

Recommended Posts

Posted

 

ohhh i see i will try this script already...thanks   :)

 

but i like to be like this so that i limit rare items that i will put on that NPC...but its a big help your script to me thanks buddy like :)

// Old Violet Box Obtainable Items Database
//
// Structure of Database:
// GroupID,ItemID,Rate

2,501,14	// Red Potion
2,502,14	// Orange Potion
2,503,14	// Yellow Potion
2,504,14	// White Potion
2,505,14	// Blue Potion
2,506,14	// Green Potion
2,507,14	// Red Herb
2,508,14	// Yellow Herb
2,509,14	// White Herb
2,510,14	// Blue Herb
2,511,14	// Green Herb

 

Change this one

setarray .RandItem[0],501,502,503,504,505; // Put all the items here 

To:

if (rand(100) < 10) {
setarray .RandItem[0],501,502,503; // Items with 10% Chance
}
else {
setarray .RandItem[0],501,502,503; // Items with 90% chance
}
  • 0
Posted
On 28/06/2014 at 7:10 PM, Jyabil said:

 

Here's a sample script but you have to input the item_IDs of the items you want to include on the list.

#3 not included.


prontera,100,100,4 script Promo NPC 100,{

mes "[Promo NPC]";
mes "Get random item for 300,000z?";
next;
menu "Yes",-,"No",Menu_No;

if (Zeny < 300000) goto No_Zeny;

setarray .RandItem[0],501,502,503,504,505; // Put all the items here
set .RandCount, getarraysize(.RandItem);

mes "[Promo NPC]";
mes "Here it is...";
getitem (.RandItem[rand(.RandCount)],1);
set Zeny, Zeny - 300000;
close;

Menu_No:
mes .RandItem[rand(.RandCount)];
close;

No_Zeny:
mes "[Random]";
mes "You don't have enough Zeny.";
close;
}

what if i will change the payment for this script i want  is event ticket not zeny

  • 0
Posted (edited)
1 hour ago, skymia said:

what if i will change the payment for this script i want  is event ticket not zeny

Change if(sent<300000) to 

if (countitem(itemid)<1)

and change

set zeny, zeny -30000 to

delitem itemid,1;

Then

 

mes "You don't have enough zeny";

to your item name

Edited by Cyro
  • 0
Posted (edited)
22 minutes ago, Cyro said:

Change if(sent<300000) to 


if (countitem(itemid)<1)

and change

set zeny, zeny -30000 to

delitem itemid,1;

Then

 


mes "You don't have enough zeny";

to your item namenot working sir i have even ticket but it said i dont have enough event ticket

Edited by Cyro
  • 0
Posted
Just now, skymia said:

not working sir i have event ticket but it said i dont have enough event ticket

Change itemid to your event ticket id

  • 0
Posted (edited)
2 minutes ago, Cyro said:

Change itemid to your event ticket id

sec_in02,147,161,4	script	Random Donate NPC	936,{

mes "[Random Donate NPC]";
mes "Get random item for 1 Event Ticket?";
next;
menu "Yes",-,"No",Menu_No;

if (countitem(7711)>=1) goto No_Zeny;
delitem 7711,1;

if (rand(100) < 10) {
setarray RandItem[0],5469,5579,5518,5548,5483,31500,31501,31502,31503; // Items with 10% Chance
}
else {
setarray RandItem[0],31200,31201,31202,31203,31204,31205,31206,31207,31208,31209,31210,31211,31212,31213,31214,31224,31225,31226,31227,31228,31229,31230,31231,31232; // Items with 90% chance
}set RandCount, getarraysize(RandItem);

mes "[Random Donate NPC]";
mes "Here it is...";
getitem (RandItem[rand(RandCount)],1);
delitem 7711,1;
close;

Menu_No:
mes RandItem[rand(RandCount)];
close;

No_Zeny:
mes "[Random Donate NPC]";
mes "You don't have enough Event Ticket.";
close;
}

i already did it sir

Edited by skymia
  • 0
Posted (edited)
14 minutes ago, skymia said:

sec_in02,147,161,4	script	Random Donate NPC	936,{

mes "[Random Donate NPC]";
mes "Get random item for 1 Event Ticket?";
next;
menu "Yes",-,"No",Menu_No;

if (countitem(7711)>=1) goto No_Zeny;
delitem 7711,1;

if (rand(100) < 10) {
setarray RandItem[0],5469,5579,5518,5548,5483,31500,31501,31502,31503; // Items with 10% Chance
}
else {
setarray RandItem[0],31200,31201,31202,31203,31204,31205,31206,31207,31208,31209,31210,31211,31212,31213,31214,31224,31225,31226,31227,31228,31229,31230,31231,31232; // Items with 90% chance
}set RandCount, getarraysize(RandItem);

mes "[Random Donate NPC]";
mes "Here it is...";
getitem (RandItem[rand(RandCount)],1);
delitem 7711,1;
close;

Menu_No:
mes RandItem[rand(RandCount)];
close;

No_Zeny:
mes "[Random Donate NPC]";
mes "You don't have enough Event Ticket.";
close;
}

i already did it sir

Remove

delitem 7711,1; <--- This line 

below this line 

if (countitem(7711)<1) goto No_Zeny;
Edited by Cyro
  • 0
Posted (edited)
6 minutes ago, Cyro said:

Remove


delitem 7711,1; <--- This line 

below this line 


if (countitem(7711)>=1) goto No_Zeny;

Thanks sir i fix it now

Edited by skymia
Posted (edited)

Does anyone already have this script?

 

Npc Flow:

1. Pay zeny let say 300k.

2. It will give random items just like Old Blue Box/Old Violet Box....example of the item:costume items,potions,weapons,armors,etc.

3. By Percentage it depends on the item level.

 

 

Hope some could have this script already...Thanks in Advance

 

Here's a sample script but you have to input the item_IDs of the items you want to include on the list.

#3 not included.

prontera,100,100,4 script Promo NPC 100,{

mes "[Promo NPC]";
mes "Get random item for 300,000z?";
next;
menu "Yes",-,"No",Menu_No;

if (Zeny < 300000) goto No_Zeny;

setarray .RandItem[0],501,502,503,504,505; // Put all the items here
set .RandCount, getarraysize(.RandItem);

mes "[Promo NPC]";
mes "Here it is...";
getitem (.RandItem[rand(.RandCount)],1);
set Zeny, Zeny - 300000;
close;

Menu_No:
mes .RandItem[rand(.RandCount)];
close;

No_Zeny:
mes "[Random]";
mes "You don't have enough Zeny.";
close;
}
Edited by Jyabil
Posted (edited)

ohhh i see i will try this script already...thanks   :)

 

but i like to be like this so that i limit rare items that i will put on that NPC...but its a big help your script to me thanks buddy like :)

// Old Violet Box Obtainable Items Database
//
// Structure of Database:
// GroupID,ItemID,Rate

2,501,14	// Red Potion
2,502,14	// Orange Potion
2,503,14	// Yellow Potion
2,504,14	// White Potion
2,505,14	// Blue Potion
2,506,14	// Green Potion
2,507,14	// Red Herb
2,508,14	// Yellow Herb
2,509,14	// White Herb
2,510,14	// Blue Herb
2,511,14	// Green Herb
Edited by Scotch
Posted
if (rand(100) < 10) {
setarray .RandItem[0],501,502,503; // Items with 10% Chance
setarray .RewardNumber[0],1,1,1;     // Reward Number
}
else {
setarray .RandItem[0],501,502,503; // Items with 90% chance
setarray .RewardNumber[0],5,5,5;     // Reward Number
}
getitem (.RandItem[rand(.RandCount)],.RewardNumber);

add on setarray .RewardNumber the nummber of items the the npc the player gives

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...