View Single Post
  #1  
Old 12-05-2012, 10:40 AM
Sinclipse
Hill Giant
 
Join Date: May 2012
Posts: 122
Default Need help... Bot quest...

Code:
##Bot Script ##Made by Dirge

sub EVENT_SAY
{
	$botcount = $qglobal{bot_spawn_limit};
	
	if(($ulevel >= 10) && ($botcount == 0))
	{
		$companion = quest::saylink("companion");
		$yes = quest::saylink("yes");
		
		if($botcount == 0)
		{
			if($text=~/hail/i)
			{
				plugin::Whisper("Hello there $name; would you be interested in obtaining a [$companion]?");
			}
			elsif($text=~/companion/i)
			{
				plugin::Whisper("Of course, I live to serve. 'Insert info about bot 1'");
			}
			elsif($text=~/yes/i)
			{
				if(($ulevel >= 10) && ($botcount == 0))
				{
					plugin::Whisper("Enjoy your first of many companions.");
					$botcount = $qglobals{bot_spawn_limit} + 1;
				}
				else
				{
					plugin::Whisper("You already have one bot; come back again once you are more experienced.");
				}
			}
		}
	}
	elsif(($ulevel >= 30) && ($botcount > 0 && $botcount < 2))
	{
		$completed = 0;
		$companion = quest::saylink("companion");
		
		if($text=~/hail/i)
		{
			plugin::Whisper("Hello again $name; are you interested in acquiring a second [$companion]?");
		}
		elsif($text=~/companion/i)
		{
			plugin::Whisper("Very well, 'Insert info about bot 2'");
		}
		
		
		##End Product
		elsif($completed == 1)
		{
			plugin::Whisper("Congratulations $name; here is your second companion.");
			$botcount = $qglobal{bot_spawn_limit} + 1;
		}
	}
	elsif($botcount >= 2)
	{
		plugin::Whisper("You already have the maximum number of companions; go adventure.");
	}
	else
	{
		plugin::Whisper("Please return when you have acquired enough knowledge.");
	}
}
This is the current code we have, it doesn't work. I've changed the plugin::Whisper to $npcwhisper as well, I can't seem to figure this out, is it something I'm doing wrong in the Database? As, when I tried copying over the Bazaar way of obtaining Bots to a random NPC in Nexus, it STILL didn't work... What's going on with the script, any help would be great.
Reply With Quote