Jump to content
  • 0

Save ID script command


Question

Posted (edited)

Hello guys..

 

May I request a sql command to save Players info into sql table (create new table) after they received items from NPC?

 

Example of SQL table :

 

- Char ID

- Account ID

- Item

- Time

- Date

- Map

 

I'm using eAthena 3ceAM

Edited by uDe

6 answers to this question

Recommended Posts

Posted

/*
CREATE TABLE reward_backup
(
char_id varchar(255),
acc_id varchar(255),
item_id varchar(255),
amount varchar(255),
time varchar(255),
map varchar(255)
);
*/

map,x,y,4	script	reward_backup	111,{

.....
.....
.....
set .@Rew_CharID$,getcharid(0);
set .@Rew_AccID$,getcharid(3);
set .@Rew_ITEM??$;
set .@Rew_ITEMAMOUNT$??;
set .@Rew_Time$,gettimestr("%Y-%m/%d %H:%M:%S",21);
set .@Rew_Map$,getmap??;
query_sql "INSERT INTO `reward_backup` VALUES('"+@Rew_CharID$"','"+@Rew_AccID$+"','"+.@Rew_ITEM?$+"','"+@Rew_ITEMAMOUNT$?$+"','"+.@Rew_Time$+"','"+.@Rew_Map$+"')";
getitem 11111,10;
close;
}

Like this? I want to combine it with my personal WoE Reward script. I'm so sorry for not share the whole WOE Reward Script. I can't do that..

But, I had give some example like above..

Posted

yep, it should work properly. make sure to backup!

I don't know what to use for item, item amount and map variable..

For item, there's 3 different item will be given according the woe day.. Sunday item id is 11111, Wednesday item id is 11112 and Saturday item id is 11113. Amount of item is 1. For map, it should be new_zone02.

Join the conversation

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

Guest
Answer this question...

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