Advertisement
kolpastebin

ZataraConsultChatbot script.ash

Feb 8th, 2018
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. //Ask salt/romeo/null to match up with these responses:
  2. string __setting_food = "pepper";
  3. string __setting_character = "juliet";
  4. string __setting_word = "void";
  5.  
  6. void consultbotAnswerQuestions()
  7. {
  8. buffer page_text = visit_url("clan_viplounge.php?preaction=lovetester");
  9. string [int][int] matches = page_text.group_string("clan_viplounge.php.preaction=testlove&testlove=([0-9]+)");
  10. foreach key in matches
  11. {
  12. int player_id = matches[key][1].to_int();
  13. if (player_id <= 0) continue;
  14. print("My love for you, " + player_id + ".");
  15.  
  16. visit_url("clan_viplounge.php?q1=" + __setting_food + "&q2=" + __setting_character + "&q3=" + __setting_word + "&preaction=dotestlove&testlove=" + player_id);
  17. }
  18. }
  19.  
  20.  
  21. void consultbotReceivedMessage(string sender, string message, string channel)
  22. {
  23. if (channel == "Events" && message.contains_text("You have been invited to consult Madame Zatara about your relationship with"))
  24. {
  25. consultbotAnswerQuestions();
  26. return;
  27. }
  28. }
  29.  
  30. void main(string sender, string message, string channel)
  31. {
  32. consultbotReceivedMessage(sender, message, channel);
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement