|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
|
|
|
08-02-2015, 07:02 PM
|
Fire Beetle
|
|
Join Date: Jul 2015
Posts: 28
|
|
Quest::autoinventory()
Is there a command like listed above so i could do something like :
Code:
sub EVENT_SAY {
$upgrade = quest::saylink("upgrade",1);
$sure = quest::saylink("sure",1);
if ($text=~/hail/i) {
plugin::Whisper("I have a few gifts for you.");
quest::summonitem(1050, 2);
quest::autoinventory(); ##sends item to next open slot
quest::summonitem(2000, 1);
quest::autoinventory(); ##sends item to next open slot
quest::summonitem(1233, 1);
quest::autoinventory(); ##sends item to next open slot
quest::summonitem(9956, 3);
quest::autoinventory(); ##sends item to next open slot
quest::summonitem(5797, 1);
quest::autoinventory(); ##sends item to next open slot
quest::summonitem(6127, 5);
quest::autoinventory(); ##sends item to next open slot
}
}
Reason for this is im finding that a mass item summon causes the client to get confused about certain items and only way to fix this is to zone, on some of my events where the items are only needed for maybe 2 minutes its a pain to force players to have to leave and come back just to right their inventory...
|
|
|
|
08-02-2015, 09:17 PM
|
|
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
This could be done through perl, I could try putting something together for you if you want.
Was bored and wrote a thing.... and this should work I hope (may want to do some testing :p)
I tested it for awhile and it seemed to work fine for me
Place this inside the plugins folder...
https://perl.pastebin.mozilla.org/8841427
This is an example quest.. that uses it...
Code:
sub EVENT_SAY {
if($text=~/hail/i) {
plugin::Whisper("FREE SHIT BRO");
$client->Message(315, "::" . quest::saylink("summon shit",1));
} elsif($text=~/summon shit/i) {
plugin::summon_into_inventory($client, 9990, 60); #60 skin of milk.
}
}
Last edited by NatedogEZ; 08-02-2015 at 11:40 PM..
|
08-03-2015, 08:46 AM
|
|
Dragon
|
|
Join Date: Nov 2008
Location: GA
Posts: 904
|
|
Nice.
10char
|
08-03-2015, 08:47 AM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
Yes, it does.
|
08-03-2015, 08:48 AM
|
|
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
Quote:
Originally Posted by Kingly_Krab
Yes, it does.
|
This
Also in the code I left a few comments to describe the code a bit.. like the comment at the bottom
"#NO MORE VALID SLOTS... time to summon the rest to cursor..."
:p
|
|
|
|
09-27-2015, 12:15 PM
|
Hill Giant
|
|
Join Date: Jun 2010
Posts: 231
|
|
Nate, Do you know of any easy way to completely strip a toon of all inventoried gear and money and set them back to level 1? Here's my example:
Code:
sub EVENT_SAY {
if($text=~/hail/i){
quest::say("Welcome, young mortal. Word of your deeds has preceded your arrival. Your intentions seem honorable, young one, however my trust is not an easy thing to win these days. Like you, there has been another that came before me with the trust of the dragon kin, and trust them too I did, but alas that proved to be destructive. I note your deeds to this shrine young one, but should you wish my counsel, you must prove your worth beyond doubt. Perhaps a small challenge shall be of interest to you?");
}
elsif($text=~/i wish to prove my worth/i){
quest::say("Then as agreed, young mortal, I will grant you one chance to prove your worth in my eyes. The Storm King Tormax sits on a throne carved from the skull of one of our fallen within the city of Kael, which disgraces the mighty children of Veeshan. His life alone is a blight upon the children of Veeshan. Should you be a true patriot to our cause, I seek of you but one task. Should you succeed in this task, not only will your actions offset the balance of this war in our favor, but will surely take a step in driving the vileness of the giants from our noble lands. Bring me, young one, the head of Tormax, and then we shall speak further.");
}
elsif($text=~/treasure/i){
quest::say("This sword is a symbol of our evolution and ancient heritage. Back when our feathered relatives were not so distant, a sword was forged and enchanted with the spirit of an elder griffin. This noble griffin bound his soul to the sword, the essence of his being honing the blade to an edge imperceptible to mortal eyes. Although our races have evolved away from each other, we still hold them in high regard. But if you think you are not worthy to wield this honor, return the sword to me and I have other tokens you may find of more use. Perhaps if you want, I can imbue you with the power of the [dragons].");
}
elsif($text=~/dragons/i && $qglobals{"dragon"} == 0) {
quest::say("I will only offer this once, but I can inject the power of the dragons into your veins. You will suffer a little discomfort and will have to be reborn. However, your class will determing your color which will also determine your dragon roar! So which is it? [Yes] or [No]?");
quest::setglobal("dragon", "1", 5, 'F');
}
elsif($text=~/dragons/i && $qglobals{"dragon"} == 1) {
quest::say("Too late, i'm done with you.");
}
elsif($text=~/yes/i){
quest::say("Welcome to the Clan of Veeshan!");
quest::setglobal("dragon1", "1", 5, 'F');
quest::faction(42,+7500); # claws of veeshan
quest::faction(362,+7500); # yelinak
quest::faction(189,-1000); # zek
quest::faction(504,-10000);
quest::faction(130,-10000);
if($class eq 'Warrior'){quest::playerrace(184);
quest::summonitem(1591);
quest::playertexture(2);}
elsif($class eq 'Cleric'){quest::playerrace(195);
quest::summonitem(1655);
quest::playertexture(0);}
elsif($class eq 'Paladin'){quest::playerrace(195);
quest::summonitem(1655);
quest::playertexture(0);}
elsif($class eq 'Ranger'){quest::playerrace(184);
quest::summonitem(1656);
quest::playertexture(0);}
elsif($class eq 'Shadowknight'){quest::playerrace(19);
quest::summonitem(1592);}
elsif($class eq 'Druid'){quest::playerrace(165);
quest::summonitem(1591);
quest::playertexture(0);}
elsif($class eq 'Monk'){quest::playerrace(184);
quest::summonitem(1660);
quest::playertexture(1);}
elsif($class eq 'Bard'){quest::playerrace(184);
quest::summonitem(1654);
quest::playertexture(4);}
elsif($class eq 'Rogue'){quest::playerrace(195);
quest::summonitem(1660);
quest::playertexture(1);}
elsif($class eq 'Shaman'){quest::playerrace(165);
quest::summonitem(1659);
quest::playertexture(1);}
elsif($class eq 'Necromancer'){quest::playerrace(19);
quest::summonitem(1592);}
elsif($class eq 'Wizard'){quest::playerrace(195);
quest::summonitem(1591);
quest::playertexture(1);}
elsif($class eq 'Magician'){quest::playerrace(192);
quest::summonitem(1591);
quest::playertexture(0);}
elsif($class eq 'Enchanter'){quest::playerrace(165);
quest::summonitem(1659);
quest::playertexture(1);}
elsif($class eq 'Beastlord'){quest::playerrace(165);
quest::summonitem(1659);
quest::playertexture(0);}
elsif($class eq 'Berserker'){quest::playerrace(165);
quest::summonitem(1660);
quest::playertexture(0);}
}
}
}
elsif($text=~/no/i){
quest::say("That is to bad. Be gone mortal!");
quest::setglobal("dragon1", "0", 5, 'F');
quest::faction(42,-7500); # claws of veeshan
quest::faction(362,-7500); # yelinak
quest::faction(189,+1000); # zek
}
}
else {
quest::say("You have yet to prove your loyalty to me, $race. Return to me when you have done so."); # Text made up
}
}
sub EVENT_ITEM {
if ($faction <= 3) { # require kindly faction
if(plugin::check_handin(\%itemcount, 30516 => 1)){
quest::emote("watches as you drop the colossal head of King Tormax to the ground before him. You sense intense hatred within Yelinak as he stares down at the bloody remains of a descendent of the one who slew his mate. Obviously the death of Tormax has done little to console the ancient snow dragon. Finally Yelinak speaks,");
quest::say("I look upon this face, and even though he is dead, the hatred burns on. My grief and anger are unchanged even in the face of ultimate fate. His grandfathers act was so despicable and all-encompassing that it instilled an... immortal loathing. Nevertheless, you have completed the task I set before you and, as such, you deserve my gratitude. Please accept this [treasure].");
quest::summonitem(29647);
}
elsif(plugin::check_handin(\%itemcount, 29647 => 1)){
quest::say("I lost the scales that made these boots in a battle with Tormaxs minions. The casters of the shrine gathered these fallen scales up and fashioned a very powerful enchantment into these boots.");
quest::summonitem(29645);
}
elsif(plugin::check_handin(\%itemcount, 29645 => 1)){
quest::say("This helm was created by our smiths and enchanted by the priests of the shrine to provide protection to our new allies who have found that their heads are much more fragile than those of our kin.");
quest::summonitem(29648);
}
elsif(plugin::check_handin(\%itemcount, 29648 => 1)){
quest::say("This sword is a symbol of our evolution and ancient heritage. Back when our feathered relatives were not so distant, a sword was forged and enchanted with the spirit of an elder griffin. This noble griffin bound his soul to the sword, the essence of his being honing the blade to an edge imperceptible to mortal eyes. Although our races have evolved away from each other, we still hold them in high regard. But if you think you are not worthy to wield this honor, return the sword to me and I have other tokens you may find of more use.");
quest::summonitem(29647);
}
}
else {
quest::say("I do not know you well enough to entrust you with such an item, yet.");
}
plugin::return_items(\%itemcount);
}
#Zone : skyshrine : NPC_ID : 114106 : Lord Yelinak
This is gonna act as a prestige mode. Once they decide to change races then they get a custom item , race, texture and reset to level 1.
Last edited by Maceblade; 09-27-2015 at 12:18 PM..
Reason: did something weird to window...
|
|
|
|
11-23-2015, 03:31 AM
|
|
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
Bump for a lua version of this...
http://wiki.eqemulator.org/i?Module=...Paste=aJ7HOI90
name that "custom.lua" and place it into the /lua_modules/ folder...
When using it here is an example... that loads a naked character with 8 bags and 100 food / water
Place that on a random NPC.. hail it and magic should happen! :p
This is just a basic example :p
If there is no where for the item to go.. it will just default to the cursor as well!
Code:
function event_say(e)
local custom = require("custom");
custom.summon_into_inventory(e.other, 17403, 8);
custom.summon_into_inventory(e.other, 13005, 100);
custom.summon_into_inventory(e.other, 13006, 100);
end
|
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 09:39 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|