Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Apollyon
Wanderer


Joined: 02 Oct 2001
Posts: 76
Location: USA

PostPosted: Sun Feb 09, 2003 1:30 am   

easy for you, but not for me
 
i wanna take all of these lines of script from something i have and turn it from the form

"blahblahblah1" "blahblahblah2"

into a trigger
#trigger {blahblahblah1} {blahblahblah2} {classnamehere}

i figured there might be some way to copy the line and use an alias such as

#alias something {makestrigger}

doesnt seem to work for me, any suggestions besides typing in all of these 600+ lines for triggers?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Feb 09, 2003 2:18 am   
 
Are they each one one their own line in a file? If so, then use this script:
#FILE 1 filename.txt
#LOOP 1,%filesize(1) {#VAR line {%read(1, %i)};#EXEC %concat("#TRIGGER {", %right(%word(@line, 1, %concat(%char(34), " ")), 1), "} {", %leftback(%right(%word(@line, 1, %concat(%char(34), " ")), 1), 1), "} className")}
#CLOSE 1

Don't test it with the whole file at first, in case something goes wrong.

Kjata
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net