• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

OTClient Magiceffects and distance effects gifs

Silba

is stephany, the josh wife
Joined
Aug 22, 2013
Messages
436
Solutions
9
Reaction score
349
While you're presumably in early stages might you consider letting the user load in their own custom assets (gif/png/spr?). One of the old spell makers made it possible to import obd i think and assign a shootType or effectId or something to it so the spell maker could use it

Regardless, good luck :)
 

Gesior.pl

Mega Noob&LOL 2012
Senator
Premium User
Joined
Sep 18, 2007
Messages
2,765
Solutions
91
Reaction score
2,787
Location
Poland
GitHub
gesior
I am working on a spell creator for 1.5. Kind of like the old one that was released. Does anyone have gifs for the spell effects?
Export effect images from client .dat and .spr into .png (1 animation frame per image):
Convert exported images into animated .gif:
It generates animations with 5 frames per second. Looks too slow for effects. You can download library and run it on your PC:
Edit this line ( open-tibia-library/index.php at master · gesior/open-tibia-library (https://github.com/gesior/open-tibia-library/blob/master/tools/item-image-frames-to-animated-gif-converter/index.php#L38) ):
PHP:
$converter->convert($gifImagesZipArchivePath);
To:
PHP:
$converter->convert($gifImagesZipArchivePath, 0.1);
To change it to 10 frames per second (0.1 sec interval).
 
OP
OP
Itutorial

Itutorial

Excellent OT User
Joined
Dec 23, 2014
Messages
2,279
Solutions
68
Reaction score
919
While you're presumably in early stages might you consider letting the user load in their own custom assets (gif/png/spr?). One of the old spell makers made it possible to import obd i think and assign a shootType or effectId or something to it so the spell maker could use it

Regardless, good luck :)
It won't require a dat/spr, maybe in the future. I am not the best VB or even coding in general but I can make things happen. You will be able to add your own files if you want as I will release the source code.

Export effect images from client .dat and .spr into .png (1 animation frame per image):
Convert exported images into animated .gif:
It generates animations with 5 frames per second. Looks too slow for effects. You can download library and run it on your PC:
Edit this line ( open-tibia-library/index.php at master · gesior/open-tibia-library (https://github.com/gesior/open-tibia-library/blob/master/tools/item-image-frames-to-animated-gif-converter/index.php#L38) ):
PHP:
$converter->convert($gifImagesZipArchivePath);
To:
PHP:
$converter->convert($gifImagesZipArchivePath, 0.1);
To change it to 10 frames per second (0.1 sec interval).
Any chance you have it for distance effects too?
 

Gesior.pl

Mega Noob&LOL 2012
Senator
Premium User
Joined
Sep 18, 2007
Messages
2,765
Solutions
91
Reaction score
2,787
Location
Poland
GitHub
gesior
Any chance you have it for distance effects too?
Replace this:
Code:
let effectThingType = this.datManager.getEffect(effectId);
with:
Code:
let effectThingType = this.datManager.getMissile(effectId);
and this:
Code:
this.progressValue(effectId, datManager.getCategory(DatThingCategory.ThingCategoryEffect).length);
with:
Code:
this.progressValue(effectId, datManager.getCategory(DatThingCategory.ThingCategoryMissile).length);
recompile TypeScript - step 4 of README - and it will generate distance effects.

EDIT:
I can compile it on monday on my PC and upload to ots.me.
 
Last edited:
OP
OP
Itutorial

Itutorial

Excellent OT User
Joined
Dec 23, 2014
Messages
2,279
Solutions
68
Reaction score
919
Replace this:
Code:
let effectThingType = this.datManager.getEffect(effectId);
with:
Code:
let effectThingType = this.datManager.getMissile(effectId);
and this:
Code:
this.progressValue(effectId, datManager.getCategory(DatThingCategory.ThingCategoryEffect).length);
with:
Code:
this.progressValue(effectId, datManager.getCategory(DatThingCategory.ThingCategoryMissile).length);
recompile TypeScript - step 4 of README - and it will generate distance effects.

EDIT:
I can compile it on monday on my PC and upload to ots.me.
Missed something maybe. I applied that and compiled. Still did magic effects not distance effects
 

Gesior.pl

Mega Noob&LOL 2012
Senator
Premium User
Joined
Sep 18, 2007
Messages
2,765
Solutions
91
Reaction score
2,787
Location
Poland
GitHub
gesior
Missed something maybe. I applied that and compiled. Still did magic effects not distance effects
Looks like there are some other effect related variables. Try to replace every effect with missile and every Effect with Missile. It should work.
 

Gesior.pl

Mega Noob&LOL 2012
Senator
Premium User
Joined
Sep 18, 2007
Messages
2,765
Solutions
91
Reaction score
2,787
Location
Poland
GitHub
gesior
@Gesior.pl 0.0 :) I tried changing all types of stuff still cant get it to work.
Ye. It required one more change in library.
Added missile generator in 0.1.5 version:

Online version:

Generator exports all directions of missile into 1 image (9 directions, no 5 is always empty [self direction?]):
18_9.png

After converting it to gif (using PNG to GIF converter (https://item-images.ots.me/png-to-gif-converter/) ), it looks like that:
18.gif


// Also added configurable frame rate to PNG to GIF converter.
 
OP
OP
Itutorial

Itutorial

Excellent OT User
Joined
Dec 23, 2014
Messages
2,279
Solutions
68
Reaction score
919
Ye. It required one more change in library.
Added missile generator in 0.1.5 version:

Online version:

Generator exports all directions of missile into 1 image (9 directions, no 5 is always empty [self direction?]):
18_9.png

After converting it to gif (using PNG to GIF converter (https://item-images.ots.me/png-to-gif-converter/) ), it looks like that:
18.gif


// Also added configurable frame rate to PNG to GIF converter.
Not joking I messed with everything I could find in all files. Thanks for getting it working.
 

Dip Set

Veteran OT User
Joined
Dec 27, 2007
Messages
376
Solutions
2
Reaction score
329
Gesior is the freakin man, guy is literally spitting master level knowledge every time he posts lol.

I still think thais war pvp bots is probably the most underrated, underutilized release ever. Only problem was the coding is too high level for the average user to parse through it.
 
Top