Venture Posted February 16, 2014 Group: Members Topic Count: 52 Topics Per Day: 0.01 Content Count: 179 Reputation: 2 Joined: 08/30/13 Last Seen: November 7, 2024 Share Posted February 16, 2014 (edited) I need a function that returns variable name as string, and a function that takes string and returns variable. I felt that this would be really useful for me. For example, I have $@Test[1] = 100; var2string($@Test[1]); dispbottom var2string($@Test[1]); //would result displaying $@Test[1] on the bottom. While the other way round is also possible. for example. $@Test[1] = 100; .varstring$ = "Test"; .result = 200 + string2var("$@" + .varstring$ + "[1]"); dispbottom .result; //would results to displaying 300 on the bottom. Is this possible? Imagine the tons of possibilities with the availability of this function. I could make a lot of scripts that are once impossible into reality!. Edited February 16, 2014 by gekigengar Quote Link to comment Share on other sites More sharing options...
Jonne Posted February 16, 2014 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 153 Reputation: 33 Joined: 12/24/11 Last Seen: September 30, 2024 Share Posted February 16, 2014 Var to String should be tought. Other way around, check for SetD and GetD 1 Quote Link to comment Share on other sites More sharing options...
Venture Posted February 16, 2014 Group: Members Topic Count: 52 Topics Per Day: 0.01 Content Count: 179 Reputation: 2 Joined: 08/30/13 Last Seen: November 7, 2024 Author Share Posted February 16, 2014 (edited) Var to String should be tought. Other way around, check for SetD and GetD You are right, I never knew such function exist. There is nothing on rAthena wiki regarding setD getD. I found it on Hercules Wiki. http://hercules.ws/wiki/Setd http://hercules.ws/wiki/Getd I think thats all I need, Thank you! Edited February 16, 2014 by gekigengar Quote Link to comment Share on other sites More sharing options...
Jonne Posted February 16, 2014 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 153 Reputation: 33 Joined: 12/24/11 Last Seen: September 30, 2024 Share Posted February 16, 2014 Look through doc/script_commands.txt or whats it called Quote Link to comment Share on other sites More sharing options...
Euphy Posted February 16, 2014 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted February 16, 2014 There is nothing on rAthena wiki regarding setD getD. Setd Getd Those pages have existed since January 2009. o.o; As Jonne said, run a search through doc/script_commands.txt to see if a command exists. Quote Link to comment Share on other sites More sharing options...
Venture Posted February 17, 2014 Group: Members Topic Count: 52 Topics Per Day: 0.01 Content Count: 179 Reputation: 2 Joined: 08/30/13 Last Seen: November 7, 2024 Author Share Posted February 17, 2014 (edited) There is nothing on rAthena wiki regarding setD getD. SetdGetd Those pages have existed since January 2009. o.o; As Jonne said, run a search through doc/script_commands.txt to see if a command exists. But but, Uncle Google didn't even link them to those page! ;_; try typing rathena setd getd will get you to hercules stuff! Edited February 17, 2014 by gekigengar Quote Link to comment Share on other sites More sharing options...
Question
Venture
I need a function that returns variable name as string, and a function that takes string and returns variable.
I felt that this would be really useful for me.
For example, I have
While the other way round is also possible.
for example.
Is this possible?
Imagine the tons of possibilities with the availability of this function.
I could make a lot of scripts that are once impossible into reality!.
Edited by gekigengarLink to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.