View Full Version : Lua say links
provocating
09-23-2013, 12:04 PM
Are Lua say links completely implemented? I read through the Lua documentation on Git but for the life of me I cannot get say links working. Other functions I tried worked fine though Lua, just not say links. I also looked though the converted Quests and could not find any examples of Saylinks in those.
Robregen
09-23-2013, 12:34 PM
I haven't tried this yet. but there is a documentation on saylink in git wiki.
Void say_link(String phrase, Boolean silent, String link_name);
This is listed as a general functions so it would have be eq.say_link("something",0, "say something"); or something like that. You'll just have to experiment with it. If you get it working. Post it on here so other can see to use as example.
provocating
09-23-2013, 02:59 PM
I tried every combination I can think of, other things in the same class seem to work like depop(). I know very little C++ but from looking at the code the existing Perl function returns a link, the Lua one returns void.
An existing one would be something like this in Perl.
my $sl1 = quest::saylink("blessings", 1);
$client->Message(315, "$NPCName says, 'Hail, $name. Have you come for my $sl1");
According to the documentation the Lua on would be like this I think. I cannot see how that would even work, it seems like the Lua implementation would need to return something so you could put it in a say back to the client.
eq.say_link("Hail, $name. Have you come for my %s", 0, "blessings");
It definitely is no big deal, I am tinkering with it though. figuring these things out helps me learn C++ and Lua so something is gained by messing with it.
Robregen
09-23-2013, 03:20 PM
oh I learn that in lua, when you are using a boolean. you have to put it in as false or true instead of 0 or 1.
provocating
09-23-2013, 03:26 PM
Yeah, I read that in the official docs. I think I tried true/false last night with the same results.
Lua Say Links were accidentally given an incorrect type. So atm they don't work, I'll put it in with my next set of fixes.
provocating
09-25-2013, 05:04 PM
No worry, I thought that was what happened. Your C++ Kung Fu is greater than mine by far.
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.