Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Morpher (https://forums.graalonline.com/forums/showthread.php?t=30078)

BBflat 05-26-2002 07:59 AM

Morpher
 
Hey again. I was just wondering how the morpher on Classic was made. If you aren't familiar with it, you can fire it next to someone and get all his/her clothes, shield, sword, and head. It's really quite cool. I don't quite know how to do this, though. Here's what I would do...

NPC Code:

if (weaponfired)
{
// Do this for each direction
if (playerdir == 1)
{
this.pindex = testplayer(playerx - 1, playery);
// Use the player's index to get all his/her clothes.
}
}



But um... What do I do with the player's index then? I don't know of anything to return another player's clothing colors.

Tyhm 05-26-2002 08:36 AM

Standard player detection, then
setplayerprop #3,#3(this.i);
if(!strequals(#s(this.i),shield1.png))
setplayerprop #2,#2(this.i);

But I oversimplify, there are delays of course, activation and deactivation conditions, and more shields and swords to not morph....

BBflat 05-26-2002 01:05 PM

Quote:

Originally posted by Tyhm
Standard player detection, then
setplayerprop #3,#3(this.i);
if(!strequals(#s(this.i),shield1.png))
setplayerprop #2,#2(this.i);

But I oversimplify, there are delays of course, activation and deactivation conditions, and more shields and swords to not morph....

Awesome. So you can get basically any information about another player using a messagecode(index)? Thanks.


All times are GMT +2. The time now is 01:23 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.