Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Can someone please help? (https://forums.graalonline.com/forums/showthread.php?t=39997)

Stev579 11-06-2002 12:51 AM

Can someone please help?
 
Hi there, I'm kinda new to scripting, and I'm trying a script for when a player with a specific account name says a specific word to get warped. I'm thinking of using:

if (playerchats&&strequals(#a,account name)&&strequals(#c,warp))
{setlevel2 level.graal,31.5,15;}

Would this be right? If not, can you suggest something that might be? Any help is greatly appreciated.

Thanks. :)

(level.graal, account name and warp are all examples. XD)

CheeToS2 11-06-2002 12:53 AM

Re: Can someone please help?
 
Quote:

Originally posted by Stev579
Hi there, I'm kinda new to scripting, and I'm trying a script for when a player with a specific account name says a specific word to get warped. I'm thinking of using:

if (playerchats&&strequals(#a,account name)&&strequals(#c,warp))
{setlevel2 level.graal,31.5,15;}

Would this be right? If not, can you suggest something that might be? Any help is greatly appreciated.

Thanks. :)

(level.graal, account name and warp are all examples. XD)

yes, but make sure you use .nw as the level.. not .graal (unless it really is .graal)

Stev579 11-06-2002 01:19 AM

Re: Re: Can someone please help?
 
Quote:

Originally posted by CheeToS2


yes, but make sure you use .nw as the level.. not .graal (unless it really is .graal)

I figured I should use .graal because the house would be for The Adventure/Classic. (When the NPC server gets put up. X_X)

bigkow44 11-06-2002 10:21 AM

Whats the difference between .NW and .GRAAL, I never really listened.

user13-xo 11-06-2002 12:49 PM

Quote:

Originally posted by bigkow44
Whats the difference between .NW and .GRAAL, I never really listened.
1 difference is that you can open .nw levels in a text editor and edit the level (including scripts and links and signs)

King_Arthur_Elven 11-06-2002 01:15 PM

.nw Can have more NPCS in a level than .graal i belive .graal has a limt of 50? .nw was made for New World.

Stev579 11-06-2002 06:22 PM

Re: Re: Re: Re: Can someone please help?
 
Quote:

Originally posted by Kaimetsu


If it's for the NPC Server then setlevel2 won't work clientside. Which means it won't work if it's in a weapon without triggering the server.

Okay...so what do I use instead? It's only going to warp players.

Dach 11-06-2002 07:38 PM

I think all classic levels are going to be changed to nw for npcserver, so the simple scripts can be batched easier.

Stev579 11-07-2002 01:44 AM

Re: Re: Re: Re: Re: Re: Can someone please help?
 
Quote:

Originally posted by Kaimetsu


Lots of complicated stuff with triggeractions and params and stuff. You should probably ask some of the Classic staff or something...

...but wait. Why are you making a warp weapon for Classic? I thought they weren't allowed in personal houses.

Warp weapon!? X_X
The idea is that when someone with a specific account name says a specific word/phrase, they get warped to a different level, like, they get warped to their own room, and only they can access it...

R0bin 11-07-2002 02:20 AM

if (playerchats&&strequals(#a,Account)) {
setlevel2 level.graal,30,30;
}


^^ works fine online. (not clientside)

Com013 11-07-2002 03:33 AM

It looks to me like it's working fine. (As long as it isn't a weapon). Yes, we will be using .nw files. Just keep in mind that I've got to lock unique items (and maybe even horses) out of password/account locked rooms.

Quote:

Originally posted by R0bin
if (playerchats&&strequals(#a,Account)) {
setlevel2 level.graal,30,30;
}


^^ works fine online. (not clientside)

No, then you'd be warped always when chatting, even when you just wanted to talk to somebody.

screen_name 11-07-2002 04:20 AM

Stev, why didn't you try the script before posting about it? It would work fine offline.

An ancient plague has shown it's ugly face once again... lazyness!

Dach 11-07-2002 08:25 AM

Quote:

Originally posted by screen_name
Stev, why didn't you try the script before posting about it? It would work fine offline.

An ancient plague has shown it's ugly face once again... lazyness!

Quote:

Originally posted by Stev579
Hi there, I'm kinda new to scripting
That's why, you remember when you first started don't you? He just wanted to know if this was the best way to do it.

Stev579 11-07-2002 04:40 PM

Re: Re: Re: Re: Re: Re: Re: Re: Can someone please help?
 
Rar. I r dumb. :rolleyes:

I did actually try it offline. It worked fine with my account (when I accessed my passworded, account named room), but when I let another player try to access their room, it didn't work. :\

screen_name 11-07-2002 08:46 PM

Quote:

Originally posted by Dach

That's why, you remember when you first started don't you? He just wanted to know if this was the best way to do it.

Yes I do. I remember myself reading the documentation, then studying the commands. Then I started to try to script with examples from the documentation. I don't remember having to go anywhere for help when I just wanted to know if it would work or not. I tried it and if it didn't work then I would try to fix it.

Quote:

Originally posted by Stev579

Rar. I r dumb.

I did actually try it offline. It worked fine with my account (when I accessed my passworded, account named room), but when I let another player try to access their room, it didn't work.

Then from this I conclude that you just wanted someone to fix it so it would work for other people. Otherwise you wouldn't have posted this thread.


Sorry if you feel offended or something of the sort, but that's just how I feel about the matter.


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

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