Jump to content

Recommended Posts

Posted

set and get and delete 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


Extra:

Delete from all players a Gepard Variable
gepard_delete("VAR");//delete "VAR" with any index from all players

Delete from all players a Gepard Variable with an index
gepard_delete("VAR",1);//delete "VAR" with index 1 from all players

 

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">}});
//= gepard_delete(<"key">{,<index>});
//============================================================
/*
//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/19
  • Category
  • Video
  • Content Author
    sader1992

 

  • Upvote 1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...