Graal Forums

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

Knight_Vincent 01-14-2002 02:14 AM

Lol,

Yes it is :).

-Night fox

lordhelmut 01-14-2002 09:56 AM

How would a player place an item then? putnpc?

Slaktmaster 01-14-2002 01:47 PM

Something like:
if (playerchats&&strequals(#c,lay down <weaponname>)) {
this.x = {0.5,-0.5,0.5,2.5};
this.y = {-1,1,3,1};
putnpc weaponimage,weaponcode,this.x[playerdir],this.y[playerdir];
destroy;
}

That is just for laying weapons so it would need more code, but it's a good start.

lordhelmut 02-04-2002 12:40 PM

Quote:

Originally posted by Slaktmaster
Something like:
if (playerchats&&strequals(#c,lay down <weaponname>)) {
this.x = {0.5,-0.5,0.5,2.5};
this.y = {-1,1,3,1};
putnpc weaponimage,weaponcode,this.x[playerdir],this.y[playerdir];
destroy;
}

That is just for laying weapons so it would need more code, but it's a good start.

this.x = {0.5,-0.5,0.5,2.5};
this.y = {-1,1,3,1};

what is that

nyghtGT 02-04-2002 01:51 PM

Quote:

Originally posted by lordhelmut


this.x = {0.5,-0.5,0.5,2.5};
this.y = {-1,1,3,1};

what is that

arrays

Saga2001 02-05-2002 12:13 AM

It would be fairly simple, but if you wanted to do a lot of very advanced stuff, it could become a "var hogger".

TDK_RC6 02-05-2002 01:31 AM

Quote:

Originally posted by lordhelmut


this.x = {0.5,-0.5,0.5,2.5};
this.y = {-1,1,3,1};

what is that


setting arrays so that it will put the npc at a certain spot depending on which way you are facing

lordhelmut 02-05-2002 07:46 AM

I MUST LEARN :)

TDK_RC6 02-05-2002 08:26 AM

Quote:

Originally posted by Slaktmaster
Something like:
if (playerchats&&strequals(#c,lay down <weaponname>)) {
this.x = {0.5,-0.5,0.5,2.5};
this.y = {-1,1,3,1};
putnpc weaponimage,weaponcode,this.x[playerdir],this.y[playerdir];
destroy;
}

That is just for laying weapons so it would need more code, but it's a good start.
i was just looking over this script, and it is really buggy

NPC Code:

this.x = {0.5,-0.5,0.5,2.5};
this.y = {-1,1,3,1};
putnpc weaponimage,weaponcode,this.x[playerdir],this.y[playerdir];



this would only put a weapon at those cordinates, you would have to do, playerx+this.x[playerdir] and player.y+this.y[playerdir]
also, if you face left

KuJi2002 08-04-2002 05:55 AM

Markets
 
O kool! lol

Python523 08-04-2002 06:05 AM

Re: Markets
 
Quote:

Originally posted by KuJi2002
O kool! lol
don't revive dead posts....


All times are GMT +2. The time now is 06:54 PM.

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