Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-29-2003, 01:01 AM
bashjgovers bashjgovers is offline
Registered User
Join Date: Aug 2003
Posts: 31
bashjgovers is on a distinguished road
need help

how do i make this:

someone touchs a NPC:
all player in room get a message;
all players in room will be warped to X,Y;
Reply With Quote
  #2  
Old 08-29-2003, 01:06 AM
Neoreno Neoreno is offline
Cerebrate
Neoreno's Avatar
Join Date: Aug 2001
Location: England
Posts: 1,663
Neoreno is on a distinguished road
Send a message via AIM to Neoreno
Read the forum rules. Don't ask for full scripts.
__________________

Quote:
Exitus Acta Probat: The Outcome Justifies the Deed.
Reply With Quote
  #3  
Old 08-29-2003, 02:09 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Re: need help

Quote:
Originally posted by bashjgovers
how do i make this:

someone touchs a NPC:
all player in room get a message;
all players in room will be warped to X,Y;
I'm assuming this is for an event type of thing?

All I can say is... learn the basics of scripting, and the correct syntax, and then try. It'll be easier then you would image.


Look into:
playertouchsme
for loops
playerx, playery
with
getplayer

And try figureing it out yourself.

Quote:
Read the forum rules. Don't ask for full scripts.
He wasnt asking for the script, I don't think... 'cause he said "HOW do I make this".
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #4  
Old 08-29-2003, 03:07 AM
Riot-Starter Riot-Starter is offline
Registered User
Join Date: Aug 2001
Location: Central Florida, USA
Posts: 79
Riot-Starter is on a distinguished road
Send a message via AIM to Riot-Starter
Re: Re: need help

Quote:
Originally posted by Knuckles

I'm assuming this is for an event type of thing?

All I can say is... learn the basics of scripting, and the correct syntax, and then try. It'll be easier then you would image.


Look into:
playertouchsme
for loops
playerx, playery
with
getplayer

And try figureing it out yourself.
getplayer wouldn't really be needed for this.
playertouchsme
for()
with()
playerx/y
players[index]
Reply With Quote
  #5  
Old 08-29-2003, 05:11 AM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Re: need help

Quote:
Originally posted by bashjgovers
how do i make this:

someone touchs a NPC:
all player in room get a message;
all players in room will be warped to X,Y;
What kind of message?
Reply With Quote
  #6  
Old 08-29-2003, 05:13 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: Re: Re: need help

Quote:
Originally posted by Riot-Starter

getplayer wouldn't really be needed for this.
some people do getplayer(#a(index))
instead ofplayers[index]
Reply With Quote
  #7  
Old 08-29-2003, 06:06 AM
Riot-Starter Riot-Starter is offline
Registered User
Join Date: Aug 2001
Location: Central Florida, USA
Posts: 79
Riot-Starter is on a distinguished road
Send a message via AIM to Riot-Starter
Re: Re: Re: Re: need help

Quote:
Originally posted by Python523


some people do getplayer(#a(index))
instead ofplayers[index]
Hence the "wouldn't really be needed"
Reply With Quote
  #8  
Old 08-29-2003, 10:34 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Re: Re: Re: Re: Re: need help

Quote:
Originally posted by Riot-Starter


Hence the "wouldn't really be needed"
I can say the same for your command. o.o
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #9  
Old 08-29-2003, 10:42 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Re: Re: Re: Re: Re: Re: need help

Quote:
Originally posted by Knuckles

I can say the same for your command. o.o
Which? The only thing he recommended that wasn't on your list was players[], which isn't a command and is the simplest, most efficient approach to the situation.
__________________
Reply With Quote
  #10  
Old 08-29-2003, 03:44 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: Re: Re: Re: Re: Re: Re: need help

Quote:
Originally posted by Kaimetsu


Which? The only thing he recommended that wasn't on your list was players[], which isn't a command and is the simplest, most efficient approach to the situation.
hmm...could be true or couldn't be true, either way the serverside NPC still has to load the player's attribs and make them writeable, I guess it really depends on if it was coded the same way or not, and depends on is the index is converted into an account or not (which is unlikely but yea)
Reply With Quote
  #11  
Old 08-29-2003, 05:17 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Re: Re: need help

Quote:
Originally posted by protagonist


What kind of message?
Probably say2.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #12  
Old 08-29-2003, 07:44 PM
bashjgovers bashjgovers is offline
Registered User
Join Date: Aug 2003
Posts: 31
bashjgovers is on a distinguished road
yep its for a event

(sorry it wasnt aksing for a script but i need some help


i scripted that if someone touchs the NPC a flag will be set, but thats only for the person who touchs the npc isnt it?
Reply With Quote
  #13  
Old 08-29-2003, 11:35 PM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Re: Re: Re: need help

Quote:
Originally posted by osrs


Probably say2.
Ah, I thought he might have meant something like sendpm.
Reply With Quote
  #14  
Old 08-30-2003, 05:20 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Re: Re: Re: Re: Re: Re: Re: Re: need help

Quote:
Originally posted by Python523
hmm...could be true or couldn't be true, either way the serverside NPC still has to load the player's attribs and make them writeable
Assuming it doesn't have them loaded at all times. getplayer has to search through every player on the server. Using player[] just skips that step.
__________________
Reply With Quote
  #15  
Old 08-30-2003, 05:58 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: Re: Re: Re: Re: Re: Re: Re: Re: need help

Quote:
Originally posted by Kaimetsu


Assuming it doesn't have them loaded at all times. getplayer has to search through every player on the server. Using player[] just skips that step.
Well, I'm assuming there is some 'list' of all the players online, getplayer pulls the players row (as in from a MySQL db) out of that list, which contains all his attribs. Using players[] probably does the same but level based instead of searching through all the accounts, since you can't access all the player's attribs without using a with function thing, get what I'm saying? I could be wrong about my opinion on what it does, if your opinion is different please tell yours
Reply With Quote
  #16  
Old 08-30-2003, 06:16 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: need help

Quote:
Originally posted by Python523
Well, I'm assuming there is some 'list' of all the players online, getplayer pulls the players row (as in from a MySQL db) out of that list, which contains all his attribs.
Yes, but it can't just magically grab that element. It needs to search for it based on string comparisons.

Quote:
Using players[] probably does the same but level based instead of searching through all the accounts
There's no searching at all in such a case; the player[] structure is specified explicitly.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:14 PM.


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