Bots and Forum Script: This way to the Future™!

Started by Legend, Jan 05, 2016, 05:07 AM

0 Members and 1 Guest are viewing this topic.

the-pi-guy

#30



I gots to add these to the bot.  :D



This one could be useful too!  

Legend

Feel free to edit those into the bot, and I'll approve the changes.

the-pi-guy

$ys = 'yeahsure.gif';
$ys2 = '[img]http://www.reactiongifs.us/wp-content/uploads/2014/10/yeah_sure_jon_hamm.gif[/img]';
$message=str_replace($ys,$ys2,$message);

$br ='bravo.gif';
$br2 = '[img]http://i.imgur.com/P1I2gSz.gif[/img]';
$message=str_replace($br,$br2,$message);

$gu='giveup';
$gu2 = '[img]http://cdn2.thegloss.com/wp-content/uploads/2013/08/sheldon-gif.gif[/img]';
$message=str_replace($gu,$gu2,$message);

$us = 'yousuck'
$us2='[img]https://s-media-cache-ak0.pinimg.com/originals/16/07/7c/16077c8a0173b8ac2ade9d332bee3114.gif[/img]';
$message=str_replace($us,$us2,$message);

lol

Legend

Quote from: the-Pi-guy on Mar 31, 2016, 12:34 AM$ys = 'yeahsure.gif';
$ys2 = '[img]http://www.reactiongifs.us/wp-content/uploads/2014/10/yeah_sure_jon_hamm.gif[/img]';
$message=str_replace($ys,$ys2,$message);

$br ='bravo.gif';
$br2 = '[img]http://i.imgur.com/P1I2gSz.gif[/img]';
$message=str_replace($br,$br2,$message);

$gu='giveup';
$gu2 = '[img]http://cdn2.thegloss.com/wp-content/uploads/2013/08/sheldon-gif.gif[/img]';
$message=str_replace($gu,$gu2,$message);

$us = 'yousuck'
$us2='[img]https://s-media-cache-ak0.pinimg.com/originals/16/07/7c/16077c8a0173b8ac2ade9d332bee3114.gif[/img]';
$message=str_replace($us,$us2,$message);

lol
Would you like to rewrite the "compiler?"  Currently it's really holding bots back from being easy.

the-pi-guy

Quote from: Legend on Mar 31, 2016, 01:03 AMWould you like to rewrite the "compiler?"  Currently it's really holding bots back from being easy.
What would I need to do?

Legend

Quote from: the-Pi-guy on Mar 31, 2016, 01:12 AMWhat would I need to do?

Just take the input string in "Forum Script" and convert it to an output string in PHP.

Hard/difficult part needs to be making sure the finale PHP string only has authorized PHP functions and isn't a security exploit. I can PM you the current code. Its problem is that it doesn't work with nested functions, forcing you to assign everything to a variable like in your bots.

the-pi-guy


Dr. Pezus

#37
Quote from: the-Pi-guy on Jan 09, 2016, 05:23 AMSweet that's what I did!-ish.
$message=$trigger['Message'];
str_replace ( 'catman' , 'notcat' , $message);
editPost(message);
How does it look?
I'm gonna fix it up a little later.  

What is this supposed to do, for educative purposes? Replace the word catman in your messages with notcat? What would the point be lol?

Let's say I wanted my bot to respond to someone who likes my post, what would the code look like?

the-pi-guy

Quote from: Dr. Pezus on Mar 15, 2018, 10:43 PMWhat is this supposed to do, for educative purposes? Replace the word catman in your messages with notcat? What would the point be lol?
That's roughly what is there.  
I was using it to test, so I could make something to auto insert gifs for me.  
So I could type in "Franz Ferdinand.gif", and it'd insert a specified gif.

Weird thread bump.  

Dr. Pezus

Quote from: the-Pi-guy on Mar 15, 2018, 10:46 PMThat's roughly what is there.  
I was using it to test, so I could make something to auto insert gifs for me.  
So I could type in "Franz Ferdinand.gif", and it'd insert a specified gif.

Weird thread bump.  
Haha yeah. I was looking into my profile settings. Had forgotten about the bot creating section, don't think I ever checked that out.

Legend

Quote from: Dr. Pezus on Mar 15, 2018, 10:43 PMWhat is this supposed to do, for educative purposes? Replace the word catman in your messages with notcat? What would the point be lol?
Oh the wounds. Why did you remind me that I abandoned forum script and let it die!?


But yeah you understand the function correctly.

Dr. Pezus

Quote from: Legend on Mar 15, 2018, 10:50 PMOh the wounds. Why did you remind me that I abandoned forum script and let it die!?


But yeah you understand the function correctly.
On to my next question then! (see above)

Legend

Quote from: Dr. Pezus on Mar 15, 2018, 10:53 PMOn to my next question then! (see above)
User bots are currently non operational   :-[



the-pi-guy

#43
Quote from: Legend on Mar 31, 2016, 01:03 AMWould you like to rewrite the "compiler?"  Currently it's really holding bots back from being easy.
2 years later, and I am learning how all this compiler stuff works.  

Quote from: Legend on Mar 15, 2018, 10:50 PMOh the wounds. Why did you remind me that I abandoned forum script and let it die!?
Well technically, you passed it onto me... so uh.  Yep, all your fault.  

Legend

Quote from: the-Pi-guy on Mar 15, 2018, 10:56 PM2 years later, and I am learning how all this compiler stuff works.  
Well I was just translating it into php  :P