View Single Post
  #1  
Old 08-28-2010, 01:31 PM
Bellos
Hill Giant
 
Join Date: Jul 2007
Posts: 111
Default How to evolve items using character flags and other means

Does anyone have an example script i could look at?

I have my charm evolving based on level but I have no idea how to do it based on anything else.

Any help would be appreciated.


Also, anyone know if its possible to evolve an item based on what items the player is wearing or has in his inventory?

Ok i found

GetItemAt(slot)

can this be used to get items inside backpacks or no?


Also do you have to specify the slot or can it be like GetItemAt(everyslotininventory) if so, how would i do that?


Edit: Ok this is what i have. Im fairly sure it wont work like I want it to but i cant think of anything else so maybe one of you guys can help me.

Basically it want it to scale up in stats based on how many of the rings of power the player has in his inventory.

Code:
#Ring of Thror

sub EVENT_SCALE_CALC {

	#Setup Items In Slots
	my $item1 = $client->GetItemAt(1);
	my $item2 = $client->GetItemAt(2);
	my $item3 = $client->GetItemAt(3);
	my $item4 = $client->GetItemAt(4);
	my $item5 = $client->GetItemAt(5);
	my $item6 = $client->GetItemAt(6);
	
	my $itemscale = 1;

	#check slots for items
  if($item1 == 2393 || $item2 == 2393 || $item3 == 2393 || $item4 == 2393 || $item5 == 2393 || $item6 == 2393) {
	 $questitem->SetScale($itemscale = $itemscale++);
  }

  if($item1 == 2415 || $item2 == 2415 || $item3 == 2415 || $item4 == 2415 || $item5 == 2415 || $item6 == 2415) {
	 $questitem->SetScale($itemscale = $itemscale++);
  }
 
   if($item1 == 2421 || $item2 == 2421 || $item3 == 2421 || $item4 == 2421|| $item5 == 2421 || $item6 == 2421) {
	 $questitem->SetScale($itemscale = $itemscale++);
  }
  
}

Yeah it doesnt work at all lol
Reply With Quote