Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Send params to putnpc2? (https://forums.graalonline.com/forums/showthread.php?t=71846)

Twinny 02-01-2007 05:19 AM

I've always done
PHP Code:

  temp.npc putnpc2(params[1],params[2],"join(\"blah!\");");
  
temp.npc.owner player.account;
  
temp.npc.attr[1] = params[3]; 

You could also save the id of temp.npc for later editing ^^.

Chandler 02-01-2007 12:45 PM

HTML Code:

with(putnpc2(this.x, this.y, "join object;"))
{
  this.curMode = "started...? lol";
}

Always, and forever.

Inverness 02-01-2007 11:57 PM

I never knew that putnpc2() returned the npc object >_>
Hurray for new things. ^^

You could even add a putnpc3() that uses a class name to join as the parameter instead of the actual script :P
with (putnpc3(this.x, this.y, "classname")) {}
For the lazy people like me.

xXziroXx 02-02-2007 12:19 AM

putnpc3 doesnt exist?

Inverness 02-03-2007 03:24 PM

Uh no, that was speculation.

JkWhoSaysNi 02-03-2007 04:16 PM

PHP Code:


function putnpc3(x,y,classname) {
    return 
putnpc2(x,y,"join(\"" classname "\");");


:confused: :p

Inverness 02-03-2007 06:17 PM

Yea you could do that easily enough, but having built in stuff is cooler than joining classes all the time :P


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

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