![]() |
Small Script Help! Can't get Statue working
Hey,
bin trying to script for the past days, my gold gonna expire in 1 day so i gotta find a quick way to fix it up... so what shall I do? It used to work but I messed and added the /reset command, not working anymore :/ Thanks Quote:
|
- Didn't even use 'temp.pl' in defining the NPC's looks (example: temp.pl.head)
- Mixing GS1 and GS2 - Nesting another function inside of 'onCreated' for no apparent reason - What exactly are you trying to do? |
Quote:
-I get that alot -I'll try -making it once clicked, the attributes will load as the player's |
Are you using this online or offline? If you're using it online I'll help you with a GS2 version.
|
Quote:
|
PHP Code:
|
PHP Code:
PHP Code:
PHP Code:
Yah no clue what I wrote there so ask me if you didnt understand something Damn Emera was faster but anyway it might help |
Wouldn't you want to be saving them in serverr. variables instead of client variables so they don't change for each player?
|
Quote:
EDIT for John: To have it viewable for everyone you could simply change the client.statue_first to server.statue_first. That should work aswell and would be viewable for everyone. But probably I'd change it to something serverside than and use serverr.flags since they are more secure and not changeable with memory editors. |
Quote:
Edit : oh nvm got it fixed! |
If you save statue settings to serverr flags, Skyld will cleanse your server with flame. Server flags are not appropriate for statues at all... What if 1000 statues were added? >: (
If statues absolutely NEED to keep their outfit even when the level is updated/server is restarted, use files. e.g. this.statuename = "myhouse_statue1" and then when the outfit is set serverside, save all the variables into a file e.g. statues/myhouse_states1.txt In the oncreated event, check if the file exists and if it does, load the values from it. Keep it all serverside and then the server won't have to sync Statue outfits for statues in every single damn level with the player :) |
Quote:
|
Since its a scripting thread, I need help with the variable commands, for example the ec system, I wanted to make it add on each time I want.
Quote:
Quote:
|
Quote:
But, you should take it to the OGCC and not here at this point. |
Quote:
PHP Code:
I doubt you'll be able to understand how to load/save from text files this early on in learning GS2, so here's an example of how to save and load your NPC's configuration to/from a text file. Firstly, you'll have to give your NPC-Server the following right. HTML Code:
rw objects/statues/*.txt PHP Code:
|
All times are GMT. The time now is 01:34 PM. |
Powered by vBulletin/Copyright ©2000 - 2025, vBulletin Solutions Inc.