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,540
Joined: Jun 2012
Reputation: 576
Version: 1.4.2.142
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
  When you put together the sort of performance that Minnesota Vikings’ defensive end laiyongcai92 0 47 12-20-2018 05:43 AM
Last Post: laiyongcai92
  Interlude Augment script/plugin - l2mid anheoo 3 3,876 02-06-2018 23:49 PM
Last Post: canaldextiger
  Healer Fix plugin problem aa300598 1 949 02-20-2016 13:21 PM
Last Post: Vinter
  Craft plugin? aa300598 4 1,120 02-13-2016 11:32 AM
Last Post: TheQQmaster
  help pls time code lucasdrag 4 1,089 11-18-2015 22:33 PM
Last Post: TheQQmaster
WTB WTB SCRIPT OR PLUGIN ON CC khialove 0 522 08-26-2015 16:01 PM
Last Post: khialove
  Newbie Buff script/plugin Firemoth 1 1,229 05-22-2015 22:59 PM
Last Post: akimata
  cant see unstuck plugin on /cfg plugins after infinite odysey drake182 0 910 05-13-2015 16:23 PM
Last Post: drake182
  script or plugin for speak lord_knox 3 1,132 04-02-2015 23:12 PM
Last Post: fender
Question Help convert time to code itallog 4 1,167 10-27-2014 17:55 PM
Last Post: itallog



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