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)

Metal-Slug 10-02-2001 08:18 AM

Will this work online
 
will this work on a pw with no npc server?
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(Door, #c)) {
setstring Doormessage1,#c;
message #s(Doormessage1);
}
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;
}


i know it works off line, but im not sure if the this.Door1 stuff is online stuff

entravial 10-02-2001 08:36 AM

~AlphaFlame~

Use server. strings instead of this. variables.

Poogle 10-02-2001 08:38 AM

Re: Will this work online
 
Quote:

Originally posted by Metal-Slug
will this work on a pw with no npc server?
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(Door, #c)) {
setstring Doormessage1,#c;
message #s(Doormessage1);
}
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;
}


i know it works off line, but im not sure if the this.Door1 stuff is online stuff

Wont work offline too! (Door, #c)) is the error it backwards!

Vinvect 10-02-2001 08:40 AM

lol

entravial 10-02-2001 08:43 AM

~AlphaFlame~

Quote:

Wont work offline too! (Door, #c)) is the error it backwards!
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.

Vinvect 10-02-2001 08:44 AM

MMMmmmMMmmMm............
Mutated Brocli Monster Hungry!
*drools*
*drools even more*
*drools to the floor*
.....
.........
........
....
.......
a guy says: AHHHHHHHHH!
Because
Mutated Brocli Monster Ate Him!
YUmmmm.....!

:spam:
(read my sig)

Metal-Slug 10-02-2001 08: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 knew that too, i just choose to ignore stupidity and arogance mixed now, also, why does playerhearts = +2; make the player have to full hearts? ven if they had 3?

entravial 10-02-2001 08:52 AM

~AlphaFlame~

You have the + in the wrong place. Put it in front of the =.

playerhearts += 2;

Metal-Slug 10-02-2001 08:59 AM

thanks

Vinvect 10-02-2001 09:09 AM

Re: Will this work online
 
Quote:

Originally posted by Metal-Slug
will this work on a pw with no npc server?
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(Door, #c)) {
setstring Doormessage1,#c;
message #s(Doormessage1);
}
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;
}


i know it works off line, but im not sure if the this.Door1 stuff is online stuff

can i use in my server plz?

entravial 10-02-2001 09:11 AM

~AlphaFlame~

Why not script your own that's better than that? :-P

Vinvect 10-02-2001 09:16 AM

:mad: :grrr:

nyghtGT 10-02-2001 04:38 PM

Re: Re: Will this work online
 
Quote:

Originally posted by Poogle
Wont work offline too! (Door, #c)) is the error it backwards!
when you use 'startswith' the format is:
startswith(content,str)

nyghtGT 10-02-2001 04:39 PM

Re: Re: Will this work online
 
Quote:

Originally posted by Vinvect

can i use in my server plz?

no offense but that script is not exactly that hard....

Bravo_Admin1 10-02-2001 04:51 PM

Re: Will this work online
 
Quote:

Originally posted by Metal-Slug
will this work on a pw with no npc server?
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(Door, #c)) {
setstring Doormessage1,#c;
message #s(Doormessage1);
}
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;
}


i know it works off line, but im not sure if the this.Door1 stuff is online stuff

u could always use

if (playerenters) {hide;}

that usualy works 4 me :)


All times are GMT +2. The time now is 01:12 PM.

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