Jump to content
  • 0

NPC that will send @request when player talks to it


PandaLovesHamster

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

I need an NPC that will send an @request when a player talks to it.

Example, Player clicks NPC. (at least 30 second delay to prevent spam)
 

(checks if a GM is on)

mes "I've already sent a message to the GM.";

mes "Please wait for a moment.";

@request  "I need help."

 

(if no gm is on)

mes "There is no GM online at the moment.";

mes "Please try again later.";

 

Thanks :)  /thx

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

This lacks some of the functionality you desire, such as the spam protection and list of online GM's, but you can probably tinker with it to add those features yourself. This is a good basic request script, and it includes the player's ID number in the request as well. If you want it to list the character name instead, it's easy to do and I'll be happy to change it for you.

prontera,131,167,5	script	GM Support Assistant	738,{

mes "[GM Support Assistant]";
mes "Hello, I'm the Game Master Support Assistant. I can assist you by putting you into contact with a GM at the click of a button! What would you like for me to do?";
next;
menu "Send a help request.",P_1,"Quit.",P_2;

P_1:
atcommand "@request Calling all Game Masters, player ID: " + getcharid(0) + " is in need of assistance.";
close;

P_2:
close;

}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Thank you sir this will do. I'll be changing the script to add the functionalities I need. I'll be posting here the final product, hope it runs without errors.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

Awesome, I'd love to have a copy with those features for my own use as well- I'm looking forward to your version. Glad I was able to help.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Sure. I'll have it up in a little while. I still have to go out, I'll be back within an hour or so. Hopefully, this can work out.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Sorry for the delay, but here it is. I need someone to add some kind of delay for this NPC. At least a 15 minute delay would be good, just to avoid spam.

Edit: I'm planning on adding a GM Menu where the GM can set that he is AFK and the message for the player will be sent, however the reply on the bottom would be "GM is currently AFK."
 

prontera,143,167,5	script	GM Support Assistant	738,{
mes "[GM Support Assistant]";
mes "There is "+.GM_Online+" GMs online.";
mes "Would you like to contact them?";
menu "Send a help request.",P_1,"Quit.",P_2;

P_1:
if( .GM_Online > 0){
atcommand "@request This player is in need of assistance.";
dispbottom "Notified the Game Masters.";
emotion e_hlp;
close;
}
dispbottom "No GMs are available.";
close;
end;

P_2:
close;

OnInit:
set .MinGMLevel,10;
end;


OnPCLoginEvent:
if( getgmlevel() > .MinGMLevel ){
set .GM_Online,.GM_Online+1;
end;
}
else
end;

OnPCLogoutEvent:
if( getgmlevel() < .MinGMLevel ){
set .GM_Online,.GM_Online-1;
end;
}
else
end;

}
Edited by PandaRapesHamster
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

Nice work! I'll be definitely be using this revision myself. Good job team /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

I've added a 5 minute delay to it.

 

prontera,143,167,5	script	GM Support Assistant	738,{
mes "[GM Support Assistant]";
mes "There is "+.GM_Online+" GMs online.";
mes "Would you like to contact them?";
menu "Send a help request.",P_1,"Quit.",P_2;

P_1:
if( .GM_Online > 0){
if(gettimetick(2) < #HelpDelay) {
		mes "You may only send a message every 5 minutes!";
		close;
}
atcommand "@request This player is in need of assistance.";
dispbottom "Notified the Game Masters.";
set #HelpDelay,gettimetick(2)+300;
emotion e_hlp;
close;
}
dispbottom "No GMs are available.";
close;
end;

P_2:
close;

OnInit:
set .MinGMLevel,10;
end;


OnPCLoginEvent:
if( getgmlevel() > .MinGMLevel ){
set .GM_Online,.GM_Online+1;
end;
}
if( #investprog > 0){
dispbottom "Please don't forget to claim your free PODS from the Hot Deals NPC.";
end;
}
else
end;

OnPCLogoutEvent:
if( getgmlevel() < .MinGMLevel ){
set .GM_Online,.GM_Online-1;
end;
}
else
end;

}

Not sure with the +300 there. Someone, please reconfirm xD

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