Jump to content
  • 0

Question

Posted (edited)

how can add the name of player ingame i dont want to use @reloadscript to change the name of skull for hunt

 

prontera,146,150,5	script	Skull Hunting	501,{
mes "I give you an apple if you give me " + .char_name$ +"'s skull !";
next;
if ( countitem2( 7420, 1, 0, 0, 254, 0, .cible_cid & 65535, .cible_cid >> 16 ) ) {
	mes "Yeah you have the skull ! I give you an apple";
		delitem2( 7420, 1, 1, 0, 0, 254, 0, .cible_cid & 65535, .cible_cid >> 16 );
	getitem 7227, 1;
}else{
	mes "But you didnt have it.";
}
close;



OnInit:
set .char_name$,"Jemzs";
query_sql("SELECT `char_id` FROM `char` WHERE `name`='"+escape_sql(.char_name$)+"' LIMIT 1", .cible_cid );
end;
}

 

Edited by Blue Jem

5 answers to this question

Recommended Posts

Posted
prontera,146,150,5	script	Skull Hunting	501,{
mes "I give you an apple if you give me " + .char_name$ +"'s skull !";
next;
if ( countitem2( 7420, 1, 0, 0, 254, 0, .cible_cid & 65535, .cible_cid >> 16 ) ) {
	mes "Yeah you have the skull ! I give you an apple";
	delitem2( 7420, 1, 1, 0, 0, 254, 0, .cible_cid & 65535, .cible_cid >> 16 );
	getitem 7227, 1;
}else{
	mes "But you didnt have it.";
}
close;


OnWhisperGlobal:
	if ( getgmlevel() < 60 ) end;
	dispbottom "input the player name";
	input .@name$;
	query_sql("SELECT `char_id` FROM `char` WHERE `name`='"+escape_sql(.@name$)+"'", .@char_id );
	if ( .@char_id == 0 ) {
		dispbottom "none player named "+ .@name$ +" found.";
		end;
	}
	.char_name$ = .@name$;
	.cible_cid = .@char_id;
	end;

OnInit:
	set .char_name$,"Jemzs";
	query_sql("SELECT `char_id` FROM `char` WHERE `name`='"+escape_sql(.char_name$)+"' LIMIT 1", .cible_cid );
	end;
}

whisper the npc with your gm to change the name

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