Jump to content
  • 0

Adding Players Character name to item ?


mhagz

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   1
  • Joined:  07/15/13
  • Last Seen:  

As my title says adding Players Character name to item ?

 

like i get an item reward from a quest how do i add my characters name before the name of the item =)

 

for example..

/////////////////////////////

 

 

prontera,155,181,5    script    Loki     467,{
 
 
    mes "You will receive Some Present as a reward for supporting the server";
    mes "We're gladly thankful for your support in the future too.";
    next;
 
    getitem 2383 ,1; // Brynhild [0] how to add players name to the item when they receive it?
 
    emotion e_thx;
    close;
 
 OnInit:
        waitingroom "Giver",0;
        end;
 
 
}
Edited by mhagz
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  49
  • Reputation:   4
  • Joined:  06/23/12
  • Last Seen:  

Try this,

prontera,155,181,5    script    Loki     467,{
 
 
    mes "You will receive Some Present as a reward for supporting the server";
    mes "We're gladly thankful for your support in the future too.";
    next;
 
  atcommand "@produce 2383" ; // Brynhild [0] how to add players name to the item when they receive it?
 
    emotion e_thx;
    close;
 
 OnInit:
        waitingroom "Giver",0;
        end;
 
 
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   1
  • Joined:  07/15/13
  • Last Seen:  

thanks for the fast reply, another question though how about adding a refine to the item using atcommand produce ?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

or you can use item_signer in the svn

//===== rAthena Script =======================================
//= Sign Your Items
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
//= 1.1a
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Write you name on your rare equipment or weapon ^_-
//===== Additional Comments: =================================
//= 1.1 Cleaned and edited for general use. [Euphy]
//= 1.1a Added 'disable_items' command. [Euphy]
//============================================================

prt_in,24,61,7	script	Perchik	47,{
	
	setarray .@Item[0],644,3;	// Item requirements: <ID>,<Count>{,...} (0 to disable)
	setarray .@Cost[0],0,5000;	// Zeny requirements: <base price>,<price per refine>

	disable_items;
	mes "[Perchik]";
	mes "I can ^0055FFsign your name^000000 on almost any rare item you hold.";
	next;
	if(select("Tell me more...:Sign my items, please!") == 1) {
		mes "[Perchik]";
		mes "I can put your name on any slotless equipment or weapon.";
		emotion e_ic;
		next;
		mes "[Perchik]";
		if (getarraysize(.@Item) || getarraysize(.@Cost)) {
			mes "For my work I accept:";
			if (getarraysize(.@Item)) for(set .@i,0; .@i<getarraysize(.@Item); set .@i,.@i+2)
				mes " ~ "+.@Item[.@i+1]+"x "+getitemname(.@Item[.@i]);
			if (.@Cost[0]) mes " ~ "+.@Cost[0]+" Zeny";
			if (.@Cost[1]) mes " ~ "+.@Cost[1]+" Zeny per refine";
		}
		else mes "I work for free, but...";
		next;
		emotion e_cry;
		mes "[Perchik]";
		mes "Alas, I have 12 hungry children";
		mes "and a very angry wife.";
		next;
		mes "[Perchik]";
		mes "Or it was 12 angry children";
		mes "and a very hungry wife...";
		emotion e_hmm;
		close;
	}
	mes "[Perchik]";
	mes "Show me your items to sign...";
	next;
	setarray .@pos$[1],"Upper Headgear","Armor","Left hand","Right hand","Garment","Footgear","Left Accessory","Right Accessory","Mid Headgear","Lower Headgear";
	set .@menu$,"";
	for (set .@i,1; .@i<=10; set .@i,.@i+1) {
		if (getequipisequiped(.@i))
			set .@menu$, .@menu$+.@pos$[.@i]+" [^0055FF"+getequipname(.@i)+"^000000]";
		set .@menu$, .@menu$+":";
	}
	set .@part, select(.@menu$);
	set .@id, getequipid(.@part);
	set .@ref, getequiprefinerycnt(.@part);
	mes "[Perchik]";
	if (!getequipisequiped(.@part)) {
		mes "Nothing is equipped there!";
		emotion e_wah;
		close;
	}
	for(set .@i,0; .@i<4; set .@i,.@i+1)
		set .@slot[.@i], getequipcardid(.@part,.@i);
	if (.@slot[0]==255 || .@slot[0]==254 || .@slot[0]<0) {
		mes "Alas, this item's already signed.";
		mes "I would never touch a master's work.";
		emotion e_hmm;
		close;
	}
	if (.@slot[0]>4000 && .@slot[0]<5000) {
		mes "A card? Here?!";
		mes "As I said before, I don't sign items with cards.";
		emotion e_hmm;
		close;
	}
	if (getiteminfo(.@id,10)) {
		mes "Sorry, I don't sign slotted items.";
		emotion e_sry;
		close;
	}
	getinventorylist;
	for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1)
		if (@inventorylist_expire[.@i] != 0) {
			mes "Sorry, I don't sign rental items!";
			emotion e_hmm;
			close;
		}
	set .@price, .@Cost[0]+(.@Cost[1]*.@ref);
	if (getarraysize(.@Item) || .@price) {
		mes "I will need:";
		if (getarraysize(.@Item)) for(set .@i,0; .@i<getarraysize(.@Item); set .@i,.@i+2) {
			mes " ~ "+.@Item[.@i+1]+"x "+getitemname(.@Item[.@i]);
			if (countitem(.@Item[.@i]) < .@Item[.@i+1]) set .@nr,1;
		}
		if (.@price) mes " ~ "+.@price+" Zeny";
	}
	mes "Shall I sign your ^0055FF"+getitemname(.@id)+"^000000?";
	next;
	if(select("Ok!:Leave")==2) {
		mes "[Perchik]";
		mes "See you...";
		emotion e_yawn;
		close;
	}
	mes "[Perchik]";
	if (Zeny < .@price || .@nr) {
		mes "I don't work for 'thanks'.";
		emotion e_sry;
		close;
	}
	if (!countitem2(.@id,1,.@ref,0,.@slot[0],.@slot[1],.@slot[2],.@slot[3])) {
		mes "Where is "+getitemname(@id)+"...?";
		npctalk "You're a snoozy cheater!";
		logmes "CHEATER: Tried to sign an item not having it: "+getitemname(@id);
		emotion e_wah;
		close;
	}
	if (.@price) set Zeny, Zeny-.@price;
	if (getarraysize(.@Item))  for(set .@i,0; .@i<getarraysize(.@Item); set .@i,.@i+2)
		delitem .@Item[.@i], .@Item[.@i+1];
	delitem2 .@id,1,1,.@ref,0,.@slot[0],.@slot[1],.@slot[2],.@slot[3];
	mes "Done!";
	emotion e_proud;
	getitem2 .@id,1,1,.@ref,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff;
	equip .@id;
	close;
}

 

about refine, change .@ref with the value you want in

getitem2 .@id,1,1,.@ref,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff;
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   1
  • Joined:  07/15/13
  • Last Seen:  

thank you very much  /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  88
  • Reputation:   23
  • Joined:  01/30/12
  • Last Seen:  

This one works also with non-equipment items and for equipment type theres an option to set the element and the number of star crumbs.

	set .@item_id, 501;
	set .@item_info, getiteminfo(.@item_id, 2);

    set .@charid,getcharid(0);
    set .@card3, .@charid & 65535;
    set .@card4, .@charid >> 16;

	// If you're inscribing equipment, .@card1 must be 255.
	if ( .@item_info == 4 || .@item_info == 5 || .@item_info == 7 || .@item_info == 8 )
	{
		set .@card1,255;
		// That's the number of star crumbs in a weapon.
		set .@sc,0;
		// That's the number of elemental property of the weapon. 1 - Ice, 2 - Earth 3 - Fire 4 - Wind.
	    set .@ele,0;
	    set .@card2,.@ele+((.@sc*5)<<8);

	}
	// If you're inscribing non-equipment, .@card1 must be 254.
	else {
	    set .@card1,254;     
    	set .@card2,0;
	}
    
    //*getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};
    getitem2 .@item_id,1,1,10,0,.@card1,.@card2,.@card3,.@card4;

Edited by Digos
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...