Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-28-2017, 02:26 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,746
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
Communication between a Class and DB NPC?

Goal: For this example each time a player says "debug" the database is triggered which it in turn triggers back to the class and updates every NPC that is joined to it.

So this is where I started which works.
PHP Code:
function onPlayerChats() {
  if (
player.chat == "debug") {
    
DATABASE.triggerdatabase(); // database has the public function 
  
}

My Problem: Now I want the database to trigger back to the class in order to update it. I've tried sending it back a public function but without an identifier the database can't find the class. For whatever reason level NPCs and classes can't have identifiers, and you can't use the class name as an identifier. I've tried to use triggerAction. I've also tried to join the database to the class, but the database catches the update and applies it to itself and doesn't update the other classes.

So bottom line is I need help again. Can what I'm trying to do be accomplished?
__________________
Save Classic!

Last edited by maximus_asinus; 08-28-2017 at 02:36 AM..
Reply With Quote
 


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:46 PM.


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