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

Post Reply 
 
Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Screenshot Script Request
Author Message
raid1141 Online
Amber Basilisk
*

Posts: 37
Joined: Mar 2012
Reputation: 18
Version: 1.4.2.142
Post: #1
Screenshot Script Request

Hi guys,

Does any has any ideas on how to create a script that can perform an ingame screenshot (simulate print-screen button hit) when char is under PVP attack?

please, move this topic to the right section.
(This post was last modified: 10-14-2013 18:07 PM by raid1141.)
10-14-2013 18:01 PM
Find all posts by this user Quote this message in a reply
ClockMan Offline
All Mighty
*******

Posts: 2,886
Joined: Jan 2011
Reputation: 499
Version: 1.4.3.143
Post: #2
RE: Screenshot Script Request

you can make a ProcessCommand("/dump"); it will create zip with logs and screenshot

[Image: owner.gif]
10-14-2013 20:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
raid1141 Online
Amber Basilisk
*

Posts: 37
Joined: Mar 2012
Reputation: 18
Version: 1.4.2.142
Post: #3
RE: Screenshot Script Request

(10-14-2013 20:44 PM)ClockMan Wrote:  you can make a ProcessCommand("/dump"); it will create zip with logs and screenshot

Any other more "elegant" way of forcing game print-screen along with the specific configuration that come with the game itself (format, quality)?
10-14-2013 21:30 PM
Find all posts by this user Quote this message in a reply
Sakaszli Offline
I'm too pro to be pro.
*******

Posts: 1,189
Joined: Jan 2011
Reputation: 484
Version: 1.4.2.134.5b
Post: #4
RE: Screenshot Script Request

there is a way, but as i remember only for premium users, they have one function to call any games commands like button click
10-14-2013 22:05 PM
Visit this user's website Find all posts by this user Quote this message in a reply
raid1141 Online
Amber Basilisk
*

Posts: 37
Joined: Mar 2012
Reputation: 18
Version: 1.4.2.142
Post: #5
RE: Screenshot Script Request

(10-14-2013 22:05 PM)C495 Wrote:  there is a way, but as i remember only for premium users, they have one function to call any games commands like button click

I was thinking (by watching user.ini) of something like :

Code:
ClientExec("shot");

, but this aint work for me...
10-14-2013 22:55 PM
Find all posts by this user Quote this message in a reply
Sakaszli Offline
I'm too pro to be pro.
*******

Posts: 1,189
Joined: Jan 2011
Reputation: 484
Version: 1.4.2.134.5b
Post: #6
RE: Screenshot Script Request

it should work, part of client code
    C++ Programming
if ( ParseCommand((const wchar_t **)&a4, L"SHOT") )
 {
 if ( !LODWORD(GIsEditor) )
 {
 FMemMark::FMemMark(&v125, GMem);
 v26 = 4 * *(_DWORD *)(v4 + 92) / 4;
 LODWORD(v127) = v26;
 HIDWORD(a4) = sub_200DA030(4, v26 * *(_DWORD *)(v4 + 96));
 (*(void (__stdcall **)(int, _DWORD))(**(_DWORD **)(v4 + 68) + 172))(v4 - 56, HIDWORD(a4));
 (*(void (__stdcall **)(_DWORD, _DWORD))(*(_DWORD *)GFileManager + 44))(L"../Screenshot", 0);
 for ( j = 0; ; ++j )
 {
 v108 = j;
 if ( j >= 65536 )
 break;
 v78[1] = (const wchar_t *)j;
 v78[0] = L"Screenshot";
 if ( GL2ScreenShotQuality )
 {
 LODWORD(v77) = L"../%s/Shot%05i.jpg";
 v76 = (signed int)&v84;
 }
 else
 {
 LODWORD(v77) = L"../%s/Shot%05i.bmp";
 v76 = (signed int)&v84;
 }

10-15-2013 00:25 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Sakaszli Offline
I'm too pro to be pro.
*******

Posts: 1,189
Joined: Jan 2011
Reputation: 484
Version: 1.4.2.134.5b
Post: #7
RE: Screenshot Script Request

ClientExec is for premium, so you need to write your own program
10-15-2013 00:27 AM
Visit this user's website Find all posts by this user Quote this message in a reply
raid1141 Online
Amber Basilisk
*

Posts: 37
Joined: Mar 2012
Reputation: 18
Version: 1.4.2.142
Post: #8
RE: Screenshot Script Request

The workaround I did was by compiling a code similar to https://bug414049.bugzilla.mozilla.org/a...?id=360710 and run it with os.execute, but still this aint better than ProcessCommand("/dump") + unzip

In the debug dump you have posted I cannot see the actual method that does the screen shot - this only parses the client command "shot" and determines the quality of the image - am I correct?
(This post was last modified: 10-15-2013 09:01 AM by raid1141.)
10-15-2013 08:56 AM
Find all posts by this user Quote this message in a reply
raid1141 Online
Amber Basilisk
*

Posts: 37
Joined: Mar 2012
Reputation: 18
Version: 1.4.2.142
Post: #9
RE: Screenshot Script Request

Okay, just for those who are searching for a solution to force a screenshot within a script or plugin - here is my suggestion:

1. Download this ZIP archive and unzip shot.exe into your l2tower folder. 100% virus free - you can check. If you need more info - let me know and I will share the C++ source.

2. In your script/plugin you can call shot.exe by:

    LUA Programming
-- Place screenshots inside "Temp" folder under L2Tower
local filename = GetDir() .. "temp\\" .. tostring(os.clock());
os.execute(GetDir() .. "shot -pid " .. GetCurrentProcessId() .. " -o" .. filename .. ".png");



Any questions - shoot :-)


Attached File(s)
.zip  shot.zip (Size: 19.59 KB / Downloads: 30)
10-28-2013 15:05 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Request] L2 Toxic Anti-Bot Script snocrew 18 16,087 02-11-2017 19:19 PM
Last Post: Paralyzer
  The request xxmanxx 4 3,323 04-10-2015 18:46 PM
Last Post: xxmanxx
Heart Request for upgrades to Premium services. Manboi_74 0 1,788 09-12-2014 05:33 AM
Last Post: Manboi_74
  OOP Cleanse Script Modification Request nais 2 2,860 08-16-2014 22:12 PM
Last Post: nais
Exclamation How to cancel request to join event TvT chrome 1 2,513 07-02-2014 11:13 AM
Last Post: chrome
  Request kynigos 2 2,609 06-08-2014 13:23 PM
Last Post: kynigos
  problem error: the request was denied mardukx 11 7,017 05-06-2014 04:09 AM
Last Post: mardukx
Information [REQUEST] Auto Augment on INTERLUDE for RUPIO (NOT PUSHKIN) Oren 0 3,025 02-10-2014 23:32 PM
Last Post: Oren
  REQUEST: PK killing script for Wynn Rall 1 2,571 02-05-2014 16:42 PM
Last Post: diegol
  Request scrip/plugin for maestro/artisan/crafter Dobitoken 11 9,490 09-25-2013 10:28 AM
Last Post: Dobitoken



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