Wielding-switching and Envenoming Freebies

Open up scripts in your Mudlet, create a new script and copy/paste. Change the numbers to your rapiers and delete all the other weapon types if you don't have them. You can assign the following functions to new aliases:

venomStrike(matches[2]) -- venomStrike('left leg') etc. -- cycles through two arrays of venoms (named firstvenom and secondvenom)
drawRapiers(), drawScimitars(), drawAxes, drawScimitarAndRapier(), wieldTotem(), wieldBow() -- all draw/wield aliases automatically sheathe what is currently wielded, ie unwield bow and wear it, unwield totem and put it in your pack then wield rapiers etc.

Wield totem sheathes anything wielded, retrieves the totem, dismounts, turns the system off and props the totem. So you could alias ^tot$ to do wieldTotem() and just hit 'tot' whenever you're ready to prop. Then do ^dr$ for drawRapiers() and it will automatically turn the system back on and draw your rapiers.

I've also included in this freebie shootAllDirections() which you can assign to ^sht$ or something like that, it checks GMCP for the exits in your room then fires in all those directions to hit your enemy. So if your enemy was to leave the room and you didn't see it you fire off sht and nab them as they run. Also I put in leaveAndLunge() which I didn't really test, but the theory is that it will check your exits, pick one, leave out of it and then lunge back in.

Hopefully some of these methods will help you set up something of your own or at least give you a good starting point for what you intended to set up. Enjoy.


-- Assign your own numbers here
-- Declare your primary numbers here
local rapierleft = "88126"
local rapierright = "282420" -- badass rapier

-- Declare your secondary weapons here
local axeleft = "126907"
local axeright = "253354" -- badass axe

-- Declare your tertiary weapons here
local scimitarleft = "481082"
local scimitarright = "144024" -- badass scimitar

-- Declare your mount's name here
local mountname = "hueless"

-- Declare your bow's number here
local bow = "118661"

function venomStrike(limb)
firstvenom = {'curare','aconite','curare'} -- first venom array
secondvenom = {'prefarar','curare','kalmia'} -- second venom array
firstvenom_index = (firstvenom_index or 0) + 1
secondvenom_index = (secondvenom_index or 0) + 1
-- reset to first position after we go over
if firstvenom_index > #firstvenom then firstvenom_index = 1 end
if secondvenom_index > #secondvenom then secondvenom_index = 1 end
if svo.defc.dragonform then
send("envenom claws with "..firstvenom[firstvenom_index])
send("rend "..target.." "..limb)
send("breathgust "..target)
else
if limb == NULL then
send("dsl "..target.." "..firstvenom[firstvenom_index].." "..secondvenom[secondvenom_index])
else
send("dsl "..target.." "..limb.." "..firstvenom[firstvenom_index].." "..secondvenom[secondvenom_index])
end
end
end

function checkBiWield()
if svo.me.wielded[rapierright] and svo.me.wielded[axeright] then
return true
else
return false
end
end

function checkScirWield()
if svo.me.wielded[rapierright] and svo.me.wielded[scimitarright] then
return true
else
return false
end
end

function checkRapiers()
if svo.me.wielded[rapierleft] and svo.me.wielded[rapierright] then
return true
else
return false
end
end

function checkAxes()
if svo.me.wielded[axeleft] and svo.me.wielded[axeright] then
return true
else
return false
end
end

function checkBow()
if svo.me.wielded[bow] then
return true
else
return false
end
end

function checkScimitars()
if svo.me.wielded[scimitarleft] and svo.me.wielded[scimitarright] then
return true
else
return false
end
end

function sheathe()
if svo.conf.paused then
sendAll("relax grip", "unwield totem", "vault "..mountname)
svo.app("off")
elseif (checkBow()) then
sendAll("relax grip", "unwield "..bow, "wear "..bow)
elseif (checkRapiers()) then
sendAll("relax grip", "sheathe "..rapierleft, "sheathe "..rapierright)
elseif (checkAxes()) then
sendAll("relax grip", "sheathe "..axeleft, "sheathe "..axeright)
elseif (checkBiWield()) then
sendAll("relax grip", "sheathe "..rapierright, "sheathe "..axeright)
elseif (checkScimitars()) then
sendAll("relax grip", "sheathe "..scimitarright, "sheathe "..scimitarleft)
elseif (checkScirWield()) then
sendAll("relax grip", "sheathe "..rapierright, "sheathe "..scimitarright)
end
end

function drawRapiers()
if (checkRapiers()) then
cecho("<steel_blue>"..string.rep("-",44))
cecho("\nYou are already wielding your rapiers, sire.\n")
cecho("<steel_blue>"..string.rep("-",44).."\n")
else
sheathe()
sendAll("draw "..rapierleft,"draw "..rapierright)
end
end

function drawScimitarAndRapier()
if (checkScirWield()) then
cecho("<steel_blue>"..string.rep("-",44))
cecho("\nYou are already wielding the badass rapier and the badass scimitar.\n")
cecho("<steel_blue>"..string.rep("-",44).."\n")
else
sheathe()
sendAll("draw "..rapierright.." left","draw "..scimitarright.." right")
end
end

function drawScimitars()
if (checkScimitars()) then
cecho("<steel_blue>"..string.rep("-",44))
cecho("\nYou are already wielding your scimitars.\n")
cecho("<steel_blue>"..string.rep("-",44).."\n")
else
sheathe()
sendAll("draw "..scimitarleft,"draw "..scimitarright)
end
end

function drawBiWeapons()
if (checkBiWield()) then
cecho("<steel_blue>"..string.rep("-",44))
cecho("\nYou are already wielding your bi-wielding rapiers and axes.\n")
cecho("<steel_blue>"..string.rep("-",44).."\n")
else
sheathe()
sendAll("draw "..rapierright.." left","draw "..axeright.." right")
end
end

function drawAxes()
if (checkAxes()) then
cecho("<steel_blue>"..string.rep("-",44))
cecho("\nYou are already wielding your axes.\n")
cecho("<steel_blue>"..string.rep("-",44).."\n")
else
sheathe()
sendAll("draw "..axeleft,"draw "..axeright)
end
end

function wieldBow()
if (checkBow()) then
cecho("<steel_blue>"..string.rep("-",44))
cecho("\nYou are already wielding your bow.\n")
cecho("<steel_blue>"..string.rep("-",44).."\n")
else
sheathe()
sendAll("remove "..bow,"wield "..bow)
end
end

function wieldTotem()
if (checkBow() or checkRapiers() or checkBiWield() or checkScirWield() or checkAxes() or checkScimitars()) then sheathe() end
svo.app("on")
sendAll("wield totem", "grip")
send("dismount")
send("stand totem")
end

function shootAllDirections()
local exits = gmcp.Room.Info.exits
for key in pairs(exits) do
send("shoot "..target.." "..key)
end
send("shoot "..target.." up")
end

function shuffled(tab)
local n, order, res = #tab, {}, {}
for i=1,n do order[i] = { rnd = math.random(), idx = i } end
table.sort(order, function(a,b) return a.rnd < b.rnd end)
for i=1,n do res[i] = tab[order[i].idx] end
return res
end

function leaveAndLunge()
local gmcpexits, exits = gmcp.Room.Info.exits, {}
for exit in pairs(gmcpexits) do
table.insert(exits, exit)
end
exits = shuffled(exits) --shuffle the exits
randomexit = exits[1]
send(randomexit)
send("lunge "..target)
end
image

Comments

  • StrataStrata United States of Derp
    You already randomized gmcp directions. But you forgot to add the key that randomly does lunge, snipe, thurisaz, dsl for ultimate F1 mash-to-win mode.
     
  • edited April 2014
    Nevermind, misread.




    Penwize has cowardly forfeited the challenge to mortal combat issued by Atalkez.
Sign In or Register to comment.