You have syntax errors all over the place.
As a general rule of thumb, for every left bracket, there is a closing right bracket. If there's an if statement, a bracket follows that if statement to encapsulate the following commands.
For example,
sub EVENT_SAY { <-- Starting bracket for SUB_EVENT
if($name eq "Penny")
{ - If the name matches "Penny", do the below command.
quest::say("Hi Penny!");
} - Close the if statement
} - Close the subroutine.
I recommend taking a tutorial on perl. It will teach you elementary concepts about the scripting language.
http://www.tizag.com/perlT/
Furthermore, remember that you can set quest globals in order to save your variables past zoning, zone shutdown, or client desync. There are examples littered over this forum as well as on the EQEmulator wiki for a detailed description of how they work.
If you aren't ready to learn about that, using a simple variable would be good enough to track paid status. You would still have to kill the player's pet by depopping it by client ID, but this should get you started on checking a timer. Alternatively, use makepet to spawn a pet by NPC ID, assign a script to the pet in the templates folder.
The alternative would be something like what i listed below.
Code:
sub EVENT_ITEM {
if(($platinum == 5)) {
$client->MakePet(0, Trillion, "Trillion"); #change this to a static NPC types ID
}
else
{
quest::say("That's not 5 platinum, $name!");
}
}
sub EVENT_SAY {
if($text=~/Hail/i) {
quest::say("I am for hire, $name, and I'm currently charging 5pp per hour, Want me to fight for you $class?, just pass me 5pp");
}
}
You'll have to do the NPC script seperate, but basically hand your pet 5 plat every so often to make sure it doesn't despawn.
Hope that helps.