EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Quest Issue (https://www.eqemulator.org/forums/showthread.php?t=30565)

Vexira 02-11-2010 11:12 PM

Mercenary Quest
 
Sorry for the wrong section.. I got the mercenary quest to work by using items with spells on them that typically aren't used on my server and then I added this to player.pl. Does anyone have any suggestions on what I'd do to clean up this code a bit?


Quote:

sub EVENT_CAST {
if ($spell_id == "2230") { #lvl 1 - 10 item - 1079
$client->MakePet(null, Pet1, "Hired_Mercenary");
}
if($spell_id == "2231") { #lvl 11 - 20 item - 1096
$client->MakePet(null, Pet2, "Hired_Watchman");
}
if($spell_id == "2232") { #lvl 21 - 30 item - 1118
$client->MakePet(null, Pet3, "Hired_Scout");
}
if($spell_id == "2233") { #lvl 31 - 40 item - 1119
$client->MakePet(null, Pet4, "Hired_Guard");
}
if($spell_id == "2234") { #lvl 41+ item - 1261
$client->MakePet(null, Pet5, "Hired_Assassin");
quest::selfcast(80);
}
if($spell_id == "2235") { #Epic Warrior item - 1264
$client->MakePet(null, Pet6, "Hired_Overlord");
}
if($spell_id == "2236") { #Epic Monk item - 1266
$client->MakePet(null, Pet7, "Hired_Fighter");
}
if($spell_id == "2237") { #Epic Magician item - 1267
$client->MakePet(null, Pet8, "Hired_Magus");
}
if($spell_id == "2238") { #Epic Paladin item - 1270
$client->MakePet(null, Pet9, "Hired_Protector");
}
}


ChaosSlayerZ 02-11-2010 11:33 PM

I am curious
if you already casting a spell, why not summon a pet via spells, rather than go trough all the trouble of creating a pet via cast_spell check?

trevius 02-11-2010 11:50 PM

Yeah, Vexira, you can just create your clicky items to summon the pet directly. It is pretty easy to do if you just copy a pet spell similar to how you want your pets to be, and then past it into an unused spell slot, or over another existing spell. Then, just change the pet name to summon to match the name of the pet you want it to create. I use that on my banker summoning clicky item and on my new GM Tools clicky item that summons a pet with scripting to use for GM development purposes :)

Vexira 02-12-2010 08:54 PM

Quote:

Originally Posted by ChaosSlayerZ (Post 184103)
I am curious
if you already casting a spell, why not summon a pet via spells, rather than go trough all the trouble of creating a pet via cast_spell check?

The point is the make individual items that are temporary (with charges) to cast an unused spell to summon the mercenary at any point rather than have him zone with you. It's an alternative to making source changes if your knowledge is as limited as mine. These items could be purchased for a price or be the reward of a quest or whatever it is that you'd need them for.

ChaosSlayerZ 02-12-2010 09:07 PM

Quote:

Originally Posted by Vexira (Post 184157)
The point is the make individual items that are temporary (with charges) to cast an unused spell to summon the mercenary at any point rather than have him zone with you. It's an alternative to making source changes if your knowledge is as limited as mine. These items could be purchased for a price or be the reward of a quest or whatever it is that you'd need them for.

you can achieve same results by simply having those exact spells you using to summon those pets/mercs directly.
the only difference will in fact me, that summoned pet WILL zone with you =)


All times are GMT -4. The time now is 11:00 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.