Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Will this work online (https://forums.graalonline.com/forums/showthread.php?t=13598)

nyghtGT 10-02-2001 05:28 PM

Re: Re: Will this work online
 
Quote:

Originally posted by Bravo_Admin1


u could always use

if (playerenters) {hide;}

that usualy works 4 me :)

stop spamming cause you only have 12 posts !!!

btedji 10-02-2001 07:13 PM

Re: Will this work online
 
try this

NPC Code:

// NPC made by unknown
// Hirathia Door Script
// Urond's Tavern
if (created) {
setimg newdoor.gif;
this.Door1 = 1;
}
if (playerchats && strequals(#a,Metal-Slug) && startswith(#c,Door)) {
message #c;
}
if (playerchats && strequals(#a,Metal-Slug) && strequals(#c,Door Closed)) {
this.Door1 = 1;
}
if (this.Door1 = 1 && playertouchsme) {
say2 Sorry
#bThis door is locked;
}
if (playerchats && strequals(#a,Metal-Slug) && strequals(#c,Door Opened)) {
this.Door1 = 0;
}
if (this.Door1 = 0 && playertouchsme) {
setlevel2 metal-slugbar.nw,30.5,57;
}



this seems like it should work

nyghtGT 10-03-2001 02:51 AM

Quote:

Originally posted by Kaimetsu
Hmm... Should be able to use save[] variables. Dunno exactly how they work without an NPC Server, though.
save works online (p2p and non) but they dont work offline but if you have a server.string set to make an NPC do a function to set them back then it will work...
Well it did on Delteria ....

btedji 10-03-2001 02:53 AM

Quote:

Originally posted by Kaimetsu
Hmm... Should be able to use save[] variables. Dunno exactly how they work without an NPC Server, though.
can you give me some tips on how to use save[] variables?

nyghtGT 10-03-2001 02:57 AM

uhh
 
Quote:

Originally posted by btedji


can you give me some tips on how to use save[] variables?

i think they work like this .....
if (playerchats && startswith(notes:)) {
save[1]=#c;
}
if (playersays(view notes)) {
setplayerprop #c,save[1];
}
I think this is how they may work ... but i am pretty much just spamming so ....

btedji 10-03-2001 02:59 AM

they hold strings and vars but dont need to be put in players flag list, i see, simple enough

Metal-Slug 10-03-2001 04:38 AM

vinvect, if if ind this scrip on your server i will hit you

Poogle 10-03-2001 04:49 AM

Quote:

Originally posted by entravial
~AlphaFlame~



Actually, sir, it's correct. Starts with format is

startswith(start,string)

Poogle... you, too, can go read commands.rtf and come back when you learn to script.

=/ I use it #c,HOLY COW all the time and it works =\

btedji 10-03-2001 04:54 AM

im pretty sure on all those type of things it doesnt matter the order

Metal-Slug 10-03-2001 06:15 AM

well i want to send the info to every one, so i would change it to server.Door1?

Metal-Slug 10-03-2001 08:22 AM

so, how would i set it up? if i want to send the "flag (i dunno)" to every one on the server, and its non p2p, or hel;p me along like you did with the #v stuff.

btedji 10-03-2001 07:17 PM

save[] variables are like global variables i think

btedji 10-04-2001 03:09 AM

Quote:

Originally posted by Kaimetsu


A save var is just like the variables "ap" or "rupees". You can set it and then people can read it.

And no, they're not global.

ahhhhhh, i see

Metal-Slug 10-04-2001 05:35 AM

Quote:

Originally posted by Kaimetsu


A save var is just like the variables "ap" or "rupees". You can set it and then people can read it.

And no, they're not global.

splain more please? also, i want it to be global, so i need server.whatever or this.whatever

btedji 10-04-2001 06:29 AM

Quote:

Originally posted by Metal-Slug


splain more please? also, i want it to be global, so i need server.whatever or this.whatever

server.strings are global


All times are GMT +2. The time now is 11:30 PM.

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