View Single Post
  #9  
Old 05-25-2019, 12:54 AM
WarAngel's Avatar
WarAngel
Sarnak
 
Join Date: Oct 2017
Location: Washington State
Posts: 54
Default

cOncrete, thank you for replying.

As far as issues with EVENT_SAY, up until now (code below) I had been able to cannibalize scripts and debug/test them on the fly with EVENT_SAY in game. I wish I could find that other individuals post, but I was really tired when I came across it, and didn't save for later use as a personal help file. Kicking myself for that, it was a "AHA!" moment, but now I do not remember why. Ugh.

This code did not work...but...read further.


Code:
(Placed in a global_npc.pl. for testing)
sub EVENT_SAY 
# Testing only for now...later this will be in a check_distance on a timer...etc.
{ 
if($text=~/hail/i)
{
quest::say("You have grounded me!");

# my $npc_target = $client->GetTarget();
# my $mob_target = $npc_target->GetID();

# quest::FlyMode(0);
# $mob->SetFlyMode(uint8 flymode[0])
# $mob->SetFlyMode(0);
# SetFlyMode(0);
# $mob->SetFlyMode(uint8 flymode(0));
# $mob->SetFlyMode(uint8 flymode() = 0);
# $npc->SetFlyMode(0);
# my->SetFlyMode(0);
# $npc_target->SetFlyMode(0);
# $npc_target->SetFlyMode(flymode 0);
# $npc->SetFlyMode(flymode 0);
# SetFlyMode(0);

} 
}
When Huppy replied with a simple code, using EVENT_SPAWN...did I realize that the "$NPC->SetFlyMode()" does not work in the EVENT_SAY environment (for me at least). Which led me to wonder if in the past I had concocted scripts that I cannibalize from you folks in the EVENT_SAY and gave up on them when they could have work elsewhere such as EVENT_SPAWN. They are vaporware now, I could not begin to remember them for examples, I am sorry.

"run perl -c your_script.pl from a command prompt" I need to re-attack that and learn the knowledge of how to perform the command. In the past I had the same issue with trying to run the "eqemu_server.pl". I gave up and made a batch file that does it for me. There is some part of my brain that just cannot get this right. And I do not know why. Half of doing CMD stuff eludes me. I do use Visual 2017, it seems to catch a lot of my mistakes. But, again I need to try to learn what you suggested.

Posting again with what I have so far with this ittybitty script.

-Eric
Reply With Quote