View Full Version : swarm script help
Hilts
06-07-2012, 11:57 AM
threw together a script to handle swarms in warcamps but not so good with this and cant figure out whats going on with it.. just running it makes nothing else work for some reason..
loop {
if GameObj.npcs.size > 2 and Spell[1030].affordable?
pause_script "bigshot"
fput "stance def"
multifput "prep 1030" , "cast"
waitcastrt?
fput "renew 1030" until GameObj.npcs.find_all { |i| (i.status !~ /dead|gone/)}
start_script "sloot"
wait_while { running?("sloot")}
if GameObj.npcs.size > 1
unpause_script "bigshot"
end
end
}
any help is greatly appreciated
DaCapn
06-07-2012, 12:22 PM
Pretty close. Looks like you have it use 1030 to clear the room. Then you make sure there are still creatures in the room before unpausing bigshot (which there shouldn't be).
The best way to do it is just to have an attack script set up for bigshot with logic for swarms, prioritizing targets, etc.
Hilts
06-07-2012, 12:25 PM
well.. i dont want to use open 1030 more then i have to, so i dont want to keep renewing that until EVERYTHING is dead, just until 1 or 2 is left, then bigshot will take back over and focus 1030 the remaining 1 or 2 so i stop disrupting the shroud. if that makes any sense
Jymamon
06-07-2012, 10:48 PM
Try this (untested since I'm not logged in with my bard):
loop {
if (GameObj.npcs.length > 2) and (Spell['1030'].affordable?)
pause_script "bigshot"
fput "stance def"
while ( GameObj.npcs.find_all{ |i| (i.status !~ /dead|gone/)}.length > 2 )
# Note, You don't need explicit "renew". When I looked at something like this in the
# past, I seem to remember the game already getting it right. If not, put the
# "cast" about the while and change this to fput "renew 1030".
Spell['1030'].cast
end
start_script "sloot"
wait_while { running?("sloot")}
unpause_script "bigshot"
end
pause 0.25
}
Hilts
06-07-2012, 11:09 PM
thank you, ill try it out in just a bit
edit: whatever you did fixed the freezing problems it was doing.. so right off top its alot better
seems to be working perfectly, thank you for the help Jymamon
DaCapn
06-08-2012, 01:55 AM
I guess someone probably wrote the other one for you too, huh?
Hilts
06-08-2012, 02:26 AM
threw together a script to handle swarms in warcamps but not so good with this and cant figure out whats going on with it.. just running it makes nothing else work for some reason..
loop {
if GameObj.npcs.size > 2 and Spell[1030].affordable?
pause_script "bigshot"
fput "stance def"
multifput "prep 1030" , "cast"
waitcastrt?
fput "renew 1030" until GameObj.npcs.find_all { |i| (i.status !~ /dead|gone/)}
start_script "sloot"
wait_while { running?("sloot")}
if GameObj.npcs.size > 1
unpause_script "bigshot"
end
end
}
any help is greatly appreciated
no.. i did
let me clarify.. i wasnt asking for someone to rewrite this script it DID actually halfass work aside from it making all my other ones not work while it was running, i asked for help on it to see about the freezing problem.. Jymamon redid it on their own freewill.
dont be a dick..
DaCapn
06-08-2012, 12:48 PM
no.. i did
let me clarify.. i wasnt asking for someone to rewrite this script it DID actually halfass work aside from it making all my other ones not work while it was running, i asked for help on it to see about the freezing problem.. Jymamon redid it on their own freewill.
dont be a dick..
Just going on past observation. In about a half dozen of your threads, I've yet to see you string together a single line of code much less comprehend one. My post explained the faulty logic and you treated it as a suggestion. You replied to Jymamon's post with "whatever you did worked." Looks like you still don't know what's going on (never spotted the runaway loop). It looks like code that was written off-the-cuff by someone in the know and left untested. Hopefully that clarifies my reasoning.
You can't really begrudge the fact that I think you're a little lame for continuing to come here to post thinly veiled requests for someone else to re-write something for you. I can't really begrudge the fact that people seem to do it for you, either.
You'll notice that despite that, I continue to come and drop a comment to help point you in the right direction.
Hilts
06-08-2012, 02:00 PM
Just going on past observation. In about a half dozen of your threads, I've yet to see you string together a single line of code much less comprehend one. My post explained the faulty logic and you treated it as a suggestion. You replied to Jymamon's post with "whatever you did worked." Looks like you still don't know what's going on (never spotted the runaway loop). It looks like code that was written off-the-cuff by someone in the know and left untested. Hopefully that clarifies my reasoning.
You can't really begrudge the fact that I think you're a little lame for continuing to come here to post thinly veiled requests for someone else to re-write something for you. I can't really begrudge the fact that people seem to do it for you, either.
You'll notice that despite that, I continue to come and drop a comment to help point you in the right direction.
i appreciate that you come comment when its useful like the first one and your not making assumptions, i write plenty.. its just really never dealing with npcs and attacking creatures a certain way until so many dead blah blah so i was almost completely blind writing the first script. and again.. nowhere in my post was i asking for someone to fucking rewrite it, i asked for HELP. i cant help you think people rewriting shit on their own is lame.. but if thats how you feel then stop commenting, its that simple
Gibreficul
06-09-2012, 01:52 PM
dont be a dick..
Don't tell me what to and not to be!
:troll:
DaCapn
06-09-2012, 02:42 PM
Don't tell me what to and not to be!
:troll:
Despite our very different tones, sometimes people think I'm you on LNet.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.