Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   with() problem (https://forums.graalonline.com/forums/showthread.php?t=32915)

Despo1 07-04-2002 04:49 PM

with() problem
 
also i want to read of a db npc and add the worth of the variable to the lokal script also i saw in some scripts:

NPC Code:

with(getnpc(Hat-Shops)){
hatc = strtofloat(#s(this.hatc#v(hatn)));
}



or

NPC Code:

with(getnpc(Hat-Shops)){
setstring server.temp,#s(this.hatc#v(hatn));
}
hatc = strtofloat(#s(server.temp));
setstring server.temp,;


Despo1 07-04-2002 05:29 PM

here a example, this dont work too...

NPC Code:

if (created) {
setimg sign.png;
}
if (playertouchsme) {
with(getnpc(Control-NPC)){
setstring server.temp,#s(this.hat);
}
setstring this.hat,#s(server.temp);
say2
The newest Hat is #s(this.hat);
setstring server.temp,;
}


Falcor 07-04-2002 07:42 PM

1) You dont need to set server flag w/ the with() operator.
2) with() MUST be serverside.
3) You can't call weapons w/ with() (not sure if youo were doing this. but I think you were)

Assumming you DO have an NPCs server..

Despo1 07-06-2002 12:33 AM

i use at my shophats, they use a control npc which i have controll to restock...

Falcor 07-06-2002 01:01 AM

If you would like to store information on a Databased NPC, use THIS. You can set serverstrings in any script that is server-side.

Despo1 07-07-2002 02:27 AM

i know but any serverstring will lagg the server

Python523 07-07-2002 02:43 AM

Quote:

Originally posted by Despo1
i know but any serverstring will lagg the server
just server strings wont loag, constantly calling them might, classic has over 100 server strings/flags and I don't lag much their

Despo1 07-10-2002 03:51 PM

yeah but a server.string foor each hat >=180 also i used the originally script and now i know that but thanxs anyway

Falcor 07-10-2002 05:49 PM

why store server strings when you can use a Database NPC to make a uhm, well, DUH, a Database.

Warcaptain 07-11-2002 02:02 PM

Quote:

Originally posted by Despo1
i know but any serverstring will lagg the server

no
alot of server strings lag a non-npcserver


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

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