Samuel 83 Posted November 11, 2015 (edited) 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. 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. 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 ONEHealer, Buffer, Identifier and Repair LINK Have a good day! Edited January 30, 2016 by Samuel Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted November 13, 2015 (edited) 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 November 13, 2015 by AnnieRuru 1 1 REKT and Samuel reacted to this Quote Share this post Link to post Share on other sites
Samuel 83 Posted January 21, 2016 (edited) 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 January 21, 2016 by Samuel 1 jTynne reacted to this Quote Share this post Link to post Share on other sites
jTynne 101 Posted January 24, 2016 D'aww, thanks for the credit! Your script is absolutely brilliant. Far better than my own. I will definitely recommend it in the future! Quote Share this post Link to post Share on other sites
Samuel 83 Posted January 30, 2016 Added Healer/Buffer/Identifier/Repair NPC in one A customizable script that includes 4 NPC's in ONEHealer, Buffer, Identifier and Repair Quote Share this post Link to post Share on other sites