Mods to Nyss Script

Scripts and support for your favorite MUD client.
Afu
Sojourner
Posts: 82
Joined: Sun Oct 01, 2017 3:58 pm

rewrote fwalk

Postby Afu » Mon Sep 24, 2018 1:13 am

can now just make a fwalk to a room number -- not required
@fwalk add NewFwalk [roomnumber]

alias: @fwalk

Code: Select all

^@fwalk( [0-9a-zA-Z]+)?( [0-9a-zA-Z]+)?( [0-9a-zA-Z]+)?




Code: Select all

-- map:getRoom() = nil (unknown) throws error

-- ^fwalk( [0-9A-Za-z]+)?( [A-Za-z]+)?


-- fwalk roomnum
-- fwalk add/del bookmarkname
-- fwalk bookmarkname

local var1
local var2
local var3
local tmpshiz

if matches[2] ~= nil then
  tempshiz = "<green>arg1:" .. matches[2] .. "\n"
end
if matches[3] ~= nil then
  tempshiz = tempshiz .. "arg2:" .. matches[3] .. "\n"
end
if matches[4] ~= nil then
  tempshiz = tempshiz .. "arg3:" .. matches[4] .. "\n"
end
cecho(tempshiz)

local addfwalk
local action=0

local tmpvar=charData:get("fwalk", true)

local tmplist={}

function fastwalk(xroomid)
   fwalkQue=false
   
   if roomLocked(xroomid) then
      cecho("<red>[Error: Destination room is locked]\n")
      return
   end

   if map:getRoom() == nil then
      cecho("<red>[Error: source room id is nil]\n")
      return
   end

   if getPath( map:getRoom(), xroomid) then
      doSpeedWalk()
   else
      cecho("<red>[Unable to find path to room#" .. xroomid .. "]\n")
   end
end

if tonumber(matches[2]) ~= nil then

   if inCombat() then
      cecho("<red>[Can't fwalk while in combat]\n")
      return(false)
   end

   fastwalk(tonumber(matches[2]))
else
   var1=string.trim(matches[2])
   var2=string.trim(matches[3])
   
  if tonumber(matches[4]) ~= nil then
     var3=tonumber(matches[4])
      cecho("<green>room:" .. var3 .. "\n")
   else
     --cecho("<green>room:" .. matches[4] .. "\n")
     var3=nil
   end
   
   cecho("<red>Usage: @fwalk roomnumber - fastwalk to specified room number\n")
   cecho("<red>       @fwalk name       - fastwalk to room indicated by fwalk name\n")
   cecho("<red>       @fwalk add name   - adds a fastwalk to the currently occupied room using 'name' \n")
  cecho("<red>       @fwalk del name   - deletes fastwalk 'name'\n")
   cecho("<red>       @fwalk all        - list all fwalks regardless of location\n")
   cecho("<red>       @fwalk area       - list all fwalks in current area\n")

   echo("\n")

   if var1 == "all" then

      for k,v in pairs(charData:get("fwalk", true)) do

         if roomExists(v) then
            local zoneid=tonumber(getRoomUserData(v, "zoneid") )
            local pathlength=0

            if roomLocked(v) == false then
               if getPath( map:getRoom(), v) then
                  pathlength=#speedWalkPath
               end
            end

            if pathlength ~= 0 then
               tmplist[#tmplist+1] = string.format("[%-30s] [%6d %-15s] [%3d] %s\n", NyyLIB.areaTable[zoneid], v, k, pathlength, getRoomName(v))
            else
               tmplist[#tmplist+1] = string.format("[%-30s] [%6d %-15s] [%3d] %s\n", NyyLIB.areaTable[zoneid], v, k, pathlength, getRoomName(v))
            end
         else
            tmplist[#tmplist+1] = string.format("[%-30s] [%6d %-15s] [%3s] %s\n", "", v, k, "", "")
         end
      end

      cecho("<white>             Area                  Room#      fwalk     Distance          Room Name\n")
      printSorted(tmplist)

      return
   end

   if var1 == "area" then

      local roomid= map:getRoom()

      local internalid = getRoomArea( roomid )
      local zone=getRoomUserData(roomid, "zoneid")
      local currentareazoneid=tonumber(zone)

      for k,v in pairs(charData:get("fwalk", true)) do

         if roomExists(v) then
            local zoneid=tonumber(getRoomUserData(v, "zoneid") )
            local pathlength=0

            if roomLocked(v) == false then
               if getPath( map:getRoom(), v) then
                  pathlength=#speedWalkPath
               end
            end

            if zoneid == currentareazoneid then
               if pathlength ~= 0 then
                  tmplist[#tmplist+1] = string.format("[%-30s] [%6d %-15s] [%3d] %s\n", NyyLIB.areaTable[zoneid], v, k, pathlength, getRoomName(v))
               else
                  tmplist[#tmplist+1] = string.format("[%-30s] [%6d %-15s] [%3d] %s\n", NyyLIB.areaTable[zoneid], v, k, pathlength, getRoomName(v))
               end
            end
         --else
         --   tmplist[#tmplist+1] = string.format("[%-30s] [%6d %-15s] [%3s] %s\n", "", v, k, "", "")
         end
      end

      cecho("<white>             Area                  Room#      fwalk     Distance          Room Name\n")
      printSorted(tmplist)

      return
   end


   if map:getRoom() == nil then
      cecho("<red>[Current room is unknown]\n")
      return
   end

   -- check if var1 is existing marker - if so, fastwalk and exit

   for k,v in pairs(charData:get("fwalk", true)) do
      if k == var1 then
         cecho("<green>[Issue speedwalk to " .. var1 .. " at " .. v .. "]\n")
   
         fastwalk(v)

         return
      end
   end

   if var1 == "add" and var2 ~= nil then
     if var3 ~= nil then
      cecho("<green>[Adding fwalk for (" .. var2 .. ") to destination " .. var3 .. "]\n")

      tmpvar[var2] = var3
      charData:set("fwalk", tmpvar, true)      
      else
      cecho("<green>[Adding fwalk for (" .. var2 .. ") to destination " .. map:getRoom() .. "]\n")

      tmpvar[var2] = map:getRoom()
      charData:set("fwalk", tmpvar, true)
      end

      return
   end

   if var1 == "del" and tmpvar[var2] ~= nil then
      cecho("<green>[Deleting fwalk for (" .. var2 .. ") at destination " .. tmpvar[var2] .. "]\n")

      tmpvar[var2] = nil
      charData:set("fwalk", tmpvar, true)

      return
   end

   for k,v in pairs(tmpvar) do

      if roomExists(v) then
         local zoneid=tonumber(getRoomUserData(v, "zoneid") )
         local pathlength=0

         if roomLocked(v) == false then
            if getPath( map:getRoom(), v) then
               pathlength=#speedWalkPath
            end
         end

         if pathlength ~= 0 or map:getRoom() == v then
            tmplist[#tmplist+1] = string.format("[%-30s] [%6d %-15s] [%3d] %s\n", NyyLIB.areaTable[zoneid], v, k, pathlength, getRoomName(v))
         end
      end
   end

   cecho("<white>             Area                  Room#      fwalk     Distance          Room Name\n")
   printSorted(tmplist)
end
Afu
Sojourner
Posts: 82
Joined: Sun Oct 01, 2017 3:58 pm

Re: Mods to Nyss Script

Postby Afu » Tue Sep 25, 2018 10:19 pm

Code: Select all

-------------------------------------------------
--         Put your Lua functions here.        --
--                                             --
-- Note that you can also use external Scripts --
-------------------------------------------------
-- TODO: update inittrain path in Silverymoon

   testtrain = {
      {48518, "Shalyssa Lurialar"},
      {48850, "Forell Luckaun"},
      {48721, "Seipora Rein"}
   }

raventrain = {
{85870, "captain"},
{85868, "reaver"},
{85879, "slaver"},
{85878, "reaver"},
{85890, "captain"},
{85889, "first"},
{85885, "knight"},
{85886, "navigator"},
{85875, "reaver"},
{85871, "reaver"}
}

smlow = {
--{48658, "cleric"},   --32
--{48665, "commoner"},   --33
--{48739, "commoner"},   --33
--{48484, "commoner"},   --33
--{48629, "commoner"},   --33
--{48736, "commoner"},   --35
--{48717, "commoner"},   --35
--{48704, "commoner"},   --35
--{48617, "commoner"},   --35
--{48611, "commoner"},   --35
--{48785, "commoner"},   --35
--{48479, "soldier"},   --36
{48644, "commoner"},   --38
{48666, "commoner"},   --39
{48699, "commoner"},   --39
{48732, "commoner"},   --39
{48722, "commoner"},   --39
{48919, "commoner"},   --39
{48614, "commoner"},   --39
{48605, "commoner"},   --39
{48758, "commoner"},   --39
{48799, "commoner"},   --39
{84203, "bankDeposit"}
}

cmtrain = {{44327,"bugbear"},
{44328,"bugbear"},
{44329,"bugbear"},
{44330,"bugbear"},
{44331,"bugbear"},
{44344,"bugbear"},
{44345,"bugbear"},
{44346,"bugbear"},
{44347,"bugbear"},
{44348,"bugbear"},
{44349,"bugbear"},
{44350,"bugbear"},
{44349,"bugbear"},
{44348,"bugbear"},
{44347,"bugbear"},
{44346,"bugbear"},
{44345,"bugbear"},
{44344,"bugbear"},
{44331,"bugbear"},
{44332,"bugbear"},
{44333,"bugbear"},
{44334,"bugbear"},
{44335,"bugbear"},
{44340,"bugbear"},
{44341,"bugbear"},
{44342,"bugbear"},
{44343,"bugbear"},
{44342,"bugbear"},
{44341,"bugbear"},
{44340,"bugbear"},
{44335,"bugbear"},
{44336,"bugbear"},
{44337,"bugbear"},
{44338,"bugbear"},
{44339,"bugbear"},
{44338,"bugbear"},
{44337,"bugbear"},
{44336,"bugbear"},
{44335,"bugbear"},
{44334,"bugbear"},
{44333,"bugbear"},
{44332,"bugbear"},
{44331,"bugbear"},
{44330,"bugbear"},
{44329,"bugbear"},
{44328,"bugbear"},
{44327,"bugbear"},
{44313,"orc"},
{44333,"orc"},
{44314,"orc"},
{44315,"orc"},
{44316,"orc"},
{44317,"orc"},
{44318,"orc"},
{44319,"orc"},
{44320,"orc"},
{44321,"orc"},
{44322,"orc"},
{44323,"orc"},
{44322,"orc"},
{44321,"orc"},
{44324,"orc"},
{44325,"orc"},
{44326,"orc"},
{44325,"orc"},
{44324,"orc"},
{44321,"orc"},
{44320,"orc"},
{44319,"orc"},
{44318,"orc"},
{44317,"orc"},
{44316,"orc"},
{44315,"orc"},
{44314,"orc"},
{44313,"orc"}--71763, "bankDeposit"}
}

   smtrain = {
      {84203, "bankDeposit"},
      {49036, "Dragor Keenblade"},
      {49117, "devout priest"},
      {49135, "Ultrumm"},
      {48586, "Ersenas"},
      {48681, "Corland Deepforge"},
      {48721, "Seipora Rein"},
      {48850, "Forell Luckaun"},
      {48518, "Shalyssa Lurialar"},
      {48525, "Elaith Waterstill"},
      {48524, "Lavis Ryl"},
      {48873, "Aratha Sul"},
      {48882, "Willa O'Greensleeves"}
--      {49054, "Tathshandra Tyrar"},
--      {94648, "Otasit"},
   }

   ashtrain = {
      {87415, "bankDeposit"},
      {87263, "gambler"},
      {87272, "prostitute"},
      {87275, "aging prostitute"},
      {87276, "naked woman"},
      {87263, "gambler"},
      {87272, "prostitute"},
      {87275, "aging prostitute"},
      {87254, "Ashstone noble"},
      {87251, "Ashstone noble"},
      {87255, "Ashstone noble"},
      {87249, "Ashstone noble"},
      {87253, "Ashstone noble"},
      {87258, "Ashstone noble"},
      {87257, "Ashstone noble"},
      {87253, "Ashstone noble"},
      {87249, "Ashstone noble"},
      {87255, "Ashstone noble"},
      {87251, "Ashstone noble"},
      {87255, "Ashstone noble"},
      {87254, "Ashstone noble"},
      {87253, "Ashstone noble"},
      {87251, "Ashstone noble"},
      {87255, "Ashstone noble"},
      {87249, "Ashstone noble"},
      {87253, "Ashstone noble"},
      {87253, "Ashstone noble"},
      {87258, "Ashstone noble"},
      {87249, "Ashstone noble"}
   }

   wdtrain = {
      {13402, "elite"},
      {13359, "elite"},
      {13343, "elite"},
      {13354, "master"},
      {13397, "master"}
--      {85354, "elite guard"},
--      {85358, "elite guard"},
--      {85356, "elite guard"},
--      {85410, "elite guard"},
--      {85421, "elite guard"},
--      {85349, "elite guard"}
   }

nobles = {       
    {87415, "bankDeposit"},
      {87254, "Ashstone noble"},
      {87251, "Ashstone noble"},
      {87255, "Ashstone noble"},
      {87249, "Ashstone noble"},
      {87253, "Ashstone noble"},
      {87258, "Ashstone noble"},
      {87257, "Ashstone noble"},
      {87253, "Ashstone noble"},
      {87249, "Ashstone noble"},
      {87255, "Ashstone noble"},
      {87251, "Ashstone noble"},
      {87254, "Ashstone noble"}
}

function configureTrain()
   fwalkQue=false

   -- disable any active triggers prior to enabling
   expandAlias("@resettrain", false)

   cecho("<green>[Laying train tracks...]\n")

   if trainList ~= nil then
      if _G[trainList] ~= nil then
         NyyLIB.smtrainstops = _G[trainList]
         trainList=nil
         return
      end
   end

   if map:getCurrentZone() == "Ashstone" then
      NyyLIB.smtrainstops = ashtrain
   elseif map:getCurrentZone() == "Silverymoon, Gem of the North" then
      NyyLIB.smtrainstops = smtrain
   elseif map:getCurrentZone() == "Northern Waterdeep Main City" then
      NyyLIB.smtrainstops = wdtrain
   elseif map:getCurrentZone() == "The Great Harbor of Waterdeep" then
      NyyLIB.smtrainstops = wdtrain
   elseif map:getCurrentZone() == "The Comarian Mines" then
      NyyLIB.smtrainstops = cmtrain
   elseif map:getCurrentZone() == "The Spirit Raven" then
      NyyLIB.smtrainstops = raventrain
   end
end

--The Comarian Mines
Afu
Sojourner
Posts: 82
Joined: Sun Oct 01, 2017 3:58 pm

Re: Mods to Nyss Script

Postby Afu » Wed Sep 26, 2018 12:40 am

Bane backup blind

i assume you are already using blind potion
i assume you are wielding a bane

Trigger:
substring: appears to go blind

Code: Select all

charData:set("blinded_mob", true)


Trigger
substring: apply poison to

Code: Select all

charData:set("blinded_mob", false)
charData:set("blind_app", 0)


Trigger
substring: your weapon wears off

Code: Select all

charData:set("blind_app", charData:get("blind_app")+1)
if charData:get("blind_app") > 1 then
  if charData:get("blinded_mob") then
    --send("say blinded!")
  else
    send("say Dragonblind")   
   end
end
Afu
Sojourner
Posts: 82
Joined: Sun Oct 01, 2017 3:58 pm

Improved @dbfind

Postby Afu » Wed Sep 26, 2018 4:42 am

alias @dbfind
regex:^ @dbfind (.*)$
syntax:
@dbfind dam > 3
@dbfind dam > 3 legs


Code: Select all

function statlookup (stat, operator, amount, slot)
   local recs, row
   local retval = {}
   
--select items.item_name, items.short_stats, item_slots.slot_abbr, items.item_id, items.item_type, item_attribs.attrib_abbr, item_attribs.attrib_value
--from items, item_attribs, item_slots where items.item_id == item_attribs.item_id
--and items.item_id == item_slots.item_id
--and items.item_name like "%a black-hafted broadsword stained with blood%"
--and item_attribs.attrib_abbr like "%dam%"
--and item_attribs.attrib_value > 2
if slot ~= nil then
  sql = "select items.item_name, items.short_stats, item_slots.slot_abbr, items.item_id, items.item_type, item_attribs.attrib_abbr, item_attribs.attrib_value "
   sql = sql .. "from items, item_attribs, item_slots where items.item_id == item_attribs.item_id "
   sql = sql .. "and items.item_id == item_slots.item_id "
   sql = sql .. "and item_slots.slot_abbr like '%" .. slot .. "%' "
   sql = sql .. "and item_attribs.attrib_abbr like '%" .. stat .. "%' "
   sql = sql .. "and item_attribs.attrib_value " .. operator .. " " .. amount
else
  sql = "select items.item_name, items.short_stats, item_slots.slot_abbr, items.item_id, items.item_type, item_attribs.attrib_abbr, item_attribs.attrib_value "
   sql = sql .. "from items, item_attribs, item_slots where items.item_id == item_attribs.item_id "
   sql = sql .. "and items.item_id == item_slots.item_id "
   --sql = sql .. "and item_slots.slot_abbr like '%" .. slot .. "%' "
   sql = sql .. "and item_attribs.attrib_abbr like '%" .. stat .. "%' "
   sql = sql .. "and item_attribs.attrib_value " .. operator .. " " .. amount
end
   cecho("<cyan>SQL:" .. sql .. "\n")

   recs = assert(NyyLIB.conn:execute(sql))
   row = recs:fetch({})

   while row do
      retval[#retval+1] = row[2]
      row = recs:fetch({})
   end

   recs:close()
   
   return(retval)
       
end

local data

--cecho("<red>[Attempting to identify " .. matches[2] .. "]\n")
local args = matches[2]
local temp = args:split("\ ")
local attr = temp[1]
local oppr = temp[2]
local amt = temp[3]
local slot = temp[4]

data = statlookup(attr, oppr, amt,slot)

for k,v in pairs(data) do
   cecho("\n<green>" .. v .. "\n")
end

cecho ("<red>[" .. #data .. " matches in database]\n")
Afu
Sojourner
Posts: 82
Joined: Sun Oct 01, 2017 3:58 pm

@stat

Postby Afu » Wed Sep 26, 2018 6:43 am

this alias will look up a characters equipment if you @stat them

its pretty complicated, but ill try to explain
be careful when i say regex, be sure to change the dropdown from subscript to regex


alias: @stat
regex: ^@stat (.*)$

trigger: beginlook
regex: ^(.*) is a .*sized level .*\.$

Code: Select all

--cecho("<cyan>" .. matches[2] .. "\n")
cecho("\n<red>Debug beginlook\n")
enableTrigger("FirstBlank")
enableTrigger("statgear")
disableTrigger("beginlook")


trigger: statgear
regex: ^\<.*\>(.*)$

Code: Select all

qlookup(matches[2])
--cecho("\n<red>Debug statgear\n")
enableTrigger("SecondBlank")
disableTrigger("FirstBlank")


trigger: SecondBlank
regex: ^$

Code: Select all

--cecho("\n<red>Debug secondblank\n")
cecho("\n<green>@stat complete\n")
disableTrigger("statgear")
disableTrigger("SecondBlank")


trigger: notthere
substring: You do not see that here

Code: Select all

--cecho("\n<red>Debug nothere\n")
disableTrigger("FirstBlank")
disableTrigger("beginlook")
disableTrigger("SecondBlank")
disableTrigger("statgear")
cecho("\n<red>Target not found @stat\n")


function.. can add to any script, i keep my own

Code: Select all

function qlookup(item)
   stats = sqliditem(string.gsub(item, " %(.+%)", ""))
   cecho("\n<green>[" ..  stats[1] .. "]\n")
end



@stat Alurissi

< 469h/469H 158v/158V P: std >
She has long silvery streaked midnight black hair. Her eyes are the color of pine needles, and
shaped like almonds. She has pale almost white skin. She is very slim, and of an average height.
Upon her left cheek is a small tattoo of an oak tree. Her lips are thin and slightly darker than
the rest of her skin.
Alurissi is a medium-sized level 50 Moon Elf.
Debug beginlook
She is in excellent condition.
She's encased in a shimmering globe!
She has little gills in her neck!

<worn as a badge> a githzerai zealot's badge (illuminating)
<worn on head> a blessed mitre of etched ironwood
[a blessed mitre of etched ironwood (Head) AC:8 Hp:20 Svsp:-3 Pois:5% FARSEE * !Fighter !Mage !Thief
* Zone: SPoB (R) * Last ID: 2005-01-20]
<worn on eyes> an eyepatch of woven silver links
[an eyepatch of woven silver links (Eyes) AC:4 Hp:10 Str:9 DM * !Fighter !Mage !Thief * Wt:1 Val:5p
* Zone: SPoB (R) * Last ID: 2007-07-21]
<worn in ear> a single link of a crystalline chain
[a single link of a crystalline chain (Ear) AC:0 Hp:21 Maxwis:3 DET_EVIL * Magic !Fighter !Mage
!Thief * Wt:2 Val:5p * Zone: SPoB (R) * Last ID: 2009-08-06]
<worn in ear> a single link of a crystalline chain
[a single link of a crystalline chain (Ear) AC:0 Hp:21 Maxwis:3 DET_EVIL * Magic !Fighter !Mage
!Thief * Wt:2 Val:5p * Zone: SPoB (R) * Last ID: 2009-08-06]
<worn on face> a chainlink veil of woven silver
[a chainlink veil of woven silver (Face) AC:7 Hp:14 DET_EVIL * !Fighter !Mage !Thief * Wt:2 Val:5p *
Zone: SPoB (R) * Last ID: 2010-01-20]
<worn around neck> a runed oaken holy symbol hanging from a silver chain
[a runed oaken holy symbol hanging from a silver chain (Neck) AC:0 Con:13 Hp:10 SENSE * !Fighter
!Mage !Thief * Wt:2 Val:5p * Zone: SPoB (R) * Last ID: 2007-08-07]
<worn around neck> a runed oaken holy symbol hanging from a silver chain
[a runed oaken holy symbol hanging from a silver chain (Neck) AC:0 Con:13 Hp:10 SENSE * !Fighter
!Mage !Thief * Wt:2 Val:5p * Zone: SPoB (R) * Last ID: 2007-08-07]
<worn on body> a suit of mithril platemail armor
[a suit of mithril platemail armor 8 (On_body) AC:28 Hp:35 Svsp:-5 * Magic No_Burn No_Sleep !Mage
!Thief * Wt:10 Val:0p * Zone: Bryn (Q) * Last ID: 2009-01-04]
<worn about body> a travelling cloak with an etched ironwood clasp
[a travelling cloak with an etched ironwood clasp (About) AC:20 Hp:38 Mv:40 * !Fighter !Mage !Thief
* Zone: SPoB (R) * Last ID: 2004-01-10]
<component bag> a seaweed pouch of magic
[a seaweed pouch of magic (Component) Con:-4 WB * Float Magic No_Loc !Evil * Wt:17 Val:100p * Zone:
Embay (Q) * Last ID: 2013-05-08]
<worn about waist> a silken sash with dangling silver links
[a silken sash with dangling silver links (Waist) AC:8 Hp:20 Svpar:-3 * !Fighter !Mage !Thief * Wt:2
Val:5p * Zone: SPoB (R) * Last ID: 2006-01-22]
<worn on arms> a pair of runed oaken munnions
[a pair of runed oaken munnions (Arms) AC:10 Hp:14 Fire:5% * !Fighter !Mage !Thief * Wt:2 Val:5p *
Zone: SPoB (R) * Last ID: 2008-12-03]
<held as shield> a round shield of anointed ironwood
[a round shield of anointed ironwood (Shield) AC:10 Hp:20 Svpar:-4 MIN_GLOBE * !Fighter !Mage !Thief
* Wt:7 Val:5p * Zone: SPoB (R) * Last ID: 2007-06-19]
<worn around wrist> a bracer of woven silver links
[a bracer of woven silver links (Wrist) AC:8 Hp:12 Acid:5% * !Fighter !Mage !Thief * Wt:2 Val:5p *
Zone: SPoB (R) * Last ID: 2007-07-21]
<worn around wrist> a bracer of woven silver links
[a bracer of woven silver links (Wrist) AC:8 Hp:12 Acid:5% * !Fighter !Mage !Thief * Wt:2 Val:5p *
Zone: SPoB (R) * Last ID: 2007-07-21]
<worn on hands> a pair of crystalline chain gauntlets
[a pair of crystalline chain gauntlets (Hands) AC:6 Hit:2 Hp:14 * !Fighter !Mage !Thief * Zone: SPoB
(R) * Last ID: 2004-03-19]
<worn on finger> a simple ring of etched ironwood
[a simple ring of etched ironwood (Finger) Hp:65 Svsp:-5 * !Fighter !Mage !Thief * Wt:1 Val:5p *
Zone: SPoB (R) * Last ID: 2009-07-22]
<worn on finger> a simple ring of etched ironwood
[a simple ring of etched ironwood (Finger) Hp:65 Svsp:-5 * !Fighter !Mage !Thief * Wt:1 Val:5p *
Zone: SPoB (R) * Last ID: 2009-07-22]
<held> a winged totem
[a winged totem (Held) Hp:20 Maxwis:3 Cold:5% FLY * Bless Magic No_Loc !Fighter !Mage !Thief * Zone:
SM * Last ID: 2010-11-17]
<worn on legs> a pair of layered anointed ironwood cuisses
[a pair of layered anointed ironwood cuisses (Legs) AC:8 Hp:20 Svbr:-2 * !Fighter !Mage !Thief *
Wt:2 Val:5p * Zone: SPoB (R) * Last ID: 2008-01-05]
<worn on feet> a pair of crystalline chain boots
[a pair of crystalline chain boots (Feet) AC:10 Hp:22 Svsp:-2 LEV * Magic !Fighter !Mage !Thief *
Wt:2 Val:5p * Zone: SPoB (R) * Last ID: 2006-01-23]

@stat complete
You attempt to peek at the inventory:
the heart of the forest

< 469h/469H 158v/158V P: std >
Last edited by Afu on Fri Oct 05, 2018 1:59 am, edited 3 times in total.
Afu
Sojourner
Posts: 82
Joined: Sun Oct 01, 2017 3:58 pm

expTrain fix

Postby Afu » Wed Sep 26, 2018 4:44 pm

I found that my train stalls after hitting the 45 second pause sometimes

modified the code in trainscripts under bots

Code: Select all

    -- Delay 60 seconds if less then 50% hp or movement
    if hpPercent < .5 or mvPercent < .5 then
     tempTimer(45, [[NextTrainStop()]])
     fwalkQue=false  -- fix train stall
      mud:send("gcmd [Train paused 45 seconds: Low movement or hp]")
     return
    end   
 
Afu
Sojourner
Posts: 82
Joined: Sun Oct 01, 2017 3:58 pm

Re: Mods to Nyss Script

Postby Afu » Sat Feb 16, 2019 4:12 am

Been working on this functionality.

this is pretty close to done, hoping for someone seeing what im doing wrong.

what this is supposed to do:

when i type group, it builds a list of castable buffs, i will work on the buff list once this functionality is working.

to test this i do this:
lua echoPopup("blur|", {[[mud:send "bl test"]]}, {"blur test"})

this makes a clickable link that tries to blur test

so, here's what i did

1) Create a new trigger group with all of this in it, i called it BuffGroup which is irrellavant

2) Create new triggers

Name:BuildGroup
Substring:Group information for

Code: Select all

enableTrigger("GroupLine")
enableTrigger("EndGroup")


Name: GroupLine
Regex:- ([A-Za-z ]+)

My problem, its not sending the commands, ive tried send "bl " .. temp, mud:send "bl " .. temp, send("bl " .. temp)

Code: Select all

blurline = "bl " .. matches[2]
scaleline = "ds " .. matches[2]
globeline = "gi " .. matches[2]
echoPopup("->>bl|", {[[expandAlias(blurine, false)]]}, {"blur " .. matches[2]})
echoPopup("ds|", {[[expandAlias(scaleline, false)]]}, {"scale " .. matches[2]})
echoPopup("gi", {[[expandAlias(globeline, false)]]}, {"globe " .. matches[2]})


Name: EndGroup
Regex:^$

Code: Select all

disableTrigger("GroupLine")
disableTrigger("EndGroup")


Once i got this running and type group
and get

Group information for Vamot and Company
Size: 2
(Head) 108/108 move 805/724 hit - Vamot->blur ds gi
104/104 move 666/666 hit - Poromople->blur ds gi

working now, also generates a gagged line with all buffs in it because of nyss auto group check
Afu
Sojourner
Posts: 82
Joined: Sun Oct 01, 2017 3:58 pm

Re: Mods to Nyss Script

Postby Afu » Sun Feb 17, 2019 3:46 pm

Universal bash
gotta replace nyss bash alias, just search for bash and find the alias, fix the regex and replace the code, or delete it and make a new one like i did.


work in progress
Name: bash
REgeX: ^bash ?(.*)?$

Code: Select all

local chump = nil
local bshcmd = "say I can't bash silly"

if matches[2] ~= nil then
  chump = " " .. matches[2]
end

if checkMask("rog") then
  bshcmd = "tr" .. chump 
end

if checkMask("pal") then
  if equip:getWeapon() == "TwoHand" then
    bshcmd = "ts" .. chump
   else
     bshcmd = "rc" .. chump
   end
end
if checkMask("blk") then
  if equip:getWeapon() == "TwoHand" then
    bshcmd = "ss" .. chump
   else
     bshcmd = "ds" .. chump
   end
end
if checkMask("war") then
  if equip:getWeapon() == "TwoHand" then
    bshcmd = "ss" .. chump
   else
     bshcmd = "sb" .. chump
   end
end

if checkMask("ran") then
  if equip:getWeapon() == "Bow" then
    bshcmd = "ks" .. chump
   else
     bshcmd = "ss" .. chump
   end
end
expandAlias(bshcmd,false)

Last edited by Afu on Sun Feb 17, 2019 8:49 pm, edited 1 time in total.
Afu
Sojourner
Posts: 82
Joined: Sun Oct 01, 2017 3:58 pm

Re: Mods to Nyss Script

Postby Afu » Sun Feb 17, 2019 8:46 pm

just wrote a new spammy one, fun tho

what it does:
this one clairs everyone in the who list! im a jerk right?
gotta have a tia mesh on a cleric / shaman / ctr
alias:
@mudchk
regex: ^@mudchk$

Code: Select all

enableTrigger("OpenThem")
send("who")


trigger
name: CapName
regex:^\[.*\]\ ([A-Z][a-z]+).*$

Code: Select all

send("say farsight " .. matches[2])


trigger
name: OpenThem
substring: Listing of the Mortals!

Code: Select all

enableTrigger("CapName")
enableTrigger("CloseThem")
disableTrigger("OpenThem")


trigger
name: CloseThem
regex: ^$

Code: Select all

disableTrigger("CapName")
disableTrigger("CloseThem")
Afu
Sojourner
Posts: 82
Joined: Sun Oct 01, 2017 3:58 pm

Expanded Item Gags

Postby Afu » Wed Feb 27, 2019 3:42 pm

Nysslib gags about 50 lines from items, but it needs to be expanded, so...



Trigger Lines:
Substring:your dagger draws the very
Substring:as you plunge your dagger perfectly into the center
Substring:the holy blessing of Yondalla has taken hold upon you
Substring:and out of visibility! You spring to the side
REGEX:Your wonderful (glittering) dagger glows brightly as your body starts to flicker
Substring:Your face finally loses its magical intensity, your body visibly relaxing as the mystical rage departs.
Substring:Your movements begin to slow as the mystical rage leaves your body.
Substring:races towards you within a narrow strip of bright white light. A significant sounding
Substring:their way up your arms, you are infused with a surprising finesse of movement.
Substring:of smoke. Rapidly, you are taken by its ferocity and plunged into a trance.
REGEX:your body to (momentarily) go numb.
Substring:Your staff sends a shock racing through your arm and into your head, causing
Substring:and immediately you feel more knowing, and prepared.
REGEX:(chimera). The awe-filled rush of intellect surges into your body
Substring:of intellect from the magics within your circlet of the facile
Substring:As easily as a whim, your mind siezes hold upon a blissful gift





Trigger Code:

Code: Select all


if charData:get("condensed", true)["items"] then
   eraseLine()
   if matches[2] == "chimera" then
      cecho("\n<cyan>[proc: chimera circlet]\n")
   end
   --momentarily
   if matches[2] == "momentarily" then
      cecho("\n<cyan>[proc: gnarled staff]\n")
   end
   if matches[2] == "glittering" then
      cecho("\n<cyan>[proc: matriarch]\n")
   end

end

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 21 guests