PDA

View Full Version : help with ;fireguardians (newb scripter)



IorakeWarhammer
06-07-2010, 11:08 AM
ALL ISSUES RESOLVED - REMOVED ALL BUT MODIFIED FIRE GUARDIAN SCRIPT IN CASE ANYONE NEEDS TO COPY. Go into this and edit it for your own spells or signs, etc. Also, make sure to change "put broadsword in void" to stow or whatever weapons command you use. Necessary edits should be clear even to the most seasoned noobs.

***********

def rest
echo "**RESTING** will hunt when mind is clear"
until (checkmind(1) or checkmind(2) or checkmind(3)) and !checkmind(4)
pause 200
end
gohunting
end

def attack_routine
stand
killingtime
fput "stance def"
loot
end



def loot
grabthese=["diamond", "emerald", "onyx", "faenor-bloom", "star ruby", "wand", "aetherstone", "agate", "azurite", "beryl", "bloodjewel", "bloodstone", "bluerock", "caederine", "cordierite", "deathstone", "doomstone", "dreamstone", "eostone", "firestone", "galena", "geode", "hyacinth", "pyrite", "peridot", "rhimar", "riftshard", "riftstone", "rosepar", "wyrdshard", "spinel", "faenor", "blazestar", "despanal", "feystone", "ruby", "pearl", "sapphire", "opal", "jacinth", "garnet", "moonstone", "topaz", "gem", "coral", "sunstone", "starstone", "quartz", "heliodor", "glimaerstone", "carbuncle", "turquoise", "chalcedony", "tourmaline", "obsidian", "zircon", "amethyst", "lapis", "amber" , "sphene" , "shell", "stone", "lapis","gem","mother-of-pearl","lazuli", "jade", "ivory", "nugget"]
fput "loot"
craplist=[/heavy .*? orb/]
if RoomObj.loot and !(checkloot.to_a & grabthese).empty?
fput "store weapon"
(0..RoomObj.loot.length).each do |x|
echo "checking loot object number #{x}"
if grabthese.include?(RoomObj.loot[x].noun) and craplist.include?(RoomObj.loot[x].name)
echo "Item found is a piece of shit. Ignoring it."
elsif grabthese.include?(RoomObj.loot[x].noun)
echo "Good item found, grabbing it:"
fput "get ##{RoomObj.loot[x].id}"
fput "stow right"
end
end
fput "get my broad"
fput "sign swords"
pause 1
fput "sign smiting"
fput "sign striking"
pause 1
fput "sign defending"
fput "sign warding"
end
end

def stand
if !Char.standing?
fput "stand"
waitrt?
end
end

def killingtime
waitrt?
fput "stance neutral"
while target = RoomObj.npcs.find { |npc| npc.status != 'dead' and npc.name != "firephantom"}
stand
fput "attack ##{target.id}"
if matchtimeout(1,"You currently have no valid target|What were you referring to?") and checknpcs
walk
break
end
if RoomObj.npcs.find { |npc| npc.status == 'dead'}
fput "loot"
end
end
loot
end

def wander
bad_rooms = ['4121','8141','7902','7905']
pastfried=0
until pastfried >= 2 or dead?
room = Room.current
begin
next_room = room.wayto.keys[rand(room.wayto.keys.length)]
end while bad_rooms.include?(next_room)
way = room.wayto[next_room]
if way.class == String
move(way)
else
way.call
end
if checkpcs or checkloot.include?("disk")
sleep 1
elsif RoomObj.npcs.find { |npc| npc.status == 'dead' }
loot
elsif checknpcs and RoomObj.npcs.find { |npc| npc.status != 'dead' and npc.name != "firephantom"}
if checkmind(7)
pastfried=pastfried+1
end
echo "what have we here?"
until !checknpcs or dead? or !RoomObj.npcs.find { |npc| npc.status != 'dead' and npc.name != "firephantom"}
attack_routine
end
end
end
end

def gohunting
stand
multifput("stance def","ready weapon","ready shield")
pause 1
fput "prep 601"
fput "cast"
pause 4
fput "prep 606"
fput "cast"
pause 4
fput "prep 107"
fput "cast"
pause 4
fput "prep 613"
fput "cast"
pause 4
fput "prep 103"
fput "cast"
pause 4
start_script 'go2', [ '4124', '_disable_confirm_' ]
waitfor "The walls and ceiling of this room curve gently around, blending into each other without any sharp corners or straight lines."
wander
if dead?
fput "quit"
end
start_script 'go2', [ '1776', '_disable_confirm_' ]
pause 20
multifput("put broad in void","remove my void","sell my void","wear my void","get broad from void")
pause 10
start_script 'go2', [ '400', '_disable_confirm_' ]
waitfor "First Elanith Bank, Teller"
fput "deposit all"
start_script 'go2', [ '3600', '_disable_confirm_' ]
rest
end

if Room.current.id == 3600
rest
elsif
gohunting

SpiffyJr
06-07-2010, 11:24 AM
fput "get my broad"
fput "sign swords"
pause 1
fput "sign smiting"
fput "sign striking"
pause 1
fput "sign defending"
fput sign warding"
end
end


You're missing the beginning quotation (") before sign warding.

IorakeWarhammer
06-07-2010, 11:31 AM
when i edit in notepad i think its converting from .lic to .txt and then won't find it ;/ (EDIT - RESOLVED - fixed it - manually entered .lic)

thank you Spiffy

im reading monotonous tutorial (realized its annoying to ask newb questions)

testing this now.. script seems to be working so far. I edited the script I modified so it can be copied/pasted if anyone needs it.

what I changed in case anyone wants to use this to modify for their own purposes:

1. set rest location to Voln
2. added in spellup
3. added in CoL signs during looting to refresh properly
4. changed stance from forward to neutral
5. changed stow commands until i figured out how to use it properly. (you may need to change it back to stow)

Renewing of signs does not appear to be draining mana faster than regen (I have 46 mana)

SpiffyJr
06-07-2010, 11:49 AM
fput "sign warding" unless checkmana < 2 or checkspell 9903

Cast sign of warding unless you have less than two mana or if it's already running.

IorakeWarhammer
06-07-2010, 12:33 PM
right now it only appears to be throwin up col signs if the critter has a gem so im gonna modify

Jayvn
06-07-2010, 12:35 PM
or...just use bigshot... problem solved...

IorakeWarhammer
06-07-2010, 12:38 PM
yeah i'm going to tackle that next. just want a basic script to run for now while i learn that. i wanna spend extensive time with bigshot so i can master it and I may begin MAing with some anonymous characters rather than using a high profile name subject to grief. the current char I'm using is really for testing purposes. also bigshot is not as user friendly as it might seem for newbs to lich (as you can see by the questions posed)

AS FOR THE SCRIPT: it appears its only throwing up col signs when a critter has a gem and its looted

Anebriated
06-07-2010, 01:15 PM
maybe you should take it out of the elseif that deals with looting and grabbing the gem.... just a thought.

Another thought, you might want to spell elseif like that instead of elsif.

IorakeWarhammer
06-07-2010, 01:37 PM
yeah i'm getting an issue where it doesn't bring the weapon back out.. testing..

the elsif came with the script i didnt alter it

Anebriated
06-07-2010, 01:39 PM
i must be wrong about that. Been awhile since I did any real coding. Noticed it as elsif at a few spots... im probably wrong

Tordane
06-07-2010, 01:43 PM
i must be wrong about that. Been awhile since I did any real coding. Noticed it as elsif at a few spots... im probably wrong

its elsif.

Alorn15
06-07-2010, 01:46 PM
re: your mentioning notepad -

I highly recommend you switch to an editor with syntax coloring and smart indentation. Komodo Edit is decent, and it allows you to to specify that .lic files should be recognized as ruby.

SpiffyJr
06-07-2010, 01:55 PM
re: your mentioning notepad -

I highly recommend you switch to an editor with syntax coloring and smart indentation. Komodo Edit is decent, and it allows you to to specify that .lic files should be recognized as ruby.

Notepad++ for the win.

Beguiler
06-07-2010, 02:27 PM
Mkay..here's me being noobish again.

What's so win about Notepad++, and will I need something like that to tweak scripts?

Ryvicke
06-07-2010, 02:34 PM
Mkay..here's me being noobish again.

What's so win about Notepad++, and will I need something like that to tweak scripts?

You don't *need* it for basic tweaking at all. Notepad can definitely handle that. I'll let others explain the incredible glories of Notepad++.

JohnDoe
06-07-2010, 04:48 PM
I'm an UltraEdit fan, but don't plan on buying it for my personal machine. Notepad++ is freeware, right? I'll give it a shot.

Just DON'T use Microsoft Word. I edited a script a few nights ago in Word (not sure why) and it took me 5x the amt of time to figure out why I kept getting "unexpected tIDENTIFIER, expecting kEND" errors when I ran it. Thankfully, Google came to my rescue and I saw that someone else had a similar problem elsewhere in the world (related to hidden characters inserted by a text editor) and I was able to rework the new part of the script (i.e. retyped it in notepad) to fix it.

Gnomad
06-07-2010, 09:11 PM
You don't *need* it for basic tweaking at all. Notepad can definitely handle that. I'll let others explain the incredible glories of Notepad++.

worth 1000 words:

http://img36.imageshack.us/img36/3615/notepads.png

SpiffyJr
06-07-2010, 09:33 PM
^^^ That.

Alorn15
06-07-2010, 09:52 PM
My turn. Vim.

http://img683.imageshack.us/img683/2853/screenshot20100607at651.png