L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best performance with code in Plugin than Script?
Author Message
rORUMI Offline
Expired VIP Member
**

Posts: 278
Joined: May 2014
Reputation: 50
Version: 1.4.2.142
Post: #1
Best performance with code in Plugin than Script?

Hi, I would really like to know if programs code like plugins perform better than the same code in Script?

If so, basically why the difference?

my Script work great, no dc/critical in party, the only problem i have is if I made a Pause from GUI, and dont stop the script of that char... my screen start to go slow and take all my memory... i go Script GUI, stop all.. and all is fine.
(This post was last modified: 09-14-2014 01:43 AM by rORUMI.)
09-14-2014 01:38 AM
Find all posts by this user Quote this message in a reply
kerberos464 Offline
Bug revealer

Posts: 1,538
Joined: Jun 2012
Reputation: 576
Version: 1.4.3.143
Post: #2
RE: Best performance with code in Plugin than Script?

plugins could trigger actions depending on some conditions, like when char cast skills or when some item drops or mob dies, etc.

about your script, most probably it takes all cpu time because of loop without any pause, add some Sleep to fix it, for example:

before:
    LUA Programming
repeat
...
until false;




after:
    LUA Programming
repeat
...
Sleep(1000);
until false;


Everything is possible. The impossible just takes longer.
09-14-2014 01:49 AM
Visit this user's website Find all posts by this user Quote this message in a reply
rORUMI Offline
Expired VIP Member
**

Posts: 278
Joined: May 2014
Reputation: 50
Version: 1.4.2.142
Post: #3
RE: Best performance with code in Plugin than Script?

But trigger actions by conditions, is lua code, same at plugins like scripts. And any script can be converted to Plugins and viceverse.

And about de Sleep Time, i make 3 functions, to control debug, AntiSpam and UnSleep. Trying to send to a txt file most of action of the script in a txt file and not to the screen to avoid crash the client..

And all codes inside repeat are conditioned by "if not IsPaused() then..."

I think like the screenlag in pause mode come from another part.
(This post was last modified: 09-14-2014 03:04 AM by rORUMI.)
09-14-2014 02:24 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Interlude Augment script/plugin - l2mid anheoo 4 9,620 04-05-2020 10:59 AM
Last Post: icarox3
  Healer Fix plugin problem aa300598 1 3,164 02-20-2016 13:21 PM
Last Post: Vinter
  Craft plugin? aa300598 4 4,121 02-13-2016 11:32 AM
Last Post: TheQQmaster
  help pls time code lucasdrag 4 4,047 11-18-2015 22:33 PM
Last Post: TheQQmaster
WTB WTB SCRIPT OR PLUGIN ON CC khialove 0 1,772 08-26-2015 16:01 PM
Last Post: khialove
  Newbie Buff script/plugin Firemoth 1 3,347 05-22-2015 22:59 PM
Last Post: akimata
  cant see unstuck plugin on /cfg plugins after infinite odysey drake182 0 2,294 05-13-2015 16:23 PM
Last Post: drake182
  script or plugin for speak lord_knox 3 3,421 04-02-2015 23:12 PM
Last Post: fender
Question Help convert time to code itallog 4 3,414 10-27-2014 17:55 PM
Last Post: itallog
  feature for batch script/plugin encryption kerberos464 4 4,524 08-16-2014 23:40 PM
Last Post: kerberos464



User(s) browsing this thread: 1 Guest(s)