Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-15-2013, 02:36 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Script line limit

Is there some kind of script line limit or an amount to stay away from?

For my movement it seems I have to update the weapon twice for it to load at all after login for myself. I haven't had a chance to test with anyone else yet...

I've tried weaponorder=-GUIProfiles,-System/Initialize,-System/Movement

but it seems it didnt make a difference...

Even the timeout doesnt show up unless I update the weapon twice after logging in.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #2  
Old 10-15-2013, 06:34 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
How many lines does the script have? only thing i realized with long scripts has been that it took them longer to update/load (in rc), nothing on the player itself
__________________
MEEP!
Reply With Quote
  #3  
Old 10-15-2013, 09:32 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Sounds like laggy servers or your script aint right.
__________________
Quote:
Reply With Quote
  #4  
Old 10-15-2013, 09:45 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
It's 1092 lines. I've actually noticed my other issue of being invincible:
http://forums.graalonline.com/forums...hp?t=134268833

is linked to this as well, because when I update it to finally show the player chat in the timer, I also finally get hurt... I would think it's lag but thats weird that updating 2 times, no matter how long in between those 2 times, it works.

Also, script was working fine yesterday. I added one thing and just took it out just in case, and it's still happening.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #5  
Old 10-15-2013, 09:47 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
are there any errors showing up when you press f2 and go to scripts?

my guess is that despite what youre doing with the server option weaponorder your movement is attempting to do things before every resource it relies on is initializing

if all else fails try re-adding the movement weapon on login like so:

player.removeweapon("-System/Movement");
player.addweapon("-System/Movement");
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #6  
Old 10-15-2013, 09:54 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I will try that in just a min but even more odd it seems its just me... Decus char showed the chat in timeout right off the bat. I've already copied my player weapons and flags from him amd I have nothing specifically being done to my char account.

Also when this happened the movement sys wasn't in the server opts weapon order at all.... working just fine until last night.

F2 didn't show any errors for movement but ill check again in a sec.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #7  
Old 10-15-2013, 10:22 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
And now it all works? Very strange.........

Sorry guys, no idea what happened I didn't change anything to make it work except taking out disablenpchits = false; in the onCreated(). Guess that was messing something up?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #8  
Old 10-16-2013, 05:06 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by sssssssssss View Post
It's 1092 lines.
I know this is now slightly off topic, but wanted to mention that 1092 lines is fine. I've gone well into the high thousands in the past. SQL Explorer is about 4000, my support center is close to 8000 in the main script.

(your scripts should definitely not be this large, it is a sign of poorly-organized code—and indeed these are examples of that)
__________________
Reply With Quote
  #9  
Old 10-16-2013, 05:48 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
The movement system not even setting the ganis so the movement system isn't loading at all for me, I've recently noticed. Maybe it's just a single issue for myself since Decus' is working perfectly fine, it's just very strange...

Ok so if the first thing I do is echo "started" in oncreated, then echo "joined classes" after joining classes the very next thing, it gets to started, but that's it. I've commented out each line and tested the classes joined to the weapon, but it didnt make any difference on any of them.

If I update twice it still goes through the entire thing and works. Sometimes just once.

The movement weapon still isn't loading upon login for me whatsoever, unless I update it twice (or once sometimes), only for me, not Decus.

I am completely lost on why this is happening at this point...
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #10  
Old 10-16-2013, 10:00 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I ended up having to do this at the beginning of the onCreated function:

PHP Code:
if (!player.run && player.account == "sssssssssss") {
    
scheduleevent(3"Created"null);
  } 
player.run is set in onCreated. If anyone has a better fix up, or an actual reason or solution let me know, that hack is lame to have to do. :/
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #11  
Old 10-16-2013, 10:11 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
why not just call a function to that weapon at the same time player.run is being set in the other weapon script, and only set player.run if the movement weapon object exists, checking every frame?
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #12  
Old 10-17-2013, 02:31 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
player.run is set in the movement script, so I'm not sure what you mean by "at the same time player.run is being set in the other weapon script".

This is all the same weapon with the problem. :/ What's posted works, it's just I shouldn't have to do it at all... if there is a solution that isn't hacky, I'm up for ears, but a better hacky version isn't really in my look.

I don't mean that rude by any means either, and I appreciate the response. I just would rather keep what I put, unless there is an ultimate fix to the server and my player itself, and not some wacky hacky way to make something work that should work automatically, ya know what I mean?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #13  
Old 10-17-2013, 06:59 AM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
unless you show more code this is basically like having to find a needle in a haystack while blindfolded

you did say you were using a clientside player class previously, i remember a problem in the past where classes which were no longer joined to the player clientside were somehow still stuck to the player, it might be worth debugging whatever that class was and if its somehow still doing stuff, try removing it with player.leave("class");
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #14  
Old 10-17-2013, 11:32 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I can let you on if you have gold by chance like I said before so its not as difficult. I don't think its a class I believe is the movement weapon not loading, being that the ganis to replace in the weapon are not being replaced either and literally nothing in the weapon is loading unless I update twice or use the code I posted that I'm using to force it to keep scheduling an event until it all works (see where i talk about the echoes above). Its not the class. Its the movement weapon not loading.

I also have had classes take a day or two to actually update but I know exactly what class it is and its still being joined to I and decus. Its not the class.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #15  
Old 10-17-2013, 05:50 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
sorry!

as you can see from this thread i am choosing to no longer use gold - http://forums.graalonline.com/forums...hp?t=134268836

i dont see the point in being so secretive though because nobody who has to copy code is ever going to make anything successful with it
__________________
This signature has been deleted by Darlene159.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:07 AM.


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