View Full Version : Shattered Noob Scripting Help
GsJersey
08-08-2010, 02:59 AM
Hi, I am fairly new and was trying to create 2 scripts for shattered.
A. I need help to make this script work. Almost like the bot healers in tsc which heal , I want to spellup anyone walking into the room using waggle. Cant seem to get it to work. Any suggestions..any help would be greatly appreciated.
1:
matchfindexact ("just arrived")
fput "waggle #{person}"
goto 1
B. Second i am building a cleric and also trying to make it an afk rescuer without using 225 for friends which hunt in different areas and most likely out of range at times like solhaven and landing for 116 and 225. So I was trying to see if there was a way that when you use lnet locate and the room number pops up can you have a script take you to that room when you are afk? so lets say bobbie dies, my script
bobbie dies
fput 'lnet locate bobbie'
----for example screen comes up showing bobbie dead in room 388 or wherever but of course i am afk and cannot see the screen to know the number----- I want to be able to walk AFK to bobby's room number he died in which i dont know how to make happen or if you can even do that...
the rest of it raising ect is easy to script.
Any help would be greatly appreciated
Thanks
Jersey
Liagala
08-09-2010, 10:18 AM
B. Second i am building a cleric and also trying to make it an afk rescuer without using 225 for friends which hunt in different areas and most likely out of range at times like solhaven and landing for 116 and 225. So I was trying to see if there was a way that when you use lnet locate and the room number pops up can you have a script take you to that room when you are afk? so lets say bobbie dies, my script
bobbie dies
fput 'lnet locate bobbie'
----for example screen comes up showing bobbie dead in room 388 or wherever but of course i am afk and cannot see the screen to know the number----- I want to be able to walk AFK to bobby's room number he died in which i dont know how to make happen or if you can even do that...
the rest of it raising ect is easy to script.
Any help would be greatly appreciated
Thanks
Jersey
Assuming Bobbie has set it so that you can locate him via lich ;locate functionality, you can ;go2 Bobbie. (If he's not sure how, ;lnet help)
Deathravin
08-09-2010, 10:36 AM
1:
matchfindexact ("just arrived")
fput "waggle #{person}"
goto 1
people = []
thepeople = []
loop {
wait_while { people == checkpcs }
thepeople = checkpcs - people
people = checkpcs
people = [] if people.nil?
if thepeople.length > 0
people = checkpcs
thepeople.each { |pcc| fput "waggle #{pcc} }
end
}
Something like that.
This will make it so if you see the character come in the room, regardless of method (dragging somebody, being dragged in, unhiding, walking up stairs or through a door, anything) you waggle at them. Not just 'just arrived'.
If you're talking about working off that game text itself, then this would be how to do that...
loop {
line = get
if line =~ /([A-Z,a-z]+) just arrived\.$/
person = $1.to_s
fput "waggle #{person}"
end
}
That will extract the name from the 'just arrived' message.
And for the 2nd one, I'd suggest looking in ;go2locate for some code to steal out of there... or just use that to begin with.
GsJersey
08-13-2010, 12:46 AM
great thx
GsJersey
08-13-2010, 01:22 AM
Ok had to tweak it by adding start_script("waggle", ["#{person}"]);wait_while{running?("waggle")} because it was just waggling fingers at people but works great now for spellups thanks... simple to when i used it to trigger getting coins for spell ups....easy code thx...
Still cant get the go2 locate to work.. I locate the person and they are on the friends list then go2 locate and also tried go2 name of person that didnt work. So guess im going to have to do it the old fashion way for an afk rescue and 116 locate them and then when message of town desc comes up when they are out of range just walk to the corresponding town and use 225 to fog to them...
Unless others have ideas
GsJersey
08-13-2010, 02:37 AM
Assuming Bobbie has set it so that you can locate him via lich ;locate functionality, you can ;go2 Bobbie. (If he's not sure how, ;lnet help)
I added my friends under allow to locate is there anything else they have to allow?
I was using both ;go2 name and nothing ;go2 said nothing found. I know long term i need to get this to work a travelling group that heals, raises and spells up a deader in a sanctuary will deffinately be a plus
Thanks again for any input
=)
go2 locate works with 116 but not lnet locate. Cant seem to switch the code that it finds in the history to recognize lnet location instead. Any ideas?
Jersey
Liagala
08-13-2010, 09:54 AM
I added my friends under allow to locate is there anything else they have to allow?
I was using both ;go2 name and nothing ;go2 said nothing found. I know long term i need to get this to work a travelling group that heals, raises and spells up a deader in a sanctuary will deffinately be a plus
Thanks again for any input
=)
go2 locate works with 116 but not lnet locate. Cant seem to switch the code that it finds in the history to recognize lnet location instead. Any ideas?
Jersey
Interesting. This used to work. I just tested it and it didn't go for me either. I'm sorry for pointing you in the wrong direction! For your other question, I'm not a particularly good coder - I can mess around with someone else's scripts, but I don't really understand most of it. I'm afraid I wouldn't be much help in changing what go2 is finding in history.
GsJersey
08-13-2010, 02:54 PM
Interesting. This used to work. I just tested it and it didn't go for me either. I'm sorry for pointing you in the wrong direction! For your other question, I'm not a particularly good coder - I can mess around with someone else's scripts, but I don't really understand most of it. I'm afraid I wouldn't be much help in changing what go2 is finding in history.
I just got this from tillmen... was an alias he used. but cant get that to work either comes up locate failed maybe i have it setup wrong. If I cant get this to work i guess i will just use 116 and go2 locate and only raise those who are in my town i reside in. Although seems it would be nice if I can do Solhaven, Icemule and Landing since everyone is blowing thousands on lifekeep potions.
;alias add ;go2name=;eq if (room = LNet.get_data("\?", 'locate')) and (room_num = Map.list.find { |r| r.title.include?(room['title']) and r.desc.include?(room['description']) and r.paths.include?(room['exits']) }.id); start_script('go2', [ room_num.to_s ]); else; echo 'locate failed'; end
GsJersey
08-13-2010, 04:13 PM
ok got it to work with tillmens alias it was ;go2name nameofperson
works excellent after an lnet locate, i rescued a friend in icemule from elven nations... now to perfect it with an empath... woot
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.