Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 08-31-2010, 07:22 AM
Bellos
Hill Giant
 
Join Date: Jul 2007
Posts: 111
Default

After a few days of work I figured this out so here is a script if anyone else wants to do this.

Code:
sub EVENT_SCALE_CALC {

	my $itemscale = 1;

	#check all slots for items
  if(plugin::check_hasitem($client, 76094)) {
	 $itemscale = $itemscale + 2;
  }

  if(plugin::check_hasitem($client, 2393)) {
	 $itemscale = $itemscale + 2;
  }
 
  if(plugin::check_hasitem($client, 2421)) {
	 $itemscale = $itemscale + 2;
  }
  
	$questitem->SetScale($itemscale);

}
Reply With Quote
  #3  
Old 04-28-2011, 04:18 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

i have a follow up question - the code above, where do you set WHICH Charms specifically (item id?) you want this code apply to?

like i have 2 different charms. i want the code to work for one but not for the other?
Reply With Quote
  #4  
Old 04-28-2011, 08:16 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

The charmfile is the name of the perl file used to scale the item. They are in the quests/items directory. If you want two different effects, just make two files and assign them to the items.
Reply With Quote
  #5  
Old 04-28-2011, 09:49 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

ah, charmfile as the column entry in items table i take it?
perfect, thank you much!!! =)


2 more question about charms:

1. what determines what is charm MAX possible stats? do I put MIN stats on charm and they
add up with each scaleup +1?

2. let say I have a charm which scales with accordance to items you wearing.
So understand that stats will go up, but is it posible to put an effect on charm - like Focus or
regeneration, which will only activate
when it scaled up high enough?
Reply With Quote
  #6  
Old 04-28-2011, 10:16 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

1. The stats on the item are the base you get scale * stat for those stats. Ex 25 STR charm with 0.5 modifier = 12STR, 1.0 = 25, 2.0 = 50.. etc etc.

2. No but it's possible in theory would require someone willing to add it to the code (don't look at me =p)
Reply With Quote
  #7  
Old 04-28-2011, 10:40 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Oh KLS - this would be great!
think what can we achieve with it- SET ITEMS =)

You know like in Diablo 2, WoW and EQ2, when you collect a full set of specific items you get bonus effect? So a charm could be set to give you a unique bonus - Focus, Click effect, but only if you are wearing full set
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:22 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3