Page 1 of 2

/modify command

Posted: Tue Jan 21, 2014 7:31 pm
by John Adams
I discovered that many of our Sign (zone) widgets do not have the proper destination coordinates set - ie., you click on a door to Antonica and end up 1/2 way across the world. I decided to quickly implement an in-game solution and chose to put into the long-abandoned /modify command.
  • /modify was supposed to replace many of the old commands, but I never got around to implementing it. Seemed a good time to start.
The result of my efforts tonight, now I can pop a Sign/Zone into my zone, I know it's spawn_id from the DB Editor, I go to the destination zone and stand at the coordinates, and type

Code: Select all

/modify spawn zoneto {spawn_id} 
and the coords get set to MY current location. Simple.

Wiki for /modify spawn

Code tested and on SVN.

Re: /modify command

Posted: Wed Jan 22, 2014 8:32 pm
by thefoof
Cool, looks like it could grow until a nice function :D

Re: /modify command

Posted: Thu Jan 23, 2014 3:52 pm
by Jabantiz
Good job, will be nice to not have to write the coords down anymore.

I noticed you have a modify for character, you can copy and paste my code from /player over (only to add coins) and delete the /player command so we have one global command to change stuff.

Re: /modify command

Posted: Fri Jan 24, 2014 7:28 pm
by John Adams
Yup, I remember when you added /player, I think I might have mentioned /modify back then but it wasn't useful enough. When I get to it, I'll consolidate many of these commands.

Re: /modify command

Posted: Wed Apr 22, 2015 3:53 pm
by Jabantiz
Thanks to Cynnar /modify character has been started, so far adding and removing coins from a character has been added.

Re: /modify command

Posted: Thu Apr 23, 2015 7:10 pm
by Cynnar
Thanks Jab. Got busy and forgot to post it.

Re: /modify command

Posted: Thu Jul 30, 2015 9:28 pm
by Cynnar
Have been working on /ModifyQuest instead of /modify character lately. I have been adding in quests, needing to edit or delete quest in one way or another, and I thought this command would be great right about now. So I started working on it. By that I mean I have been bugging the crap out of Jab for answers. :mrgreen:

At the moment the only thing added is list. I know that addstep, removestep, completed, remove and progress will be necessary, but are there any others that need to be added to this list?

Re: /modify command

Posted: Wed Aug 05, 2015 7:10 pm
by John Adams
Does my DB Editor not allow you to add/edit Quests? It should have a full quest, spell and spawn LUA Editor.

Re: /modify command

Posted: Wed Aug 05, 2015 7:16 pm
by Jabantiz
He is referring to quests that a player has, deleting completed quests so they can be tested again and so forth.

Re: /modify command

Posted: Wed Aug 05, 2015 7:25 pm
by Cynnar
What Jab said. He got here it before I did. It's my bad I thought I put in that it was players quest . :oops:

Re: /modify command

Posted: Fri Sep 04, 2015 4:13 pm
by Jabantiz
Support for /modify skill has been added you can add, remove, or change the value.

To add a skill, for example parry

Code: Select all

/modify skill add parry
To remove a skill

Code: Select all

/modify skill remove parry
To change the value

Code: Select all

/modify skill set parry 50

Re: /modify command

Posted: Sun Sep 06, 2015 9:28 am
by John Adams
Jab, you doing these based off target, or self? What if a GM wants to do this to a player not in the zone? On target is fine, just bringing up the obvious things I think of to make your life more difficult :)

Re: /modify command

Posted: Sun Sep 06, 2015 2:27 pm
by Jabantiz
If your target is a player it will effect that player, else it will effect yourself. I hadn't considered an out of zone target though.

Re: /modify command

Posted: Thu Jun 15, 2017 4:00 pm
by Cynnar
Started working on adding widget/door parts to the modify spawn command.
With my poor C++ skills I have done something that is not working (go figure) :(
Here is what I have so far

Code: Select all

if (strcmp(sep->arg[1], "door") == 0)
		{
			Widget* target = (Widget*)client->GetPlayer()->GetTarget();
			if (target && target->IsPlayer() == false)
			{
				client->Message(CHANNEL_COLOR_YELLOW, "Modify client target using door give me this heading", (Widget*)target->GetIncludeHeading());
			}
			else
				client->SimpleMessage(CHANNEL_COLOR_RED, "Something Went Wrong! Back to the drawing board.");
		}
		else
			client->SimpleMessage(CHANNEL_COLOR_RED, "invalid target!");
I even broke it down to

Code: Select all

if (strcmp(sep->arg[1], "door") == 0)
		{
			Widget* target = (Widget*)client->GetPlayer()->GetTarget();
			client->Message(CHANNEL_COLOR_YELLOW, "Modify client target using door give me this heading", (Widget*)target->GetIncludeHeading());

		}
		else
			client->SimpleMessage(CHANNEL_COLOR_RED, "invalid target!");
When I use the command I get the invalid target, but I do not get anything else. So I know that the problem is in the Widget* target = (Widget*)client->GetPlayer()->GetTarget(); part of the code. I ran out of time to mess with it today, so I was hoping that someone could point me in the right direction.

Re: /modify command

Posted: Thu Jun 15, 2017 4:27 pm
by Ememjr
I know the feeling, " I have done something that is not working" or my favorite
I have done something and many other things don't work anymore