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

10-17-2011, 05:46 PM
|
Hill Giant
|
|
Join Date: May 2010
Posts: 105
|
|
Fabled spawn code
On my server, I am getting rid of the old /camp out to repop zone. I deleted all PH so named are the only one in their spawn table. Now, instead of fabled sharing a spawn, I want to make it so that once you kill the named, you have a 5% chance of making its death spawn the fabled version. (right now it is set to 70% for testing below) Here is my script. Please tell me why its not working. Also, is there a way I can code it so that it /Emotes something to the server the first time it has been killed? Thanks!
Code:
sub EVENT_DEATH{
my $random_result = int(rand(100));
my $a=63096; #npc - Fabled Garanel Rucksif
if(($random_result<70){
quest::say("Spawning Fabled");
quest::shout ("I will be Avenged Scoundrel!");
quest::spawn2($a, 485, 147, -33);
}else{
quest::say("No spawn");
}
|

10-17-2011, 06:00 PM
|
Sarnak
|
|
Join Date: Dec 2007
Posts: 60
|
|
Did you use a SQL query or edit the mobs out by hand?
looks like you are missing a close bracket
Code:
sub EVENT_DEATH{
my $random_result = int(rand(100));
my $a=63096; #npc - Fabled Garanel Rucksif
if(($random_result<70){
quest::say("Spawning Fabled");
quest::shout ("I will be Avenged Scoundrel!");
quest::spawn2($a, 485, 147, -33);
}else{
quest::say("No spawn");
}
}
To troubleshoot, why not add in...
Code:
sub EVENT_DEATH{
my $random_result = int(rand(100));
my $a=63096; #npc - Fabled Garanel Rucksif
if(($random_result<70){
quest::shout ("$random_result");
quest::say("Spawning Fabled");
quest::shout ("I will be Avenged Scoundrel!");
quest::spawn2($a, 485, 147, -33);
}else{
quest::say("No spawn");
quest::shout ("$random_result");
}
}
sorry I'm not much help 
|
 |
|
 |

10-17-2011, 06:03 PM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
Syntax-wise, you have an extra opening parenthesis and a missing closing curly bracket. This is a syntactically correct version:
Code:
sub EVENT_DEATH
{
my $random_result = int(rand(100));
my $a=63096; #npc - Fabled Garanel Rucksif
if($random_result<70)
{
quest::say("Spawning Fabled");
quest::shout ("I will be Avenged Scoundrel!");
quest::spawn2($a, 485, 147, -33);
}
else
{
quest::say("No spawn");
}
}
To find those issues, all I did was copy your code into a file called, e.g. D:\temp\test.pl, launched a command window and ran it through Perl like so:
Code:
D:\temp>perl test.pl
syntax error at test.pl line 4, near "){"
syntax error at test.pl line 8, near "}else"
Missing right curly or square bracket at test.pl line 10, at end of line
Execution of test.pl aborted due to compilation errors.
That won't tell you if it will work in-game, but it will catch any syntax errors for you.
If it terminates with no messages, you know your syntax is good.
Last edited by Derision; 10-17-2011 at 06:09 PM..
|
 |
|
 |

10-17-2011, 06:10 PM
|
Hill Giant
|
|
Join Date: May 2010
Posts: 105
|
|
ok, derision's works, I think I need 6 numbers in the spawn loc instead of 3 to spawn the fabled, if I add in 0, 0, 0 to the back of the spawn loc it adds him under the world.
Code:
sub EVENT_DEATH
{
my $random_result = int(rand(100));
my $a=63096; #npc - Fabled Garanel Rucksif
if($random_result<70)
{
quest::say("Spawning Fabled");
quest::shout ("I will be Avenged Scoundrel!");
quest::spawn2($a, 485, 147, -33);
}
else
{
quest::say("No spawn");
}
}
And if you know how I can make him emote ONLY the first time he is killed, that would be sick too. (for "SERVER FIRST" script)
|

10-17-2011, 07:17 PM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
http://www.eqemulator.net/wiki/wikka...=QuestTutorial
quest::spawn2(npc_type,grid,guildwarset,x,y,z,head ing) - Spawn "npc_type" on "grid" with "guildwarset" (use 0) at "x","y","z" facing "heading".
As for the "first", use a quest global.
|

10-17-2011, 07:36 PM
|
Hill Giant
|
|
Join Date: May 2010
Posts: 105
|
|
Where would you find what "grid" to use?
Can you give me an example of the quest global?
|

10-17-2011, 07:38 PM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
The grid is set up by you. If you don't want him to walk, use 0.
Quest globals are on the bottom of that page I just linked.
|

10-17-2011, 07:52 PM
|
Hill Giant
|
|
Join Date: May 2010
Posts: 105
|
|
k thanks.
the global section is sort of gibberish, its easier to deconstruct or manipulate existing, but ill look elsewhere. Thanks for the grid tip, though. Works.
|

10-17-2011, 08:15 PM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
All kinds of examples if you have the peq quests library. Take a look at any elemental zone and PoK
|

10-17-2011, 09:40 PM
|
Hill Giant
|
|
Join Date: May 2010
Posts: 105
|
|
If you mean the PEQ editor, yeah , ill try to install that later. Looks pretty complex itself.
|

10-17-2011, 10:59 PM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
you can increase the zone autoshutdown delay to something greater than 5000ms or you could simply statically load the zones.
I assume you are only doing this on fabled as there are a ton of named with PH spawns otherwise.
And giving the named a 100% spawn? so instead of repopping the zone, i go from zone to zone killing everything and coming back at the scheduled respawn time.
Finally, no he is not talking about the peq editor.
|

10-18-2011, 02:09 AM
|
Hill Giant
|
|
Join Date: May 2010
Posts: 105
|
|
Quote:
Originally Posted by sorvani
you can increase the zone autoshutdown delay to something greater than 5000ms or you could simply statically load the zones.
I assume you are only doing this on fabled as there are a ton of named with PH spawns otherwise.
And giving the named a 100% spawn? so instead of repopping the zone, i go from zone to zone killing everything and coming back at the scheduled respawn time.
Finally, no he is not talking about the peq editor.
|
No, im doing it on all named spawns in dungeons at least. Its way more fun to run through a zone in an hour and slay everything. There is nothing fun about /camping to repop a zone. If you really want to camp the fabled, yeah, i guess come back later, but its more of a bonus encounter.
Can you tell me what he IS talking about? I googled it and no results. dumb it down with a download link for us newbs.
|

10-18-2011, 03:23 PM
|
Hill Giant
|
|
Join Date: May 2010
Posts: 105
|
|
Ok, ill dig through there and try to find something similar to what i'm looking for. Thanks
|

10-18-2011, 07:58 PM
|
 |
Hill Giant
|
|
Join Date: Aug 2010
Location: UT
Posts: 215
|
|
Hey bodi, hang in there, you'll get it.
Here's where I first learned how to use quest globals:
http://projecteqquests.googlecode.co...iles_Thrall.pl
You'd have to have complied your server with bots to play around and see it working in game though.
|
Thread Tools |
|
Display Modes |
Linear Mode
|
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 11:24 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |