Jump to content
  • 0
Sign in to follow this  
hadiesyafiq

HELP announcement getitem script

Question

Hi all can someone help me to understand "getitemname" because i make this script is successful announce but the item name show "null"

i make bet npc that will announce item that player get but annouce show "null"

here my test script...

prontera,151,183,6	script	Rika Exchange	4_F_KAFRA8,{
	if (checkweight(Knife,1) == 0 || (MaxWeight - Weight) < 10000) {
		mes "[Rika]";
		close;
	}
	mes "[Rika]";
	mes "Hi place your bet....";
	next;
	switch (select("2M Zeny", "5M Zeny", "10M Zeny")) {
	case 1:
		mes "[Rika]";
		mes "Good good, let me just check";
		next;
		if (Zeny < 2000000)
		{
			mes "[Rika]";
			mes "Sorry, but you lack some money...";
			close;
		}
		set Zeny, Zeny - 2000000;
		getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(1,1);
		announce "[Rika] : "+strcharinfo(PC_NAME)+" get "+getitemname( "" )+".",bc_all;
		close;
	case 2:
		mes "[Rika]";
		mes "Good good, let me just check";
		next;
		if (Zeny < 5000000)
		{
			mes "[Rika]";
			mes "Sorry, but you lack some money...";
			close;
		}
		set Zeny, Zeny - 5000000;
		getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(1,1);
		announce "[Rika] : "+strcharinfo(PC_NAME)+" get "+getitemname( "" )+".",bc_all;
		close;
	case 3:
		mes "[Rika]";
		mes "Good good, let me just check";
		next;
		if (Zeny < 10000000)
		{
			mes "[Rika]";
			mes "Sorry, but you lack some money...";
			close;
		}
		set Zeny, Zeny - 10000000;
		getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(1,1);
		announce "[Rika] : "+strcharinfo(PC_NAME)+" get "+getitemname( "" )+".",bc_all;
		close;

	}
OnPCLoadMapEvent:
if (strcharinfo(3) == strnpcinfo(4))
    showevent QTYPE_QUEST2,1;
end;
}

how to make is show item name not "null"

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
On 7/14/2021 at 2:44 AM, fTakano said:

You need a parameter inside the `getitemname` script command.

e.g. getitemname(Red_Potion)  will show "Red Potion".

Ya the script is get random item..how to make it show the item they get?please help me about this script 🙏

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.