First problem:
Look up things in the
Windows JScript 5.6 documentation and look at the source of (many) scripts and also search the forums. Look up
Replace,
indexOf, and other related string functions.
Second Problem:
Look up things in the
Plus! scripting documentation and look at the source of (almost all) scripts and also search the forums. Look up
GetScriptCommands and
OnEvent_ChatWndSendMessage.
Note: the reason why I don't give a straight answer is so you can learn to look things up and learn from there. This is way more effecient and you will learn much more than just copy/pasting something
Both are extremely basic though.
EDIT: so I don't revive this thread after so long:
quote:
Originally posted by Supersonicdarky
this one is better because the other one had conflicting variables
There are no conflicting variables in his code. you can perfectly reuse a variable like that. In fact, it will use less memory (and will run a tick faster since the script parser doesn't need to create and allocate a new variable).