Putnpc's not saving after reconnect

I think i’ve got saving npcs put on a level via putnpc figured out…

Possible?

Ok the putnpc dropper adds the levelname to a serverflag(if not already there) and sets the itemcount in the level(after putting the npc in the level), so we have something like this
setstring this.level,#L;
setstring server.#s(this.level)_info ,blah;

server.itemlevels=start.nw,items.nw
server.start.nw_itemscount=0
server.start.nw_item_0=item.txt,x,y,otherinfo
(dunno if the .nw in the string will affect anything but possibly can be removed possibly…)

the player has a weapon that checks if in a level that has items in it…
if so then sends a triggeraction to where the item is supposed to be…
if it gets information back it doesnt putnpc and showlocal
if it doesnt it putnpc and showlocal;
… if a player picks up the item it deletes the server.flag containing the item information… deleting it for everyone else
and if a player leaves the level and someone picks it up while gone and the player comes back it will be deleted instantly…(trying to figure out how to do this right now…ugh) <<<<… random numbers given to each item dropped, if the number doesnt match the server flag then it will automatically destroy the npc

it would probably be laggy and cause problems with duplication of items somehow… modem tapping and all that… so yeah
so there would have to be some kind of check to see if the player is responding to the server
… how would that be possible?
hmm

edit:
maybe a server flag that is used as a time keeper(kept in a control level with an account to keep it going)
then the weapon the player has does a timer before dropping the putnpc
this.time = server.time;
sleep 1; (or use a timeout ticker if not wanting to sleep)
if (this.time<=server.time) do not drop…

anyone?

so that would all have to be done manually:bang: and there would be a limited amount of items in each level…

I can script this when i have the time, just wondering if its going to be a waste of time due to lag and stuff(and possibly having too many server.flags ?? i heard classic had a HUGE list of server flags though… )… need some people that know more about how graal works…

it would work… but just how well would it work without bugs/lag is the question?

If you guys think it will work i will try to script it … Just want to hear some advice from people that know more about gserver before starting and getting a headache.

oh yeah and using shoot instead of triggeraction(wouldnt this cause problems?, or just make it more secure actually…)…

Im just thinking outloud, and i share others to think with me… lets figure this out…

n e 1 ?

“this.strings” bind to the player, not the NPC.
So when the player reconnects, poof. “this.string” does not exist as the GServer is told to not save it.

There for, use “client.strings” ;] They save to the player and stay after reconnect. You could also use flags but you can’t edit them.

Aye but in his case, he wants it bound to the NPC, given that there is multiple NPCs.

PutNPC does however add an NPC to the level. If the server crashed/restarted, update level or you have a destroy command in there, would be the only reasons for it not being there.

It took official Graal a while to even get this feature. And even then, I think it only works with putnpc2, which is server-side.

I just made a putnpc that saves and shows for all players…

used with server strings and triggeraction.

the only problem is that there is a maximum amount of items allowed on the server

but it shouldnt be much of a problem

forgot to add the modem tapping fix lol good thing this post was here

i was thinking of an idea of hacking horses in the gserver and making them have a script to them and able to be triggered, dunno if its possible though… im no good at C++ and networking
there could be a horse npc that warps to each level and updates stuff

If we could get a gserver running on Ipod touch that would be the greatest.

Uhm? No! Not worth the effort one bit.