help please
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

help please

Started by k3?M?T?, 03 March, 2005, 01:48:35

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

k3?M?T?

hi , im very lost wen it comes to scripts i was using this one b4 i moved over to new ptokak just wanted to know if anyone could convert it to work with the new software.....

botname="Hang"

function DataArrival(user, data)
   data=strsub(data,1,strlen(data)-1)
   s,e,cmd,arg = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
   if (cmd=="!hang") then
      if not (arg==nil) then
         local tmp = GetItemByName(arg)
         if (tmp==nil) then
            SendToAll(botname,""..user.sName.." tries to hang   "..arg..", but he/she smacks them in the head!")
         end
         if not (tmp==nil) then
            SendToAll(botname, ""..user.sName.." throw's a rope round  "..arg.." neck, and hangs them from the hub rafters!!:)")
         end
         return 1
      end
   end
end


would be very gratefull if someone can help

thanxs
 :P

blackwings

QuoteOriginally posted by k3?M?T?
hi , im very lost wen it comes to scripts i was using this one b4 i moved over to new ptokak just wanted to know if anyone could convert it to work with the new software.....
 :P
Try this =
botname="Hang" 

function ChatArrival(user, data) 
   data=string.sub(data,1,string.len(data)-1) 
   s,e,cmd,arg = string.find(data,"%b<>%s+(%S+)%s+(%S+)") 
   if (cmd=="!hang") then 
      if not (arg==nil) then 
         local tmp = GetItemByName(arg) 
         if (tmp==nil) then 
            SendToAll(botname,""..user.sName.." tries to hang   "..arg..", but he/she smacks them in the head!") 
         end 
         if not (tmp==nil) then 
            SendToAll(botname, ""..user.sName.." throw's a rope round  "..arg.." neck, and hangs them from the hub rafters!!:)") 
         end 
         return 1 
      end 
   end 
end


k3?M?T?

ta bud ill ave a try get back to you  :P

k3?M?T?

thats sorted it bud thanx greatly appreiated

SMF spam blocked by CleanTalk