Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-24-2009, 05:44 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
the NPC's name

The wiki has failed me again.

with(findnpc("turret"))

that's great, but how do I get the NPC's name? I mean, how do I know which NPC to find? Does it even work with putnpc2sies?

Here's the problem:
I've made a script that, clientside, comes up with a list of targets, then sends these targets to the serverside. The serverside checks the list of targets to make sure the player isn't being cheeky, then applies damage. Currently I've got the clientside triggering with a list of npc.id s, and the server's catching it no problem, but I can't seem to go from a list of npc.ids to a list of actual NPCs, short of running a very large findareanpcs and comparing their IDs...I'd much rather either send a list of npc.names (or whatever the mysterious property is, the wiki's no help) or look them up by id directly. temp.npc=npc.id(param1)? =findnpcbyid(param1)?
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
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:58 AM.


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