PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: owen on 02 November, 2004, 16:09:31

Title: word replacer script problem
Post by: owen on 02 November, 2004, 16:09:31
Dis script blocks the others currently running scripts,both Robocop and other scripts do not work.In case the script is turned out otherwise everything runs properly.Cas somebody please give an advice where d foult is? thnx.
code:--------------------------------------------------------------------------------
--//NaughtyASs Cook Bot v1.06 fixed by Phatty
--//Does things with words lol :p

Bot = "!crazy"
function Main()
   frmHub:RegBot(Bot)
end
 
badtable = {

["twat"]="bread",
["cunt"]="dish washer",
["bastard"]="cook-book",
["fucker"]="chief",
["fucking"]="cooking",
["fuck"]="cook",
["arsehole"]="microwave",
["arse"]="microchip",
["clit"]="tomato",
["cock"]="banana",
["tosser"]="baker",
["bitch"]="teaspoon",
["shit"]="mcdonald's manager",
["crap"]="chocolate",
["pissed"]="diluted",
["piss"]="orange juice",
["shagging"]="boiling",
["shag"]="sauce",
["cum"]="water",
["spunk"]="juice",
["asshole"]="fridge-freezer",
["ass"]="oven",
["slut"]="grape-fruit",
["dick"]="sausage",
["fanny"]="pie",
["whore"]="hotdog",
["wanker"]="i'm a wanker",
["slag"]="i'm a slag",

}

function DataArrival(user,data)
   if strsub(data, 1, 1) == "<" then
   for i,v in badtable do
         data=gsub(data, i, v)
      --data, x,y = gsub(data, "%b"..i, v)
      end
   SendToAll(data)
   return 1
   end
end
--------------------------------------------------------------------------------
Title:
Post by: Herodes on 02 November, 2004, 20:35:24
the scripts in Ptokax run in alphabetical order ...
rename the script so that it runs after the Robocop script ..

also there is a better version of this bot ...

CrazyBot by plop. ..[http://www.plop.nl/ptokaxbots/Plop.php]grab it here[/url]
Title:
Post by: plop on 02 November, 2004, 21:10:20
try this 1 (http://www.plop.nl/ptokaxbots/Plop/word_replacer_1.1p.lua).
it has a dirty bypase for commands from other scripts, and only sends the procest data when something changed during the proces.

plop
Title:
Post by: Herodes on 02 November, 2004, 22:05:11
Lol where was I when (reading) this thread ... sry for recommending crazybot .. it doesnt do what you need ..  :)