Jump to content
  • 0

Custom Enchanter


karazu

Question


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

Hi, i want to make use of this items "

 

AGI+10 [Armor]   Item ID# 4739 (Agility10)"
Archer Lv1 [Armor]   Item ID# 4832

 

by default they are just like cards. if u click them they will be slot in to a slotted Armors.



-But what i want to make is an NPC which the NPC will slot this ORBS even though the Armor is already compound with card(only 1 ORB) per armor.

 

-The NPC will only detect orbs like those because i dont want a double tao gunka in the armor (if u get what i think)..


that only..

thank you.


 



ADDITIONAL INFO

these items are donation items in my server. thats why i want the NPC when clicked find this items in the inventory of the player so that they can slot it.

 

If armor is slotted [1]

ARMOR
[CARD][NONE][NONE][ORBS]

 

If armor is non-slotted [0]

ARMOR
[NONE][NONE][NONE][ORBS]
 

Edited by karazu
Link to comment
Share on other sites

13 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

This will be a very good practice to hone my scripting abilites(lvl = 1, Sir patskie, euphy, emistry, capu, liondhart, skorm etc.etc. >= 90++++) . I will make a very customizable enchanter.. Give me time on this ok? :)

Edited by Lil Troll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

Yes thank you!  /kis

Link to comment
Share on other sites


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


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

Thank you emistry but i dont want it tobe random... Because those orbs are donate inmy server... My wants is click the npc and select what orb u like

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Tropa, almost finish doing the script, what do you mean by this?

If armor is slotted [1]
ARMOR
[CARD][NONE][NONE][ORBS]
 
If armor is non-slotted [0]
ARMOR
[NONE][NONE][NONE][ORBS]
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

Tropa, almost finish doing the script, what do you mean by this?

If armor is slotted [1]
ARMOR
[CARD][NONE][NONE][ORBS]
 
If armor is non-slotted [0]
ARMOR
[NONE][NONE][NONE][ORBS]

its only like if the ARMOR is SLOTTED or not the orb is always be on the fourth slot. and only 1 orb per item. heheh sorry for the confusion.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

Ok, any armor can be enchanted?

we need a valid range to read current equiped armor, but I dont know it , realy need this too

 

if(getequipid(16)==armor id){                      //  <--- a number o code to read current equiped armor  
    .@id = getequipid(16);
    .@ref = getequiprefinerycnt(16);
    .@card1 = getequipcardid( 16, 0 );
    .@card2 = getequipcardid( 16, 1 );
    .@card3 = getequipcardid( 16, 2 );
    .@card4 = getequipcardid( 16, 3 );
    progressbar "ffff00",4;
    delitem2 .@id, 1, 1, .@ref, 0, .@card1, .@card2, .@card3, .@card4;
    getitem2 .@id, 1, 1, .@ref, 0, .@card1, .@card2, .@card3, 4739;   // <---- +10 agi
    equip .@id;
    specialeffect2 618;
    close;
Edited by Patskie
Change to code
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

playerzxy:
	mes "["+strnpcinfo(1)+"]";
	mes "First pick slot you want to be enchanted";
	set .@m,select("Proceed:Cancel");
	if(.@m==2) close;	
	if(.@m==1) {
	if(.w==0)setarray .@p$[1], "Headgear","Armor","Invalid","Invalid","Garment","Footgear";
	if(.w==1)setarray .@p$[1], "Headgear","Armor","Weapon","Invalid","Garment","Footgear";
	if(.w==2)setarray .@p$[1], "Headgear","Armor","Invalid","Shield","Garment","Footgear";
	if(.w==3)setarray .@p$[1], "Headgear","Armor","Weapon","Shield","Garment","Footgear";
	set .@m$,"";
	deletearray .@r;
	set .@j, 1;
	for( set .@i,1; .@i <= getarraysize(.@p$); set .@i,.@i+1) {
		if(.w==2 || .w==3){
			if ((.@i == 3) && (getiteminfo(getequipid(3),5) == 32) && (getequipisequiped(.@i))) { 
				set .@m$, .@m$ + .@p$[.@i] + "-" + "[" + getequipname(.@i) + "]";
				set .@r[.@j], .@i;
				set .@j, .@j + 1;
				set .@m$, .@m$ + ":";
			}
		}
		if(getequipisequiped(.@i) && (.@i != 4) && (.@i != 3)) {
			set .@m$, .@m$ + .@p$[.@i] + "-" + "[" + getequipname(.@i) + "]";
			set .@r[.@j], .@i;
				set .@j, .@j + 1;
			set .@m$, .@m$ + ":";
		}
		if ((.@i == 1 || .@i == 3) && (getiteminfo(getequipid(4),5) == 2) && (getequipisequiped(.@i))) { 
			set .@m$, .@m$ + .@p$[.@i] + "-" + "[" + getequipname(.@i) + "]";
			set .@r[.@j], .@i;
			set .@j, .@j + 1;
			set .@m$, .@m$ + ":";
			}	
function	ee 	{ return ""+getequipisequiped(getarg(0))+""; }
function	dd	{ return ""+getitemname(getarg(0))+""; }	
function	cc	{ return ""+getequiprefinerycnt(getarg(0))+""; }
function	bb	{ return ""+getequipid(getarg(0))+""; }
function	aa	{ if(getequipname(getarg(0,0))=="") return "- Empty -";
			return ""+getequipname(getarg(0))+""; }
OnInit: 
	set .w,0;							// 0=Disable Weap/Shield, 1=Enable Weap, 2=Enable Shield, 3=Enable Shield/Weapon.
	set .m,0;							// Mode: 0 Donator Type Enchanter, 1 Donator+Normal Enchanter
	set .z,0;							// 0 Enable 3slot enchanting / 1, 1 slot enchanting only.
	set .v,0;							// Slot overiding, 0 Enabled, 1 Disabled.
	set .zc,1000000,2000000,3000000;		// Zeny cost per slot.
	setarray .x,70,40,10;				// 1st slot, 2nd slot, 3rd slot chance.
	setarray .a,1,2,3,4,5,6,7,8,9,10; 		// Equip Position.
	setarray .b,2307,2308,2309,2310;		// Blacklist of equips.
	setarray .ee,501,502,503,504,505;		// Requirements ItemID. 
	setarray .ea,  1,  1,  1,  1,  1;		// Requirements Amount.
	setarray .ei,4007,4720;				// Enchant Type 1. Start to End DB, for example 501 to 510.
	setarray .eo,4721,4732;				// Enchant Type 2.
	setarray .eu,4733,4746;				// Enchant Type 3.

@icariz im using this one, almost finish this script, doing this stuff after work only i just needed more time. :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

Yes any armor can be enhanted,if ever what u mean includes headgears i think if it will be to imbalance.. As long as its an armor (cloth, valk armor, diablos armor. Etc,)then yes u can slot am orb with it.

But if its possible then its ok.... Maybe troll will just put an option to disable the other feature.. That might be great.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Yes any armor can be enhanted,if ever what u mean includes headgears i think if it will be to imbalance.. As long as its an armor (cloth, valk armor, diablos armor. Etc,)then yes u can slot am orb with it.

But if its possible then its ok.... Maybe troll will just put an option to disable the other feature.. That might be great.

Yeah, I will put equip slot restrictions. I think i should add option where enabling accessories enchantment too. Later ima continue doing the script.

 

Bump updates. here are the configurations, it has ingame npc built in configuration check.

OnInit: 									
// ============== SLOT CONFIGURATIONS =====================================
	setarray .z,0,	// 0 = 3-Slot Enchant / 1 = 1-Slot Enchant Only
	            0,	// 0 Enabled Slot Overriding / 1 = Disabled
	            0;	// 1 = Enable to enchant on first slot / 0 = Disable(Soon to be added!)
// ============== EQUIPMENT RESTRICTIONS TOGGLE ===========================	
	      setarray .w,1,	// 1 = Enable Shield Enchanting / 0 Disable
		 	  1,	// 1 = Enable Weapon Enchanting / 0 Disable
		  	  1,    // 1 = Enable Mid/Lower Head Enchanting / 0 Disable
		 	  1,	// 1 = Enable Accessory Enchanting / 0 Disable
		          1;	// 1 = Enable Armor,Garment,Shoes Enchanting / 0 Disable
	setarray .b[1],2307,2308,2309,2310;   // Black List of Equipments here:
// =============== ENCHANTING MODE =========================================
	set .ma,0;	// 1 = When Fail Armor Break / 0 = Nothing Happens
	set .m,3;	// Mode: 
			//0 Normal Enchanting 	// Random
			//1 Donator Mode	// VIP
			//2 Special Enchanting	// Specific
			//3 Normal + Special
// =============== ZENY COST PER SLOT ======================================
	setarray .zc,0,		// 1 = Enable Zeny Cost in Enchanting / 0 Disable
		     1000000,	// 1st Slot Cost
	             2000000,	// 2nd Slot Cost
		     3000000,	// 3rd Slot Cost
		     5000000,	// Special Enchanting 1st Slot
	             10000000,	// 2nd Slot Cost
	             150000000;	// 3rd Slot Cost
// =============== SUCCESS CHANCE PER SLOT =================================
	setarray .x,70,		// 1st Slot Chance
	            40,		// 2nd Slot Chance
	            10,		// 3rd Slot Chance
	            50,		// Special Enchanting 1st Slot Chance
	            30,		// 2nd Slot Chance
	            10;		// 3rd Slot Chance
// ========= INPUT REQUIRED ID AND ITS AMOUNT ==============================
// ------------------ NORMAL ENCHANTMENT SETUP -----------------------------
	setarray .r$,"Enchant Type 1",	// Enchant Type 1 Name
		     "Enchant Type 2",	// Enchant Type 2 Name
		     "Enchant Type 3";	// Enchant Type 3 Name
	setarray .rn,4700,4720,		// Enchant Orbs Type1 (From 4700-4720)
		     4721,4732,		// Enchant Orbs Type2 (From 4721-4732)
		     4733,4746;     	// Enchant Orbs Type3 (From 4733-4746)
// ------------------ REQUIREMENTS SETUP -----------------------------------
	set .r,0;  // 1 = Requirement is the same as Enchantment Requirement(Not yet done)	
	setarray .ra[1],501,502,503,504,505;	// Requirements ItemID: 		
	setarray .rb[1],  1,  1,  1,  1,  1;	// Requirements Amount:	
// ------------------ PROGRESS BAR SETUP -----------------------------------
	setarray .rc,1,		// 1 = Enable Progress Bar in Enchanting / 0 Disable
	             5;		// Enchanting Progress Bar Cast Length in Seconds(5 Recommended)

Now going to start doing the script again, atlast work is done.

 

Now these are progress:

Base npc and core is done plus normal enchanting. 

 

To do:

Special + Donator Enchanting as per request by karazu.

 

Please do suggest what features would you like to add in the script while its easy to change the core script.

 

Am not really good at scripting but am capable of doing things via hard coding(trial and error). :)

Edited by Lil Troll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

Thank you very much Troll, I am very excited to try this out. 

I am on my work right now, i will update you later. and know this script rocks hahahah



Hello Troll where can i find the NPC?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

I haven`t finished the NPC yet, i really dont have any time for finishing it now, lots of work to do. Anyways I will upload the core script, you can check it out, if you can see bug or error or suggestion to more feature just state it and i will put it on the script.

 

http://rathena.org/board/topic/86164-utility-enchant-npc/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

ohh ok! no problem, i will just wait for it till its finish I am not in a hurry anyways.

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