Jump to content
  • 0

R> headgear enchantment


Cisqua

Question


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

can somebody make me a new enchantment script ?

 

this is the info.

 

* chance success rate : 30%

* chance failing rate : 70%

* only upper headgear can be enchant

* headgear can be enchant once 

* cost per enchant 1M zeny and 7808

* enchant item will be attach in 4th slot card

* slotted or non-slotted can be enchant

* not all upper headgear can be enchant, dependingon the list what upper headgear can be enchant

 

eg: a player need to bring 1m and 1pc of 7808 and the upper headgear to be enchant, if it fail the headgear will still remain but 1m and 7808 will be gone and if it success an random item will be attach to the headgear this is the item to be attach .

 

item #:

40120

40121

40122

40123

40124

40125

 

i found this script made by Skorm and edit but dont know how to set this set .@itm, 4700+((rand(5)*10)+rand(3));

//v1.4
new_1-2,95,71,4 script Enchant Expert 100,{
//Character Variables
set .@geid, getequipid(9);
set .@cout, countitem(.item);
set .@gin$, getitemname(.item);
set .@gerf, getequiprefinerycnt(9);
set .@crd1, getequipcardid(9,0);
set .@crd2, getequipcardid(9,1);
set .@crd3, getequipcardid(9,2);
set .@crd4, getequipcardid(9,3);
set .@itm, 4700+((rand(5)*10)+rand(3));


mes .npc$;
mes "I can endow your glasses with mystical powers, but It'll cost yah "+.pric+" "+((.pric-1)?.@gin$+"s":.@gin$)+"."; next;
if(!.@cout) { mes .npc$; mes "Sorry come back when you have "+.@gin$+"(s)."; close; }
if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
if(.@cout<.pric) { mes .npc$; mes "I'm sorry you don't have enough "+.@gin$+"(s) to for me to endow your specticals, please come back later."; close; }
if(rand(0,((100/.perc)-1))) { mes .npc$; mes "I'm sorry but I've failed you!";
 misceffect 155;
 emotion e_sob,0;
 delitem .item,.pric; close; }
mes .npc$;


if(compare(.uit$,""+.@geid)) {
delitem .item,.pric;
delitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
getitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@itm;
misceffect .efet;
mes "All done!";
equip .@geid;
close;
}
mes "I'm sorry but you need to equipped a slotted mid-range headgear before we can continue.";
close;


//NPC Constants
OnInit:
//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
set .npc$, "[^0000FFBlinger^000000]"; // NPC Name
set .pric, 1; // Price
set .efet, 154; // Effect Number
set .item, 6242; // Item Number
set .uit$, "5074,5401,5104,18507,5068,2204,2260,5085,2202";// Item List
set .perc, rand(50,80); // Percent
/*18603(Black Devil Mask), Not included because it wasn't in my DB*/ 
/*2286 Unslotted version of 18507*/
/*2203 Unslotted version of 2204*/
/*2201 Unslotted version of 2202*/
//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
}

 

 

now this what ive done.

but how to stop if the headgear already enchant can be enchant again.
//v1.4
new_1-2,95,71,4 script Enchant Expert 100,{


//Character Variables
set .@geid, getequipid(1);
set .@cout, countitem(.item);
set .@gin$, getitemname(.item);
set .@gerf, getequiprefinerycnt(1);
set .@crd1, getequipcardid(1,0);
set .@crd2, getequipcardid(1,1);
set .@crd3, getequipcardid(1,2);
set .@crd4, getequipcardid(1,3);
// set .@itm, 4700+((rand(5)*10)+rand(3));
set .@itm, rand(40120,40125);


mes .npc$;
mes "I can endow your glasses with mystical powers, but It'll cost yah "+.pric+" "+((.pric-1)?.@gin$+"s":.@gin$)+".";
 next;
if(!.@cout) {
 mes .npc$;
 mes "Sorry come back when you have "+.@gin$+"(s).";
close;
}

if(select("Yes:No")&2) {
 mes .npc$; mes "Alright, thanks anyways!";
close;
}

if(.@cout<.pric) {
 mes .npc$;
 mes "I'm sorry you don't have enough "+.@gin$+"(s) to for me to endow your specticals, please come back later.";
close;
}


if(rand(0,((100/.perc)-1))) {
 mes .npc$;
 mes "I'm sorry but I've failed you!";
 misceffect 155;
 emotion e_sob,0;
 delitem .item,.pric;
close;
}


mes .npc$;
if(compare(.uit$,""+.@geid)) {
delitem .item,.pric;
delitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
getitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@itm;
misceffect .efet;
mes "All done!";
equip .@geid;
close;
}
mes "I'm sorry but you need to equipped a slotted upper-range headgear before we can continue.";
close;


//NPC Constants
OnInit:
//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
set .npc$, "[^0000FFEnchant Expert^000000]"; // NPC Name
set .pric, 1; // Price
set .efet, 154; // Effect Number
set .item, 6242; // Item Number
set .uit$, "5137";// Item List Alice Doll [1]
set .perc, rand(50,80); // Percent
/*18603(Black Devil Mask), Not included because it wasn't in my DB*/ 
/*2286 Unslotted version of 18507*/
/*2203 Unslotted version of 2204*/
/*2201 Unslotted version of 2202*/
//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
}
Edited by Cisqua
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   6
  • Joined:  12/20/12
  • Last Seen:  

idk how to do it but there's some way to check if the last slot is empty or not?

 

maybe that way u can do it ^^

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