Jump to content
  • 0

{Help} Npc Gm-Price


Question

Posted

Hi, please forgive my English, i need help whit my script.

 

this it.

prontera,123,170,5	script	Premiador	871,{
if(getgroupid() ==1){ 
 mes "Hola soy el Premiador";
 mes "Primero escribe el nombre del Usuario";
   input .@user$;
   set .@user,getcharid(3,.@user$);
   if (!.@user){
      mes "Este usuario no esta conectado";
      close;
      }
   next;
   mes "Ahora indica la Razon por cual lo Premias";
   input .@razon$;
   mes "Escribe La id del Premio";
   input .@id;
 mes "y para finalizar escribe la cantidad del item";
   input .@cantidad;
   set .@o,getcharid(3);
   attachrid(.@user);
   getitem .@id,.@cantidad;
   announce "se premiado a " + strcharinfo(0) + " por " +.@razon$+" con " +.@cantidad+" "+getitemname(.@id),bc_all,0x00ff00;
   attachrid(.@o);
   mes "Todo Listo.";
   close;
}
mes "no puedes usar este npc";
close;
}

if there is a way to save "announce".

It would be a great help,

I need to know as I should

thanks <3

 

5 answers to this question

Recommended Posts

  • 0
Posted

Save? You mean, like a log?
If yes:

See your doc/script_commands:

*logmes "<message>";

This command will write the message given to the map server NPC log file, as 
specified in 'conf/log_athena.conf'. In the TXT version of the server, the log 
file is 'log/npclog.log' by default. In the SQL version, if SQL logging is 
enabled, the message will go to the 'npclog' table, otherwise, it will go to the 
same log file.

If logs are not enabled, nothing will happen.
  • Upvote 1
  • 0
Posted

Thanks Haziel, now save on npclog :D

but what i should be written to "take" the announce

 

i try use 

logmes "<message>";

but "save" the word <message>, i need save log announce :C

 

 

if i try this:

logmes ""se premiado a " + strcharinfo(0) + " por " +.@razon$+" con " +.@cantidad+" "+getitemname(.@id),";

npc appears but dont talk

 

 

please help me again

  • 0
Posted

It's just an erros of your syntax.

Look:

logmes ""se premiado a " + strcharinfo(0) + " por " +.@razon$+" con " +.@cantidad+" "+getitemname(.@id),";

You opened the quotes twice.
Try:

logmes "Se premiado a " + strcharinfo(0) + " por " +.@razon$+" con " +.@cantidad+" "+getitemname(.@id);
  • Upvote 1

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