|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Custom Custom Quests here |
|
|
|
11-29-2017, 11:57 PM
|
|
Discordant
|
|
Join Date: Apr 2014
Posts: 279
|
|
Armor Crates
Hey all.
For my custom "tutorial" zone I was wanting a way to make sure players got a full set of starter gear without having to farm for specific pieces due to them not dropping the first time around. I've made a solution that can be applicable to a ton of other situations and I thought it would be useful to other server developers.
Instead of having gear drop that may or may not suit the player's class, you can have these "loot crates" drop that will award the player a piece of gear suitable to their class every time. Well worth the extra work in my opinion.
Here's how:
I have a set of gear using a modified version of kingly krab's set generation scripts found here.
I copied the blank armor set "Glowing Othni" from live and added a BLANK spell to it, mainly for the description, but also very important that the item is listed as itemtype "21". This is so the item is consumed upon use of its 1 charge.
Please ignore the current description as I'm lazy and just copied an existing spell I was using for AA tokens.
On each piece of this new glowing othni set I set the script file ID to 1, as that is the name of the script I'm currently using. Note: The check at the bottom is because all set pieces awarded through this script are Lore items.
quests/global/items/script_1.pl
Code:
sub EVENT_ITEM_CLICK {
#:: Dragonscale Set #########################################
if($itemid == 135056) { #:: Chest
my %ArmorList = (
"Warrior" => 135015,
"Cleric" => 135015,
"Paladin" => 135015,
"Ranger" => 135008,
"Shadowknight" => 135015,
"Druid" => 135022,
"Monk" => 135029,
"Bard" => 135015,
"Rogue" => 135008,
"Shaman" => 135008,
"Necromancer" => 135001,
"Wizard" => 135001,
"Magician" => 135001,
"Enchanter" => 135001,
"Beastlord" => 135022,
"Berserker" => 135008);
$ItemToSummon = $ArmorList{$class};
}
if($itemid == 135052) { #:: Legs
my %ArmorList = (
"Warrior" => 135018,
"Cleric" => 135018,
"Paladin" => 135018,
"Ranger" => 135011,
"Shadowknight" => 135018,
"Druid" => 135025,
"Monk" => 135032,
"Bard" => 135018,
"Rogue" => 135011,
"Shaman" => 135011,
"Necromancer" => 135004,
"Wizard" => 135004,
"Magician" => 135004,
"Enchanter" => 135004,
"Beastlord" => 135025,
"Berserker" => 135011);
$ItemToSummon = $ArmorList{$class};
}
if($itemid == 135050) { #:: Feet
my %ArmorList = (
"Warrior" => 135019,
"Cleric" => 135019,
"Paladin" => 135019,
"Ranger" => 135012,
"Shadowknight" => 135019,
"Druid" => 135026,
"Monk" => 135033,
"Bard" => 135019,
"Rogue" => 135012,
"Shaman" => 135012,
"Necromancer" => 135005,
"Wizard" => 135005,
"Magician" => 135005,
"Enchanter" => 135005,
"Beastlord" => 135026,
"Berserker" => 135012);
$ItemToSummon = $ArmorList{$class};
}
if($itemid == 135055) { #:: Hands
my %ArmorList = (
"Warrior" => 135020,
"Cleric" => 135020,
"Paladin" => 135020,
"Ranger" => 135013,
"Shadowknight" => 135020,
"Druid" => 135027,
"Monk" => 135034,
"Bard" => 135020,
"Rogue" => 135013,
"Shaman" => 135013,
"Necromancer" => 135006,
"Wizard" => 135006,
"Magician" => 135006,
"Enchanter" => 135006,
"Beastlord" => 135027,
"Berserker" => 135013);
$ItemToSummon = $ArmorList{$class};
}
#:: Dragonscale Set End #####################################
$client->Message(15, "Armor DEBUG: " . $ItemToSummon . "");
if(plugin::check_hasitem($client,$ItemToSummon)) {
$client->Message(15, "ERROR: Claiming this item would result in a lore item.");
$client->SummonItem($itemid, 1);
}
else {
$client->SummonItem($ItemToSummon, 1);
}
}
|
|
|
|
11-30-2017, 09:47 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,595
|
|
You can also just make a spell like the Phantom Plate spell and have it summon a bag full of gear. Or add entries to the starting_items table to make them spawn in fully equipped so they don’t have to farm at all.
|
12-01-2017, 05:13 AM
|
|
Discordant
|
|
Join Date: Apr 2014
Posts: 279
|
|
Quote:
Originally Posted by Kingly_Krab
You can also just make a spell like the Phantom Plate spell and have it summon a bag full of gear. Or add entries to the starting_items table to make them spawn in fully equipped so they don’t have to farm at all.
|
That's bad design. The point of this is for the players to actually play the game to get the gear. Can also be used for raid gearing etc.
|
12-01-2017, 11:32 AM
|
Fire Beetle
|
|
Join Date: Oct 2017
Location: Calgary
Posts: 3
|
|
Quote:
Originally Posted by Splose
That's bad design. The point of this is for the players to actually play the game to get the gear. Can also be used for raid gearing etc.
|
Guess that all depends on what the players on the server want.Many times I have seen someone log on to a server and ask where the starter gear is.
|
12-01-2017, 02:43 PM
|
|
Discordant
|
|
Join Date: Apr 2014
Posts: 279
|
|
Quote:
Originally Posted by Stu
Guess that all depends on what the players on the server want.Many times I have seen someone log on to a server and ask where the starter gear is.
|
Which, again, is bad design. Players always want instant gratification which in turn makes them bored in the long run and more likely to just leave your server to never return.
This whole thing is getting off-topic.. I used my specific example of what I was using this for as a tutorial zone to outline one of the many possibilities this could be used for. Kingly and I have a history and every time I make a contribution he has to try and one up me. There are many ways to do things if you don't want to use it then don't.
|
12-02-2017, 12:56 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,595
|
|
I wasn’t trying to one up you at all. I was just giving my feedback as well as alternative methods to achieve similar results.
|
|
|
|
02-22-2018, 05:09 PM
|
Fire Beetle
|
|
Join Date: Aug 2010
Posts: 14
|
|
not trying to one up you, but this is a bit more of a easier way of doing what you were trying to do...
Code:
sub EVENT_ITEM_CLICK {
%ItemDB = (
#Plate #Chest #Legs #Feet #Hands
"Warrior" => {135056 => 135015 , 135052 => 135018, 135050 => 135019, 135055 => 135020},
"Cleric" => {135056 => 135015 , 135052 => 135018, 135050 => 135019, 135055 => 135020},
"Shadowknight" => {135056 => 135015 , 135052 => 135018, 135050 => 135019, 135055 => 135020},
"Bard" => {135056 => 135015 , 135052 => 135018, 135050 => 135019, 135055 => 135020},
#Chain
"Ranger" => {135056 => 135008 , 135052 => 135011, 135050 => 135012, 135055 => 135013},
"Rogue" => {135056 => 135008 , 135052 => 135011, 135050 => 135012, 135055 => 135013},
"Shaman" => {135056 => 135008 , 135052 => 135011, 135050 => 135012, 135055 => 135013},
"Berserker" => {135056 => 135008 , 135052 => 135011, 135050 => 135012, 135055 => 135013},
#Leather
"Druid" => {135056 => 135022 , 135052 => 135025, 135050 => 135026, 135055 => 135027},
"Beastlord" => {135056 => 135022 , 135052 => 135025, 135050 => 135026, 135055 => 135027},
"Monk" => {135056 => 135029 , 135052 => 135032, 135050 => 135033, 135055 => 135034}, #Monks use a completely diffrent set than anyone else... no clue..
#Cloth
"Necromancer" => {135056 => 135001 , 135052 => 135004, 135050 => 135005, 135055 => 135006},
"Wizard" => {135056 => 135001 , 135052 => 135004, 135050 => 135005, 135055 => 135006},
"Magician" => {135056 => 135001 , 135052 => 135004, 135050 => 135005, 135055 => 135006},
"Enchanter" => {135056 => 135001 , 135052 => 135004, 135050 => 135005, 135055 => 135006}
);
$ItemToSummon = $ItemDB{$class}{$itemid};
$client->Message(15, "Armor DEBUG: " . $ItemToSummon . "");
if(plugin::check_hasitem($client,$ItemToSummon)) {
$client->Message(15, "ERROR: Claiming this item would result in a lore item.");
$client->SummonItem($itemid, 1);
}
else {
$client->SummonItem($ItemToSummon, 1);
}
}
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 03:46 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|