PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: k3?M?T? on 03 March, 2005, 01:48:35

Title: help please
Post by: k3?M?T? on 03 March, 2005, 01:48:35
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
Title:
Post by: blackwings on 03 March, 2005, 01:59:59
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
Title:
Post by: k3?M?T? on 03 March, 2005, 02:07:19
ta bud ill ave a try get back to you  :P
Title:
Post by: k3?M?T? on 03 March, 2005, 02:10:51
thats sorted it bud thanx greatly appreiated