Graal Forums

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

Draktha 04-29-2002 05:21 AM

help...
 
How would i go about displaying a sting using say2? (i.e. making an npc say 'you have 1 out of 4 pieces of heart')

Saga2001 04-29-2002 05:28 AM

Re: help...
 
Quote:

Originally posted by Draktha
How would i go about displaying a sting using say2? (i.e. making an npc say 'you have 1 out of 4 pieces of heart')
NPC Code:

if (created) setstring this.sign,Sign Text#bwoooooo;
if (playertouchsme) say2 #s(this.sign);


Draktha 04-29-2002 05:45 AM

Re: Re: help...
 
Quote:

Originally posted by Saga2001


NPC Code:

if (created) setstring this.sign,Sign Text#bwoooooo;
if (playertouchsme) say2 #s(this.sign);


Many thanking yous! :D

Saga2001 04-29-2002 06:56 AM

Re: Re: Re: help...
 
Quote:

Originally posted by Draktha


Many thanking yous! :D

Keine Problem

emortylone 04-29-2002 08:02 PM

Why not on a non-p2p? It looks fine, just a simple say2 and set string... ?
---Shifter

Saga2001 04-29-2002 10:54 PM

OMG! You have to be joking me? You mean to say that on Non-Upgraded servers #b will not parse like it does on upgraded? That is some bs...Sorry, but I can understand light effects, etc, but it is stuff like that I cannot understand, thats is a very small thing to not allow Non-Upgraded servers to have.

Oh...I mean because there is no such thing as a this. string, duh, I don't know what that was all about. :rolleyes:

THIS POST HAS NOT BEEN EDITED!!!

SaijinGohan 04-30-2002 03:18 AM

Quote:

Originally posted by Saga2001
OMG! You have to be joking me? You mean to say that on Non-Upgraded servers #b will not parse like it does on upgraded? That is some bs...Sorry, but I can understand light effects, etc, but it is stuff like that I cannot understand, thats is a very small thing to not allow Non-Upgraded servers to have.
stefan must of lost it

Saga2001 04-30-2002 10:22 AM

oh...
*feels dumb*
*walks off a cliff*

TDO2000 04-30-2002 04:22 PM

Re: Re: Re: Re: help...
 
Quote:

Originally posted by Saga2001


Keine Problem

remove the e at the end of 'keine'
at the moment the first word is plural and the second one singular so it would be wrong ;) ;)

emortylone 04-30-2002 08:04 PM

Will the string now work after the upgrades? I just upgraded my account (projectshifter) b/c i needed to. This one isn't mine, it is a friend's who was letting me use it. I just registered w/ the forums, so i'll be Projectshifter now, instead of emortylone, heh. So give it a week and i'll be up and posting. You'll notice the sig and the closing (---Shifter) will be the same, lol
---Shifter

emortylone 04-30-2002 08:20 PM

O_o, heh. I have never used the NPC Server, exactly what good is it and what does it do? I wonder if ALL servers will have axx to one after tomorrow? I finally upgraded my account! :P
---Shifter

emortylone 04-30-2002 08:31 PM

Wait, so they WILL be available to ALL servers now? I need to figure out the stuff for it. Sansnat5
---Shifter

Saga2001 04-30-2002 10:34 PM

Quote:

Originally posted by emortylone
O_o, heh. I have never used the NPC Server, exactly what good is it and what does it do? I wonder if ALL servers will have axx to one after tomorrow? I finally upgraded my account! :P
---Shifter

Well the question is not what is good about it, its more what is bad, sure some npcs can take a little more time to figure out when you first get started, but if you get a really good scripter (Er1c in my case) to help you out with the basics you will like it a lot more. The reason that not all servers will have NPC-Server tomorrow is because the fact if they did, then they would have to add //#CLIENTSIDE to a lot of npcs, and also turn things like graalet manipulation serverside (a lot of work). So maybe over time some non-upgraded servers will turn into upgraded. Who knows. I'd go with NPC-Server though.

emortylone 05-01-2002 08:01 PM

I'm a NAT on Sans, so i want to understand this so we can start using more complex stuff. So WHAT needs to be added in all of our NPC'S? //#CLIENTSIDE ? is that it? Just @ the top of them all? And how would we obtain the NPC Server, or is one of the options that higher level RC's can use? If we now have access to all of this stuff, i think it would be good to take advantage of it :D
---Shifter

emortylone 05-01-2002 09:09 PM

o_O! Like can you give me a quick example of how things are to be changed?
---Shifter

Saga2001 05-01-2002 10:56 PM

Quote:

Originally posted by emortylone
o_O! Like can you give me a quick example of how things are to be changed?
---Shifter

Lets say you have an npc like this:
NPC Code:

if (playertouchsme) say2 say "stuff" to buy me!;
if (playerchats && strequals(#c,Stuff)) {playerrupees-=100;toweapons stuff;}


It would have to change to this:
NPC Code:

if (actionserverside) {
playerrupees-=100;
addweapon stuff;
}
//#CLIENTSIDE
if (playertouchsme) say2 say "stuff" to buy me!;
if (playerchats && strequals(#c,Stuff)) triggeraction 0,0,serverside,;


Is probably more what you would be doing. Also something that displays server. striungs will have to be changed like this:
used to be:
NPC Code:

if (playerchats) {
tokenize #c;
if (strequals(What is "#t(2)")) setplayerprop #c,#s(server.#t(2));
}


will have to be:
NPC Code:

if (actionserverside) {
setplayerprop #c,#s(server.#p(0));
}
//#CLIENTSIDE
if (playerchats) {
tokenize #c;
if (strequals(What is "#t(2)")) triggeraction 0,0,serverside,#t(2);
}



this is not precise, because I think if you wish to triggeraction on a database npc or otherwise it has to be assigned a name. But its a lot like what you would have to do. Also the stuff weapon would need to be added into the weapons database, although I believe toweapons still works if you have it in the weapons database, it is a lot easier to make changes on it. However there are a lot of benefits you also get, for example:
NPC Code:

if (actionservergetfromothernpc) {
with(getnpc(databasenpcname)) {
thiso.vars = this.var;
setstring thiso.stuff,#s(this.stuff);
}
setplayerprop #c,#v(this.vars) - #s(this.stuff);
}
//CLIENTSIDE
if (weaponfired) triggeraction 0,0,servergetfromothernpc;


This will go to the specified database npc, look for the this.var variable and this.stuff string and set them on this npcw and set the player's prop, so you can have many npcs on the server all addstring or deletestring or lindex of on one string a lot like server strings, however one of my favorite part is that only people with NC (hopefully only the admins) will be able to edit it so that you don't get gps who (for some reason) have access to server vars deleting your flags, etc. (very nice).

Saga2001 05-02-2002 09:12 AM

Quote:

Originally posted by Kaimetsu
Um... Actually PastAustin, a couple of those aren't exactly right. For a start, serverside scripts can take playerchats events just fine, and there's no way to directly and exclusively trigger a non-weapon.
Yes, I know, they were just examples...
However I think the point was probably processed...

BBflat 05-04-2002 08:45 AM

Re: Re: Re: Re: Re: help...
 
Quote:

Originally posted by TDO2000

remove the e at the end of 'keine'
at the moment the first word is plural and the second one singular so it would be wrong ;) ;)

I don't want to argue with someone who speaks fluent German, but it was possible Saga2001 thought Problem was feminine. That would explain it, oder?

BBflat 05-04-2002 09:12 PM

Re: Re: Re: Re: Re: Re: Re: help...
 
Quote:

Originally posted by Kaimetsu


Wait, when was I involved in this?

Lol, sorry Kamietsu. My mistake. *Changes to correct name* Es tut mir leid.


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

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