Jump to content

Question

Posted

how to put announcement when u get item.

 

here's my script

 

prontera,155,285,4 script Luningning 465,{
 
mes "[Luningning]";
mes "Get random item for 300,000z?";
next;
menu "Yes",-,"No",Menu_No;
 
if (Zeny < 300000) goto No_Zeny;
 
setarray .RandItem[0],25035,25036,25037,25038,25039,25040,25041,25042,25043,25044,25045,25046,25047,25048; // Put all the items here
set .RandCount, getarraysize(.RandItem);
 
mes "[Luningning]";
mes "Here it is...";
getitem (.RandItem[rand(.RandCount)],1);
set Zeny, Zeny - 300000;
close;
 
Menu_No:
mes .RandItem[rand(.RandCount)];
close;
 
No_Zeny:
mes "[Random]";
mes "You don't have enough Zeny.";
close;
}

8 answers to this question

Recommended Posts

Posted (edited)

here's the edited with announce. but still not working... when i click npc can't open, or no pop up message..

prontera,155,285,4 script Luningning 465,{
 
mes "[Promo NPC]";
mes "Get random item for 300,000z?";
next;
menu "Yes",-,"No",Menu_No;
 
if (Zeny < 300000) goto No_Zeny;
 
setarray .RandItem[0],25035,25036,25037,25038,25039,25040,25041,25042,25043,25044,25045,25046,25047,25048; // Put all the items here
set .RandCount, getarraysize(.RandItem);
 
mes "[Promo NPC]";
mes "Here it is...";
getitem (.RandItem[rand(.RandCount)],1);
announce strcharinfo(0)+" got "+getitemname(.RandItem[rand(.RandCount)]+"!",bc_all;
set Zeny, Zeny - 300000;
close;
 
Menu_No:
mes .RandItem[rand(.RandCount)];
 
close;
 
No_Zeny:
mes "[Random]";
mes "You don't have enough Zeny.";
close;
}
Edited by Hatake Kakashi
Posted (edited)

 

here's the edited with announce. but still not working... when i click npc can't open, or no pop up message..

prontera,155,285,4 script Luningning 465,{
 
mes "[Promo NPC]";
mes "Get random item for 300,000z?";
next;
menu "Yes",-,"No",Menu_No;
 
if (Zeny < 300000) goto No_Zeny;
 
setarray .RandItem[0],25035,25036,25037,25038,25039,25040,25041,25042,25043,25044,25045,25046,25047,25048; // Put all the items here
set .RandCount, getarraysize(.RandItem);
 
mes "[Promo NPC]";
mes "Here it is...";
getitem (.RandItem[rand(.RandCount)],1);
announce strcharinfo(0)+" got "+getitemname(.RandItem[rand(.RandCount)]+"!",bc_all;
set Zeny, Zeny - 300000;
close;
 
Menu_No:
mes .RandItem[rand(.RandCount)];
 
close;
 
No_Zeny:
mes "[Random]";
mes "You don't have enough Zeny.";
close;
}

 

Be sure that you are using <tab> and not <spaces> on the first line of the script.

prontera,155,285,4<tab>script<tab>Luningning<tab>465,{

If it's still not working, check the console for errors and post it.

Edited by Jyabil
Posted

 

still not working.. 

 

i think have a problem here

announce strcharinfo(0)+" got "+getitemname(.RandItem[rand(.RandCount)]+"!",bc_all;
mes "[Promo NPC]";
mes "Here it is...";
set .RandCount,rand(getarraysize(.Randitem));
getitem .RandItem[.RandCount],1;
announce " "+strcharinfo(0)+" has just obtained a [ "+getitemname(.RandItem[ .RandCount ])+" ] !",0;

try to replace the whole part starting at mes

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