Log in

View Full Version : Last bind point


rixcraven
11-18-2013, 01:25 PM
Hi,
I was wondering if its possible to get an npc to tell the player where he was last bound?, I know /charinfo will do it, but I can't see a way to integrate that command into perl.
Perhaps someone here could help me with this?

wolfwalkereci
11-18-2013, 06:27 PM
== 01/16/2013 ==
Secrets: Added five new functions to perl for clients: GetBindX, GetBindY, GetBindZ, GetBindHeading, and GetBindZoneID. They all have an optional parameter of index of playerprofile's bindpoint.

zone/client.h
$client->GetBindZoneID();
$client->GetBindX();
$client->GetBindY();
$client->GetBindZ();
$client->GetBindHeading();

see also zone\perl_client.cpp

Uleat
11-18-2013, 07:26 PM
I looked into that too...

There doesn't appear to be a coded translator to convert the ZoneID to an actual name.


It doesn't serve much purpose to add a $client->GetBindZoneLongName(n) for current quests,
but it would be useful for custom content :)

Kingly_Krab
11-18-2013, 07:44 PM
I have that capability, however, it's in Perl. :| I don't know if it would be useful or not.

wolfwalkereci
11-18-2013, 08:13 PM
Reference a hash or array with zoneid,longname. Several people have posted examples that could be built upon.
Akkadius, Trevius, Kingly have posted examples, probably a half dozen others but those names spring to mind.

Kingly_Krab
11-18-2013, 08:17 PM
Here's my code for seven plugins, including zone short name and just zone period.

These go in the 'plugins' folder, you can name the Perl file anything you want.
http://pastebin.com/AtqS8F2p

All you would do is this.
sub EVENT_SAY
{
if($text=~/Hail/i)
{
plugin::Whisper("The zone you are bound to is " . plugin::Zone($client->GetBindZoneID()) . ".");
}
}

Uleat
11-18-2013, 09:52 PM
o.O I didn't even think to look in the plugins folder..duh! O.o

Kingly_Krab
11-18-2013, 09:55 PM
Haha, that's what I did for mine, it makes things simpler to be able to just do that.

rixcraven
11-20-2013, 12:51 PM
Thanks for ALL the great help folks!...
Nice code Kingly :) :)
This forum is a great place for sharing info, its great to see a community like this, and to be a (very) small part in it.