Thread: Addicted Dads
View Single Post
  #6  
Old 09-25-2017, 08:40 PM
shea851
Fire Beetle
 
Join Date: Jan 2010
Location: Illinois
Posts: 9
Default

Yep, it is heavily based off NL. Wonderful dad server gameplay!

Here's the source change I made, and built code Sept 1 2017. You can see with #version in game.

corpse.cpp
Code:
if (!IsPlayerCorpse() && inst->GetItem()->Attuneable) {
	inst->SetAttuned(true);
}

Here's the deattuner script.

Code:
sub EVENT_ITEM {

	my $gummiesID = 133015;
	my $dadtokenID = 133016;
	my $cost = 5000;
	
	my @item = ($item1, $item2, $item3, $item4);
	my @item_charges = ($item1_charges, $item2_charges, $item3_charges, $item4_charges);
	my @item_attuned = ($item1_attuned, $item2_attuned, $item3_attuned, $item4_attuned);
	
	# Return bogus items
	for my $i (0 .. $#item)
	{
		if ($item[$i] > 0 && $item_attuned[$i] == 0 && $item[$i] != $gummiesID && $item[$i] != $dadtokenID)
		{
			$client->SummonItem($item[$i], $item_charges[$i], $item_attuned[$i]);
			quest::me("I have no need for this $name, you can have it back.");
			$item[$i] = 0;
		}
	}
	
	$emptySlotCount = scalar(grep(/^0$/, @item));
	
	# Platinum quest
	if ($platinum == $cost && $emptySlotCount == 3)
	{
		for my $i (0 .. $#item)
		{
			if ($item[$i] > 0)
			{
				$client->SummonItem($item[$i], $item_charges[$i], 0);
			}
		}
		quest::say("Enjoy, $name!");
		return;
	}
	
	# Gummies quest
	if (grep(/^$gummiesID$/, @item) && $emptySlotCount == 2)
	{
		for my $i (0 .. $#item)
		{
			if ($item[$i] > 0 && $item[$i] != $gummiesID)
			{
				$client->SummonItem($item[$i], $item_charges[$i], 0);
			}
		}
		quest::givecash($copper, $silver, $gold, $platinum);
		quest::say("Enjoy, $name!");
		return;
	}
	
	# AA quest
	if (grep(/^$dadtokenID$/, @item) && $client->GetLevel() >= 51)
	{
		for my $i (0 .. $#item)
		{
			if ($item[$i] > 0)
			{
				$client->AddAAPoints($item_charges[$i]);
			}
		}
		quest::say("Enjoy, $name!");
		return;
	}
	
	# Return remaining items/cash should we arrive here
	quest::givecash($copper, $silver, $gold, $platinum);
		
	for my $i (0 .. $#item)
	{
		if ($item[$i] > 0)
		{
			$client->SummonItem($item[$i], $item_charges[$i], $item_attuned[$i]);
			quest::me("I have no need for this $name, you can have it back.");
		}
	}

}
Reply With Quote