plop help
 

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

plop help

Started by gathering, 17 December, 2004, 16:50:14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gathering

in texter 4.5 how do i get the nick to be shown on the user that writes the CMD

example

CMD +wc

shows

----------------->[user] Siger



        \\\II///
        /  0 0 \  
        \c  --_)      
           ) (          
           /  \          
_o _  /   \  \ _
I    I  /     / \ _O__
I    I_((_______    I
\                /    / /_
  \______ /     (___)Jeg er lige p? potten ;o)

[_XStaTiC_]

Replace this code

function showtext(user, file, where)
	local handle = openfile(FDFolder.."/"..file..".txt", "r")
	local contents = gsub(read(handle, "*a"),strchar(10), "\r\n")
	closefile (handle)
   if where == "main" then
      user:SendData(Bot, "\r\n"..contents.."\r\n|")
   elseif where == "allmain" then
      SendToAll(Bot, "\r\n"..contents.."\r\n|")
   elseif where == "allpm" then
      SendPmToAll(Bot, "\r\n"..contents.."\r\n|")
   else
      user:SendPM(Bot, "\r\n"..contents.."\r\n|")
   end
end

for this

function showtext(user, file, where)
	local handle = openfile(FDFolder.."/"..file..".txt", "r")
	local content = gsub(read(handle, "*a"),strchar(10), "\r\n")
	closefile (handle)
        contents = gsub(content, "%b[USER]",user.sName)
   if where == "main" then
      user:SendData(Bot, "\r\n"..contents.."\r\n|")
   elseif where == "allmain" then
      SendToAll(Bot, "\r\n"..contents.."\r\n|")
   elseif where == "allpm" then
      SendPmToAll(Bot, "\r\n"..contents.."\r\n|")
   else
      user:SendPM(Bot, "\r\n"..contents.."\r\n|")
   end
end


and put in every txt file [USER]

gathering


plop

try this 1.
function showtext(user, file, where)
   local handle = openfile(FDFolder.."/"..file..".txt", "r")
   local content = gsub(read(handle, "*a"),strchar(10), "\r\n")
   closefile (handle)
   contents = gsub(content, "%[USER]",user.sName)
   if where == "main" then
      user:SendData(Bot, "\r\n"..contents.."\r\n|")
   elseif where == "allmain" then
      SendToAll(Bot, "\r\n"..contents.."\r\n|")
   elseif where == "allpm" then
      SendPmToAll(Bot, "\r\n"..contents.."\r\n|")
   else
      user:SendPM(Bot, "\r\n"..contents.."\r\n|")
   end
end
@ _XStaTiC_: %b captures strings between the 1st 2 chars which are after the b.
in your case it would be something between the [ and the U followed by SER.
all needed is 2 excape the [ from being magic, %[.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

gathering

don?t get it dosen?t work

SMF spam blocked by CleanTalk