Jump to content
Samuel

Samuel's Script Collections

Recommended Posts

Hello, since it's my vacation time, trying to refresh myself with scripting. :)

 

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

 

 

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. :)

*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 :)

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. :)
 

 
  • 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.
 

 
  • 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!
Edited by Samuel

Share this post


Link to post
Share on other sites

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 :)

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.

Edited by AnnieRuru

Share this post


Link to post
Share on other sites

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

Edited by Samuel

Share this post


Link to post
Share on other sites

Added Healer/Buffer/Identifier/Repair NPC in one

 

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.