Released under public scripts.
Please use the thread there.
Released under public scripts.
Please use the thread there.
Last edited by bonsai; 11-01-2013 at 11:42 AM.
Grats on first release
goodjob ;p
Nice thread layout. Congrats on the release.
Maybe you could add the files as attachments so that you can see how many downloads each has had? Just a suggestion though.![]()
Solar from RiD.
Gratz on release!
Nice, scripts are starting to come back! gl on script, I won't use much due to already having maxed combat.
Congratulations on the release!
I want to start scripting for SRL 6 but it seems like there are no tutorials, do you have any advice on how I an start?
<3
Great release, this seems to have huge potential.
I can appreciate what you're saying. What do you think would be most helpful? Detail posts on each of the main 'objects' like minimap, actionbar, tabBackpack?
I'm new to all of this (simba, smart, srl) and it's been a challenge to figure out how to get something going. Everyone's throwing around acronyms and you don't know what they mean or what to do with them! "Why didn't you walk with DTMs and use TPAs?"... if I only knew what the heck they were I could try lol. The documentation is sparse and often just reiterates the function definition. I found looking at the code was the best way of figuring out more of what the intent and usage would be.
You can use this script and Justin's fletcher as working examples to get a basic structure put together.
Anyone has my permission to rehash my code to get their script working; no need to contact me for specific permission. As is the norm, it would be nice to add a comment saying where you copied it from.
SRL6 Documentation
Justins fletcher
Updated with more npc support and some minor improvements.
Logs out when health gets too low
Turns towards NPCs when it can't find one
Combined into a single file for easy download/install.
Uploaded V1-1
This version works with the getMouseOverTextCount() functionality that Olly provided since the font changes broke mouseover text.
nice scripts,i try even im full in combat but got error,Exception in Script: Unknown declaration "getMouseOverTextCount" at line 414, column 24.
Glad to see someone trying it! Let me know how it works out for you.
Yes, it need the newest version.
One note, SRL is having a login bug with the new update, so you need to log in manually.
Run something like this, then disable smart when it sticks on the lobby. Choose your own world, find a quiet place, then start the fighter script.
Also, I made a small change not worth an update but it makes it kill a lot more NPCs. I was waiting 5 seconds to make sure it started the fight, doesn't seem like it needs that much.Code:program new; {$DEFINE SMART} {$i srl-6/srl.simba} begin ClearDebug(); SetupSRL(); players.setup(['TTnick'], 'characters'); currentPlayer := 0; players[currentPlayer].login(); end.
Change line 455 from
toCode:t := getSystemTime() + 5000;
Code:t := getSystemTime() + 2500;
Hello, Thanks for this script. Have you got any idea on this error? -
Client is ready.
---- Setup SRL in 249ms.
-- setupSRL(): True
-- TPlayerArray.setup()
---- ERROR: Couldn't find army file(characters)
-- TPlayerArray.setup(): false
-- Freeing gametabs bitmaps..
-- ****** bonsaiFighter: Script shutting down
---- Saving screenshot: bonsaiFighter.png
Only the weak surrender..
You need to use the player manager to create a player file and add your character information.
I named my file in the player manager "characters".
If you didn't change the name on yours it would be named "default".
You can check SIMBADIR/includes/players to see the files that you made. They have .xml for the extension. You can open them in notepad to make sure the contents are what you expect.
Follow the info at the top about editing the script to set your own values. Change playername to your charcter name or alias. Change playerfile to the name of your players file.
Code:playername = 'TTnick'; // change this to your username or nickname playerfile = 'characters'; // change this to your playerfile name
Thanks for that, sorry to be such a noob, I'm now getting the following error ->
Exception in Script: Runtime error: "Access violation" at line 1419, column 33
The following bitmaps were not freed: [SMART Debug Image]
I'm useless at scripting, about the only thing I will figure and help with is adding NPCs.
Only the weak surrender..
No problem, man, we all start somewhere
I'm pretty new to this whole setup myself.
The line it's failing on is:
This is telling me you don't have the user name/nickname set right or you don't have users in your player file.Code:players[currentPlayer].world := desiredWorld;
Line 1265 should have your user name or nickname:
Code:playername = 'TTnick'; // change this to your username or nickname
I didn't even realise that I had to create a player through SRL. Done that now, any idea why it finds the colors of my created NPC but will not click attack? The mouse hovers over all the NPC's but just decides to rotate the camera?
Only the weak surrender..
Yes, that's because of the problems reading mouseover text with the new update.
When it's hovering like that it should be printing mouseovertextcount numbers. Let's say it keeps printing 485. Add 485 to the last array in the npc record you added. For example, below if the corpse mage entry. The 483 below is the mouseover pixel count. The 108 is the count for plain old "Attack" since sometimes thats all they show instead of "attack corpse mage". Make sense?
['Corpse mage',52, 17.1,
5524794, 12, 3.6, 0.44,
['ttack', 'orpse'], 35, 35, 210,
'mrAAAAHichcqxCkAAAEXRJyllUharMiCDMjIpm29mNCkmROJL 3JSVV2d4dW1JkyltGLHiwI4TF1qaDjMWbDgxoEdaNXJc7+GHkY IkU5wXz4/KWhbNF+PHuxuG4xEk',
120,
-1, [483, 108]]
Yes, in that last post the "120" on the second to last line is 120 seconds max for the fight. So if you're doing something that takes 4 minutes, bump it up.
Also, the messy string above it is the DTM to match when it's in a fight. You can see all the entries in _npcs[] are using the same one at the moment, but I guess it's possible its not matching for your NPC.
One other possibility is you're using range/magic and the NPC is moving off the main screen during the fight. That causes the DTM not to match and it thinks the fight is done.
If you want, post or pm the record you added and I'll sanity check it. If a nooby free-to-play character can try it I'll make sure it works ok.
There are currently 1 users browsing this thread. (0 members and 1 guests)