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

02-21-2012, 10:11 PM
|
Sarnak
|
|
Join Date: Sep 2009
Posts: 32
|
|
Super!
Huge help Akkadius! Features, weapon, etc.. all changed, makes those poor bandits seem more like individuals now.
Your plugin post is great. I saw how the illusion_tool allowed for race/ gender randomization but i didn't really know how to use it. Your plugin along with tutorial-ish post worked great. I do seem to be having a small issue with the texture selection. No matter what I use it shows them as wearing nothing/ cloth type armor as opposed to leather, chain, plate and whatnot.
Here is what I came up with with the help I got here:
Code:
sub EVENT_SPAWN
{
quest::settimer("feature",5);
}
sub EVENT_TIMER
{
if ($timer eq "feature")
{
quest::stoptimer("feature");
plugin::RandomWeapons(10688, 10693, 100, 0, 0, 1, 1);
plugin::SpawnDynNPC(quest::ChooseRandom(1,2,3,4,5,6,7,8,9,10,11,12,128,130,330,522),quest::ChooseRandom(1,2,3),quest::ChooseRandom(0,1));
}
}
This allowed me to use all races, both genders, and should allow for leather, chain, and plate texture unless im mistaken?
|
 |
|
 |

02-21-2012, 10:22 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
You can also set a random armor tint by adding something like this after all of your other changes are done:
Code:
#my $Material = plugin::RandomRange(1,3); # Random armor texture
my $Material = 2;
$Color = (plugin::RandomRange(0,255) & 0xFF) << 16;
$Color |= (plugin::RandomRange(0,255) & 0xFF) << 8;
$Color |= (plugin::RandomRange(0,255) & 0xFF);
$Color |= 0xFF << 24;
for (my $slot = 0; $slot < 7; $slot++)
{
$npc->WearChange($slot, $Material, $Color);
}
You could add robes in there as well if you wanted to by adding the Materials 12 to 18 or whatever when it does the chest slot in the for loop.
|
 |
|
 |

02-21-2012, 10:26 PM
|
 |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Quote:
Originally Posted by Luccian
Super!
Huge help Akkadius! Features, weapon, etc.. all changed, makes those poor bandits seem more like individuals now.
Your plugin post is great. I saw how the illusion_tool allowed for race/ gender randomization but i didn't really know how to use it. Your plugin along with tutorial-ish post worked great. I do seem to be having a small issue with the texture selection. No matter what I use it shows them as wearing nothing/ cloth type armor as opposed to leather, chain, plate and whatnot.
Here is what I came up with with the help I got here:
Code:
sub EVENT_SPAWN
{
quest::settimer("feature",5);
}
sub EVENT_TIMER
{
if ($timer eq "feature")
{
quest::stoptimer("feature");
plugin::RandomWeapons(10688, 10693, 100, 0, 0, 1, 1);
plugin::SpawnDynNPC(quest::ChooseRandom(1,2,3,4,5,6,7,8,9,10,11,12,128,130,330,522),quest::ChooseRandom(1,2,3),quest::ChooseRandom(0,1));
}
}
This allowed me to use all races, both genders, and should allow for leather, chain, and plate texture unless im mistaken?
|
That should work fine. I think the only reason why I didn't post it is that you need to keep in mind that people who zone in after this has fired off, some clients may not view textures and races correctly as not everything sends. I never investigated as to why, but I made a hack that resent the information for NPC's whenever a client got close to the NPC (Proximity) via Perl, not the greatest solution and depends on how many NPC's you want to use this for to what resources it takes up. I'm sure all of this is not reassuring, maybe someone else could answer as to why illusion packets aren't reliably sent after setting an NPC's visuals appearances using Perl.
|
 |
|
 |

02-22-2012, 05:55 AM
|
Sarnak
|
|
Join Date: Sep 2009
Posts: 32
|
|
Quote:
Originally Posted by Akkadius
That should work fine. I think the only reason why I didn't post it is that you need to keep in mind that people who zone in after this has fired off, some clients may not view textures and races correctly as not everything sends.
|
I saw this after I went to sleep. I woke up and fiddled some more and saw that after zoning out and in I could at least see the chest texture, but everything else was cloth looking. This is really only a minor inconvenience. I can just set individual textures and such worst case scenario. I really really appreciate your help. Both you and Trev =)
One final question though regarding this all (at least I hope). Is there a way to choose specific weapons only, as opposed to a ranged using the RandomWeapons plugin? Example being I wanted to use weapon 1,3,11,13,27,and 62 but nothing in between.
|
Thread Tools |
|
Display Modes |
Hybrid 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:28 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |