PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: gizmo on 15 January, 2004, 15:36:58

Title: hub jump script
Post by: gizmo on 15 January, 2004, 15:36:58
Hi is it possible to do a script who redirects to another
hub in the network like this

!hub1   then they come to  xx1.myftp.org
!hub2   then they come to  xx2.myftp.org

and soo on     there is 5 hubs in our network
Title:
Post by: raz on 15 January, 2004, 15:43:18
yeah there is away. i think it is in the channel bot.  :D
Title:
Post by: plop on 15 January, 2004, 22:09:27
QuoteOriginally posted by raz
yeah there is away. i think it is in the channel bot.  :D
not only channelbot has it, allin1 also and some more.
but here's a nice standalone script.
-- multi hub jump script aka Tattood_Mommy (she knows why)
-- by plop


command = "!hub" ---- no need for a number here, that goes in the table below
HUBS = {["1"]="hub1.no-ip.something", ["2"]="some.other.hub" } -- add as much hub's as you like but give them a unique number
Bot = "Tattood_Mommy" -- name of the bot

function DataArrival(user,data)
   if (strsub(data, 1, 1) == "<") then
      data = strsub(data,1,strlen(data)-1)
      s,e,cmd,num = strfind(data, "%b<>%s+(%D+)(%d+)")
      if cmd == command and num ~= nil then
         if HUBS[num] then
            user:SendData(" You are being redirected to: "..HUBS[num].." ... |$ForceMove "..HUBS[num].."|")
         else
            user:SendData(Bot, "No sutch hub number in use.|")
         end
      end
   end
end
plop

*whoeps left some debug stuff in. lol
Title:
Post by: Jitway on 16 January, 2004, 01:36:51
Heres one that works real well.

--//HubJump
--//Additional Scripting Help By Piglja
--//June 1st 2003

botname = " "
hubA = "forgottenrealm.dyndns.org"
hubB = "hideout.dyndns.org"
hubC = "RPGW.dyndns.org"
hubD = "anime-divx.dyndns.org"
hubE = "cartooncartoon.no-ip.org"
hubF = "black-gryphon.no-ip.com"
hubsA = "!hubA"
hubsB = "!hubB"
hubsC = "!hubC"
hubsD = "!hubD"
hubsE = "!hubE"
hubsF = "!hubF"
cmd = "!jump"

function DataArrival(user, data)
if (strsub(data, 1, 1) == "<") then
data = strsub(data,1,strlen(data)-1)
if (strfind(strlower(data), strlower(hubsA))) then
user:SendData(Bot, "Redirecting to: "..hubA.."")
user:SendData(botname, "Redirecting to: "..hubA.."|$ForceMove "..hubA.."|")
elseif (strfind(strlower(data), strlower(hubsB))) then
user:SendData(Bot, "Redirecting to: "..hubB.."")
user:SendData(botname, "Redirecting to: "..hubB.."|$ForceMove "..hubB.."|")
elseif (strfind(strlower(data), strlower(hubsC))) then
user:SendData(Bot, "Redirecting to: "..hubC.."")
user:SendData(botname, "Redirecting to: "..hubC.."|$ForceMove "..hubC.."|")
elseif (strfind(strlower(data), strlower(hubsD))) then
user:SendData(Bot, "Redirecting to: "..hubD.."")
user:SendData(botname, "Redirecting to: "..hubD.."|$ForceMove "..hubD.."|")
elseif (strfind(strlower(data), strlower(hubsE))) then
user:SendData(Bot, "Redirecting to: "..hubE.."")
user:SendData(botname, "Redirecting to: "..hubE.."|$ForceMove "..hubE.."|")
elseif (strfind(strlower(data), strlower(hubsF))) then
user:SendData(Bot, "Redirecting to: "..hubF.."")
user:SendData(botname, "Redirecting to: "..hubF.."|$ForceMove "..hubF.."|")
elseif (strfind(strlower(data), strlower(cmd))) then
user:SendData(botname, "----------------------------------------------------------------------------")
user:SendData(botname, "Hub Affiliates Of 420 ??+?r????")
user:SendData(botname, "----------------------------------------------------------------------------")
user:SendData(botname, "Type These Commands In Main Chat:")
user:SendData(botname, "----------------------------------------------------------------------------")
user:SendData(botname, "!hubA - let's U connect to "..hubA.." You Are Here Already :)")
user:SendData(botname, "!hubB - let's U connect to "..hubB.." PRIVATE See ?mokey420 for Details")
user:SendData(botname, "!hubC - let's U connect to "..hubC.."")
user:SendData(botname, "!hubD - let's U connect to "..hubD.."")
user:SendData(botname, "!hubE - let's U connect to "..hubE.."")
user:SendData(botname, "!hubF - let's U connect to "..hubF.."")
user:SendData(botname, "----------------------------------------------------------------------------")
end
end
end
Title:
Post by: gizmo on 16 January, 2004, 18:01:49
tnx for the scripts works fine =)))