Jump to content
  • 0

{Help} Npc Gm-Price


Zutcer

Question


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   5
  • Joined:  07/19/15
  • Last Seen:  

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

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  639
  • Reputation:   596
  • Joined:  11/25/11
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   5
  • Joined:  07/19/15
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  639
  • Reputation:   596
  • Joined:  11/25/11
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   5
  • Joined:  07/19/15
  • Last Seen:  

thank you very much I really appreciate your help, I could finally finish the npc but only with your help, thank you very much seriously <3

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  639
  • Reputation:   596
  • Joined:  11/25/11
  • Last Seen:  

Don't mention it.
Glad you made it.

  • Upvote 1
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...