linktree Atrinik.org - Multiplayer Online Role Playing Game  >  Community  >  General Chat
linktree Topic: More get & take trouble!
Pages: [1]   Go Down
  Print  
Author Topic: More get & take trouble!  (Read 4188 times)
0 Members and 1 Guest are viewing this topic. Bookmarked by 0 members.
Offline Floozy

Posts: 226
Gender: Female
« on: February 07, 2011, 10:13:40 pm »

OMG its me again

I pick up a sword - its not my cup-of-tea but its useful for illustrating this one!!!!

/drop slash    weapons

Nothing to drop

/drop slash weapons

<sword appears on floor - no message - this is a known bug>

/take slash              weapons

Nothing to take

/take slash weapons

You pick up the sword

I hope this is self-explanatory

Love Floozy
 Logged
Offline ddhanna
Main Server Mod
Contributor

Posts: 184
Gender: Male
« Reply #1 on: February 07, 2011, 11:28:35 pm »

from the looks of it, you for some reason put spaces infront. i am trying to figure out why the extra spaces. i can understand maybe one extra space, but several?

I see what you are pointing out. thank you for pointing it out.

Ddhanna
 Logged
Offline Floozy

Posts: 226
Gender: Female
« Reply #2 on: February 08, 2011, 09:38:21 am »

Hi David

I did it for emphasis - actually when I have the problem there are usually only two spaces.  When sorting bounty I tend to drop everything and /get ... each group: for each type of weapon I usually edit the last /get ... statement - and sometimes convert "/get impact weapons" to "/get slash  weapons" by replacing the t with a space instead of deleting it.

It's no problem once you know that more than one space fails - I just thought I'd point it out.

Actually I was thinking that it may be a bit of a pig to fix this! It will be a bit more complicated that it sounds replacing any number of spaces with just one when there could be many places in the string where there are multiple spaces e.g. "/get   wand    of    firestorm" !!!! Good luck with it if you decide that it should be fixed (I wouldn't blame anyone if it went to the "never" end of the TODO list)!

If someone does decide to tackle it - any chance that "... weapon" can be treated the same as "... weapons"; "... book" the same as "... books"; etc. - I keep forgetting to pluralise!!!!! (Stop being cheeky Floozy - they have enough to do).

<edit> Actually I have had a *ding* (i.e. hopefully helpful) thought: maybe extra spaces could be removed from all input (parameters) before being passed to the specific handler - so that "/use_skill remove   traps" works the same as "/use_skill remove traps" without having to specifically amend the "/use_skill" handler (bet you pro'lly thought of this already though) </edit>

Love Floozy
« Last Edit: February 08, 2011, 09:48:52 am by Floozy »  Logged
Offline Cleo
Developer
Alex Tokar

Posts: 580
Gender: Male
« Reply #3 on: February 08, 2011, 10:09:19 am »

You can actually do "/drop unread level 1-100 books" and type the 'books' part as either 'books', 'book', or just leave it out completely. Extraneous whitespace is also ignored there.

The problem is that most of the other checks are not using sscanf like the above example but more simplistic and faster strcasecmp, thus taking extraneous whitespace into account... The simplest solution would be to include a fully-blown regex library with the server and have that do that job... But that may not be very efficient when trying to match 20-30 checks against (possibly) hundreds of items...

So thanks, but yes, I'm guessing that will go unfixed for a while. :)


<edit>Actually I have had a *ding* (i.e. hopefully helpful) thought: maybe extra spaces could be removed from all input (parameters) before being passed to the specific handler - so that "/use_skill remove   traps" works the same as "/use_skill remove traps" without having to specifically amend the "/use_skill" handler (bet you pro'lly thought of this already though) </edit>


What if you wanted to do "/use_skill inscription string1                           string2"?
 Logged
Offline Floozy

Posts: 226
Gender: Female
« Reply #4 on: February 08, 2011, 11:09:44 am »

Hi Cleo

Um, you could have a rule similar to internet searches etc. etc.: text surrounded by quotation marks is treated "literally", so that particular command would be typed in as:
/use_skill inscription "string1                           string2"
then in this (special) case the inscription would include the spaces, but exclude the quotation marks.

And (before you say so) I realise you would then need a special way to include quotation marks as well.
To create the following inscription:
Say "H i   F l o o z y" whenever she logs in
The simplest method is to treat everything after a quotation mark as literal, including any embedded quotation marks except one immediately before end-of-input, so
/use_skill inscription "Say "H i   F l o o z y" whenever she logs in"

More complete (but I wouldn't go this far) is to allow combined space-stripping and literals, maybe with:
/use_skill inscription Say     """H i   F l o o z y"""   whenever she logs in
Where the first set of multiple spaces was replaced by a single space; the two sets of doubled quotation marks within the literal are replaced by a single one but the spaces within the literal are preserved; and the multiple spaces after the closing quotation mark are replaced by a single space.

Then you might ask "what if there is no closing quote?" to which I may answer "end of line is end of literal!", and other complications, but its workable.

Just an idea!

Love Floozy

P.S. you could also program it to allow your markup language to be used within inscriptions - no doubt that has or would shortly cross your fertile mind! But imho that would be overkill !!!!!!
 Logged
Offline Floozy

Posts: 226
Gender: Female
« Reply #5 on: February 09, 2011, 01:54:46 pm »


You can actually do "/drop unread level 1-100 books" and type the 'books' part as either 'books', 'book', or just leave it out completely.


Without the "level" you need "books" (plural)
/get unread
Nothing to take.
/get unread book <doesn't work>
Nothing to take.
/get unread books
You pick up ...

btw - why are empty books classified as unread - "You open the book and find it empty" - arguably you haven't read it, but as "empty books" is recognised its sometime inconvenient to find them dropped alongside "exp-giving" books!

Love Floozy
P.S. If I am getting too annoying shall I open another website account "IncorrigablePoster" or something?
 Logged
Offline evilasa
Posts: 34
Gender: Male
« Reply #6 on: February 09, 2011, 07:47:59 pm »

/get laid. Seriously. You sound really bored Flo. Talk to ya in game when I can get back on. Real life keeping me occupied at the moment, hope to finish Ragaril's Palace when I get back to it. Then extending Temple Of Loki? Unless Cleo's already set about it. See you guys soon  :twisted:
 Logged
Offline Floozy

Posts: 226
Gender: Female
« Reply #7 on: February 09, 2011, 08:23:31 pm »

Hi again Mr Asa

I am trying to help the game by looking for things that need to be fixed - that keeps me from being bored ;)
 Logged
Offline ddhanna
Main Server Mod
Contributor

Posts: 184
Gender: Male
« Reply #8 on: February 10, 2011, 02:12:25 am »

Who told asa about the new command? we have a leak somewhere.
 Logged
Offline NiteStar

Posts: 466
Gender: Male
« Reply #9 on: February 20, 2011, 09:12:20 am »


Who told asa about the new command? we have a leak somewhere.

A leak? I'll call the plumber. :P
 Logged
Offline Floozy

Posts: 226
Gender: Female
« Reply #10 on: April 03, 2011, 03:12:14 pm »

Hiya

I got confused about what the latest topic concerning /get or /take is - so I "randomly"chose this one!

/get MANA or /GET MANA does not pick up food with mana bonuses, the lowercase /get mana does.

Hoping this helps

Love Floozy
« Last Edit: April 04, 2011, 07:43:26 am by Floozy »  Logged
Offline NiteStar

Posts: 466
Gender: Male
« Reply #11 on: May 09, 2011, 12:25:11 pm »

So just type it in lowercase, then. Sheesh!  :P
 Logged
Pages: [1]   Go Up
  Print  
 
Jump to: