Shoutbox

[Request] a script that will change your PSM from a text file for each new line - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Request] a script that will change your PSM from a text file for each new line (/showthread.php?tid=86024)

[Request] a script that will change your PSM from a text file for each new line by gotest on 09-19-2008 at 02:17 AM

if you didnt get that
i need a script that changes your PSM from a text file's last line that adds a new line every 10 secs...

if you didnt understand that then i dont know what else to say...


RE: [Request] a script that will change your PSM from a text file for each new line by roflmao456 on 09-19-2008 at 02:40 AM

this should work:

code:
/* Create file 'psm.txt'..
add some lines of text.. */
var psm, count=0;

function OnEvent_Timer(TimerId){
if(Messenger.MyStatus > 0 && Messenger.MyEmail === "abc@zcx.com"){
if(count == psm.length) count=0;
Messenger.MyPersonalMessage = psm[count];
count++;
MsgPlus.AddTimer("changepsm", 10000);
}
}

function OnEvent_Initialize(MessengerStart){
var fso = new ActiveXObject("Scripting.FileSystemObject");
var file = fso.OpenTextFile(MsgPlus.ScriptFilesPath + "\\psm.txt", 1);
psm = file.ReadAll().split("\n");
OnEvent_Timer("changepsm");
}

function OnEvent_Uninitialize(){
file.Close();
}


RE: [Request] a script that will change your PSM from a text file for each new line by gotest on 09-19-2008 at 03:48 AM

not to be rude but...
it works but it only reads the first line in the text file i want it to read the last line in the text file


RE: [Request] a script that will change your PSM from a text file for each new line by roflmao456 on 09-19-2008 at 12:19 PM

updated and works now :)


RE: [Request] a script that will change your PSM from a text file for each new line by gotest on 09-19-2008 at 04:02 PM

ok here is what im doing
i am using game maker and i have an RPG game an it saves a txt file of your stats like this

quote:
LoZ:TEC Stats [LV:2 HP:129/135 SP:36/36 EXP:21 Next LV:27 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:129/135 SP:34/36 EXP:21 Next LV:27 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:129/135 SP:34/36 EXP:21 Next LV:27 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:129/135 SP:35/36 EXP:21 Next LV:27 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:129/135 SP:35/36 EXP:21 Next LV:27 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:129/135 SP:35/36 EXP:21 Next LV:27 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:111/135 SP:36/36 EXP:21 Next LV:27 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:121/135 SP:36/36 EXP:21 Next LV:27 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:119/135 SP:36/36 EXP:21 Next LV:27 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:129/135 SP:36/36 EXP:22 Next LV:26 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:115/135 SP:36/36 EXP:22 Next LV:26 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:109/135 SP:36/36 EXP:23 Next LV:25 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:109/135 SP:36/36 EXP:24 Next LV:24 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:109/135 SP:36/36 EXP:24 Next LV:24 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:109/135 SP:36/36 EXP:24 Next LV:24 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:106/135 SP:36/36 EXP:24 Next LV:24 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:103/135 SP:35/36 EXP:26 Next LV:22 Strength:7 Defence:5 Magic:4]
LoZ:TEC Stats [LV:2 HP:103/135 SP:35/36 EXP:26 Next LV:22 Strength:7 Defence:5 Magic:4]
it keeps adding lines every 2 seconds and i want to set my psm set to the latest line and it keeps refreshing the txt file does that make more sence?