Jump to content

Utility: set and get Variable for Gepard


Recommended Posts


  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

set and get Variable for Gepard


with this you can add a "like" variable that hooked to the unique id that Gepard provide

ofc the script wont work without Gepard Shield

Faster Explanation:

all you need to know if you already know how to script:

TO SET EXAMPLE:

Account Variable in rAthena
EX: #VAR = 10;

Character Variable in rAthena
EX: VAR = 10;

Gepard Variable ? > with this functions
EX: gepard_int_set("VAR",10);

AFTER THE ABOVE THE RESULT WOULD BE>

TO GET EXAMPLE:

Account Variable in rAthena
EX: mes "" + #VAR;// = 10

Character Variable in rAthena
EX: mes "" + VAR;// = 10

Gepard Variable ? > with this functions
EX: mes "" + gepard_int_get("VAR");// = 10

 

Download the test NPCs for more Explanation:

 

Script Header:

//===== rAthena Script =======================================
//= set and get for gepard
//===== By: ==================================================
//= Sader1992
//https://rathena.org/board/profile/30766-sader1992/
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: ===================================== 
//= rAthena Project
//= https://github.com/sader1992/sader_scripts
//===== Description: =========================================                          <<<<<<<  READ ME!
//= YOU MUST RUN THE SQL SCRIPT IN YOUR MAIN SQL FIRST!!!!!
//= you should add this to the end of your 'rathena/npc/other/Global_Functions.txt'
//= gepard_int_get(<"key">,{<index>{,<"unique id">}});
//= gepard_string_get(<"key">,{<index>{,<"unique id">}});
//= gepard_int_set(<"key">,<value>{,<index>{,<"unique id">}});
//= gepard_string_set(<"key">,<"value">{,<index>{,<"unique id">}});
//============================================================
/*
//ADD THIS TO YOUR SQL!

CREATE TABLE IF NOT EXISTS `gepard_reg_num` (
  `unique_id` int(11) unsigned NOT NULL default '0',
  `key` varchar(32) binary NOT NULL default '',
  `index` int(11) unsigned NOT NULL default '0',
  `value` int(11) NOT NULL default '0',
  PRIMARY KEY (`unique_id`,`key`,`index`),
  KEY `unique_id` (`unique_id`)
) ENGINE=MyISAM;

CREATE TABLE IF NOT EXISTS `gepard_reg_str` (
  `unique_id` int(11) unsigned NOT NULL default '0',
  `key` varchar(32) binary NOT NULL default '',
  `index` int(11) unsigned NOT NULL default '0',
  `value` varchar(254) NOT NULL default '0',
  PRIMARY KEY (`unique_id`,`key`,`index`),
  KEY `unique_id` (`unique_id`)
) ENGINE=MyISAM;

*/

 

 


  • Submitter
  • Submitted
    06/16/2019
  • Category
  • Video
  • Content Author
    sader1992

 

  • Upvote 1
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...