Samuel's Script Collections

Samuel

New member
Messages
397
Points
0
Discord
Elijah#5798
Github
Samuel23
Emulator
Hello, since it's my vacation time, trying to refresh myself with scripting.
default_smile.png


Here are some of my recent work, will add more probably in the next coming days.
default_biggrin.png


Disclaimer:
You may use, modify and host all my scripts.
You may not sell them, re-release them in any way (modified) or remove credits.
  • Level Up Event

A customizable script for events to happen when a player levels up base/job.

Recommended to be used in low/mid rate servers.
default_smile.png


*Disclaimer:
I just tried using bitwise operator in this script, I really don't know that much with bitmask but I tried the npc and it works well but if someone will guide/correct me with the correct use of the bitwise don't hesitate to tell me
default_smile.png


https://github.com/SamuelHercules/plugins/blob/master/npc/levelup_event.txt

  • Race Event

A customizable script for race event when a player reaches max level in your server.
 
Recommended to be used in low/mid rate servers.
default_smile.png

 
https://github.com/SamuelHercules/plugins/blob/master/npc/race_event.txt
 
  • Floating Rates

This script will allow a gm with level specified in the script to change your server rates depending on how he sets it
with starting day, starting time, ending day and ending time. For now, it just supports base and job exp rates.
 
https://github.com/SamuelHercules/plugins/blob/master/npc/floating_rates.txt
 
  • Bind @go command

This script will allow to customize @go lists via script

Automatically re-arrange ID's via arrangement of town list

Automatically re-creates @go list via arrangement of town list

Credits: @@jTynne

LINK

  • Healer/Buffer/Identifier/Repair NPC in one

A customizable script that includes 4 NPC's in ONE
Healer, Buffer, Identifier and Repair

LINK

 
Have a good day!
 
Last edited by a moderator:
I just tried using bitwise operator in this script, I really don't know that much with bitmask but I tried the npc and it works well but if someone will guide/correct me with the correct use of the bitwise don't hesitate to tell me
default_smile.png
bitshifting << or >> is only use when you want to squeeze all numeric information into 1 single variable
signed int is initialize as -2^31 ~ 2^31-1

so it can save 31 bits

so let's say I want to save player's base level, job level, and job ID in 1 single variable

assume that max base level is 255, max job level is 120, max job ID is Job_Rebellion(4215)

make baselevel use 8 bits = 2^8 (256)

make joblevel use 7 bits = 2^7 (128)

make job ID use 13 bits = 2^13 (8192)

total used = 28 bits, still has some space

and the script looks like this

prontera,155,185,5 script kdsfksdf 1_F_MARIA,{ // save the data as .@data = BaseLevel << 0 | JobLevel << 8 | Class << (8+7); dispbottom "data = "+ .@data; // retrieve the data as dispbottom "baselevel = "+( ( .@data >> 0 ) & ( ( 1 << 8 ) -1 ) ); dispbottom "joblevel = "+( ( .@data >> 8 ) & ( ( 1 << 7 ) -1 ) ); dispbottom "job ID = "+( ( .@data >> (8+7) ) & ( ( 1 << 13 ) -1 ) ); end;}.yeah this stuff is totally useless since we know how to use query_sql

its better to save all these stuff into sql table, because sql has better readability, and website also can list them etc.

 
Last edited by a moderator:
Added Bind @go command script

This script will allow to customize @go lists via script

Automatically re-arrange ID's via arrangement of town list

Automatically re-creates @go list via arrangement of town list

Credits: @@jTynne

 
Last edited by a moderator:
D'aww, thanks for the credit! Your script is absolutely brilliant. Far better than my own. I will definitely recommend it in the future!

 
Added Healer/Buffer/Identifier/Repair NPC in one

A customizable script that includes 4 NPC's in ONE
Healer, Buffer, Identifier and Repair

 
Back
Top