Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » How do I Make a !cin <Text_File> command for renegade ??
How do I Make a !cin <Text_File> command for renegade ?? [message #399894] Wed, 26 August 2009 13:30 Go to next message
DeathC200 is currently offline  DeathC200
Messages: 220
Registered: June 2008
Location: Hud Base
Karma: 0
Recruit
I Need To know How to Make A !cin <text_file.txt> command from lua so that way i can do this for example !cin Bot_Weapon2.txt and it gets that text file from the specific directory using the lua version 0.5 Software . ???? and sends the specific weapons to targeted bots and Allows me To Change Maps And make objectives and such ??


Thanks Once Again Hope you guys know what i mean ??

[Updated on: Wed, 26 August 2009 13:32]

Report message to a moderator

Re: How do I Make a !cin <Text_File> command for renegade ?? [message #399895 is a reply to message #399894] Wed, 26 August 2009 13:31 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
http://lua-users.org/wiki/IoLibraryTutorial
Re: How do I Make a !cin <Text_File> command for renegade ?? [message #399896 is a reply to message #399895] Wed, 26 August 2009 13:32 Go to previous messageGo to next message
DeathC200 is currently offline  DeathC200
Messages: 220
Registered: June 2008
Location: Hud Base
Karma: 0
Recruit
jnz wrote on Wed, 26 August 2009 15:31

http://lua-users.org/wiki/IoLibraryTutorial




excellent and great quick responding Smile !!

If there is a example available i would like that alot once and again thanks and i appreciate the fast responding to this topic Smile

[Updated on: Wed, 26 August 2009 13:33]

Report message to a moderator

Re: How do I Make a !cin <Text_File> command for renegade ?? [message #399897 is a reply to message #399896] Wed, 26 August 2009 13:37 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
NestGeneral wrote on Wed, 26 August 2009 21:32

jnz wrote on Wed, 26 August 2009 15:31

http://lua-users.org/wiki/IoLibraryTutorial




excellent and great quick responding Smile !!

If there is a example available i would like that alot once and again thanks and i appreciate the fast responding to this topic Smile


Here, have it on a silver platter Wink
local file = io.open ("hello.txt", "r")
for line in file:lines() do
  print(line)
end
file:close()

[Updated on: Wed, 26 August 2009 13:38]

Report message to a moderator

Re: How do I Make a !cin <Text_File> command for renegade ?? [message #399900 is a reply to message #399894] Wed, 26 August 2009 13:46 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
That's what I like about you Dan, you're a nice guy.


Re: How do I Make a !cin <Text_File> command for renegade ?? [message #399903 is a reply to message #399897] Wed, 26 August 2009 13:53 Go to previous messageGo to next message
DeathC200 is currently offline  DeathC200
Messages: 220
Registered: June 2008
Location: Hud Base
Karma: 0
Recruit
jnz wrote on Wed, 26 August 2009 15:37

NestGeneral wrote on Wed, 26 August 2009 21:32

jnz wrote on Wed, 26 August 2009 15:31

http://lua-users.org/wiki/IoLibraryTutorial




excellent and great quick responding Smile !!

If there is a example available i would like that alot once and again thanks and i appreciate the fast responding to this topic Smile


Here, have it on a silver platter Wink
local file = io.open ("hello.txt", "r")
for line in file:lines() do
  print(line)
end
file:close()






Muchos Gracias i thank you both you are awsome and now i know how to work my magic !!! . Also one more thing i need some good software to work with lua i fell like the software i have is not sufficent enouph for the job Thumbs Up
Big Grin
Re: How do I Make a !cin <Text_File> command for renegade ?? [message #399905 is a reply to message #399894] Wed, 26 August 2009 13:56 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
http://notepad-plus.sourceforge.net/uk/site.htm

Notepad plus plus is quite a cool program with syntax highlighting. It's free and you might find you like to use it for other things too.



Re: How do I Make a !cin <Text_File> command for renegade ?? [message #399908 is a reply to message #399894] Wed, 26 August 2009 13:57 Go to previous messageGo to next message
DeathC200 is currently offline  DeathC200
Messages: 220
Registered: June 2008
Location: Hud Base
Karma: 0
Recruit
AWSOME YES This Well Do very nicely thanks Big Ups


index.php?t=getfile&id=11599&private=0

Logo Of Program after im done making code Wink !!

[Updated on: Wed, 26 August 2009 14:02]

Report message to a moderator

Re: How do I Make a !cin <Text_File> command for renegade ?? [message #399911 is a reply to message #399894] Wed, 26 August 2009 14:01 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
I use Crimson editor because it has the ablility to highlight Lua syntax. I don't know if Notepad++ has the same ablity.
Re: How do I Make a !cin <Text_File> command for renegade ?? [message #399913 is a reply to message #399911] Wed, 26 August 2009 14:02 Go to previous messageGo to next message
DeathC200 is currently offline  DeathC200
Messages: 220
Registered: June 2008
Location: Hud Base
Karma: 0
Recruit
Really ?? hmm Had No idea Well this one has Theme And plugin Support back on topic now please thanks Very Happy !


Edit Features Of NotePad ++


Here are the features of Notepad++ :

Syntax Highlighting and Syntax Folding


Supported languages :
C C++ Java C# XML HTML
PHP CSS makefile ASCII art (.nfo) doxygen ini file
batch file Javascript ASP VB/VBS SQL Objective-C
RC resource file Pascal Perl Python Lua TeX
TCL Assembler Ruby Lisp Scheme Properties
Diff Smalltalk Postscript VHDL Ada Caml
AutoIt KiXtart Matlab Verilog Haskell InnoSetup
CMake YAML

WYSIWYG


If you have a colour printer, print your source code (or whatever you want) in colour.
User Defined Syntax Highlighting


It allows user to define his own language : not only the syntax highlighting keywords, but also the syntax folding keywords, comment keywords and the operators. ( screenshot1, screenshot2, screenshot3, screenshot4 ).
Auto-completion


For most supported languages, user can make his/her own API list (or download the api files from dowload section). Once the api file is ready, type Ctrl+Space to launch this action (see screenshot). For more information about Auto-completion, please see Auto-completion HOWTO.
Multi-Document


You can edit several documents at the same time.
Multi-View


You have two views at same time. That means you can visualize (edit) 2 different documents at the same time (screenshot). You can visualize (edit) in the 2 views one document at 2 different positions as well. The modification of document in one view will carry out in another view (i.e. you modify the SAME document when you are in clone mode, see screenshot).
Regular Expression Search/Replace supported


You can search and replace one string in the document by using the regular expression.
Full Drag 'N' Drop supported


You can open a document by drag & drop. You can also move your document from a position (or even a view) to another by drag & drop.
Dynamic position of Views


The user can set the position of the views dynamically (only in 2 views mode : the splitter can be set in horizontal or in vertical), see screenshot.
File Status Auto-detection


If you modify or delete a file which opened in Notepad++, you will be notified to update your document (reload the file or remove the file).
Zoom in and zoom out


That's another fantastic function of Scintilla component. Just see screenshot.
Multi-Language environment supported


The Chinese, Japanese, Korean, Arabic and Hebrew Windows environments are supported. See Notepad++ under the Chinese Windows , under the Arabic Windows and under the Hebrew Windows in action screenshot.
Bookmark


User can just click on the bookmark margin (located right side of line number margin) or type Ctrl+F2 to toggle a book mark. To reach the bookmark, type just F2 (Next bookmark) or Shift+F2 (Previous bookmark). To clear all bookmarks, click the Menu Search->Clear All bookmarks. See screenshot.
Brace and Indent guideline Highlighting


When the caret stay beside of one of those symbol { } [ ] ( ) , the symbol beside of caret and its symmetric opposite symbol will be highlighted, as well as the indent guideline (if any) in order to locate the block more easily. See screenshot1, screenshot2 .
Macro recording and playback


You can save several macros and edit their keyboard shorcuts for the next use.

[Updated on: Wed, 26 August 2009 14:08]

Report message to a moderator

Re: How do I Make a !cin <Text_File> command for renegade ?? [message #399918 is a reply to message #399911] Wed, 26 August 2009 14:36 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

jnz wrote on Wed, 26 August 2009 16:01

I use Crimson editor because it has the ablility to highlight Lua syntax. I don't know if Notepad++ has the same ablity.

I believe it does, but I'm not positive... I never really use Lua. It's great for everything else though!


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: How do I Make a !cin <Text_File> command for renegade ?? [message #399920 is a reply to message #399894] Wed, 26 August 2009 15:15 Go to previous messageGo to next message
DeathC200 is currently offline  DeathC200
Messages: 220
Registered: June 2008
Location: Hud Base
Karma: 0
Recruit
im going with notepad ++ personally because it has highliting as well so thats what im gonna use thanks for all the help guys Smile
Re: How do I Make a !cin <Text_File> command for renegade ?? [message #400240 is a reply to message #399894] Thu, 27 August 2009 23:59 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
Actually, he wants to play a cinematic (from the sounds of it..)

function OnChat(pID, Type, Message, Target)
	local toks = Explode( Message, " " )
	if ( toks[1] == "!cin" ) then
		local obj = Create_Object( "invisible_object", Get_Position(Get_GameObj(pID)) )
		if obj ~= nil then
			Attach_Script_Once( obj, "Test_Cinematic", toks[2] )
		end
	end
end


Requires Explode function to work.
Re: How do I Make a !cin <Text_File> command for renegade ?? [message #400340 is a reply to message #399894] Fri, 28 August 2009 06:14 Go to previous messageGo to next message
DeathC200 is currently offline  DeathC200
Messages: 220
Registered: June 2008
Location: Hud Base
Karma: 0
Recruit
I Think Zack what i meant to say was that This Command Grabs the Text File . !cin <Text_File.txt> just Grabs The Text File From the specified Directory and Sends It To the Server I Type The Command InGanme Or Straight From the Server Box !.


!cin BotWeaps2

After This Command Is Typed It Gets The Text File From The Directory Sends It To The Server .The Bots Weapons Are to The Specific Bots Officers , Mendoza , excedra Also well make it work for objectives setting the map type , changing the server mode , basically this is gonna be a awsome script when i have time to start working on it Wink possiabley during the weekend

I well be on teamspek as well

[Updated on: Fri, 28 August 2009 06:26]

Report message to a moderator

Re: How do I Make a !cin <Text_File> command for renegade ?? [message #400376 is a reply to message #399894] Fri, 28 August 2009 08:28 Go to previous message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
Yes, you sound like you want to play a cinematic. Otherwise, I'm confused or tired and can't understand what you want. Are you trying to replicate a command we have at St0rm?
Previous Topic: Mod working on LAN Server but not on FDS?
Next Topic: SupW no color change
Goto Forum:
  


Current Time: Wed Dec 18 10:31:04 MST 2024

Total time taken to generate the page: 0.01123 seconds