HelpRequesting help on coding

Posts 1–7 of 7 · Page 1 of 1
Requesting help on coding
Is there any way (in the SWF) to :

1) Extract the first char of a string
2) Test its case

I am thinking about another simple feature for ROTMG clients

Some players may undertand why i want to do that, some not..
I ask you not to spoil anyone
Sounds cool, a new simple feature! (No sarcasm, I really mean it sounds cool)
I am working on a multiboxing script right now, otherwise I would try and help.
Google it? (Ok that had some sarcasm)
There are built-in functions to find the length of a string, as well as cut it already built into the client. Just Astrogep "length" and "slice" and you'll see their usages pretty clearly. IIRC nilly used the slice in the "adding custom commands" thread - you can search her thread history for that.

If you need help with it let me know, but I assume since you know what you're doing you can look at those two and do what you want. Testing the case of the stripped string is gonna be your biggest obstacle here. I don't personally get what you're going for, so hard to think of how you're gonna get what you want. GL though.
What exactly is your idea? I can help but I would like to know what exactly you are trying to achieve. Why would you need to test just one character for it's case?
Quote Originally Posted by nilly View Post
What exactly is your idea? I can help but I would like to know what exactly you are trying to achieve. Why would you need to test just one character for it's case?
let's say

"if first letter case of his name is lowercase, doesnt display it"...

I noticed that a lot (not all) of advertising bots have a common point : name Totally in lowercase, a thing you'll never see (or at least i never saw) on a player.

I know this kind of checking is stupid , may block real players, and can be bypassed..

But its a good start to learn..
@JustAnoobROTMG - There is a reason you've never seen this on "real" players. After you've logged into the game for the first time and selected your name, it will obviously change from the default (like Uoro) to whatever you've picked (assuming it is unique). If you happen to pick, lets say, "justanoob" as your IGN, all is fine and dandy and you'll continue on your way. This is about as far as most of the ad bots get (the first ever login+name select).

Now, if you log off to grab a snack or what not and hop back on you'll notice your IGN is now "Justanoob". The game ALWAYS capitalizes at least the first letter in every player's name (if they do not do so themselves). Even something as simple as clicking "Back to Home" on the options menu will "fix" your name.

Not sure why it does it, but what you're going for would actually be a pretty effective solution, since no player can keep his all lowercase name beyond his/her first initial log in to the game.

You can test this out yourself, obviously. Just go register a new character with all lower case name, close/reopen the game and it should be renamed automatically to have the first letter capitalized.

On a note related to your actual purposes here, it is unlikely you will ever see one of the RWT shops trying to bypass an MPGH created filter. This community is not really their target audience - so if you're just trying to do this for your own good / our enjoyment, you most likely wont see the spam bots break your filter nearly as frequently as they do Kabam's. Especially since, being client-sided, they'll never be able to detect it without coming on here, downloading it, and testing it themselves.

nilly can correct me if I'm wrong here, and I'm sure there are more elegant ways of doing so, but your code could simply slice the first letter from the speaking player's name, pushstring "A", ifne check pushstring "B" on down the line. Maybe there is a far, far better way of doing the compare, but I just woke up and that is the first thing that came to mind. 26 checks may lag chat a little, never really messed with that area of the game.

From a /server command fix I did for guildies [this is nilly's originally, just copying/pasting from the closest example I had of it] - but this is what you'd need to chop just the first letter off. (obviously change pushbyte 7 to 1).

Code:
	getlocal1
	pushbyte 0
	pushbyte 7
	callproperty		QName(Namespace("http://adobe.com/AS3/2006/builtin"), "slice"), 2
	pushstring			"/server"
	ifne				NOT_EVENT
Edit: Originally just popped back on to say it was actually a fairly effective method of filtering them client-side if you can get it to work. Rambled from there, sorry.
Thanks a lot.

Actually i managed to hide them and their shadow..
I doesnt used slice after all , i just have to compare Lowercase(name) to name and, gotcha

Now, the hardest part : must hide their textbubble

Request filled, thanks again
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us