Jump to content
  • 0

how to edit this script


Hatake Kakashi

Question


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

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;
}
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

hehe ^_^

 

its not tell what item of charname he/she get. 

 

i need a full announce script with char name and what item they get. thx

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  


announce strcharinfo(0)+" got "+getitemname(.RandItem[rand(.RandCount)]+"!",bc_all;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  89
  • Reputation:   7
  • Joined:  02/27/12
  • Last Seen:  

 

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

still not working.. 

 

i think have a problem here

announce strcharinfo(0)+" got "+getitemname(.RandItem[rand(.RandCount)]+"!",bc_all;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  67
  • Reputation:   2
  • Joined:  08/09/13
  • Last Seen:  

 

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

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