Author Topic: Clone script to the new Ptokax 0.4.0.0c  (Read 2313 times)

0 Members and 1 Guest are viewing this topic.

Offline osse

  • Member
  • ***
  • Posts: 44
  • Karma: +0/-0
Clone script to the new Ptokax 0.4.0.0c
« on: 26 March, 2008, 19:53:22 »
Anyone who can help me with a script. Mutor's script.

-- Clone Alert 1.1
-- 1.0b by Mutor The Ugly
-- PM Clone login to Opchat
-- Applied to latest PtokaX by bastya_elvtars
-- Also added share checking, if different, only notifies ops.
--thx NightLitch

OpChatName = frmHub:GetOpChatName()   --Rename to opchatbot - or frmHub:GetOpChatName() for bultin
Bot =frmHub:GetHubBotName()      --Rename to you main Px bot - frmHub:GetHubBotName() for builtin
PMOps = "1"            --Should Ops be notified 1=yes 0=no (STRONGLY recommended to leave enabled!)



function NewUserConnected(curUser,sdata)
   for _,Nick in pairs(frmHub:GetOnlineUsers()) do
      if curUser.sIP==Nick.sIP and not (curUser.bOperator and Nick.bOperator) then
         if curUser.iShare==Nick.iShare then
            curUser:SendPM(Bot,"This hub does not allow the use of clones. Hit the bricks, ya leecher!")
            curUser:SendPM(Bot, "   This message has been sent to all OPs !! ")
            curUser:Disconnect()
            --Nick:SendPM(Bot,"This hub does not allow the use of clones. Hit the bricks, ya leecher!")
            
            --curUser:SendPM(Bot, "This message has been sent to all OPs !! ")
            --Nick:Disconnect()
            if PMOps == "1" then
               SendPmToOps(OpChatName, "*** Cloned user = "..curUser.sName.." logged in, Nick is a clone of = "..Nick.sName)
               SendPmToOps(OpChatName, "***"..curUser.sName.." have been disconnected")  ---and "..Nick.sName.." have been disconnected")
            end
         else
            SendPmToOps(OpChatName, "*** User "..curUser.sName.." logged in, with same IP as "..nick.sName.." but with different share, please check.")
         end
      end
   end
end

Thnx   :D ;D

PtokaX forum

Clone script to the new Ptokax 0.4.0.0c
« on: 26 March, 2008, 19:53:22 »

Offline osse

  • Member
  • ***
  • Posts: 44
  • Karma: +0/-0
Re: Clone script to the new Ptokax 0.4.0.0c
« Reply #1 on: 27 March, 2008, 18:19:37 »
There was a rewrite rather than a conversion.
Clone Killer 1.1d LUA 5.1 [Strict]

I got this msg

18:19] Syntax clone.lua:31: attempt to index global 'frmHub' (a nil value)

 :-[ :-[ :'(

thnx 4 ur help Mutor  :D ;D

Offline Psycho_Chihuahua

  • Systemspecialist IT
  • Emperor
  • **
  • Posts: 1 054
  • Karma: +112/-1
  • I am wherever i want to be
    • PtokaX Luaboard
Re: Clone script to the new Ptokax 0.4.0.0c
« Reply #2 on: 27 March, 2008, 18:27:38 »
there is no frmhub Function in the new API

use this as Botname instead                  SetMan.GetString(21)
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

PtokaX forum

Re: Clone script to the new Ptokax 0.4.0.0c
« Reply #2 on: 27 March, 2008, 18:27:38 »