Now i just have 1 more question.. (then i can use random in more scripts)
I noticed that RANDOM() doesnt calculate a random number if the numbers are decimals and often results in either 0 or 99 perhaps a bug? :/
(Eg: $${RANDOM(#decimal,0.0,2.0)}$$ $${ECHO(Random deimal is %#decimal%)}$$
I have found a way i can get the decimal value by using IFs to calculate it out of a higher number and it works fine when inserting the decimal number in chat like this:
But all i need to do now is how to use this script so i can use the result in a script.. this one for example is for calculating the pitch of a random sound.. i want to be able to do something along the lines of "/playsound mob.wolf.bark AURAvulpes ~0 ~0 ~0 1 $$<RandomPitch.txt> 1"
What is the command used to output the result of a script into text within the main macro? (like the example "Playsound" command above)
Now i just have 1 more question.. (then i can use random in more scripts)
I noticed that RANDOM() doesnt calculate a random number if the numbers are decimals and often results in either 0 or 99 perhaps a bug? :/
(Eg: $${RANDOM(#decimal,0.0,2.0)}$$ $${ECHO(Random deimal is %#decimal%)}$$
I have found a way i can get the decimal value by using IFs to calculate it out of a higher number and it works fine when inserting the decimal number in chat like this:
But all i need to do now is how to use this script so i can use the result in a script.. this one for example is for calculating the pitch of a random sound.. i want to be able to do something along the lines of "/playsound mob.wolf.bark AURAvulpes ~0 ~0 ~0 1 $$<RandomPitch.txt> 1"
What is the command used to output the result of a script into text within the main macro? (like the example "Playsound" command above)
Thanks in advance ~AURA
1 How to generate a random non-natural number
...well, you can't, you can't even save a floating point number in a variable, counter variables in the mod are the equivalent of an integer variable in other languages
1.e Then what can i do
Like your example, if you want an interval of 0.1 between the options, you generate numbers in a range 10 times the size and use a 1:10 mapping
You just need to remember that you're essentially using different units though
Then if you want to display the value or something, you can convert the number to a string and insert the dot in there to get a string that has the floating point in it
---
2 How do i "return" from a script
There's no way for an arbitrary chunk of code to return a value because the entire language is interpreted differently,
Basically, the mod reads your script piece by piece.., each piece is from one semicolon or line break to the next
In each piece there is 1 command, and optionally some parameters
The command does something with it's parameters and then it's done
If you try doing something like
IF(Arraysize(&arr[]) > 20)
(i assume) the mod sees it as something like
Command: IF
extra parameters: ArraySize(&arr[]
and then it'll get confused
It doesn't know what to do when there's an ArraySize() in it's parameters, it only knows what to do with an ArraySize in the command
This is why commands that change variables are supplied the variable as a parameter, so they don't need to be replaced inline and can just do their job
There's also a new feature that looks like an exception to this.., if you type <variable> = <command>, for most commands this gets converted somehow so it still works, but it's not actually replacing <command> with a value and then assigning it like in many other languages, the preprocessor probably replaces it with a Set(a,b) or ASSIGN(a,b)
2.e
While you can't get that behaviour, you can get similar results
for example by including a &return = somevalue at the end of your script, you could do this
I still don't quite understand but the script works fine with generating a decimal by using a higher number and making that a smaller decimal.. I only did that because RANDOM() doesn't allow for random numbers with decimal points..
The script i wrote work fine when entering the result into chat using the IFs and ECHOing the result, if i can enter the resulting number into the chat directly why cant i insert the result into the rest of the macro?
I just worked out a way i can get different pitches for the wolf bark by adding the full command in each echo with the only change being the change in pitch value:
The trouble with this is if you wanted to use the random decimals for any other command you'd have to spend ages copying the new command and the changes in value for each..
There are a few things that make this way of doing it worse.. 1: Very boring and tedious re-writing everything.. 2: You can only edit the random decimal value for one part of the script rather than using the $$<RandomDecimal.txt> for each random decimal value you needed.. 3: You cant use random decimal numbers in scripts outside the file
There has to be some way to get the value of the result from the text script and insert it into the main macro.. I don't see what's so complicated from it.. it's just 3 characters to insert into the next part of the script :/
I still don't quite understand but the script works fine with generating a decimal by using a higher number and making that a smaller decimal.. I only did that because RANDOM() doesn't allow for random numbers with decimal points..
The script i wrote work fine when entering the result into chat using the IFs and ECHOing the result, if i can enter the resulting number into the chat directly why cant i insert the result into the rest of the macro?
I just worked out a way i can get different pitches for the wolf bark by adding the full command in each echo with the only change being the change in pitch value:
The trouble with this is if you wanted to use the random decimals for any other command you'd have to spend ages copying the new command and the changes in value for each..
There are a few things that make this way of doing it worse.. 1: Very boring and tedious re-writing everything.. 2: You can only edit the random decimal value for one part of the script rather than using the $$<RandomDecimal.txt> for each random decimal value you needed.. 3: You cant use random decimal numbers in scripts outside the file
There has to be some way to get the value of the result from the text script and insert it into the main macro.. I don't see what's so complicated from it.. it's just 3 characters to insert into the next part of the script :/
You use the 10 times larger value to do all the math (in this case just the random) on it.., then you convert to string and insert the decimal point
The point is not that you can't have it, the point is simply that you can't have it as a number.., strings can contain any value, it's just the math that doesn't work on strings that needs you to use some sort of mapping to integers
For example here i generate a random number from 0 to 20, and with that the math part is done, i have my answer
then if the number is 1-digit i add a 0 in front,
i always add a decimal point in the middle
and i end up with a string that the mod can't do math on, but that i can use in an Echo()
Not always in the exact same format, extrathing can be infront of any word. (n) is a number(1,2,3...), not all the same number. Word are not always the same.
I want to save only "word" not the extrathing and save 1 "word" per line so it would be like(in the .txt)
Not always in the exact same format, extrathing can be infront of any word. (n) is a number(1,2,3...), not all the same number. Word are not always the same.
I want to save only "word" not the extrathing and save 1 "word" per line so it would be like(in the .txt)
I have a small request, but I don't know if it's possible or not.
Once you update to 1.8, which I assume you are going to do, can you make a feature where "skin customization" options are toggleable with a key? What I mean is, for example, let's say my skin has a jacket and hat, and if I pressed the "y" key, the jacket and hat are toggled. That would be cool.
I completely understand if this is too difficult or impossible. I'm just saying that it would be a useful feature to your already awesome mod.
Rollback Post to RevisionRollBack
I'm just a Minecraft player that likes to give my opinion. Nothing special to see here.
This is a fairly long detailed post, I can put my entire coding ability in my eye and not feel it, and I’m explaining SPC capability that I want to copy with WEW, more for clarity than anything else.
SPC (thank you simo_415) uses the “players” folder of each named world to store select player data. q3hardcore (thanks to him as well) added 4 teleport functions to that capability. I use those functions to automatically retain where I was in my world to return to that place, after putting my excess inventory in my home (actual macro below). A secondary value to this is each world has a different “Home”. I’ve written a procedure for WEW that works (partially) but, must be rewritten/modified for each world/Home.
My SPC macros
“Home” macro:
/wprem return (deletes the current “return” waypoint – probably not necessary)
/wpset return (creates a new “return” waypoint)
/wpgoto Home (actually teleports to my “home” waypoint.
“Return” macro:
/wpgoto Return
Current WEW procedure (bound to Ctrl P):
/tp ME 270.5 54 -152.5 (a named “Home” for each World would be better IMO)
Finally my real question How do I create/store/recall an x, y, z, point that changes every time I Ctrl P (ideally stored in each different named world)?
TIA
Lou
Finally my real question How do I create/store/recall an x, y, z, point that changes every time I Ctrl P (ideally stored in each different named world)?
TIA
Lou
Either use $$px, $$py, $$pz, which allows you to select from a list of "places" and gets replaced with coordinates
Ctrl-I: $${Log($$p)}$$ //press this and select to create a new home or something
some other key: /tp %PLAYER% $$px $$py $$pz
or use a script like this
I $${IF(CTRL);#x=%XPOS%;#y=%YPOS%;#z=%ZPOS%;Log(Location saved);ELSE;Echo(/tp %PLAYER% %#x% %#y% %#z%);ENDIF}$$
..or am i completely misunderstanding your question?
I'll give the script a shot. But I do not at all understand coding language.
I'd found $$p. I even looked for where those points are created. Either I can't find or read them. I thought once set it'd be difficult to change and I'd prefer to not have to manually annotate. I can do that with Excel, the problem there is I often hit Ctrl P without adding my current position to the spreadsheet (Ctrl P vs P helps). That makes it most difficult to return and it really slows things down.
Your script will create a return waypoint (or something), that I can recall with a second key? What is the trigger to recall my coordinates?
/wprem * = remove waypoint name; where * = name
/wpset * = add a waypoint name
/wpgoto * = /tp (teleport) to * coodinates; where * = named coordinates.
wplist = was a new waypoint command that just listed what waypoint names existed.
I used P to teleport to my home and O to teleport to where I was when I hit the P key. Clearer?
Lou
I'll give the script a shot. But I do not at all understand coding language.
I'd found $$p. I even looked for where those points are created. Either I can't find or read them. I thought once set it'd be difficult to change and I'd prefer to not have to manually annotate. I can do that with Excel, the problem there is I often hit Ctrl P without adding my current position to the spreadsheet (Ctrl P vs P helps). That makes it most difficult to return and it really slows things down.
Your script will create a return waypoint (or something), that I can recall with a second key? What is the trigger to recall my coordinates?
/wprem * = remove waypoint name; where * = name
/wpset * = add a waypoint name
/wpgoto * = /tp (teleport) to * coodinates; where * = named coordinates.
wplist = was a new waypoint command that just listed what waypoint names existed.
I used P to teleport to my home and O to teleport to where I was when I hit the P key. Clearer?
Lou
Hm, maybe i'll try explaining what some things do instead...
When the mod encounters any of the following parameters: $$p, $$px, $$py, $$pz, it will open up a list/menu of "places" that you can select from
In that menu you can also create new entries/places if you want, using your current coordinates or any custom ones you enter in
Once you've selected a place, all $$px get replaced with the x coordinate, similarly for $$py and $$pz (this happens before anything else)
Try binding just $${Log($$px)}$$ and triggering that a bunch of times to get an understanding of how that prompt/menu works
As for scripts, if you put $${ }$$ around your binding, what's left inside is read as a series of commands, separated by semicolons (or line breaks)
Every command (with exceptions) looks like Command(pattern), which means a script looks like $${Do(this);Do(that);Do(something,else)}$$
For saving your current position without going through the menus (just remembered this), there's a command Store("place",name)
-----------------
Example (is this better?):
On the key you use to go home: ${StoreOver("place",$[Name]);Echo("/home");Log("Press <key to return> and select $[Name] when you're done to return")}$
On the key you use to return: /tp $px $py $pz
When you press the go home key, it will ask you for a name and then save your coordinates under that name and /tp you home
when you press the return key, it will give you a list of all your saved coordinates and teleport you to the ones you choose
I think i'm starting to understand what you mean, but what's this about multiple worlds?, how does that come into play exactly?
I think we're coming together. Thanks. I'm about to power down for the evening so I can't try what you've suggested. I think I've got a grip on what I need to do. One more point you can help with. If I always name my current position (where I Ctrl P'ed (Home)) as "Return" How can I do that with interaction on my part? and second. how do I teleport back to that point without having to choose "Return" every time (no list, just go x2)?
TIA
Lou
Can I replace $[Name] with $[return] or similar, twice?
My Home is in different places on different worlds. It would be nice if /home or similar looked up where "Home" is on that specific world.
From what I've seen of this configuration. I need to first delete the current "Return". Create a new "Return" point with my current coordinates. and finally teleport "Home"; all triggered by Ctrl P.
A second key teleports me automatically to the coordinates listed in "Return".
I think we're coming together. Thanks. I'm about to power down for the evening so I can't try what you've suggested. I think I've got a grip on what I need to do. One more point you can help with. If I always name my current position (where I Ctrl P'ed (Home)) as "Return" How can I do that with interaction on my part? and second. how do I teleport back to that point without having to choose "Return" every time (no list, just go x2)?
TIA
Lou
Can I replace $[Name] with $[return] or similar, twice?
My Home is in different places on different worlds. It would be nice if /home or similar looked up where "Home" is on that specific world.
From what I've seen of this configuration. I need to first delete the current "Return". Create a new "Return" point with my current coordinates. and finally teleport "Home"; all triggered by Ctrl P.
A second key teleports me automatically to the coordinates listed in "Return".
*wakes up
Okay, so you only need one place saved?, then the original idea should work fine
Here we set user defined global variables for your coordinates and tp to them later
on your go home key, separated for clarity:
$${
@#x = %XPOS%;
@#y = %YPOS%;
@#z = %ZPOS%;
Echo(/tp home)
}$$
On your return key
$${
Echo(/tp %@#x% %@#y% %@#z%)
UnSet(@home)
}$$
Warning!: Pressing home when you're already home will set the return point there (if you accidentally click a second time)
if you want to prevent that (but then you're required to ALWAYS return), you can surround the return commands with IF(@home);...;Set(@home);ENDIF
and the return key needs to UnSet(@home)
----
But for the multiple worlds thing, i need more explanation as to what exactly that means on your server..., if the dimension or %SERVER% changes it might be relatively easy, if not it could be anything from pretty complicated to imposible
I'd like to explain the down time. I met my Lady 26 Dec 1968 in a Frische's Drive In in Northwood, Ohio (best Christmas present ever). We married 16 Jan 1971. Things were great between us until 10 or 15 years ago. I was spending all my non working hours trying to master Excel and we spent almost no time together. She filed for divorce. I woke up, realized what was important and since then with very little exception 17:00 until 22:00 - 23:00 GMT -8 is her time. Things are back as they were and we're once again happy. Gents; Please don't get so involved in what you enjoy or your profession that you ignore what's really important. You've been warned !
Your warning happened with SPC too when I had a mental lapse. Once we get this working the IF/ENDIF should prevent it.
I input for Ctrl P (spaces displayed as _ ):
$${@#x=%XPOS%;@#y=%YPOS%;@#z=%ZPOS%;Echo(/tp_Player_x_y_z)}$$
I input for Ctrl O (spaces displayed as _ ):
${Echo(/tp_%@#x%_%@#y%_%@#z%);UnSet(@return)}$2nbsp;
I'd like to explain the down time. I met my Lady 26 Dec 1968 in a Frische's Drive In in Northwood, Ohio (best Christmas present ever). We married 16 Jan 1971. Things were great between us until 10 or 15 years ago. I was spending all my non working hours trying to master Excel and we spent almost no time together. She filed for divorce. I woke up, realized what was important and since then with very little exception 17:00 until 22:00 - 23:00 GMT -8 is her time. Things are back as they were and we're once again happy. Gents; Please don't get so involved in what you enjoy or your profession that you ignore what's really important. You've been warned !
Your warning happened with SPC too when I had a mental lapse. Once we get this working the IF/ENDIF should prevent it.
I input for Ctrl P (spaces displayed as _ ):
$${@#x=%XPOS%;@#y=%YPOS%;@#z=%ZPOS%;Echo(/tp_home)}$$ Once activated I get That player cannot be found I tried adding LoRaM at /tp_LoRaM_home, no different.
For Ctrl O I input (spaces displayed as _ ):
${Echo(/tp_%@#x%_%@#y%_%@#z%)UnSet(@home)}$ When activated I see '244)UnSet(@home' is not a valid number 244 was my z coordinate.
The world thing, I play single player. I have two 1.7.10 worlds. 2014Aug21 1_7_10 and 2014Sep12 1_7_10, my home is in different locations on these two worlds. My current WorldEditWrapper Ctrl P command was /tp LoRaM 270.5 54 -152.5. That won't work for the Aug world. I may be worried about this needlessly. Let's get the first part working and then see if a problem really exists.
In your first script, it just seems like /tp home is not a valid command on your server.., did you try /home?
You should know better than i what the correct command is, just put that inside the Echo()
an Echo(str) command just sends str to the server
In your second script, you need a semicolon after the Echo and before the UnSet to separate those commands..,
If you don't have a dedicated /home command then just replace it with a teleport to coordinates
-----
Different singleplayer worlds, hmm, i'm not sure if you can tell them apart like that, you may need to just create different configs and change them yourself
Adding the ; fixed the second command.
There is no vanilla /home command and I'm not yet capable of creating my own config. changing the last part of the first command to /tp Player x y z, works. Thanks for all your help.
Lou
I tried | (shift \ on my keyboard) rather than ;. What is the difference in those two things? Is there somewhere I can find guidance on coding?
Adding the ; fixed the second command.
There is no vanilla /home command and I'm not yet capable of creating my own config. changing the last part of the first command to /tp Player x y z, works. Thanks for all your help.
Lou
I tried | (shift \ on my keyboard) rather than ;. What is the difference in those two things? Is there somewhere I can find guidance on coding?
There are two basic things you can use as bindings..
Message only:
default
separated by pipes (the "|" character is a pipe)
after preprocessing away all the $$parameters, all of the separated pieces of text are sent to the server as chat
Script:
forced by surrounding $${ }$$ brackets
separated by semicolons
after preprocessing all the separated pieces of text are interpreted as commands and run in sequence
---
Message only is kind-of obsolete in the sense that any "message|message2" could be replaced by a $${Echo(message);Echo(message2)}$$ to give the same effect, but as you can see for simple cases it's easier to read - this helps new people get some use out of the mod without having to learn too much
tl;dr semicolons (or line breaks) are used to separate COMMANDS in a SCRIPT
pipes (the vertical line) are used to separate messages in a regular binding.., one that is not a script but just sends messages out
Why would you put
#target = RANDOM([max],[min]);
When you could just put
RANDOM(#target,[max],[min]);
:S?
I noticed that RANDOM() doesnt calculate a random number if the numbers are decimals and often results in either 0 or 99 perhaps a bug? :/
(Eg: $${RANDOM(#decimal,0.0,2.0)}$$ $${ECHO(Random deimal is %#decimal%)}$$
I have found a way i can get the decimal value by using IFs to calculate it out of a higher number and it works fine when inserting the decimal number in chat like this:
$${RANDOM(#RANDOM,0,20)}$$
$${IF(#RANDOM = 0);ECHO(0);ENDIF;}$$
$${IF(#RANDOM = 1);ECHO(0.1);ENDIF;}$$
$${IF(#RANDOM = 2);ECHO(0.2);ENDIF;}$$
$${IF(#RANDOM = 3);ECHO(0.3);ENDIF;}$$
$${IF(#RANDOM = 4);ECHO(0.4);ENDIF;}$$
$${IF(#RANDOM = 5);ECHO(0.5);ENDIF;}$$
$${IF(#RANDOM = 6);ECHO(0.6);ENDIF;}$$
$${IF(#RANDOM = 7);ECHO(0.7);ENDIF;}$$
$${IF(#RANDOM = 8);ECHO(0.8);ENDIF;}$$
$${IF(#RANDOM = 9);ECHO(0.9);ENDIF;}$$
$${IF(#RANDOM = 10);ECHO(1.0);ENDIF;}$$
$${IF(#RANDOM = 11);ECHO(1.1);ENDIF;}$$
$${IF(#RANDOM = 12);ECHO(1.2);ENDIF;}$$
$${IF(#RANDOM = 13);ECHO(1.3);ENDIF;}$$
$${IF(#RANDOM = 14);ECHO(1.4);ENDIF;}$$
$${IF(#RANDOM = 15);ECHO(1.5);ENDIF;}$$
$${IF(#RANDOM = 16);ECHO(1.6);ENDIF;}$$
$${IF(#RANDOM = 17);ECHO(1.7);ENDIF;}$$
$${IF(#RANDOM = 18);ECHO(1.8);ENDIF;}$$
$${IF(#RANDOM = 19);ECHO(1.9);ENDIF;}$$
$${IF(#RANDOM = 20);ECHO(2.0);ENDIF;}$$
But all i need to do now is how to use this script so i can use the result in a script.. this one for example is for calculating the pitch of a random sound.. i want to be able to do something along the lines of "/playsound mob.wolf.bark AURAvulpes ~0 ~0 ~0 1 $$<RandomPitch.txt> 1"
What is the command used to output the result of a script into text within the main macro? (like the example "Playsound" command above)
Thanks in advance
1 How to generate a random non-natural number
...well, you can't, you can't even save a floating point number in a variable, counter variables in the mod are the equivalent of an integer variable in other languages
1.e Then what can i do
Like your example, if you want an interval of 0.1 between the options, you generate numbers in a range 10 times the size and use a 1:10 mapping
You just need to remember that you're essentially using different units though
Then if you want to display the value or something, you can convert the number to a string and insert the dot in there to get a string that has the floating point in it
---
2 How do i "return" from a script
There's no way for an arbitrary chunk of code to return a value because the entire language is interpreted differently,
Basically, the mod reads your script piece by piece.., each piece is from one semicolon or line break to the next
In each piece there is 1 command, and optionally some parameters
The command does something with it's parameters and then it's done
If you try doing something like
IF(Arraysize(&arr[]) > 20)
(i assume) the mod sees it as something like
Command: IF
extra parameters: ArraySize(&arr[]
and then it'll get confused
It doesn't know what to do when there's an ArraySize() in it's parameters, it only knows what to do with an ArraySize in the command
This is why commands that change variables are supplied the variable as a parameter, so they don't need to be replaced inline and can just do their job
There's also a new feature that looks like an exception to this.., if you type <variable> = <command>, for most commands this gets converted somehow so it still works, but it's not actually replacing <command> with a value and then assigning it like in many other languages, the preprocessor probably replaces it with a Set(a,b) or ASSIGN(a,b)
2.e
While you can't get that behaviour, you can get similar results
for example by including a &return = somevalue at the end of your script, you could do this
$$<RandomPitch.txt>
Echo("/playsound mob.wolf.bark AURAvulpes ~0 ~0 ~0 1 %&return% 1")
'Cause tomorrow spring is here
The script i wrote work fine when entering the result into chat using the IFs and ECHOing the result, if i can enter the resulting number into the chat directly why cant i insert the result into the rest of the macro?
I just worked out a way i can get different pitches for the wolf bark by adding the full command in each echo with the only change being the change in pitch value:
$${IF(#RANDOM = 2);ECHO(/playsound mob.wolf.bark AURAvulpes ~0 ~0 ~0 1 0.2 1);ENDIF;}$$
$${IF(#RANDOM = 3);ECHO(/playsound mob.wolf.bark AURAvulpes ~0 ~0 ~0 1 0.3 1);ENDIF;}$$
The trouble with this is if you wanted to use the random decimals for any other command you'd have to spend ages copying the new command and the changes in value for each..
There are a few things that make this way of doing it worse.. 1: Very boring and tedious re-writing everything.. 2: You can only edit the random decimal value for one part of the script rather than using the $$<RandomDecimal.txt> for each random decimal value you needed.. 3: You cant use random decimal numbers in scripts outside the file
There has to be some way to get the value of the result from the text script and insert it into the main macro.. I don't see what's so complicated from it.. it's just 3 characters to insert into the next part of the script :/
You use the 10 times larger value to do all the math (in this case just the random) on it.., then you convert to string and insert the decimal point
$$<randomDecimal.txt>
Example usage:
$$<RandomDecimal.txt>
ECHO(/playsound mob.wolf.bark AURAvulpes ~0 ~0 ~0 1 %&return% 1)
------
The point is not that you can't have it, the point is simply that you can't have it as a number.., strings can contain any value, it's just the math that doesn't work on strings that needs you to use some sort of mapping to integers
For example here i generate a random number from 0 to 20, and with that the math part is done, i have my answer
then if the number is 1-digit i add a 0 in front,
i always add a decimal point in the middle
and i end up with a string that the mod can't do math on, but that i can use in an Echo()
'Cause tomorrow spring is here
In-game it looks something like:
Not always in the exact same format, extrathing can be infront of any word. (n) is a number(1,2,3...), not all the same number. Word are not always the same.
I want to save only "word" not the extrathing and save 1 "word" per line so it would be like(in the .txt)
Anyone know how I would achieve this?
Something like this should work:
Macro/Keybind mod Wiki
Once you update to 1.8, which I assume you are going to do, can you make a feature where "skin customization" options are toggleable with a key? What I mean is, for example, let's say my skin has a jacket and hat, and if I pressed the "y" key, the jacket and hat are toggled. That would be cool.
I completely understand if this is too difficult or impossible. I'm just saying that it would be a useful feature to your already awesome mod.
I'm just a Minecraft player that likes to give my opinion. Nothing special to see here.
SPC (thank you simo_415) uses the “players” folder of each named world to store select player data. q3hardcore (thanks to him as well) added 4 teleport functions to that capability. I use those functions to automatically retain where I was in my world to return to that place, after putting my excess inventory in my home (actual macro below). A secondary value to this is each world has a different “Home”. I’ve written a procedure for WEW that works (partially) but, must be rewritten/modified for each world/Home.
My SPC macros
“Home” macro:
/wprem return (deletes the current “return” waypoint – probably not necessary)
/wpset return (creates a new “return” waypoint)
/wpgoto Home (actually teleports to my “home” waypoint.
“Return” macro:
/wpgoto Return
Current WEW procedure (bound to Ctrl P):
/tp ME 270.5 54 -152.5 (a named “Home” for each World would be better IMO)
Finally my real question How do I create/store/recall an x, y, z, point that changes every time I Ctrl P (ideally stored in each different named world)?
TIA
Lou
Links to pdf format, downloadable, command lists for (these often clarify/expand descriptions, and where possible link to the author's posting):
MoreCommands: http://www.mediafire.com/view/qjc9c6klcnp660e/CmdLstMoreCommands.pdf
WorldEdit: http://www.mediafire.com/view/bi7r00xd9rgxrrt/WE_Commands.pdf
Either use $$px, $$py, $$pz, which allows you to select from a list of "places" and gets replaced with coordinates
Ctrl-I: $${Log($$p)}$$ //press this and select to create a new home or something
some other key: /tp %PLAYER% $$px $$py $$pz
or use a script like this
I $${IF(CTRL);#x=%XPOS%;#y=%YPOS%;#z=%ZPOS%;Log(Location saved);ELSE;Echo(/tp %PLAYER% %#x% %#y% %#z%);ENDIF}$$
..or am i completely misunderstanding your question?
'Cause tomorrow spring is here
I'd found $$p. I even looked for where those points are created. Either I can't find or read them. I thought once set it'd be difficult to change and I'd prefer to not have to manually annotate. I can do that with Excel, the problem there is I often hit Ctrl P without adding my current position to the spreadsheet (Ctrl P vs P helps). That makes it most difficult to return and it really slows things down.
Your script will create a return waypoint (or something), that I can recall with a second key? What is the trigger to recall my coordinates?
/wprem * = remove waypoint name; where * = name
/wpset * = add a waypoint name
/wpgoto * = /tp (teleport) to * coodinates; where * = named coordinates.
wplist = was a new waypoint command that just listed what waypoint names existed.
I used P to teleport to my home and O to teleport to where I was when I hit the P key. Clearer?
Lou
Links to pdf format, downloadable, command lists for (these often clarify/expand descriptions, and where possible link to the author's posting):
MoreCommands: http://www.mediafire.com/view/qjc9c6klcnp660e/CmdLstMoreCommands.pdf
WorldEdit: http://www.mediafire.com/view/bi7r00xd9rgxrrt/WE_Commands.pdf
Hm, maybe i'll try explaining what some things do instead...
When the mod encounters any of the following parameters: $$p, $$px, $$py, $$pz, it will open up a list/menu of "places" that you can select from
In that menu you can also create new entries/places if you want, using your current coordinates or any custom ones you enter in
Once you've selected a place, all $$px get replaced with the x coordinate, similarly for $$py and $$pz (this happens before anything else)
Try binding just $${Log($$px)}$$ and triggering that a bunch of times to get an understanding of how that prompt/menu works
As for scripts, if you put $${ }$$ around your binding, what's left inside is read as a series of commands, separated by semicolons (or line breaks)
Every command (with exceptions) looks like Command(pattern), which means a script looks like $${Do(this);Do(that);Do(something,else)}$$
For saving your current position without going through the menus (just remembered this), there's a command Store("place",name)
-----------------
Example (is this better?):
On the key you use to go home: ${StoreOver("place",$[Name]);Echo("/home");Log("Press <key to return> and select $[Name] when you're done to return")}$
On the key you use to return: /tp $px $py $pz
When you press the go home key, it will ask you for a name and then save your coordinates under that name and /tp you home
when you press the return key, it will give you a list of all your saved coordinates and teleport you to the ones you choose
I think i'm starting to understand what you mean, but what's this about multiple worlds?, how does that come into play exactly?
'Cause tomorrow spring is here
TIA
Lou
Can I replace $[Name] with $[return] or similar, twice?
My Home is in different places on different worlds. It would be nice if /home or similar looked up where "Home" is on that specific world.
From what I've seen of this configuration. I need to first delete the current "Return". Create a new "Return" point with my current coordinates. and finally teleport "Home"; all triggered by Ctrl P.
A second key teleports me automatically to the coordinates listed in "Return".
Links to pdf format, downloadable, command lists for (these often clarify/expand descriptions, and where possible link to the author's posting):
MoreCommands: http://www.mediafire.com/view/qjc9c6klcnp660e/CmdLstMoreCommands.pdf
WorldEdit: http://www.mediafire.com/view/bi7r00xd9rgxrrt/WE_Commands.pdf
*wakes up
Okay, so you only need one place saved?, then the original idea should work fine
Here we set user defined global variables for your coordinates and tp to them later
on your go home key, separated for clarity:
$${
@#x = %XPOS%;
@#y = %YPOS%;
@#z = %ZPOS%;
Echo(/tp home)
}$$
On your return key
$${
Echo(/tp %@#x% %@#y% %@#z%)
UnSet(@home)
}$$
Warning!: Pressing home when you're already home will set the return point there (if you accidentally click a second time)
if you want to prevent that (but then you're required to ALWAYS return), you can surround the return commands with IF(@home);...;Set(@home);ENDIF
and the return key needs to UnSet(@home)
----
But for the multiple worlds thing, i need more explanation as to what exactly that means on your server..., if the dimension or %SERVER% changes it might be relatively easy, if not it could be anything from pretty complicated to imposible
'Cause tomorrow spring is here
Your warning happened with SPC too when I had a mental lapse. Once we get this working the IF/ENDIF should prevent it.
I input for Ctrl P (spaces displayed as _ ):
$${@#x=%XPOS%;@#y=%YPOS%;@#z=%ZPOS%;Echo(/tp_Player_x_y_z)}$$
I input for Ctrl O (spaces displayed as _ ):
${Echo(/tp_%@#x%_%@#y%_%@#z%);UnSet(@return)}$2nbsp;
And both work. thanks.
Links to pdf format, downloadable, command lists for (these often clarify/expand descriptions, and where possible link to the author's posting):
MoreCommands: http://www.mediafire.com/view/qjc9c6klcnp660e/CmdLstMoreCommands.pdf
WorldEdit: http://www.mediafire.com/view/bi7r00xd9rgxrrt/WE_Commands.pdf
In your first script, it just seems like /tp home is not a valid command on your server.., did you try /home?
You should know better than i what the correct command is, just put that inside the Echo()
an Echo(str) command just sends str to the server
In your second script, you need a semicolon after the Echo and before the UnSet to separate those commands..,
$${@#x=%XPOS%;@#y=%YPOS%;@#z=%ZPOS%;Echo(/home)}$$
$${Echo(/tp_%@#x%_%@#y%_%@#z%);UnSet(@home)}$$
If you don't have a dedicated /home command then just replace it with a teleport to coordinates
-----
Different singleplayer worlds, hmm, i'm not sure if you can tell them apart like that, you may need to just create different configs and change them yourself
'Cause tomorrow spring is here
There is no vanilla /home command and I'm not yet capable of creating my own config. changing the last part of the first command to /tp Player x y z, works. Thanks for all your help.
Lou
I tried | (shift \ on my keyboard) rather than ;. What is the difference in those two things? Is there somewhere I can find guidance on coding?
Links to pdf format, downloadable, command lists for (these often clarify/expand descriptions, and where possible link to the author's posting):
MoreCommands: http://www.mediafire.com/view/qjc9c6klcnp660e/CmdLstMoreCommands.pdf
WorldEdit: http://www.mediafire.com/view/bi7r00xd9rgxrrt/WE_Commands.pdf
There are two basic things you can use as bindings..
Message only:
default
separated by pipes (the "|" character is a pipe)
after preprocessing away all the $$parameters, all of the separated pieces of text are sent to the server as chat
Script:
forced by surrounding $${ }$$ brackets
separated by semicolons
after preprocessing all the separated pieces of text are interpreted as commands and run in sequence
---
Message only is kind-of obsolete in the sense that any "message|message2" could be replaced by a $${Echo(message);Echo(message2)}$$ to give the same effect, but as you can see for simple cases it's easier to read - this helps new people get some use out of the mod without having to learn too much
tl;dr
semicolons (or line breaks) are used to separate COMMANDS in a SCRIPT
pipes (the vertical line) are used to separate messages in a regular binding.., one that is not a script but just sends messages out
Examples:
$${Echo(/home);Wait(1);Echo(/back)}$$
/home|/back$$!
^(similar but not equivalent, the script has a delay whereas the message waits for you to press enter)
'Cause tomorrow spring is here