Custom NPC issues
I have been working on this Custom NPC for a while now. Actually, Ive been working on him and then I wondered over here, found some great scripts and now he doesnt work. Well he kinda does. I cant get the translocator and the skills vendor portion of it to work. Any ideas where my code is wrong? Sorry its so long..
Code:
## Intro - Basic Stuff ##
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Hello, $name. Are you interested in [buffs] or [items], or would you like to know your [Credit Info]? You can Also say [translocator] for some Transportation Services. If you are looking to get [stronger], just say so, I can help with your training.");
}
if($text=~/Credit Info/i){
quest::say("Would you like to know how to [obtain] credit, your current [credit value], or available [buffs] and [items]?");
}
if($text=~/obtain/i){
quest::say("For every platinum you bring me you shall receive one credit (1pp = 1£). These credits can be redeemed for buffs or items at your request.");
}
## Buffs - Menu ##
if($text=~/buffs/i || $text=~/yes/i) { #### What buffs does he offer and how much credit?
quest::say("I have the following to offer you:");
quest::say("[Cleanse] --full health and mana restore-- - FREE");
quest::say("[Temperance] - £10");
quest::say("[Virtue] - £20");
quest::say("[Conviction] - £50");
quest::say("[C1] - £5");
quest::say("[C2] - £25");
quest::say("[C3] - £50");
quest::say("[C4] - £75");
quest::say("[C5] - £100");
quest::say("[Hastening of Salik] - £30");
quest::say("[Spirit of Wolf] - £5");
quest::say("[Spirit of Eagle] - £20");
quest::say("[Circle of Neetles] - £25");
quest::say("[Blessing of Steelok] - £50");
}
if($text=~/credit value/){
if ($buffbot >= 1) {
quest::say("Your current credit is £$buffbot");
$buffbot = undef;
}
else {
quest::say("You have £0 credit. Would you like to know how much you need to donate obtain [buffs]?");
$buffbot = undef;
}
}
## Buffs Menu end ##
## Items - Menu ##
if($text=~/items/i){
quest::say("I have the following to offer you:");
quest::say("[Druid] items.");
quest::say("[Bard] items.");
quest::say("[Cleric] items.");
quest::say("[Enchanter] items.");
quest::say("[Wizard] items.");
quest::say("[Magician] items.");
quest::say("[Shaman] items.");
quest::say("[Monk] items.");
quest::say("[Beastlord] items.");
quest::say("[Necromancer] items.");
quest::say("[Ranger] items.");
quest::say("[Warrior] items.");
quest::say("[Rogue] items.");
quest::say("[Paladin] items.");
quest::say("[Shadow Knight] items.");
quest::say("[Misc] items.");
quest::say("[Food] or [Supplies].");
}
## Items Menu end ##
## Cleanse ##
if($text=~/cleanse/i){ #### Restores Mana and Health. I use this as an alternative to simply casting a spell
$client->Heal();
$client->SetMana($client->GetMaxMana());
quest::say("As you wish!");
}
## Cleanse end ##
## Buffs begin ##
## Buff 1 - Temperance ##
if($text=~/Temperance/i){
if ($buffbot >= 10) {
quest::selfcast(3692);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-10, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## Temperance ends ##
## Buff 2 - Virtue ##
if($text=~/virtue/i){
if ($buffbot >= 20) {
quest::selfcast(3467);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-20, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## Virtue ends##
## Buff 3 - Conviction ##
if($text=~/conviction/i){
if ($buffbot >= 50) {
quest::selfcast(174);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-50, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## Conviction ends
## Buff 4 - C1 ##
if($text=~/c1/i){
if ($buffbot >= 5) {
quest::selfcast(697);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-5, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## C1 ends ##
## Buff 5 - C2 ##
if($text=~/c2/i){
if ($buffbot >= 25) {
quest::selfcast(174);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-25, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## C2 ends ##
## Buff 6 - C3 ##
if($text=~/c3/i){
if ($buffbot >= 50) {
quest::selfcast(1693);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-50, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## C3 ends ##
## Buff 7 - C4 ##
if($text=~/c4/i){
if ($buffbot >= 75) {
quest::selfcast(2570);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-75, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## C4 ends ##
## Buff 8 - C5 ##
if($text=~/c4/i){
if ($buffbot >= 100) {
quest::selfcast(5513);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-100, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## C5 ends ##
## Buff 8 - Hastening of Salik ##
if($text=~/hastening of salik/i){
if ($buffbot >= 30) {
quest::selfcast(5521);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-30, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## HoS ends ##
## Buff 9 - Spirit of Wolf ##
if($text=~/spirit of wolf/i){
if ($buffbot >= 5) {
quest::selfcast(278);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-5, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## SoW ends ##
## Buff 10 - Spirit of Eagle ##
if($text=~/spirit of eagle/i){
if ($buffbot >= 20) {
quest::selfcast(16813);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-20, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## SoE ends ##
## Buff 11 - Circle of Neetles ##
if($text=~/circle of neetles/i){
if ($buffbot >= 25) {
quest::selfcast(5365);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-25, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## CoN ends ##
## Buff 12 - Blessing of Steelok ##
if($text=~/blessing of steelok/i){
if ($buffbot >= 50) {
quest::selfcast(5366);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-50, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
## BoS ends ##
## Buffs end ##
## Items Section ##
## Druid Items ##
if($text=~/druid/i){
quest::say("I have the following to offer you:");
quest::say("[DTier 1] items.");
quest::say("[DTier 2] items.");
quest::say("[DTier 3] items.");
quest::say("[DTier 4] items.");
quest::say("[DTier 5] items.");
quest::say("[DOther] items.");
}
if($text=~/dtier 1/i){
quest::say("I have the following to offer you:");
quest::say("Elder Spiritist set. Helm - [dt1helm] £1000. Boots - [dt1boots] £1000. Gloves - [dt1gloves] £1000. Chest - [dt1chest] £2000. Legs - [dt1legs] £1500. Wrist - [dt1wrist] £1000. Arms - [dt1arms] £1000. Full Set - [dt1set] £9000.");
}
if($text=~/dt1helm/i){
if ($buffbot >= 1000) {
quest::summonitem(4571);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-1000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt1boots/i){
if ($buffbot >= 1000) {
quest::summonitem(4577);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-1000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt1gloves/i){
if ($buffbot >= 1000) {
quest::summonitem(4575);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-1000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt1chest/i){
if ($buffbot >= 2000) {
quest::summonitem(4572);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-2000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt1legs/i){
if ($buffbot >= 1500) {
quest::summonitem(4576);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-1500, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt1wrist/i){
if ($buffbot >= 1000) {
quest::summonitem(4574);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-1000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt1arms/i){
if ($buffbot >= 1000) {
quest::summonitem(4573);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-1000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt1set/i){
if ($buffbot >= 9000) {
quest::summonitem(4571);
quest::summonitem(4572);
quest::summonitem(4573);
quest::summonitem(4574);
quest::summonitem(4574);
quest::summonitem(4575);
quest::summonitem(4576);
quest::summonitem(4577);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-9000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dtier 2/i){
quest::say("I have the following to offer you:");
quest::say("Natrure Walker's set. Helm - [dt2helm] £10000. Boots - [dt2boots] £10000. Gloves - [dt2gloves] £10000. Chest - [dt2chest] £20000. Legs - [dt2legs] £15000. Wrist - [dt2wrist] £10000. Arms - [dt2arms] £10000. Full Set - [dt2set] £90000.");
}
if($text=~/dt2helm/i){
if ($buffbot >= 10000) {
quest::summonitem(25398);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-10000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt2boots/i){
if ($buffbot >= 10000) {
quest::summonitem(25404);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-10000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt2gloves/i){
if ($buffbot >= 10000) {
quest::summonitem(25402);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-10000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt2chest/i){
if ($buffbot >= 20000) {
quest::summonitem(25399);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-20000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt2legs/i){
if ($buffbot >= 15000) {
quest::summonitem(25403);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-15000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt2wrist/i){
if ($buffbot >= 10000) {
quest::summonitem(25401);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-10000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt2arms/i){
if ($buffbot >= 10000) {
quest::summonitem(25400);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-10000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt2set/i){
if ($buffbot >= 90000) {
quest::summonitem(25398);
quest::summonitem(25399);
quest::summonitem(25400);
quest::summonitem(25401);
quest::summonitem(25401);
quest::summonitem(25402);
quest::summonitem(25403);
quest::summonitem(25404);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-90000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dtier 3/i){
quest::say("I have the following to offer you:");
quest::say("Kerasha's Sylvan set. Helm - [dt2helm] £30000. Boots - [dt2boots] £30000. Gloves - [dt2gloves] £30000. Chest - [dt2chest] £60000. Legs - [dt2legs] £45000. Wrist - [dt2wrist] £30000. Arms - [dt2arms] £30000. Full Set - [dt2set] £240000.");
}
if($text=~/dt3helm/i){
if ($buffbot >= 30000) {
quest::summonitem(84144);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-30000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt3boots/i){
if ($buffbot >= 30000) {
quest::summonitem(84142);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-30000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt3gloves/i){
if ($buffbot >= 30000) {
quest::summonitem(84145);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-30000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt3chest/i){
if ($buffbot >= 60000) {
quest::summonitem(84148);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-60000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt3legs/i){
if ($buffbot >= 45000) {
quest::summonitem(84146);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-45000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt3wrist/i){
if ($buffbot >= 30000) {
quest::summonitem(84143);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-30000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt3arms/i){
if ($buffbot >= 30000) {
quest::summonitem(84147);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-10000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dt2set/i){
if ($buffbot >= 240000) {
quest::summonitem(84142);
quest::summonitem(84143);
quest::summonitem(84143);
quest::summonitem(84144);
quest::summonitem(84145);
quest::summonitem(84146);
quest::summonitem(84147);
quest::summonitem(84148);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-240000, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
if($text=~/dtier 4/i){
quest::say("I have the following to offer you:");
quest::say("Coming soon.");
}
if($text=~/dtier 5/i){
quest::say("I have the following to offer you:");
quest::say("Coming soon.");
}
if($text=~/dother/i){
quest::say("I have the following to offer you:");
quest::say("Coming soon.");
}
## Druid Items end ##
## Bard Items ##
if($text=~/bard/i){
quest::say("I have the following to offer you:");
quest::say("[BTier 1] items.");
quest::say("[BTier 2] items.");
quest::say("[BTier 3] items.");
quest::say("[BTier 4] items.");
quest::say("[BTier 5] items.");
quest::say("[BOther] items.");
}
## Bard Items end ##
## Cleric Items ##
if($text=~/cleric/i){
quest::say("I have the following to offer you:");
quest::say("[CTier 1] items.");
quest::say("[CTier 2] items.");
quest::say("[CTier 3] items.");
quest::say("[CTier 4] items.");
quest::say("[CTier 5] items.");
quest::say("[COther] items.");
}
## Cleric Items end ##
## Enchanter Items ##
if($text=~/enchanter/i){
quest::say("I have the following to offer you:");
quest::say("[ETier 1] items.");
quest::say("[ETier 2] items.");
quest::say("[ETier 3] items.");
quest::say("[ETier 4] items.");
quest::say("[ETier 5] items.");
quest::say("[EOther] items.");
}
## Enchanter Items end ##
## Wizard Items ##
if($text=~/wizard/i){
quest::say("I have the following to offer you:");
quest::say("[WTier 1] items.");
quest::say("[WTier 2] items.");
quest::say("[WTier 3] items.");
quest::say("[WTier 4] items.");
quest::say("[WTier 5] items.");
quest::say("[WOther] items.");
}
## Wizard Items end ##
### Skills Vendor Script ###
##Skills Vendor
##Created by Durge
sub EVENT_SAY
{
$skills = quest::saylink("skills");
if($text=~/stronger/i)
{
$client->Message(315,"$NPCNAME whispers to you, 'Hello there $name, are you here to purchase [$skills]?'");
}
if($text=~/skills/i)
{
$client->Message(315,"$NPCNAME whispers to you, 'Yes, for a price I can set your skills. For 1000 platinum all your class skills will be set to 100, for 2000 platinum your class skills will be set to 200, and for 3000 platinum your class skills will be set to 300, and for 4500 platinum ALL your skills will be set to 400.'");
}
}
sub EVENT_ITEM
{
if($platinum == 1000)
{
if($class eq 'Shadowknight')
{
if($ulevel >= 6)
{
quest::setskill(10, 100);
}
if($ulevel >= 10)
{
quest::setskill(19, 100);
}
if($ulevel >= 17)
{
quest::setskill(34, 100);
}
if($ulevel >= 20)
{
quest::setskill(20, 100);
}
if($ulevel >= 30)
{
quest::setskill(37, 100);
}
if($ulevel >= 40)
{
quest::setskill(16, 100);
}
}
if($class eq 'Warrior')
{
if($ulevel >= 6)
{
quest::setskill(10, 100);
quest::setskill(19, 100);
}
if($ulevel >= 10)
{
quest::setskill(34, 100);
}
if($ulevel >= 13)
{
quest::setskill(22, 100);
}
if($ulevel >= 15)
{
quest::setskill(20, 100);
}
if($ulevel >= 25)
{
quest::setskill(37, 100);
}
if($ulevel >= 35)
{
quest::setskill(16, 100);
}
}
if($class eq 'Necromancer' || $class eq 'Enchanter' || $class eq 'Magician' || $class eq 'Wizard')
{
if($ulevel >= 16)
{
quest::setskill(58, 100);
}
if($ulevel >= 20)
{
quest::setskill(43, 100);
quest::setskill(44, 100);
quest::setskill(45, 100);
quest::setskill(46, 100);
quest::setskill(47, 100);
$client->Message(315, "$NPCNAME whispers to you, 'Remember you can only have 1 specialization.'");
}
if($ulevel >= 22)
{
quest::setskill(19, 100);
}
}
if($class eq 'Cleric')
{
if($ulevel >= 25)
{
quest::setskill(10, 100);
}
}
if($class eq 'Shaman')
{
if($ulevel >= 25)
{
quest::setskill(59, 100);
}
}
if($class eq 'Druid')
{
if($ulevel >= 5)
{
quest::setskill(27, 100);
}
if($ulevel >= 20)
{
quest::setskill(53, 100);
}
}
if($class eq 'Druid' || $class eq 'Shaman' || $class eq 'Cleric')
{
if($ulevel >=15)
{
quest::setskill(19, 100);
}
if($ulevel >= 30)
{
quest::setskill(43, 100);
quest::setskill(44, 100);
quest::setskill(45, 100);
quest::setskill(46, 100);
quest::setskill(47, 100);
$client->Message(315, "$NPCNAME whispers to you, 'Remember you can only have 1 specialization.'");
}
}
if($class eq 'Rogue')
{
if($ulevel >= 4)
{
quest::setskill(19, 100);
}
if($ulevel >= 5)
{
quest::setskill(35, 100);
}
if($ulevel >= 7)
{
quest::setskill(48, 100);
}
if($ulevel >= 10)
{
quest::setskill(62, 100);
quest::setskill(8, 100);
}
if($ulevel >= 12)
{
quest::setskill(34, 100);
quest::setskill(39, 100);
}
if($ulevel >= 13)
{
quest::setskill(22, 100);
}
if($ulevel >= 15)
{
quest::setskill(17, 100);
}
if($ulevel >= 16)
{
quest::setskill(20, 100);
}
if($ulevel >= 18)
{
quest::setskill(6, 100);
}
if($ulevel >= 20)
{
quest::setskill(56, 100);
}
if($ulevel >= 22)
{
quest::setskill(71, 100);
}
if($ulevel >= 27)
{
quest::setskill(16, 100);
}
}
if($class eq 'Ranger')
{
if($ulevel >= 5)
{
quest::setskill(30, 100);
}
if($ulevel >= 8)
{
quest::setskill(19, 100);
}
if($ulevel >= 10)
{
quest::setskill(42, 100);
}
if($ulevel >= 17)
{
quest::setskill(22, 100);
}
if($ulevel >= 18)
{
quest::setskill(34, 100);
}
if($ulevel >= 20)
{
quest::setskill(20, 100);
}
if($ulevel >= 35)
{
quest::setskill(17, 100);
quest::setskill(37, 100);
}
}
if($class eq 'Monk')
{
if($ulevel >= 3)
{
quest::setskill(39, 100);
}
if($ulevel >= 5)
{
quest::setskill(38, 100);
}
if($ulevel >= 10)
{
quest::setskill(52, 100);
}
if($ulevel >= 12)
{
quest::setskill(11, 100);
}
if($ulevel >= 15)
{
quest::setskill(20, 100);
}
if($ulevel >= 17)
{
quest::setskill(28, 100);
}
if($ulevel >= 18)
{
quest::setskill(71, 100);
}
if($ulevel >= 20)
{
quest::setskill(23, 100);
}
if($ulevel >= 25)
{
quest::setskill(21, 100);
}
if($ulevel >= 27)
{
quest::setskill(17, 100);
}
if($ulevel >= 30)
{
quest::setskill(26, 100);
}
if($ulevel >= 35)
{
quest::setskill(37, 100);
}
}
if($class eq 'Bard')
{
if($ulevel >= 5)
{
quest::setskill(70, 100);
}
if($ulevel >= 8)
{
quest::setskill(49, 100);
}
if($ulevel >= 10)
{
quest::setskill(31, 100);
quest::setskill(35, 100);
}
if($ulevel >= 11)
{
quest::setskill(12, 100);
}
if($ulevel >= 12)
{
quest::setskill(27, 100);
}
if($ulevel >= 14)
{
quest::setskill(54, 100);
}
if($ulevel >= 15)
{
quest::setskill(62, 100);
}
if($ulevel >= 17)
{
quest::setskill(22, 100);
quest::setskill(42, 100);
}
if($ulevel >= 20)
{
quest::setskill(17, 100);
}
if($ulevel >= 24)
{
quest::setskill(39, 100);
}
if($ulevel >= 25)
{
quest::setskill(29, 100);
}
if($ulevel >= 26)
{
quest::setskill(71, 100);
}
if($ulevel >= 35)
{
quest::setskill(53, 100);
}
if($ulevel >= 53)
{
quest::setskill(34, 100);
}
if($ulevel >= 58)
{
quest::setskill(37, 100);
}
}
if($class eq 'Paladin')
{
if($ulevel >= 6)
{
quest::setskill(10, 100);
}
if($ulevel >= 10)
{
quest::setskill(19, 100);
}
if($ulevel >= 17)
{
quest::setskill(34, 100);
}
if($ulevel >= 20)
{
quest::setskill(20, 100);
}
if($ulevel >= 30)
{
quest::setskill(37, 100);
}
if($ulevel >= 40)
{
quest::setskill(16, 100);
}
}
if($class eq 'Beastlord')
{
if($ulevel >= 5)
{
quest::setskill(30, 100);
}
if($ulevel >= 10)
{
quest::setskill(19, 100);
}
if($ulevel >= 17)
{
quest::setskill(22, 100);
}
if($ulevel >= 25)
{
quest::setskill(11, 100);
}
if($ulevel >= 40)
{
quest::setskill(37, 100);
}
}
if($class eq 'Berserker')
{
if($ulevel >= 6)
{
quest::setskill(74, 100);
}
if($ulevel >= 10)
{
quest::setskill(19, 100);
}
if($ulevel >= 12)
{
quest::setskill(34, 100);
}
if($ulevel >= 15)
{
quest::setskill(20, 100);
}
if($ulevel >= 30)
{
quest::setskill(37, 100);
}
if($ulevel >= 35)
{
quest::setskill(16, 100);
}
}
}
elsif($platinum == 2000)
{
if($class eq 'Shadowknight')
{
if($ulevel >= 6)
{
quest::setskill(10, 200);
}
if($ulevel >= 10)
{
quest::setskill(19, 200);
}
if($ulevel >= 17)
{
quest::setskill(34, 200);
}
if($ulevel >= 20)
{
quest::setskill(20, 200);
}
if($ulevel >= 30)
{
quest::setskill(37, 200);
}
if($ulevel >= 40)
{
quest::setskill(16, 200);
}
}
if($class eq 'Warrior')
{
if($ulevel >= 6)
{
quest::setskill(10, 200);
quest::setskill(19, 200);
}
if($ulevel >= 10)
{
quest::setskill(34, 200);
}
if($ulevel >= 13)
{
quest::setskill(22, 200);
}
if($ulevel >= 15)
{
quest::setskill(20, 200);
}
if($ulevel >= 25)
{
quest::setskill(37, 200);
}
if($ulevel >= 35)
{
quest::setskill(16, 200);
}
}
if($class eq 'Necromancer' || $class eq 'Enchanter' || $class eq 'Magician' || $class eq 'Wizard')
{
if($ulevel >= 16)
{
quest::setskill(58, 200);
}
if($ulevel >= 20)
{
quest::setskill(43, 200);
quest::setskill(44, 200);
quest::setskill(45, 200);
quest::setskill(46, 200);
quest::setskill(47, 200);
$client->Message(315, "$NPCNAME whispers to you, 'Remember you can only have 1 specialization.'");
}
if($ulevel >= 22)
{
quest::setskill(19, 200);
}
}
if($class eq 'Cleric')
{
if($ulevel >= 25)
{
quest::setskill(10, 200);
}
}
if($class eq 'Shaman')
{
if($ulevel >= 25)
{
quest::setskill(59, 200);
}
}
if($class eq 'Druid')
{
if($ulevel >= 5)
{
quest::setskill(27, 200);
}
if($ulevel >= 20)
{
quest::setskill(53, 200);
}
}
if($class eq 'Druid' || $class eq 'Shaman' || $class eq 'Cleric')
{
if($ulevel >=15)
{
quest::setskill(19, 200);
}
if($ulevel >= 30)
{
quest::setskill(43, 200);
quest::setskill(44, 200);
quest::setskill(45, 200);
quest::setskill(46, 200);
quest::setskill(47, 200);
$client->Message(315, "$NPCNAME whispers to you, 'Remember you can only have 1 specialization.'");
}
}
if($class eq 'Rogue')
{
if($ulevel >= 4)
{
quest::setskill(19, 200);
}
if($ulevel >= 5)
{
quest::setskill(35, 200);
}
if($ulevel >= 7)
{
quest::setskill(48, 200);
}
if($ulevel >= 10)
{
quest::setskill(62, 200);
quest::setskill(8, 200);
}
if($ulevel >= 12)
{
quest::setskill(34, 200);
quest::setskill(39, 200);
}
if($ulevel >= 13)
{
quest::setskill(22, 200);
}
if($ulevel >= 15)
{
quest::setskill(17, 200);
}
if($ulevel >= 16)
{
quest::setskill(20, 200);
}
if($ulevel >= 18)
{
quest::setskill(6, 200);
}
if($ulevel >= 20)
{
quest::setskill(56, 200);
}
if($ulevel >= 22)
{
quest::setskill(71, 200);
}
if($ulevel >= 27)
{
quest::setskill(16, 200);
}
}
if($class eq 'Ranger')
{
if($ulevel >= 5)
{
quest::setskill(30, 200);
}
if($ulevel >= 8)
{
quest::setskill(19, 200);
}
if($ulevel >= 10)
{
quest::setskill(42, 200);
}
if($ulevel >= 17)
{
quest::setskill(22, 200);
}
if($ulevel >= 18)
{
quest::setskill(34, 200);
}
if($ulevel >= 20)
{
quest::setskill(20, 200);
}
if($ulevel >= 35)
{
quest::setskill(17, 200);
quest::setskill(37, 200);
}
}
if($class eq 'Monk')
{
if($ulevel >= 3)
{
quest::setskill(39, 200);
}
if($ulevel >= 5)
{
quest::setskill(38, 200);
}
if($ulevel >= 10)
{
quest::setskill(52, 200);
}
if($ulevel >= 12)
{
quest::setskill(11, 200);
}
if($ulevel >= 15)
{
quest::setskill(20, 200);
}
if($ulevel >= 17)
{
quest::setskill(28, 200);
}
if($ulevel >= 18)
{
quest::setskill(71, 200);
}
if($ulevel >= 20)
{
quest::setskill(23, 200);
}
if($ulevel >= 25)
{
quest::setskill(21, 200);
}
if($ulevel >= 27)
{
quest::setskill(17, 200);
}
if($ulevel >= 30)
{
quest::setskill(26, 200);
}
if($ulevel >= 35)
{
quest::setskill(37, 200);
}
}
if($class eq 'Bard')
{
if($ulevel >= 5)
{
quest::setskill(70, 200);
}
if($ulevel >= 8)
{
quest::setskill(49, 200);
}
if($ulevel >= 10)
{
quest::setskill(31, 200);
quest::setskill(35, 200);
}
if($ulevel >= 11)
{
quest::setskill(12, 200);
}
if($ulevel >= 12)
{
quest::setskill(27, 200);
}
if($ulevel >= 14)
{
quest::setskill(54, 200);
}
if($ulevel >= 15)
{
quest::setskill(62, 200);
}
if($ulevel >= 17)
{
quest::setskill(22, 200);
quest::setskill(42, 200);
}
if($ulevel >= 20)
{
quest::setskill(17, 200);
}
if($ulevel >= 24)
{
quest::setskill(39, 200);
}
if($ulevel >= 25)
{
quest::setskill(29, 200);
}
if($ulevel >= 26)
{
quest::setskill(71, 200);
}
if($ulevel >= 35)
{
quest::setskill(53, 200);
}
if($ulevel >= 53)
{
quest::setskill(34, 200);
}
if($ulevel >= 58)
{
quest::setskill(37, 200);
}
}
if($class eq 'Paladin')
{
if($ulevel >= 6)
{
quest::setskill(10, 200);
}
if($ulevel >= 10)
{
quest::setskill(19, 200);
}
if($ulevel >= 17)
{
quest::setskill(34, 200);
}
if($ulevel >= 20)
{
quest::setskill(20, 200);
}
if($ulevel >= 30)
{
quest::setskill(37, 200);
}
if($ulevel >= 40)
{
quest::setskill(16, 200);
}
}
if($class eq 'Beastlord')
{
if($ulevel >= 5)
{
quest::setskill(30, 200);
}
if($ulevel >= 10)
{
quest::setskill(19, 200);
}
if($ulevel >= 17)
{
quest::setskill(22, 200);
}
if($ulevel >= 25)
{
quest::setskill(11, 200);
}
if($ulevel >= 40)
{
quest::setskill(37, 200);
}
}
if($class eq 'Berserker')
{
if($ulevel >= 6)
{
quest::setskill(74, 200);
}
if($ulevel >= 10)
{
quest::setskill(19, 200);
}
if($ulevel >= 12)
{
quest::setskill(34, 200);
}
if($ulevel >= 15)
{
quest::setskill(20, 200);
}
if($ulevel >= 30)
{
quest::setskill(37, 200);
}
if($ulevel >= 35)
{
quest::setskill(16, 200);
}
}
}
elsif($platinum == 3000)
{
if($class eq 'Shadowknight')
{
if($ulevel >= 6)
{
quest::setskill(10, 300);
}
if($ulevel >= 10)
{
quest::setskill(19, 300);
}
if($ulevel >= 17)
{
quest::setskill(34, 300);
}
if($ulevel >= 20)
{
quest::setskill(20, 300);
}
if($ulevel >= 30)
{
quest::setskill(37, 300);
}
if($ulevel >= 40)
{
quest::setskill(16, 300);
}
}
if($class eq 'Warrior')
{
if($ulevel >= 6)
{
quest::setskill(10, 300);
quest::setskill(19, 300);
}
if($ulevel >= 10)
{
quest::setskill(34, 300);
}
if($ulevel >= 13)
{
quest::setskill(22, 300);
}
if($ulevel >= 15)
{
quest::setskill(20, 300);
}
if($ulevel >= 25)
{
quest::setskill(37, 300);
}
if($ulevel >= 35)
{
quest::setskill(16, 300);
}
}
if($class eq 'Necromancer' || $class eq 'Enchanter' || $class eq 'Magician' || $class eq 'Wizard')
{
if($ulevel >= 16)
{
quest::setskill(58, 300);
}
if($ulevel >= 20)
{
quest::setskill(43, 300);
quest::setskill(44, 300);
quest::setskill(45, 300);
quest::setskill(46, 300);
quest::setskill(47, 300);
$client->Message(315, "$NPCNAME whispers to you, 'Remember you can only have 1 specialization.'");
}
if($ulevel >= 22)
{
quest::setskill(19, 300);
}
}
if($class eq 'Cleric')
{
if($ulevel >= 25)
{
quest::setskill(10, 300);
}
}
if($class eq 'Shaman')
{
if($ulevel >= 25)
{
quest::setskill(59, 300);
}
}
if($class eq 'Druid')
{
if($ulevel >= 5)
{
quest::setskill(27, 300);
}
if($ulevel >= 20)
{
quest::setskill(53, 300);
}
}
if($class eq 'Druid' || $class eq 'Shaman' || $class eq 'Cleric')
{
if($ulevel >=15)
{
quest::setskill(19, 300);
}
if($ulevel >= 30)
{
quest::setskill(43, 300);
quest::setskill(44, 300);
quest::setskill(45, 300);
quest::setskill(46, 300);
quest::setskill(47, 300);
$client->Message(315, "$NPCNAME whispers to you, 'Remember you can only have 1 specialization.'");
}
}
if($class eq 'Rogue')
{
if($ulevel >= 4)
{
quest::setskill(19, 300);
}
if($ulevel >= 5)
{
quest::setskill(35, 300);
}
if($ulevel >= 7)
{
quest::setskill(48, 300);
}
if($ulevel >= 10)
{
quest::setskill(62, 300);
quest::setskill(8, 300);
}
if($ulevel >= 12)
{
quest::setskill(34, 300);
quest::setskill(39, 300);
}
if($ulevel >= 13)
{
quest::setskill(22, 300);
}
if($ulevel >= 15)
{
quest::setskill(17, 300);
}
if($ulevel >= 16)
{
quest::setskill(20, 300);
}
if($ulevel >= 18)
{
quest::setskill(6, 300);
}
if($ulevel >= 20)
{
quest::setskill(56, 300);
}
if($ulevel >= 22)
{
quest::setskill(71, 300);
}
if($ulevel >= 27)
{
quest::setskill(16, 300);
}
}
if($class eq 'Ranger')
{
if($ulevel >= 5)
{
quest::setskill(30, 300);
}
if($ulevel >= 8)
{
quest::setskill(19, 300);
}
if($ulevel >= 10)
{
quest::setskill(42, 300);
}
if($ulevel >= 17)
{
quest::setskill(22, 300);
}
if($ulevel >= 18)
{
quest::setskill(34, 300);
}
if($ulevel >= 20)
{
quest::setskill(20, 300);
}
if($ulevel >= 35)
{
quest::setskill(17, 300);
quest::setskill(37, 300);
}
}
if($class eq 'Monk')
{
if($ulevel >= 3)
{
quest::setskill(39, 300);
}
if($ulevel >= 5)
{
quest::setskill(38, 300);
}
if($ulevel >= 10)
{
quest::setskill(52, 300);
}
if($ulevel >= 12)
{
quest::setskill(11, 300);
}
if($ulevel >= 15)
{
quest::setskill(20, 300);
}
if($ulevel >= 17)
{
quest::setskill(28, 300);
}
if($ulevel >= 18)
{
quest::setskill(71, 300);
}
if($ulevel >= 20)
{
quest::setskill(23, 300);
}
if($ulevel >= 25)
{
quest::setskill(21, 300);
}
if($ulevel >= 27)
{
quest::setskill(17, 300);
}
if($ulevel >= 30)
{
quest::setskill(26, 300);
}
if($ulevel >= 35)
{
quest::setskill(37, 300);
}
}
if($class eq 'Bard')
{
if($ulevel >= 5)
{
quest::setskill(70, 300);
}
if($ulevel >= 8)
{
quest::setskill(49, 300);
}
if($ulevel >= 10)
{
quest::setskill(31, 300);
quest::setskill(35, 300);
}
if($ulevel >= 11)
{
quest::setskill(12, 300);
}
if($ulevel >= 12)
{
quest::setskill(27, 300);
}
if($ulevel >= 14)
{
quest::setskill(54, 300);
}
if($ulevel >= 15)
{
quest::setskill(62, 300);
}
if($ulevel >= 17)
{
quest::setskill(22, 300);
quest::setskill(42, 300);
}
if($ulevel >= 20)
{
quest::setskill(17, 300);
}
if($ulevel >= 24)
{
quest::setskill(39, 300);
}
if($ulevel >= 25)
{
quest::setskill(29, 300);
}
if($ulevel >= 26)
{
quest::setskill(71, 300);
}
if($ulevel >= 35)
{
quest::setskill(53, 300);
}
if($ulevel >= 53)
{
quest::setskill(34, 300);
}
if($ulevel >= 58)
{
quest::setskill(37, 300);
}
}
if($class eq 'Paladin')
{
if($ulevel >= 6)
{
quest::setskill(10, 300);
}
if($ulevel >= 10)
{
quest::setskill(19, 300);
}
if($ulevel >= 17)
{
quest::setskill(34, 300);
}
if($ulevel >= 20)
{
quest::setskill(20, 300);
}
if($ulevel >= 30)
{
quest::setskill(37, 300);
}
if($ulevel >= 40)
{
quest::setskill(16, 300);
}
}
if($class eq 'Beastlord')
{
if($ulevel >= 5)
{
quest::setskill(30, 300);
}
if($ulevel >= 10)
{
quest::setskill(19, 300);
}
if($ulevel >= 17)
{
quest::setskill(22, 300);
}
if($ulevel >= 25)
{
quest::setskill(11, 300);
}
if($ulevel >= 40)
{
quest::setskill(37, 300);
}
}
if($class eq 'Berserker')
{
if($ulevel >= 6)
{
quest::setskill(74, 300);
}
if($ulevel >= 10)
{
quest::setskill(19, 300);
}
if($ulevel >= 12)
{
quest::setskill(34, 300);
}
if($ulevel >= 15)
{
quest::setskill(20, 300);
}
if($ulevel >= 30)
{
quest::setskill(37, 300);
}
if($ulevel >= 35)
{
quest::setskill(16, 300);
}
}
}
elsif($platinum == 4500)
{
quest::setallskill(400);
}
else
{
$client->Message(315, "$NPCNAME whispers to you, 'This is not what I want.'");
plugin::return_items(\%itemcount);
}
}
### Vendor Script End ###
## Translocator Script ###
#Translocator for Multiple Zones
#Array for all available zones to be sent to
@ZoneList = qw(
cazicthule
akanon
bothunder
befallen
blackburrow
cabeast
cabwest
mistmoore
chardok
thurgadina
veksar
cobaltscar
crystal
dalnir
necropolis
dreadlands
dulak
freporte
echo
erudnext
unrest
everfrost
fieldofbone
fungusgrove
greatdivide
grobb
guktop
halas
highkeep
charasis
paw
kael
kaesora
karnor
kurn
lakeofillomen
nurga
soldungb
najena
nexus
freportn
nro
oggok
sebilis
permafrost
airplane
fearplane
growthplane
hateplane
poinnovation
poknowledge
mischiefplane
ponightmare
postorms
povalor
qeytoqrg
rivervale
runnyeye
shadowhaven
skyshrine
soldunga
sro
felwitheb
ssratemple
qrg
acrylia
arena
burningwood
citymist
sharvahl
nadox
dawnshroud
thegrey
gunthak
hole
jaggedpine
maiden
overthere
paludal
podisease
hateplaneb
pojustice
scarlet
umbral
frozenshadow
poeartha
velketor
vexthal
warrens
warslikswood
freportw
);
sub EVENT_SAY{
#Spacer between Text messages to make them easier to read
$client->Message(7, "-");
my $NPCName = $npc->GetCleanName();
if ($text =~/translocator/i)
{
$client->Message(315, "$NPCName whispers to you, 'If there is a zone you would like to go to, just tell me the short name of it and I will see if I have a spell to send you there. If you do not know the full name, just type part of the name to search my list of possible zones. Or, I can list [all] of them if you like.'");
}
#Counts each row for the While
my $count = 1;
#Counts each element in the Array for the While
my $n = 0;
if ($text !~ /translocator/i)
{
#Use scalar form of Array
while ($ZoneList[$n])
{
#This uses the lc() function in perl to convert anything typed into all lowercase, since that is what the zone list is
#If the zone name contains part of the text said, or if the player wants to list all possible zones we list them
if (($ZoneList[$n] =~ lc($text) && $ZoneList[$n] ne lc($text)) || ($text =~ /^All$/i))
{
my $ZoneName = $ZoneList[$n];
$client->Message(315, "$NPCName whispers to you, 'Possible match is: $ZoneName");
}
#If they say the full name of one of the zones in the Array, or click one of the saylinks, port them to the safe loc there
if ($ZoneList[$n] eq lc($text) && $text !~ /^All$/i)
{
$client->Message(315, "$NPCName whispers to you, 'Enjoy your adventure!'");
$client->Message(6, "$NPCName casts a spell to translocate you to another place.");
quest::zone("$ZoneList[$n]");
}
$n++;
$count++;
}
}
}
## Translocator Script End ###
## Credit System Script ##
sub EVENT_ITEM {
#give a plat, get a credit. Takes any platinum over 1.
if($platinum >= 1){
quest::setglobal("buffbot", $buffbot+$platinum, 0, "Y9");
quest::say("Your credit has been increased by $platinum.");
$buffbot = undef;
quest::settimer(1,1);
}
else {
quest::say("I only accept platinum.");
$buffbot = undef;
}
plugin::return_items(\%itemcount);
}
sub EVENT_TIMER {
if ($timer == 1) {
quest::say("Would you like to know your total [credit value]?");
quest::stoptimer(1);
}
## Credit System Script ends ##
}
}
## End of Script ##
By the way, what I'm doing really is making a way to blow tons of plat so if you're playing single player or with one other, there is a way to get decent gear at the expense of pp. Not done yet but I would like to get it to work as is for now until I complete it. Thanks for the help, and I left all credits in the script where due.
__________________
U.S. Navy - Retired
17 Year EQ Veteran
|