HELP announcement getitem script

hadiesyafiq

New member
Messages
160
Points
0
Age
35
Location
Malaysia
Github
hadiesyafiq
Emulator
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"

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

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

 
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 🙏

 
First, you need to set a variable for the F_Rand().

.@Item = F_Rand(656, 657, 505, 645, 506, 14510);

getitem .@Item, rand(1,1);

announce "[Rika] : "+strcharinfo(PC_NAME)+" get "+getitemname(.@Item)+".",bc_all;

 
First, you need to set a variable for the F_Rand().

.@Item = F_Rand(656, 657, 505, 645, 506, 14510);

getitem .@Item, rand(1,1);

announce "[Rika] : "+strcharinfo(PC_NAME)+" get "+getitemname(.@Item)+".",bc_all;
thank you very much

 
Back
Top