View Single Post
  #10  
Old 06-15-2009, 08:19 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
It's fairly easy to send data from serverside > clientside via attr[]'s. You can do checks like that if you'd like.

What I also did was set-up a DBNPC that would intercept the triggerserver's/triggerclient's from the local NPC, and then do the communication in the DBNPC itself and then resend the function. However, I only did this for clientside > serverside, so I'm not particularly sure of how that'd work the other way around

DBNPC:
PHP Code:
function onActionServerside(cmd,lvl,checkid) {
  if (
cmd == "checkhit") {
    for (
temp.ifindlevel(lvl).npcs) {
      if (
i.id == checkid) {
        
i.test();
        break;
      }
    }
  }

And in the level itself(from the clientside):
PHP Code:
triggerserver("npc","mydbnpc","checkhit",this.level.name,this.id); 
Reply With Quote