Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-07-2007, 10:17 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
NPCs and Classes

Just how limited is communication between them?
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #2  
Old 06-07-2007, 10:22 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Npcs as in level npcs, database npcs?
__________________
Reply With Quote
  #3  
Old 06-07-2007, 10:41 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Not very, anything possible, haha.
__________________
Deep into the Darkness peering...
Reply With Quote
  #4  
Old 06-07-2007, 11:06 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Classes aren't their own objects, just scripts joined to other objects, I don't see what you're getting at.
__________________
Reply With Quote
  #5  
Old 06-08-2007, 02:53 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Doesn't matter if one is joined to an NPC or a weapon, classes are classes. Unless I misunderstood and if you meant NPC is a db-npc, level-npc, or a weapon script.
Reply With Quote
  #6  
Old 06-08-2007, 03:23 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Sorry, I never clarified what I posted this for. I was calling a public function in a DB from a weapon, that places a class, once the class is created it's supposed to call a public function from the same DB. I tried to echo a variable through this manner but it didn't work. :O


Something like his for example:

PHP Code:
function onCreated() {
  
this.npcPlace putnpc2(3030"").join("mud_npc_genericenemytest");
  
with (this.npcPlace) {
    
this.eName "Shadow";
  }

PHP Code:
function onCreated() {
  
temp.file;
  echo (
this.eName);

isn't working.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #7  
Old 06-08-2007, 03:29 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
DB-NPC:
PHP Code:
function onCreated()
{
  
this.join("functions");
  
echo2("Success");

functions Class
PHP Code:
public function echo2(message)
{
  
this.echo(temp.message);

Would work, just an example though.
Reply With Quote
  #8  
Old 06-08-2007, 03:56 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
...I know that would work. What I need is what I posted above for example.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #9  
Old 06-08-2007, 04:01 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
PHP Code:
function onCreated() {
  
with (putnpc2(3030""))
  {
    
this.join("mud_npc_getgenericenemytest");
    
this.eName "Shadow";
  }

PHP Code:
function onCreated() {
  
temp.file;
  echo (
this.eName);

Oh sorry, didn't read up. That should work.
Reply With Quote
  #10  
Old 06-08-2007, 04:09 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Edit: Inver helped me solve my problem. Thanks tho guys.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.

Last edited by killerogue; 06-08-2007 at 06:00 AM..
Reply With Quote
  #11  
Old 06-08-2007, 08:53 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
I don't think you can call putNPC2 in the created function.
__________________
Reply With Quote
  #12  
Old 06-09-2007, 03:39 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
putnpc2() just needs to be called in something that has a level and on the serverside. Those are only requirements to my knowledge. Trying to call it from a TStaticVar failed spectacularly.
__________________
Reply With Quote
  #13  
Old 06-11-2007, 02:09 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by killerogue View Post
Edit: Inver helped me solve my problem. Thanks tho guys.
So post your solution for the betterment of others...
__________________
Reply With Quote
  #14  
Old 06-13-2007, 02:21 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Well, it was the way the DB was named. :O I was using too common a named (Test was the name of it) DB and apparently it was conflicting. :O
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #15  
Old 06-13-2007, 03:32 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
This is why I had asked long time ago for a list of global variables.

Actually, I would like an allobjects array that represents all the objects active in that space (your client or the server).
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:06 AM.


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