Jump to content
  • 0

Q/R>Promo Npc


Scotch

Question


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  118
  • Reputation:   0
  • Joined:  09/19/12
  • Last Seen:  

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

Link to comment
Share on other sites

13 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  89
  • Reputation:   7
  • Joined:  02/27/12
  • Last Seen:  

 

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
}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  89
  • Reputation:   7
  • Joined:  02/27/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  118
  • Reputation:   0
  • Joined:  09/19/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  118
  • Reputation:   0
  • Joined:  09/19/12
  • Last Seen:  

Thanks men +1 and 2 thumbs up :)

Edited by Scotch
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   0
  • Joined:  04/25/14
  • Last Seen:  

Thanks for this script. How about set corresponding random amount of the item ID though? 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  86
  • Topics Per Day:  0.02
  • Content Count:  591
  • Reputation:   146
  • Joined:  06/19/12
  • Last Seen:  

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

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